diff --git a/research/crt-whole-tree-state/NOTICE.md b/research/crt-whole-tree-state/NOTICE.md new file mode 100644 index 0000000000..d2791f07eb --- /dev/null +++ b/research/crt-whole-tree-state/NOTICE.md @@ -0,0 +1,16 @@ +# Attribution and scope notice + +New changing-node controller, proof, exact tariff summation and verification +prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance, +2026. Apache-2.0. + +`workspace.py` retains JoyboyBrian's #6100 implementation and its notice, +with exactly the declared one-line geometry guard change. Numerical/ROM +query and source-update algorithms are imported unchanged from their +authenticated predecessors. All inherited license notices remain +unmodified at their original paths. + +The runtime and proof depend on the source-relative numerical/ROM contracts +named in PROOF.md. AI-assisted verification is not independent human +review or formal-kernel verification. No global multiplication theorem +or selected-frontier update is asserted. diff --git a/research/crt-whole-tree-state/OVERLAP.md b/research/crt-whole-tree-state/OVERLAP.md new file mode 100644 index 0000000000..95cf2d214c --- /dev/null +++ b/research/crt-whole-tree-state/OVERLAP.md @@ -0,0 +1,40 @@ +# Exact scope and overlap record + +Canonical main at assignment: `e54523517d0f03e58352e647c403a5af3e525a57`. +The selected record is #7000/#7001 at kappa `.00363005817`; catalogue +revision 8 still records the older #5599 context. The contextual task +picker reported that discrepancy, and the current selected record was +used for scientific status. + +Initial scope was the actual fast CRT control/payload boundary after +the #6993/#6995 recovery/extraction work. Source inspection showed that +the balanced CRT route is a payload-permutation construction; its +schoolbook control arithmetic and CRT identities were already covered +by #4100/#4377/#4409. No circular-multiplication or algebra result was +claimed from that already resolved question. + +The exact new question is the changing-node/precision ownership and +current-state composition of the actual #6100/#5625 row consumer. +The parent orchestrator approved this narrower source interface before +implementation. + +| Predecessor | Existing result | New boundary here | +| --- | --- | --- | +| #4195 | Logical whole tree and mixed-width rows | Actual physical row providers are composed | +| #5496/#5519 | Physical current-row ROM query and multi-target bank audit | Same query bytes and provider contracts retained | +| #5625 | Paid source update at a fixed node | Complete level/node/row traversal and changing precision | +| #6100 | 118 stable roles at fixed geometry | Same bank across every node plus current-width protected words | +| #5486 | Binary repair in fixed u2/t2/y8 geometry | Neither fixed-key compilation nor replay is repeated | +| #6993/#6995 | Recovery/extraction seams | Motivation only, no hidden runtime dependency | + +Targeted live PR searches on 2026-11-10 for CRT, Benes, 6100, +whole-tree CRT and three-epoch returned the predecessor chain and +explicit unresolved whole-tree/key boundaries. The direct #6100 search +returned #6100 itself; #5625/#6100 README/proof text explicitly excludes +changing-node precision. This was supplemented by canonical research-root +metadata and exact relevant source reads. These bounded searches do not +certify absence of unpublished work or arbitrary text outside coverage. + +The run uses a local allocation manifest because no supported Discussion +mutation connector is available. No placeholder issue or upstream PR was +created. No central priority/status file is altered. diff --git a/research/crt-whole-tree-state/PR-DESCRIPTION.md b/research/crt-whole-tree-state/PR-DESCRIPTION.md new file mode 100644 index 0000000000..f62c3d0f82 --- /dev/null +++ b/research/crt-whole-tree-state/PR-DESCRIPTION.md @@ -0,0 +1,25 @@ +## Change and mathematical scope + +Compose the actual numerical and ROM row pipeline across the **complete balanced CRT state tree**, reusing one physical source and the same 127 owned roles as the node and numerical precision change. This extends the explicit fixed-node boundary of #5625 and #6100. The precise claim is source-relative and covers every admitted dyadic axis count, near-equal declared widths and padded coordinate tuple. **No new kappa.** + +The only copied-workspace change is an authenticated geometry guard. The controller retains the unchanged current-row query and retire-before-source-update consumer. Eight additional owned zero words are physically prepared at each node's exact precision, satisfying the numerical entry contract without treating a previous-width dirty word as a valid current-width word. These eight words contain no header or context. The actual numerical context and ROM headers stay within the inherited 118-role workspace; one additional staging role completes the 127 owned roles. The supplied source is separate, and this is not a total binary-machine tape count. + +The proof sums the actual row-provider bills over the balanced tree, rather than multiplying a worst-node charge by a node count. For address width at most p it gives a loose within-interface source-operation bound `2^34 * 2^(3ell) * (p+2)^8`, and a rolewise historical-storage envelope `O(2^ell p ell^2+p^2)` independent of traversal count. Complete forward/reverse traversal restores every source byte and its entry head. #4195 already proves the CRT algebra and logical order; those results are inherited, not claimed as new. + +## Sources and verification + +Base: `e54523517d0f03e58352e647c403a5af3e525a57`. `SOURCES.json` authenticates all 41 consumed predecessor files and the task-catalogue provenance. The selected conditional kappa `.00363005817` from #7000/#7001 is unchanged. + +```sh +python3.12 -B scripts/research_package.py --package research/crt-whole-tree-state +``` + +Expected marker: `PASS_CRT_WHOLE_TREE_STATE four_axis_rows=30 producer_calls=28 retained=7176 controls=11`. The four-axis fixture executes 30 node-row commands at precisions 7, 5 and 11, with 28 actual unchanged ROM producer calls and **500,394,012 producer instructions**. A second physical fixture checks invalid-left disabling and padded targets. An independent defining CRT formula checks the valid forward endpoint; observer values never enter runtime state. All 127 roles plus source retain 7,176 cells in the changing-precision fixture. + +Eleven controls cover live-owner reentry, premature source mutation, changed global shape, historical-tail contamination, unretired word resizing, the actual predecessor boundary, malformed topology, an omitted subtree, crossed historical capacity peaks and a false geometric-series coefficient found in independent review. 182 exact tariff cases and a separate moment challenge corroborate the quantified proof. Both registered normal and optimized replays passed in 237.070 seconds total. A separate reviewer independently checked 744 invoice/moment domains and nine actual guard growth/shrink lifecycles, and rederived the source-state induction. `VALIDATION.md` records the exact scope and environment; these checks are not formal-kernel acceptance. + +## Limits and credit + +The supplied topology/source boundary remains explicit: complete cost is `T_topology + T_source + T_traversal`. Topology production and its encoded traversal belong to `T_topology`; idle trace entries do not imply cost-free runtime decoding. The source-operation count is not silently converted to binary TM steps. Uniform encoded topology, initial descriptor/axis production, the variable-geometry three-epoch repair key, complete payload routing and the common machine tariff remain open. No whole `analytic_recovery` discharge, unconditional multiplication theorem or selected-frontier change is claimed; all five selected assumptions remain. + +Prepared for **@CubeJerry (Jerry Chen)** with substantial **OpenAI assistance**, including separate model-assisted review. Credit Ali Romman's #5353/#5625 source interfaces; JoyboyBrian's #5053/#5219 numerical lifecycle, #5092 ROM producer, #5496 query and #6100 workspace; commdata2338's #5519 bank audit; ToikY's #4195 caller and #4192 arena; Hiroki KUMAZAKI's current-state lineage; Cinna Davis's #4100 construction; and all retained source notices. The package includes the proof, exact seam, source pins, deterministic receipts and open next questions. diff --git a/research/crt-whole-tree-state/PR-TITLE.txt b/research/crt-whole-tree-state/PR-TITLE.txt new file mode 100644 index 0000000000..a932a52f8d --- /dev/null +++ b/research/crt-whole-tree-state/PR-TITLE.txt @@ -0,0 +1 @@ +Compose the complete balanced CRT state tree across changing precision with 127 stable owned roles (no new kappa) diff --git a/research/crt-whole-tree-state/PROOF.md b/research/crt-whole-tree-state/PROOF.md new file mode 100644 index 0000000000..67d64c0f27 --- /dev/null +++ b/research/crt-whole-tree-state/PROOF.md @@ -0,0 +1,313 @@ +# Changing-node composition of the actual CRT state evaluator + +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance. +Apache-2.0. The independent checks below are mathematical/source checks by +model-assisted agents, not independent human or proof-kernel acceptance. + +## 1. Exact claim and what is inherited + +Let `d >= 2` be a power of two, `ell >= 2`, and let the **declared** widths +`h_i` belong to `{ell-1,ell}`. Let the supplied axis stream contain pairwise +coprime moduli `2 <= s_i < 2^h_i` and arbitrary padded coordinates +`0 <= x_i < 2^h_i`, in the exact tagged representation of #5353. Its owner +permits writes to coordinate bits and no other input fields. The source +shape, width tuple, node/row schedule and fixed ROM program are compiled +metadata; they do not depend on coordinate values. + +**Theorem (source-relative whole-tree composition).** Under the numerical, +ROM, and physical-row contracts inherited from #5053, #5219, #5353, #5092, +#5496, #5519 and #5625, `tree.WholeTree` executes the complete balanced CRT +state permutation of #4195 and its inverse on the **same** physical axis +stream. It uses 127 fixed owned roles: the actual 118-role row workspace, +eight protected-zero numerical roles, and one result staging role. Every +row retires all its private data, and every traversal returns all private +heads and preserves the source metadata. A forward/reverse pair restores +every source byte and its entry head. The retained storage is the sum of +the rolewise historical capacities; it is bounded independently of how +many successful traversals have occurred. + +The supplied source role is additional. This inventory is not a total +fixed tape count for a uniformly encoded machine: topology and external +source generation are still supplied interfaces. The eight added roles +contain only exact-width zeros; they are not header or context storage. +All current numerical context and ROM headers remain in the inherited +118-role workspace. + +This theorem covers changing nodes, changing precision, and shorter uses +after larger historical backing. #6100 explicitly fixes its node and +precision; #5625 explicitly excludes whole-tree changing-precision entry. +Their local theorems are used, not re-proved. The new obligations are the +changing-node ownership seam, current-width protected-word entry, complete +source-state induction, and summation of their actual tariffs. + +This is an **address-state/control evaluator**. It does not move the full +CRT payload. A polynomial or exponential bound on computing an address +key does not by itself provide a fast permutation of all payload records. +The interface receives compiled topology and the supplied axis stream; +their uniform production/encoding cost remains separately named below. +No complete binary transition program, three-epoch compact repair key, +full `E(p,ell)` bit-step theorem, new kappa, or discharge of an entire +selected foundational assumption is claimed. + +## 2. The one changed workspace check + +`workspace.py` is exactly #6100's file except for the one replacement in +`SEAMS.json`. The old guard requires the full tuple +`(widths, ell, level, start)` to equal its previous value. The new guard +requires only `(widths, ell)` to remain fixed. Source/protected alias +checks, single live owner per role, role selection, marker writes, +head returns and complete owner counts are unchanged. The verifier +reconstructs this file byte for byte from the pinned predecessor. + +There is no precision field cached in this workspace. On every invocation, +#5353 reads the current axis records and constructs the unary guide of +length + + P_G = 1 + sum_(i in G) h_i + +for the actual node `G`. The retained numerical template and all padded +streams are rebuilt from that guide. The ROM headers are rebuilt from the +same current guide. Thus allowing a different node changes neither a +numerical value nor a width by fiat. + +The exact role map remains #6100's: 63 numerical roles, 52 ROM/header +roles and three query roles. At a retired boundary the numerical ports +are blank at head one and all other row roles are blank at head zero. +The original paid entry restores the required LEFT marker and head. +For a larger new width the source methods append blank cells only through +their declared local movement/write semantics. For a smaller new width +the older unused tail stays blank. Every valid source instruction reads +the same symbol as it would on a fresh blank tape; no scientific branch +uses retained capacity to choose a value. The source cleanup theorem +clears the current visited extent, and untouched old cells remain blank. +Induction gives valid reentry, stable backing identities and full-history +blankness for every legal node sequence, not just equal-width rows. + +The inherited numerical `Word.step` emulator checks physical bounds. +That observation is not a free numerical oracle: on the valid source +execution the delimiter-driven algorithm remains within its current +constructed extent. Larger retained blank capacity does not change a +successful branch. No malformed-input or failed-initialization rollback +extension is asserted. + +## 3. Protected words really have the new precision + +The #5219 numerical entry asks for eight disjoint dirty words of exactly +the current `P_G` bits. It would be incorrect merely to carry a previous +node's dirty-word extent into that premise. This package instead owns +eight permanent auxiliary roles and uses the admitted zero case of that +contract. + +Before each active row, `ProtectedZeros.prepare(P_G)` writes LEFT, exactly +`P_G` zero cells and RIGHT using single-cell writes and unit moves. It +then returns each head to one. After the row query has retired, +`ProtectedZeros.retire()` uses the existing local `Port.retire` scan to +erase those words and their markers. Their contents are zero on entry, +but their width is exact; no dirty-word theorem is silently generalized. +All eight backings are distinct from the source, staging and 118 row +roles. Their previously longer blank tails are retained and charged. + +The construction requires initial owned blank roles, just as the pinned +row providers do. It does not acquire arbitrary dirty ambient storage. +For one word, preparation and retirement make fewer than 32 local +read/write/move operations per `P_G+2` cells; fewer than 16 finite control +steps occur between them. Therefore `2^12(P_G+2)` is a conservative +source-operation allowance for all eight words. Their initial eight +blank cells are charged positively once. No numeric input is decoded: +`P_G` is a constant in the supplied compiled node. + +All-idle rows are explicit no-ops: the controller calls neither the +numerical provider nor the ROM provider and performs no tape operation. +Their presence in the compiled schedule does not manufacture target bits. +The supplied compiled control may omit those operations entirely; they +remain in the verifier's trace to show the published synchronized order. +Any literal runtime decoding or dispatch of a topology representation is +part of the separately named `T_topology` interface, not a zero-cost +operation inferred from the tape-work trace. + +## 4. Whole-tree source-state induction + +The forward command order is exactly: + +1. balanced levels `j=1,...,log2(d)`; +2. synchronized rows `r=0,...,2ell-2`; +3. aligned nodes of size `2^j`, in increasing starting position. + +At one row, nodes have disjoint coordinate blocks. Each node changes +only its right child and reads only its own left child for its numerical +offsets. Serializing these disjoint node operations therefore realizes +the simultaneous row in #4195. No other node changes its left controls. + +Suppose the supplied stream contains the correct current state before +one active command. The unchanged #5496 query reads those actual cells +and produces the next right-node coordinate slice. #5625 copies that +slice to the separate staging tape, closes the query and ends its source +borrow, then writes the staged coordinate bits into the same source. +No source write occurs while the old numerical/ROM borrow is live. +The modulus fields, width fields, delimiters, exterior coordinates and +source extent are unchanged. Staging and all query roles then retire. + +The resulting padded coordinates remain in `[0,2^h_i)` even when an +intermediate switch visits `x_i >= s_i`. In particular the controller +does not reapply a target-validity test at a micro-row; that would be the +already documented wrong lowering. Left-child invalidity is handled by +the actual numerical producer's inherited disabling rule. + +Section 2 admits the next node's fresh guide and templates; section 3 +admits its fresh exact-width protected words. Induction over every +command therefore gives the whole #4195 padded state permutation. +For globally valid input this is the already proved CRT map: if +`P_i=product_(k= 2`, the balanced near-equal widths give `d(ell-1)<=p`. +At level `j`, `n=2^j` and there are exactly `d/n` nodes. Consequently + + sum_G (P_G+2)^4 < (8/7)(ell+3)^4 d^4 <= 715p^4, + sum_G (P_G+2)^2 < 2(ell+2)^2 d^2 <= 32p^2, + sum_G P_G^2 (n_G/2) < (2/3)(ell+1)^2 d^3 <= 6p^3, + sum_G (n_G+1)(P_G+2) < 3(ell+3)d^2 <= 15p^2. (2) + +For example the first line follows by summing +`d(ell+3)^4 sum_(j=1)^k 2^(3j)`; it is not a max-node bound repeated +`d-1` times. For the second line, `n>=2` gives +`P_G+2<=n(ell+2)`, and `sum_(j=1)^k 2^j=2d-2<2d`. +The last inequalities use `(ell+3)/(ell-1)<=5`, +`(ell+2)/(ell-1)<=4` and `(ell+1)/(ell-1)<=3`, together with +`ell-1>=1`. All four are quantified geometric sums. + +There are at most `2ell-1 < 2p` rows per node, `M <= 8p`, and at most +`p` nodes. For `h>=1`, the axis summand in `F` is exactly +`3h 2^h+3h+5`; its `4096` multiple is below the corresponding +`E_ROM` allowance. Also `2^ell+1 <= (5/4)2^ell` for `ell>=2`. +Substituting (2) into (1) gives the deliberately loose explicit majorant + + T_traversal <= 2^34 * 2^(3ell) * (p+2)^8. (3) + +To check the constant without empirical timing: the entry quartics +contribute less than `2^31 p^5`, the entry quadratics less than +`2^23 p^3`, and the remaining non-ROM terms less than `2^20 p^3`. +The complete ROM sum is at most +`48*10^6 2^(3ell) p^4(p+1)^4`; a second copy covers the axis summands +just absorbed from `F`. These are jointly below (3), including the eight +initial cells. For `p>=14`, + + 2^34 * 2^(3ell) * (p+2)^8 + <= 2^(4ell) * (p+2)^16, (4) + +because `2^ell(p+2)^8 >= 4*16^8 = 2^34`. + +Equations (3)-(4) show that summing these actual row-provider allowances +does not introduce a new power that already exceeds the published +`E(p,ell)` shape. They do **not** identify the source-operation unit +with the bit-step unit of #4377, nor close topology setup, initial source +serialization, variable-geometry key transport or payload routing. If +those supplied interfaces, including topology production and its encoded +traversal, have costs `T_topology` and `T_source`, the +complete call is `T_topology + T_source + T_traversal`, not just (3). +Those two terms are not silently set to zero. The source-relative +composition and (1) are the new claims; a global evaluator admission +still has named remaining obligations. + +## 6. Historical storage across every node + +Let `P*=A+1`, `H=ell`, and `S*=2+A+d`. Define the inherited complete ROM +bank bound + + B(P,H)=5P 2^H(H^2+3H+1)+2^H(4H-1)+48P+2H+104. + +For each role use its own monotone upper bound at `P*`, `H` and `d`: +58 numerical word/template/guide roles each use at most `P*+2` cells; +five numerical stream roles each use at most `d(2P*+4)+2`; each of +52 ROM roles is bounded by `B(P*,H)`; two query roles use `H+2` each; +the query output and staging each use `S*`. The eight new protected +roles each use at most `P*+2`. Including the supplied source itself, +a complete upper envelope is + + M + 2S* + 8(P*+2) + 58(P*+2) + + 5[d(2P*+4)+2] + 52B(P*,H) + 2(H+2). (5) + +Using a complete-bank bound separately on every ROM role is loose but +safe. No claim that one node simultaneously realizes every maximum is +needed. Actual retained capacity is exactly the sum of each distinct +backing's historical capacity. It is never replaced by the largest +standalone node total. Initial source/owned blank extents and every +retired role remain included. The bound is +`O(2^ell p ell^2+p^2)` under `A<=p`, independent of traversal count. +Compiled topology storage and any external source-generation workspace +remain outside the named 127 owned data roles and must be added at that +separate boundary. + +## 7. Evidence and remaining obligations + +The actual four-axis fixture uses moduli `(5,7,3,2)`, widths `(3,3,2,2)` +and initial state `(3,2,1,1)`. It traverses all 15 forward commands and +their complete reverse, changing numerical precision among 7, 5 and 11 +on the same role bank. The forward endpoint `(3,4,0,1)` is also checked +against an independently implemented defining CRT formula. A second +actual fixture checks invalid-left disabling and padded target values. +The receipt records every actual provider call, stable identity, +per-role retained extent, source update, complete row allowance and +observed source traffic. Finite values corroborate the proof; they do +not extrapolate all widths from the sample. + +Negative controls detect live reentry, source mutation before close, +changed global shape, a stale retired tail, unretired protected-word +resize, the predecessor's actual next-node rejection, invalid shape, +an omitted subtree, max-of-totals storage, and the rejected `4/3` +quadratic geometric coefficient found during independent review. The +old fixed-node check +is not a bug in its declared domain; it is the precise boundary extended. + +The next useful steps are a charged encoded topology/source producer, +and the variable-geometry three-epoch exceptional key with the actual +current-state conversions. The full payload stage, ordinary interchange, +precision/native supplier and outer multiplication assembly remain +external. The current selected kappa remains `.00363005817` under its +five retained assumptions. No selected-source file is changed. diff --git a/research/crt-whole-tree-state/README.md b/research/crt-whole-tree-state/README.md new file mode 100644 index 0000000000..332b637fb2 --- /dev/null +++ b/research/crt-whole-tree-state/README.md @@ -0,0 +1,138 @@ +# Complete balanced CRT state traversal with changing node precision + +The actual numerical/ROM row pipeline now runs the whole balanced CRT +state tree on one source tape, using the same owned backing as its node +and precision change. This closes the changing-node composition left +explicitly outside [#5625](https://github.com/CrocSwap/integer-mult-bounds/pull/5625) +and [#6100](https://github.com/CrocSwap/integer-mult-bounds/pull/6100). +The contribution is a source-relative construction and quantified proof; +**no new kappa or full foundational-assumption discharge is claimed**. + +The controller reuses the exact 118-role #6100 workspace and the unchanged +#5496 physical query. Eight additional owned zero words are physically +prepared and retired at the actual node precision, satisfying the original +numerical entry's width premise. One staging role keeps the original +retire-before-source-update order. There are 127 owned backing roles in +total, and every older retained tail remains counted after erasure. +The source is a separate supplied role. This is not a whole-machine tape +count: topology/control and source-generation storage remain separate. + +## Exact result + +[PROOF.md](PROOF.md) covers every power-of-two axis count, declared widths +`h_i in {ell-1,ell}`, pairwise-coprime admitted moduli, and every padded +coordinate tuple. Complete forward and reverse traversals use the same +physical source, retain all non-coordinate fields, and return every owned +role blank at its specified head. The only predecessor workspace change +is the authenticated geometry guard in [SEAMS.json](SEAMS.json). + +The complete within-interface time is the **sum** of the inherited row +bills, with paid changing-precision word preparation. Geometric summation +gives the deliberately loose source-operation bound + +`T <= 2^34 * 2^(3ell) * (p+2)^8` when `sum h_i <= p`. + +At `p>=14` this is below the published `2^(4ell)(p+2)^16` envelope shape. +This does not identify source operations with binary TM steps. Compiled +topology production and encoded traversal, source production, the +variable-geometry exceptional key and +payload routing still have to be supplied and charged at their own +interfaces. A fast numerical address evaluator is not a fast permutation +of all payload records. + +The retained-work envelope is `O(2^ell p ell^2+p^2)` and is independent of +the number of successful traversals. It bounds each role's historical +maximum separately, including the eight current-width numerical words +and the complete source/staging extents. + +## Executed evidence + +[RESULT.json](RESULT.json) freezes the exact deterministic observations: + +- A complete four-axis forward/reverse traversal executes 30 node-row + commands at precisions 7, 5 and 11, using 28 actual unchanged ROM + producer calls and 500,394,012 producer instructions. The valid forward + endpoint `(3,4,0,1)` also matches a separately implemented defining CRT + formula. All source bytes return after reverse traversal. +- The same 127 owned roles plus source retain 7,176 finite-symbol tape + cells. Larger and smaller numerical/ROM histories occur in one run. +- A second actual fixture exercises invalid-left disabling and padded + target coordinates. All 40 executed node-row commands preserve their + declared entry/retirement contracts. +- Eleven controls detect live-owner reentry, premature source mutation, + changed global shape, stale retired tails, unretired word resizing, + the old fixed-node boundary, invalid topology, an omitted subtree, and + max-of-totals storage and a false geometric-series coefficient caught + during independent review. 182 exact tariff cases corroborate the written + geometric summation; they are not an all-parameter proof by testing. + +The complete physical query, numerical arithmetic and ROM producer run; +the verifier's oracle supplies no runtime coordinate, table or branch. +Initial fixture serialization is explicit and occurs once per source. + +## Reproduce + +Python 3.12, standard library only, from repository root: + +```sh +python3.12 -B scripts/research_package.py --package research/crt-whole-tree-state --check-only +python3.12 -B scripts/research_package.py --package research/crt-whole-tree-state +``` + +The registered normal and optimized runs each have a 300-second limit and +compare the same frozen receipt. Direct `verify.py` is read-only unless +`--write-result` is requested. The expected marker is +`PASS_CRT_WHOLE_TREE_STATE four_axis_rows=30 producer_calls=28 retained=7176 controls=11`. +[VALIDATION.md](VALIDATION.md) records actual executed checks and limits. +The separate [independent review](independent-review/REVIEW.md) includes +its own read-only tariff, source-seam and protected-word lifecycle checker; +it runs as the third registered command with a 30-second limit. + +## Novelty, source pins and limits + +Canonical base: `e54523517d0f03e58352e647c403a5af3e525a57`, selected +conditional kappa `.00363005817` from #7000/#7001. [SOURCES.json](SOURCES.json) +pins all 41 consumed predecessor files by SHA256 and Git blob. No frozen +predecessor or selected record is changed. The overlap review is in +[OVERLAP.md](OVERLAP.md). + +#4195 already supplies CRT algebra, mixed-width synchronized rows and +whole-tree logical order. #5625 already installs a current row into its +same source. #6100 already reuses the actual row roles at one fixed node. +The new result composes that actual pipeline across all nodes and their +different precision while preserving its exact entry premises and paying +the whole tree. No generic historical-max identity or CRT algebra is +claimed as new. + +The supplied topology is compiled data. A uniform binary topology +controller, initial descriptor/axis production, the three-epoch repair +key, actual payload layer, ordinary interchange, numerical/global +precision and the complete outer assembly remain separate obligations. +The predecessor numerical and ROM theorems remain inherited hypotheses. +No full multiplier, selected cold replay, Lean, Docker, independent human +review or formal-kernel acceptance is claimed. + +## Open next questions + +1. Produce and traverse the compiled level/node/row schedule from encoded + geometry on fixed tapes, charging setup and metadata storage. Start + with the precise `commands` order and the existing node entry ABI. + This removes the supplied-topology boundary left by the present theorem. +2. Bind the variable-geometry three-epoch exceptional key to actual + current-coordinate records, including their transport, role lifetimes + and bit-step conversion. Whole-tree state composition does not itself + instantiate the compact macro's three different epochs. +3. Connect a complete payload consumer using the same cost units and + full fiber. The ordinary interchange and sparse repair premises + remain blocking interfaces. + +## Credit + +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance. +Apache-2.0. Retain Ali Romman's #5353/#5625 row entry and source update; +JoyboyBrian's #5053/#5219 numerical lifecycle, #5092 ROM producer, +#5496 query and #6100 stable workspace; commdata2338's #5519 bank audit; +ToikY's #4195 mixed caller and #4192 arena work; Hiroki KUMAZAKI's +current-state/placement lineage; Cinna Davis's #4100 CRT construction; +and all pinned notices for Tekalign, Jose Manuel, Ryanson Jonathan, +unpaidmoon, Douglas Colkitt, John-Michael Smith and earlier contributors. diff --git a/research/crt-whole-tree-state/RESULT.json b/research/crt-whole-tree-state/RESULT.json new file mode 100644 index 0000000000..209b0ce1e0 --- /dev/null +++ b/research/crt-whole-tree-state/RESULT.json @@ -0,0 +1,1479 @@ +{ + "status": "PASS_CRT_WHOLE_TREE_STATE", + "source_count": 41, + "fixtures": [ + { + "name": "four_axis_changing_precision", + "moduli": [ + 5, + 7, + 3, + 2 + ], + "widths": [ + 3, + 3, + 2, + 2 + ], + "initial": [ + 3, + 2, + 1, + 1 + ], + "forward": [ + 3, + 4, + 0, + 1 + ], + "trace": [ + { + "command": [ + 1, + 0, + 0 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 7, + "actions": 42885539, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811358, + "retained_workspace_cells": 6473, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 2, + 0 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 5, + "actions": 2400101, + "allowance": 508771521522, + "producer_calls": 1, + "producer_instructions": 2363816, + "retained_workspace_cells": 6473, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 0, + 1 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 7, + "actions": 42885496, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811359, + "retained_workspace_cells": 6473, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 2, + 1 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 5, + "actions": 2400105, + "allowance": 508771521522, + "producer_calls": 1, + "producer_instructions": 2363817, + "retained_workspace_cells": 6473, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 0, + 2 + ], + "state": [ + 3, + 6, + 1, + 1 + ], + "precision": 7, + "actions": 42885503, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811363, + "retained_workspace_cells": 6473, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 2, + 2 + ], + "state": [ + 3, + 6, + 1, + 1 + ], + "precision": 5, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 6473, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 0, + 3 + ], + "state": [ + 3, + 4, + 1, + 1 + ], + "precision": 7, + "actions": 42885853, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811364, + "retained_workspace_cells": 6474, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 2, + 3 + ], + "state": [ + 3, + 4, + 1, + 1 + ], + "precision": 5, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 6474, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 0, + 4 + ], + "state": [ + 3, + 4, + 1, + 1 + ], + "precision": 7, + "actions": 42885567, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811363, + "retained_workspace_cells": 6474, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 1, + 2, + 4 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 5, + "actions": 2400102, + "allowance": 508771521522, + "producer_calls": 1, + "producer_instructions": 2363817, + "retained_workspace_cells": 6474, + "guard_cells": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ] + }, + { + "command": [ + 2, + 0, + 0 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 9944261, + "allowance": 4930460495474, + "producer_calls": 2, + "producer_instructions": 9682915, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 1 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 9944269, + "allowance": 4930460495474, + "producer_calls": 2, + "producer_instructions": 9682917, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 2 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 3 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 4 + ], + "state": [ + 3, + 4, + 0, + 1 + ], + "precision": 11, + "actions": 9944263, + "allowance": 4930460495474, + "producer_calls": 2, + "producer_instructions": 9682917, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 4 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 9944263, + "allowance": 4930460495474, + "producer_calls": 2, + "producer_instructions": 9682917, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 3 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 2 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 1 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 9944269, + "allowance": 4930460495474, + "producer_calls": 2, + "producer_instructions": 9682917, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 2, + 0, + 0 + ], + "state": [ + 3, + 4, + 1, + 0 + ], + "precision": 11, + "actions": 9944261, + "allowance": 4930460495474, + "producer_calls": 2, + "producer_instructions": 9682915, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 2, + 4 + ], + "state": [ + 3, + 4, + 1, + 1 + ], + "precision": 5, + "actions": 2399914, + "allowance": 508771521522, + "producer_calls": 1, + "producer_instructions": 2363817, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 0, + 4 + ], + "state": [ + 3, + 4, + 1, + 1 + ], + "precision": 7, + "actions": 42885567, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811363, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 2, + 3 + ], + "state": [ + 3, + 4, + 1, + 1 + ], + "precision": 5, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 0, + 3 + ], + "state": [ + 3, + 6, + 1, + 1 + ], + "precision": 7, + "actions": 42885571, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811364, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 2, + 2 + ], + "state": [ + 3, + 6, + 1, + 1 + ], + "precision": 5, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 0, + 2 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 7, + "actions": 42885855, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811363, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 2, + 1 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 5, + "actions": 2400105, + "allowance": 508771521522, + "producer_calls": 1, + "producer_instructions": 2363817, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 0, + 1 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 7, + "actions": 42885496, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811359, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 2, + 0 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 5, + "actions": 2400101, + "allowance": 508771521522, + "producer_calls": 1, + "producer_instructions": 2363816, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + }, + { + "command": [ + 1, + 0, + 0 + ], + "state": [ + 3, + 2, + 1, + 1 + ], + "precision": 7, + "actions": 42885492, + "allowance": 18296037940850, + "producer_calls": 1, + "producer_instructions": 42811358, + "retained_workspace_cells": 7016, + "guard_cells": [ + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 13 + ] + } + ], + "row_events": 30, + "active_rows": 22, + "producer_calls": 28, + "retained_total": 7176, + "retained_bound": 473950, + "high_water": { + "numeric.guide": 12, + "numeric.canonical_left": 21, + "numeric.canonical_right": 16, + "numeric.word.8": 13, + "numeric.word.9": 13, + "numeric.word.10": 13, + "numeric.word.11": 13, + "numeric.word.12": 13, + "numeric.word.13": 13, + "numeric.word.14": 13, + "numeric.word.15": 13, + "numeric.word.16": 13, + "numeric.word.17": 13, + "numeric.word.18": 13, + "numeric.word.19": 13, + "numeric.word.20": 13, + "numeric.word.21": 13, + "numeric.word.22": 13, + "numeric.word.23": 13, + "numeric.word.24": 13, + "numeric.word.25": 13, + "numeric.word.26": 13, + "numeric.word.27": 13, + "numeric.word.28": 13, + "numeric.word.29": 13, + "numeric.word.30": 13, + "numeric.word.31": 13, + "numeric.word.32": 13, + "numeric.word.33": 13, + "numeric.word.34": 13, + "numeric.word.35": 13, + "numeric.word.36": 13, + "numeric.word.37": 13, + "numeric.word.38": 13, + "numeric.word.39": 13, + "numeric.word.40": 13, + "numeric.word.41": 13, + "numeric.word.42": 13, + "numeric.word.43": 13, + "numeric.word.44": 13, + "numeric.word.45": 13, + "numeric.word.46": 13, + "numeric.word.47": 13, + "numeric.word.48": 13, + "numeric.word.49": 13, + "numeric.word.50": 13, + "numeric.word.51": 13, + "numeric.word.52": 13, + "numeric.word.53": 13, + "numeric.word.54": 13, + "numeric.word.55": 13, + "numeric.word.56": 13, + "numeric.word.57": 13, + "numeric.word.58": 13, + "numeric.word.59": 13, + "numeric.word.60": 13, + "numeric.word.61": 13, + "numeric.word.62": 13, + "numeric.word.63": 13, + "numeric.template": 13, + "numeric.padded_left": 54, + "numeric.padded_right": 54, + "numeric.output": 54, + "rom.h": 13, + "rom.modulus": 13, + "rom.selected_layer": 13, + "rom.offsets": 14, + "query.coordinate": 5, + "query.countdown": 5, + "query.output": 8, + "rom.zero": 13, + "rom.one": 13, + "rom.two": 13, + "rom.root": 13, + "rom.n": 13, + "rom.remaining": 13, + "rom.depth": 13, + "rom.height": 13, + "rom.low": 13, + "rom.high": 13, + "rom.size": 13, + "rom.cur_node": 13, + "rom.init_kind": 13, + "rom.init_layer": 13, + "rom.init_index": 13, + "rom.init_value": 13, + "rom.limit": 13, + "rom.xloop": 13, + "rom.yloop": 13, + "rom.px": 13, + "rom.py": 13, + "rom.node": 13, + "rom.kind": 13, + "rom.layer": 13, + "rom.index": 13, + "rom.value": 13, + "rom.x": 13, + "rom.other": 13, + "rom.opposite": 13, + "rom.color": 13, + "rom.initial": 13, + "rom.top": 13, + "rom.off": 13, + "rom.permuted": 13, + "rom.addition": 13, + "rom.child": 13, + "rom.child_index": 13, + "rom.inverse": 13, + "rom.last": 13, + "rom.outlayer": 13, + "rom.layloop": 13, + "rom.layers_count": 13, + "rom.column": 13, + "rom.check": 13, + "rom.arena": 5322, + "rom.spool": 42, + "rom.layers": 47, + "rom.rom": 10 + }, + "source_initializations": 1 + }, + { + "name": "invalid_left_padding", + "moduli": [ + 7, + 3 + ], + "widths": [ + 3, + 2 + ], + "initial": [ + 7, + 3 + ], + "forward": [ + 7, + 3 + ], + "trace": [ + { + "command": [ + 1, + 0, + 0 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 2820351, + "allowance": 733299666034, + "producer_calls": 1, + "producer_instructions": 2776286, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 1 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 2820308, + "allowance": 733299666034, + "producer_calls": 1, + "producer_instructions": 2776287, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 2 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 3 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 4 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 2820305, + "allowance": 733299666034, + "producer_calls": 1, + "producer_instructions": 2776287, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 4 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 2820305, + "allowance": 733299666034, + "producer_calls": 1, + "producer_instructions": 2776287, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 3 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 2 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 0, + "allowance": 0, + "producer_calls": 0, + "producer_instructions": 0, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 1 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 2820308, + "allowance": 733299666034, + "producer_calls": 1, + "producer_instructions": 2776287, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + }, + { + "command": [ + 1, + 0, + 0 + ], + "state": [ + 7, + 3 + ], + "precision": 6, + "actions": 2820304, + "allowance": 733299666034, + "producer_calls": 1, + "producer_instructions": 2776286, + "retained_workspace_cells": 2296, + "guard_cells": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ] + } + ], + "row_events": 10, + "active_rows": 6, + "producer_calls": 6, + "retained_total": 2390, + "retained_bound": 263143, + "high_water": { + "numeric.guide": 7, + "numeric.canonical_left": 12, + "numeric.canonical_right": 10, + "numeric.word.8": 8, + "numeric.word.9": 8, + "numeric.word.10": 8, + "numeric.word.11": 8, + "numeric.word.12": 8, + "numeric.word.13": 8, + "numeric.word.14": 8, + "numeric.word.15": 8, + "numeric.word.16": 8, + "numeric.word.17": 8, + "numeric.word.18": 8, + "numeric.word.19": 8, + "numeric.word.20": 8, + "numeric.word.21": 8, + "numeric.word.22": 8, + "numeric.word.23": 8, + "numeric.word.24": 8, + "numeric.word.25": 8, + "numeric.word.26": 8, + "numeric.word.27": 8, + "numeric.word.28": 8, + "numeric.word.29": 8, + "numeric.word.30": 8, + "numeric.word.31": 8, + "numeric.word.32": 8, + "numeric.word.33": 8, + "numeric.word.34": 8, + "numeric.word.35": 8, + "numeric.word.36": 8, + "numeric.word.37": 8, + "numeric.word.38": 8, + "numeric.word.39": 8, + "numeric.word.40": 8, + "numeric.word.41": 8, + "numeric.word.42": 8, + "numeric.word.43": 8, + "numeric.word.44": 8, + "numeric.word.45": 8, + "numeric.word.46": 8, + "numeric.word.47": 8, + "numeric.word.48": 8, + "numeric.word.49": 8, + "numeric.word.50": 8, + "numeric.word.51": 8, + "numeric.word.52": 8, + "numeric.word.53": 8, + "numeric.word.54": 8, + "numeric.word.55": 8, + "numeric.word.56": 8, + "numeric.word.57": 8, + "numeric.word.58": 8, + "numeric.word.59": 8, + "numeric.word.60": 8, + "numeric.word.61": 8, + "numeric.word.62": 8, + "numeric.word.63": 8, + "numeric.template": 8, + "numeric.padded_left": 18, + "numeric.padded_right": 18, + "numeric.output": 18, + "rom.h": 8, + "rom.modulus": 8, + "rom.selected_layer": 8, + "rom.offsets": 9, + "query.coordinate": 4, + "query.countdown": 4, + "query.output": 5, + "rom.zero": 8, + "rom.one": 8, + "rom.two": 8, + "rom.root": 8, + "rom.n": 8, + "rom.remaining": 8, + "rom.depth": 8, + "rom.height": 8, + "rom.low": 8, + "rom.high": 8, + "rom.size": 8, + "rom.cur_node": 8, + "rom.init_kind": 8, + "rom.init_layer": 8, + "rom.init_index": 8, + "rom.init_value": 8, + "rom.limit": 8, + "rom.xloop": 8, + "rom.yloop": 8, + "rom.px": 8, + "rom.py": 8, + "rom.node": 8, + "rom.kind": 8, + "rom.layer": 8, + "rom.index": 8, + "rom.value": 8, + "rom.x": 8, + "rom.other": 8, + "rom.opposite": 8, + "rom.color": 8, + "rom.initial": 8, + "rom.top": 8, + "rom.off": 8, + "rom.permuted": 8, + "rom.addition": 8, + "rom.child": 8, + "rom.child_index": 8, + "rom.inverse": 8, + "rom.last": 8, + "rom.outlayer": 8, + "rom.layloop": 8, + "rom.layers_count": 8, + "rom.column": 8, + "rom.check": 8, + "rom.arena": 1322, + "rom.spool": 14, + "rom.layers": 17, + "rom.rom": 6 + }, + "source_initializations": 1 + } + ], + "geometric_budget": { + "cases": 182, + "worst_ratio_numerator": 22919227170243838, + "worst_ratio_denominator": 1208925819614629174706176, + "independent_moment_challenge": { + "ell": 20, + "d": 16, + "moments": [ + 12513547455, + 199815, + 1097632, + 11117 + ] + } + }, + "negative_controls": [ + "live_query_reentry", + "source_write_before_close", + "changed_global_shape", + "stale_historical_tail", + "unretired_guard_resize", + "predecessor_rejects_next_node", + "non_dyadic_shape", + "invalid_declared_width", + "omitted_subtree_endpoint", + "max_of_totals_storage", + "quadratic_geometric_ratio" + ], + "fixed_owned_roles": 127, + "source_relative": true, + "kappa_change": null +} diff --git a/research/crt-whole-tree-state/SEAMS.json b/research/crt-whole-tree-state/SEAMS.json new file mode 100644 index 0000000000..e7b8c502ae --- /dev/null +++ b/research/crt-whole-tree-state/SEAMS.json @@ -0,0 +1,6 @@ +{ + "source": "research/crt-stable-row-workspace/workspace.py", + "replacements": { + "need(self.geometry in (None, geometry), 'fixed-node geometry')": "need(self.geometry is None or self.geometry[:2] == geometry[:2], 'fixed whole-tree shape')" + } +} diff --git a/research/crt-whole-tree-state/SOURCES.json b/research/crt-whole-tree-state/SOURCES.json new file mode 100644 index 0000000000..36e49933e1 --- /dev/null +++ b/research/crt-whole-tree-state/SOURCES.json @@ -0,0 +1,258 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "research/crt-current-row-query/PROOF.md", + "usage": "input", + "sha256": "6aaa6253bf5f64f07cbfbf0a98a7c464e5a78cfa05c398f7eb41a27f03a7379c", + "git_blob": "0449d47c5027b4b5a6b6b5b2a87219069d4ad91c" + }, + { + "path": "research/crt-current-row-query/SOURCES.json", + "usage": "input", + "sha256": "39c9b9b9e530a93da6aaf7f02a6884882cdaca778767d9fa06c4a42d2cf6a47a", + "git_blob": "56ddb1dafd73ddac3e0a4f0a64f9e0455fad6f85" + }, + { + "path": "research/crt-current-row-query/join.py", + "usage": "input", + "sha256": "11c9ac1175a45edae80869b22c041e31a1b5cc75f4389ec2e073de37e547bf35", + "git_blob": "676582b4a376db375237ec52df84a3ddaf231827" + }, + { + "path": "research/crt-dense-guard-scan/machine.py", + "usage": "input", + "sha256": "1cb27312932914eb631078bd56e85feb1dc6c4191e9d1962b2cc3a7e1cfb8df7", + "git_blob": "ce763898bd7b4401bbab818c640a0593b65c9a82" + }, + { + "path": "research/crt-encoded-benes-rom-producer/PROOF.md", + "usage": "input", + "sha256": "93bd340ac9b77f8f781926aeb7327325789b331863b3088fed1809eefb789bd2", + "git_blob": "cdd530c668254558bb1ef8a6c6af9a5660f8f9c2" + }, + { + "path": "research/crt-encoded-benes-rom-producer/SOURCES.json", + "usage": "input", + "sha256": "527b3a3a2996c24462b7f81f0e37c86fb315f8401026f2e19e46bb5bc55bffce", + "git_blob": "ea930342bb19c3f87839990d2e91ce6e4fb06654" + }, + { + "path": "research/crt-encoded-benes-rom-producer/microcode.py", + "usage": "input", + "sha256": "d4af5350854a87b67484840800b94e1e53cff82c78ec0f2a91753fed9ea70af7", + "git_blob": "052b01a83bc910c176b83a012b9f46f0e9525b9d" + }, + { + "path": "research/crt-encoded-benes-rom-producer/vendor/pr4192-NOTICE.md", + "usage": "input", + "sha256": "b886589be7c8b87bcf12b14ce4db6827299b7cec93836ed22cff81aed37623dc", + "git_blob": "6ca47019de7e58edf93c4278a6a8251625d37477" + }, + { + "path": "research/crt-encoded-benes-rom-producer/vendor/pr4192-PROOF.md", + "usage": "input", + "sha256": "c3eb4e14dc5ee0102cbf77c4a0e61db9989c2b8a0eaf7f0659a6e39373197474", + "git_blob": "af1ea10b9d2b117d150ec7bddfb81e681172cdb4" + }, + { + "path": "research/crt-encoded-benes-rom-producer/vendor/pr4192-verify.py", + "usage": "input", + "sha256": "e8ff7800ffa267d2825009656b78ab1613544b55301982744ec0d99f38800913", + "git_blob": "e79a9ce3f38f78031310acd9e384fd4010ce8ca8" + }, + { + "path": "research/crt-mask-repair-bridge/key_subroutine.py", + "usage": "input", + "sha256": "ffdbb610be71ae20bf974946dac66b6c1b4d43739cbc3b1eb81cbbeab8784b44", + "git_blob": "5771ae55626dbc2a32a95d8c098bdd03d820833c" + }, + { + "path": "research/crt-mixed-row-entry/PROOF.md", + "usage": "input", + "sha256": "8a529ece497c62d5225261cdacebfd88979322b3a8886d1a31eb6295f1989e4b", + "git_blob": "76e75e002b5c5860a43b2fe6313ba4339efcc3ff" + }, + { + "path": "research/crt-mixed-row-entry/SOURCES.json", + "usage": "input", + "sha256": "aac37dac580b1c3b3b4b53220b76292519d3188da0384a728270b02119ea7d80", + "git_blob": "d6782e6fdb4600499843b932efa93a5700fe47bc" + }, + { + "path": "research/crt-mixed-row-entry/bridge.py", + "usage": "input", + "sha256": "89c38638c0d66da731566c903c32e7fa1ad31088d29cfd2634fce823dd07c1f9", + "git_blob": "57f6853e262a6136bc616f1e47a31d0ace28495c" + }, + { + "path": "research/crt-mixed-row-entry/verify.py", + "usage": "input", + "sha256": "b8695e19bbd597b61dd97379f3970b62f375719a10512dea77784e2ce3b71f2d", + "git_blob": "0ec8d2906fb0a07e0c2a34a43b260c742d0b148f" + }, + { + "path": "research/crt-mixed-width-caller/README.md", + "usage": "input", + "sha256": "c5126d2e1f381fe5a34b8e3350799ac4c3a58fe2def590b12ad4354da7b01ebf", + "git_blob": "ff3b6d0708cd5296e71756a16b22167746ac1b24" + }, + { + "path": "research/crt-mixed-width-caller/verify.py", + "usage": "input", + "sha256": "5e62787f3c4a8f1175ca7dea6c6b8ceff7863a3f879abd6245faf6aeb272fd45", + "git_blob": "7980582b86e8d20269ae32252ad03896eff1131b" + }, + { + "path": "research/crt-multitarget-row-audit/PROOF.md", + "usage": "input", + "sha256": "607397886c41c0abe00969c5e1cd54f23c16a61e4fc34d3dc1eb8d47e8f97662", + "git_blob": "77adf1bcd4d5da9035d400985638f13572055387" + }, + { + "path": "research/crt-multitarget-row-audit/README.md", + "usage": "input", + "sha256": "5414c943d1ce540b84500a0a1960210640f287ab2ce5a4a91fc261d6109977ad", + "git_blob": "fd052021bd66bba6e8a2ab6d1af8ee3c0240eadb" + }, + { + "path": "research/crt-paid-key-service/PROOF.md", + "usage": "input", + "sha256": "1a4ac02653eb6c1b20807033a910f27bf9484cc972bf2629941f589275a87325", + "git_blob": "a0b84e8d3bd80d760a1be9e801fc57939b6f24e9" + }, + { + "path": "research/crt-paid-key-service/service.py", + "usage": "input", + "sha256": "ff06c6305c9f650a694e5c42baa4c7d841decf844a4f44f6776acc10a8400083", + "git_blob": "726d9523ab7dd4a16697f9201b0224f2da1f2517" + }, + { + "path": "research/crt-paid-key-service/verify.py", + "usage": "input", + "sha256": "fb02e2792cb07c52367c0a8c7087d54958bdf55214e51bc02f4e68dbf95547b1", + "git_blob": "9cd6b46a1ae52223ffe8de73c8e223e74f11ba4a" + }, + { + "path": "research/crt-paid-row-reentry/PROOF.md", + "usage": "input", + "sha256": "3e87455e3f30af808c1aac199001b968a92ca087906eec7f227b9296a6e5b48e", + "git_blob": "eec7613f560e8c04b1c8c4d821660f912584e0b2" + }, + { + "path": "research/crt-paid-row-reentry/SOURCES.json", + "usage": "input", + "sha256": "3b7107191656e0945c709364f2f5a0ca0161c92be368ca55f9f032f3e692a3ac", + "git_blob": "8f77f1ca423df752272669bc7e71e8642b1c2f5b" + }, + { + "path": "research/crt-paid-row-reentry/reentry.py", + "usage": "input", + "sha256": "19b9ffa6d77547818d7e71980c29492c27f5d6fbd81e2cccac4ee752acadcf25", + "git_blob": "a0c99ee0b0012caabde48bc44d5b19befb59245f" + }, + { + "path": "research/crt-paid-row-reentry/verify.py", + "usage": "input", + "sha256": "6a79ea51739a824647d7c3971135c4767336bcdc7c1b088b0f821177724f600d", + "git_blob": "f9054c051897c32864a6d63cab3031df87fdd775" + }, + { + "path": "research/crt-stable-row-workspace/PROOF.md", + "usage": "input", + "sha256": "24a727242f8a5aca7ad074b569e050f62c00aa21983ec9cf83eee260452f4600", + "git_blob": "f71926a9b94223a9db7110ada50badeaf6469d4b" + }, + { + "path": "research/crt-stable-row-workspace/README.md", + "usage": "input", + "sha256": "64c6528c723c21866ad51595ce0accb1a320e85806918acaa0731b8416d707a7", + "git_blob": "bb2f19ed4435d968bbe34d7acceb97723f33d5e2" + }, + { + "path": "research/crt-stable-row-workspace/SEAMS.json", + "usage": "input", + "sha256": "a51fd1cd401503b9393a734993373d1429abdfbd5f8a5ab7c13229937b8752e9", + "git_blob": "3e38082d9aa3ee7ef2e1d346006d5e9b09b9dd9a" + }, + { + "path": "research/crt-stable-row-workspace/query.py", + "usage": "input", + "sha256": "b0c633aed85808cf54087d07e29cb7978bc56e3690d316e87b264a1df5c079e7", + "git_blob": "deb44570954162985364060427046547e7761684" + }, + { + "path": "research/crt-stable-row-workspace/workspace.py", + "usage": "input", + "sha256": "6d1e8c354ee8896800f723befa9890233e8db6f49cc453e8b60898c6dc88762e", + "git_blob": "0b13c022460fc0c044ed24df591731a87e5cff3f" + }, + { + "path": "research/crt-uniform-rom-query/PROOF.md", + "usage": "input", + "sha256": "736be5e1af590f2195e8b56b958258f0babe5cd6d2cf6f4f5023410112f4d870", + "git_blob": "63b0551a7715b9b67f2b13510183254401eb082f" + }, + { + "path": "research/crt-uniform-rom-query/machine.py", + "usage": "input", + "sha256": "46ee6a635251e498ee9a5d4aff8c0e2a7f1ef2ff951e5b6a2a8953316e9cd02d", + "git_blob": "88292ce98d31d540c7dba6960bfe4c19f06a8077" + }, + { + "path": "research/encoded-crt-entry-lifecycle/PROOF.md", + "usage": "input", + "sha256": "a619be48c8c85749ea5411929aa6ff3986443b467133d32d19d543250b0054b0", + "git_blob": "8c9d971a3d3e5a75637e3279ed8f7f89b0c6a566" + }, + { + "path": "research/encoded-crt-entry-lifecycle/entry.py", + "usage": "input", + "sha256": "0537ec98f306270c8ff6a424841886cf53f675d9947029347090c7dc779616d7", + "git_blob": "1fa2b0cb88320d4f5b623554bb0fc6de332b773c" + }, + { + "path": "research/encoded-current-crt/PROOF.md", + "usage": "input", + "sha256": "7da614e737414a373c8716158f2c02a52666620ea1f114fac7ca09b3b38489bc", + "git_blob": "286ab05ba7ab500e5b86268384545dcec8862d1c" + }, + { + "path": "research/encoded-current-crt/producer.py", + "usage": "input", + "sha256": "88dab4ca02a92164a67826db361214fa1405e4b4a588f8c4279a21bcee95ab76", + "git_blob": "a327b0161eca57a1cc44ec2aa8e3defed2167ddc" + }, + { + "path": "research/r437-preparation-composition/predecessor4025/source/records.py", + "usage": "input", + "sha256": "0c9c4b23e998597fb877bb1a29da69ac869b68262abe635b162b4dba9c69b372", + "git_blob": "4f00467a0ff580954ad2fd0c7380240c753ddef3" + }, + { + "path": "research/r437-preparation-composition/predecessor4025/source/words.py", + "usage": "input", + "sha256": "5c37f57708ba3131bdcb03139f9dbc29886bee44569c09cbba51b68f75acd7f9", + "git_blob": "8d4ba37e2778acb35b34e0719df2caf138fbeb50" + }, + { + "path": "research/unconditional-batched-crt/NOTICE.md", + "usage": "input", + "sha256": "924109837e71c52392191710d49c9deb42780878d1094f0b01e8690dbe799461", + "git_blob": "886a8fdee275f01b459cbd68ae2815dc9269502f" + }, + { + "path": "research/unconditional-batched-crt/check_batched_crt.py", + "usage": "input", + "sha256": "681e2e3d71fa74c8b9b326f3860104fd9d89590a222e26ae6ee718d1fd40ff2e", + "git_blob": "1cf78abccd5e06beecc3ed21ba55f7c03b65fdbc" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec" + } + ] +} diff --git a/research/crt-whole-tree-state/TASK.json b/research/crt-whole-tree-state/TASK.json new file mode 100644 index 0000000000..defbfcb20f --- /dev/null +++ b/research/crt-whole-tree-state/TASK.json @@ -0,0 +1,95 @@ +{ + "schema_version": 1, + "task_id": "uniform-transfer-audit", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "uniform-transfer-audit", + "question": "Can one of the selected record's five inherited assumptions be proved at its actual caller?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "Identify the proposition and what would change downstream; do not equate a finite replay with a universal proof.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Choose one assumption ID (native_all_columns, owned_erasure, compiler, precision_tape, analytic_recovery), one quantified implication and exact dependency closure. Check current handoffs, including #5625 row reentry and #5707 root-prefix lowering, without treating their partial scope as the whole theorem. Prove or falsify that implication with a caller-bound argument; stop at the chosen obligation. Finite tests or root digits do not discharge an all-size statement.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "existing_checks": [ + { + "scope": "PR #4100: proposed unconditional construction and finite checks, without independent acceptance.", + "evidence": "research/unconditional-batched-crt/README.md", + "remaining": "Independent proof audit of one caller-bound all-size implication; all other premises remain explicit.", + "status": "author-checked", + "source_commit": "337d04939571a637aeab54a0f58f54fde811663a", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Source-relative whole balanced CRT address-state traversal across changing nodes and precision using the actual paid RowQuery and stable 118-role workspace, with eight owned exact-width protected numerical words.", + "scope_change_reason": "The existing control arithmetic/CRT identities and fixed-node row update/reuse are already covered. #5625/#6100 explicitly leave changing-node precision and whole-tree physical state composition open.", + "bottleneck_link": "Reduces the analytic_recovery control/caller interface by proving actual changing-node source-state, ownership and complete row-sum composition; no full payload or binary evaluator admission.", + "budget_minutes": 100, + "stop_rule": "Stop after one complete four-axis changing-precision roundtrip, one invalid-left case, written geometric sum, source pins and independent cross-review. Do not expand into three-epoch key or binary topology compiler in this package.", + "outcome": "completed", + "evidence": "PROOF.md; RESULT.json; SEAMS.json; source-authenticated registered normal/optimized replay", + "author": "Jerry Chen / CubeJerry", + "ai_assistance": "Substantial OpenAI assistance; independent AI source/proof review, not human or proof-kernel acceptance", + "open_questions": [ + { + "question": "Can the balanced level/node/row schedule and its row interfaces be produced from encoded geometry by a fixed-tape controller?", + "why_it_matters": "The supplied compiled topology is the remaining uniform control boundary.", + "first_step": "Bind an encoded program tape to commands() order and the current RowQuery entry ABI, charging setup and retained metadata.", + "blocked_by": "The current numerical/ROM row adapter takes compiled topology; a runtime topology port must be provided." + }, + { + "question": "Can the actual three-epoch exceptional key use variable-geometry current-state rows with all transport and cleanup charged?", + "why_it_matters": "Whole-tree state permutation is not the compact repair key or full payload routing.", + "first_step": "Identify the exact canonical-to-current coordinate conversion at each key epoch and bind its records to the same source/owner contract.", + "blocked_by": "Variable-geometry key transport and complete bit-step conversion remain external." + }, + { + "question": "Does the complete payload caller meet one consistent tape-step tariff after topology, source delivery and ordinary interchange are added?", + "why_it_matters": "Source-operation row sums alone do not establish A5 or an unconditional multiplication theorem.", + "first_step": "Assemble the supplied source/topology costs, ordinary backend and sparse repair in the actual production geometry.", + "blocked_by": "Full payload and binary primitive interfaces are not supplied by this package." + } + ] +} diff --git a/research/crt-whole-tree-state/VALIDATION.md b/research/crt-whole-tree-state/VALIDATION.md new file mode 100644 index 0000000000..3fb5f30c02 --- /dev/null +++ b/research/crt-whole-tree-state/VALIDATION.md @@ -0,0 +1,83 @@ +# Executed validation and review + +Canonical base: `e54523517d0f03e58352e647c403a5af3e525a57`. +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance. + +## Evidence completed + +- The package metadata/source-pin check passed with all 41 scientific inputs + and task-catalogue provenance authenticated. +- A full authoring run executed both physical fixtures and wrote the frozen + receipt. This is a finite source execution, not an all-width proof. +- A separate reviewer found a false `4/3` quadratic geometric coefficient. + The proof now uses the correct ratio-2 sum and the stronger `32p^2` + normalized allowance. Exact per-node moment checks and its concrete + `(ell,d)=(20,16)` counterexample are included as regression controls. + +## Registered replay, 2026-11-10 + +Environment: CPython 3.12.14, Clang 22.1.3, Linux x86_64, glibc 2.41; +standard library only. From repository root: + +```sh +python -B scripts/research_package.py --package research/crt-whole-tree-state --check-only +python -B scripts/research_package.py --package research/crt-whole-tree-state +``` + +Both registered author commands completed within their individual 300-second +limits. Total runner wall time was 237.070 seconds. The normal and +optimized runs each produced: + +```text +PASS_CRT_WHOLE_TREE_STATE four_axis_rows=30 producer_calls=28 retained=7176 controls=11 +``` + +The runner then reported: + +```text +PASS_REGISTERED_RESEARCH_PACKAGE research/crt-whole-tree-state outcome=completed +``` + +Both runs compared their complete typed receipt with RESULT.json; +neither rewrote it. The same actual numerical and ROM producers executed +in both modes. Explicit failure checks remain active under `-O`. + +## Independent mathematical/source review + +A separate research worker reviewed the source seam, exact-width entry, +close-before-write ownership, whole-tree state induction and historical +storage, and independently rederived the tariff. It passed the scoped +theorem after the quadratic correction. Its separate executable passed +normal and optimized modes on 744 invoice/moment domains and nine actual +protected-word growth/shrink lifecycles, with three negative controls. +The exact first-use lifecycle is `10P+23` raw actions per word and reuse +is `10P+24`, strictly within the new allowance. + +That reviewer did not rerun the large author ROM interpreter. Its +independence is in the separate source/mathematical derivation and exact +smaller controls, not a claim that repeated author execution is an +independent proof. The model-assisted reviewer shares the inherited +provider hypotheses stated in PROOF.md. + +The portable [review and implementation](independent-review/REVIEW.md) +are included in this package. After copying them into the package, both +of these read-only commands passed against the frozen independent receipt: + +```sh +python -I -B research/crt-whole-tree-state/independent-review/independent.py +python -I -O -B research/crt-whole-tree-state/independent-review/independent.py +``` + +Each printed `PASS_INDEPENDENT_SCOPED_REVIEW 744 9 3`. The normal command +is also registered as the third VERIFY.json command, with a 30-second +timeout. The two author commands and this third command were all executed; +the 237.070-second figure measures the author runner before that short +independent command was added. Final metadata and pin validation passed. + +## Scope of acceptance + +Mathematical/source review remains AI-assisted. No independent human +review, proof kernel, full selected-construction replay, binary machine +admission or complete unconditional theorem has been executed or claimed. +The external topology/source producers and payload consumer remain the +explicit open boundaries in PROOF.md. diff --git a/research/crt-whole-tree-state/VERIFY.json b/research/crt-whole-tree-state/VERIFY.json new file mode 100644 index 0000000000..d139786bcc --- /dev/null +++ b/research/crt-whole-tree-state/VERIFY.json @@ -0,0 +1,80 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/crt-current-row-query/PROOF.md", + "research/crt-current-row-query/SOURCES.json", + "research/crt-current-row-query/join.py", + "research/crt-dense-guard-scan/machine.py", + "research/crt-encoded-benes-rom-producer/PROOF.md", + "research/crt-encoded-benes-rom-producer/SOURCES.json", + "research/crt-encoded-benes-rom-producer/microcode.py", + "research/crt-encoded-benes-rom-producer/vendor/pr4192-NOTICE.md", + "research/crt-encoded-benes-rom-producer/vendor/pr4192-PROOF.md", + "research/crt-encoded-benes-rom-producer/vendor/pr4192-verify.py", + "research/crt-mask-repair-bridge/key_subroutine.py", + "research/crt-mixed-row-entry/PROOF.md", + "research/crt-mixed-row-entry/SOURCES.json", + "research/crt-mixed-row-entry/bridge.py", + "research/crt-mixed-row-entry/verify.py", + "research/crt-mixed-width-caller/README.md", + "research/crt-mixed-width-caller/verify.py", + "research/crt-multitarget-row-audit/PROOF.md", + "research/crt-multitarget-row-audit/README.md", + "research/crt-paid-key-service/PROOF.md", + "research/crt-paid-key-service/service.py", + "research/crt-paid-key-service/verify.py", + "research/crt-paid-row-reentry/PROOF.md", + "research/crt-paid-row-reentry/SOURCES.json", + "research/crt-paid-row-reentry/reentry.py", + "research/crt-paid-row-reentry/verify.py", + "research/crt-stable-row-workspace/PROOF.md", + "research/crt-stable-row-workspace/README.md", + "research/crt-stable-row-workspace/SEAMS.json", + "research/crt-stable-row-workspace/query.py", + "research/crt-stable-row-workspace/workspace.py", + "research/crt-uniform-rom-query/PROOF.md", + "research/crt-uniform-rom-query/machine.py", + "research/encoded-crt-entry-lifecycle/PROOF.md", + "research/encoded-crt-entry-lifecycle/entry.py", + "research/encoded-current-crt/PROOF.md", + "research/encoded-current-crt/producer.py", + "research/r437-preparation-composition/predecessor4025/source/records.py", + "research/r437-preparation-composition/predecessor4025/source/words.py", + "research/unconditional-batched-crt/NOTICE.md", + "research/unconditional-batched-crt/check_batched_crt.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 300, + "checks": "Actual whole-tree and invalid-left physical row executions; 127 owned roles; stable source/head/retained-tail; independent defining CRT endpoint; exact geometric budget and eleven controls." + }, + { + "argv": [ + "{python}", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 300, + "checks": "Repeat the same complete checks with assertions disabled; explicit checks and frozen typed receipt must agree." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/independent-review/independent.py" + ], + "timeout_seconds": 30, + "checks": "Separate implementation of 744 exact invoice/moment domains, actual nine protected-word growth/shrink lifecycles, three controls, source pins/seam and frozen reviewed-core hashes." + } + ] +} diff --git a/research/crt-whole-tree-state/independent-review/RESULT.json b/research/crt-whole-tree-state/independent-review/RESULT.json new file mode 100644 index 0000000000..81082acdc0 --- /dev/null +++ b/research/crt-whole-tree-state/independent-review/RESULT.json @@ -0,0 +1,81 @@ +{ + "status": "PASS_INDEPENDENT_SCOPED_REVIEW", + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "source_pins": 41, + "budget_cases": 744, + "largest_full_majorant_ratio": [ + 488042602927, + 214748364800000000 + ], + "initial_proof_counterexample": { + "ell": 20, + "d": 16, + "all_widths": 20, + "actual": 199815, + "claimed_upper": [ + 541696, + 3 + ] + }, + "guard_lifecycle_cases": [ + { + "precision": 4, + "actions": 504, + "per_role_capacity": 6 + }, + { + "precision": 5, + "actions": 592, + "per_role_capacity": 7 + }, + { + "precision": 64, + "actions": 5312, + "per_role_capacity": 66 + }, + { + "precision": 4, + "actions": 512, + "per_role_capacity": 66 + }, + { + "precision": 127, + "actions": 10352, + "per_role_capacity": 129 + }, + { + "precision": 9, + "actions": 912, + "per_role_capacity": 129 + }, + { + "precision": 5, + "actions": 592, + "per_role_capacity": 129 + }, + { + "precision": 256, + "actions": 20672, + "per_role_capacity": 258 + }, + { + "precision": 4, + "actions": 512, + "per_role_capacity": 258 + } + ], + "negative_controls": [ + "live_guard_resize_rejected", + "stale_tail_detected", + "false_quadratic_geometric_inequality_detected" + ], + "reviewed_files": { + "PROOF.md": "fb174184f7bf6f93ecd1067e98e6bccf9ba41147d2cc68d50f0c440bf692ea40", + "tree.py": "db13d61b5bf8e2d37273fde140d7b624daf05cbf8432aad186db527ad43f3450", + "workspace.py": "a64bdcf8e01113fd88ed52dfe4e42cb60ad8b4ee7bbd397867584149342112b1", + "SEAMS.json": "4eb7dd9c7140c94bfd59277353bbbdade2219b11d4342695d90a9cab676e7189", + "RESULT.json": "79dcecc7cbbc84457d486df97f3509e2d6e80c19b82f2ea1aea97bba89037f6a" + }, + "heavy_rom_suite_rerun": false, + "universal_proof_in_review": true +} diff --git a/research/crt-whole-tree-state/independent-review/REVIEW.md b/research/crt-whole-tree-state/independent-review/REVIEW.md new file mode 100644 index 0000000000..24af779fb3 --- /dev/null +++ b/research/crt-whole-tree-state/independent-review/REVIEW.md @@ -0,0 +1,164 @@ +# Independent review of the changing-node CRT state package + +Reviewer: dispatcher research worker, separate from the analytic author worker. +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance. +This is model-assisted mathematical and source review, not human or proof-kernel +acceptance. Canonical base: `e54523517d0f03e58352e647c403a5af3e525a57`. + +## Outcome + +**Pass for the stated source-relative composition after one proof correction.** +The exact source seam, protected-word entry, close-before-write ownership +boundary, balanced-tree induction, complete row invoice, and rolewise storage +bound support the scoped claim. The full binary evaluator, payload permutation, +uniform topology/source production, exceptional key composition, and selected +foundational assumptions remain outside it. No multiplication or kappa change +follows from this review. + +I read the package proof, implementation and receipt, the actual #6100 +workspace/query source and proof, the #5625 adapter and proof, the #5353 RowEntry, +the #5219 Port/Entry implementation, the numerical Word boundary, and the +retained explicit-width logical Caller and balanced CRT definitions. All pinned +scientific input bytes and the single declared geometry substitution passed separate +SHA256/Git-blob checks. The predecessor paths have no changes relative to the +base in the author worktree. The task-catalogue provenance row is historically +bound by package metadata and is not treated as a live scientific input. +The reader-facing author package is still being +finished; file hashes of the reviewed core are in RESULT.json. + +## Defect found and corrected + +The initial proof asserted + + sum_G (P_G+2)^2 < (4/3)(ell+3)^2 d^2. + +This is false. For ell=20, d=16 and every width20, the left side is + + 8*43^2 + 4*83^2 + 2*163^2 + 323^2 = 199815, + +whereas the asserted upper bound is 541696/3. This width family admits +pairwise-coprime moduli, so it is not merely outside the theorem domain. + +The author replaced it with the valid bound + + sum_G (P_G+2)^2 < 2(ell+2)^2 d^2 <= 32p^2. + +For a size-n node, n>=2 and P_G+2<=n*ell+3<=n(ell+2). +There are d/n nodes at that level. Thus the relevant geometric series is +d(ell+2)^2 times sum(2^j), which is strictly below 2d^2(ell+2)^2. +Finally (ell+2)/(ell-1)<=4 and d(ell-1)<=p. The changed coefficient +fits the existing quadratic allowance; the final majorant is unaffected. +The author added this exact counterexample as a failure-detection control. + +## Independent semantic argument + +The #6100 workspace stores backing, owner identities and geometry; it stores +no width-dependent numerical object across rows. The exact new seam allows +level/start to change while preserving the width tuple and ell. The actual +#5353 RowEntry reconstructs the unary guide from the selected current source +records, appends one guide bit, and therefore supplies precisely +P_G=1+sum_(i in G) h_i. Numerical words/template, canonical and padded streams, +and ROM headers are rebuilt using that guide. The saved Python capacity does +not choose numerical branches. Its bounds check remains satisfied on the +inherited valid delimiter-driven execution. + +The eight ProtectedZeros roles satisfy the missing width-sensitive premise: +at every active entry each is LEFT, exactly P_G zero bits, RIGHT, at head1. +They are distinct from the source, staging and 118 owned row roles. The +inherited numerical entry preserves their values/heads; the new caller then +physically retires them before any change of precision. A shorter next word +does not expose stale bits because the whole historical extent was already +blank. A larger next word grows through actual Port reads/writes/moves. + +The #5625 consumer first copies the returned output into staging, then calls +the query's close. This retires all numerical/ROM roles and invokes +Workspace.end. Only after that release does the consumer write the supplied +source coordinate fields. It scans the actual source and restores its head1; +the staging tape is erased and returns to head0. The new caller preserves +this order. An all-idle node-row is explicitly skipped and uses no tape work. + +At a fixed level, different aligned nodes are disjoint, and every operation +reads left-child coordinates while changing only right-child coordinates. +Serializing nodes within a row therefore equals the logical simultaneous +row. Left-child state is fixed throughout all rows of that level, so every +new query recomputes the same controls as the published level transform. +For padded states, each inherited row is still an involution; reversing the +entire chronological list (levels, rows and nodes) gives its inverse. + +On globally valid inputs there is also a direct induction on a parent node. +If its children encode mixed-radix integers K_L and K_R in locally scaled CRT +form and S_L is the product of left moduli, the parent integer is +K_L+S_L*K_R. A right coordinate with right-local prefix Q changes from +K_R/Q modulo its modulus to + + K_R/Q + K_L/(S_L Q) = (K_L+S_L K_R)/(S_L Q). + +This is precisely the current-left offset computed by the source. Left +coordinates already have their parent prefixes. The root therefore yields +the defining complete CRT formula. This endpoint proof uses the inherited +local arithmetic/ROM correctness; the review does not replace those contracts. + +## Independent cost checks + +Direct counting of the actual Port methods gives a first protected-word +prepare-and-retire cost of 10P+23 raw actions per word, and 10P+24 on reuse +(one extra reverse move to the blank origin). Consequently the eight-word +cost is strictly within the declared 4096(P+2). Initial eight blank cells +remain separately charged. The independent executable checks this exact +formula through nine growth/shrink transitions, including 256 down to4. + +The independent invoice sums numerical entry, all per-axis ROM producers, +query work, staging/source update, the 370 stable-entry allowance, and the +protected-word allowance directly over node records. Its implementation +uses the independently simplified axis summand 3h*2^h+3h+5. It equals the +author's complete invoice in all 744 tested width domains; it is not a +rerun of the author verification implementation or the large ROM interpreter. + +The corrected universal moment bounds are consistent. For n=2^j, there +are d/n nodes. Quartic, quadratic, cubic-with-target-count, and linear-pair +sums respectively reduce to the geometric series in 8^j, 2^j, 4^j and +2^j. They give 715p^4, 32p^2, 6p^3 and 15p^2 as used in the repair. +There are fewer than2p rows per node. The quartic contribution is below +2^31 p^5; the quadratic contribution is at most2^22 p^3. A direct coarse +bound puts all remaining non-ROM terms below2^20 p^3. The total ROM +coefficient before rounding is 46,875,000 times +2^(3ell) p^4 (ell+1)^4, hence the claimed48,000,000 bound with(p+1)^4 +is safe. A second copy absorbs the axis-query summands. These estimates +fit below2^34*2^(3ell)*(p+2)^8. The p>=14 comparison follows from +2^ell*(p+2)^8>=4*16^8=2^34. + +The role inventory is 58 fixed numerical word/template/guide roles, five +numerical streams, 52 ROM roles, three query roles, eight protected words, +and staging:127 owned roles. Adding the separate supplied source gives +exactly the proof's envelope. Bounding each of the52 roles by a complete +bank bound is loose but valid. Each role's maximum is taken separately, so +reuse does not hide blank historical capacity. No external topology or +source-generation allocation is folded into this inventory. + +## Reproduction and limits + +When installed under the reviewed package's independent-review directory, +run from the repository root: + + python3 -I -B research/crt-whole-tree-state/independent-review/independent.py + +The separate working copy also accepts an explicit --package-root argument. +The script is read-only by default; --write-result explicitly regenerates the +receipt after the reviewer has inspected any changed core inputs. + +Expected: + + PASS_INDEPENDENT_SCOPED_REVIEW 744 9 3 + +The test checks all declared input pins, the exact seam, invoice equality, +forward/inverse schedule, four corrected moments, the majorant, and the +actual protected-word lifecycle. Negative controls detect live resize, +stale historical data, and the original false geometric inequality. +The random width families use seed20261110; the full tested domain is +ell2..32, d in(2,4,8,16,32,64), and four declared families per pair. +These are finite corroborations; the quantified arguments are above. + +The author's 500-million-instruction numerical/ROM suite was deliberately +not rerun by this reviewer. Its receipt was inspected, not independently +regenerated. Final author normal/optimized registered replay and a frozen +commit remain publication gates handled by the author and orchestrator. diff --git a/research/crt-whole-tree-state/independent-review/independent.py b/research/crt-whole-tree-state/independent-review/independent.py new file mode 100644 index 0000000000..f8032b9319 --- /dev/null +++ b/research/crt-whole-tree-state/independent-review/independent.py @@ -0,0 +1,188 @@ +"""Independent scoped CRT review. No heavy numerical/ROM suite is rerun.""" +from fractions import Fraction +from hashlib import sha1, sha256 +from pathlib import Path +from types import ModuleType +import argparse +import json +import random + +OUT = Path(__file__).resolve().parent +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument('--package-root', type=Path, default=OUT.parent, + help='reviewed package directory; default parent of this review folder') +parser.add_argument('--write-result', action='store_true', + help='explicitly regenerate the review receipt after reviewing changed inputs') +args = parser.parse_args() +P = args.package_root.resolve() +ROOT = P.parents[1] + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def load(path): + module = ModuleType(path.stem) + exec(compile(path.read_bytes(), str(path), 'exec'), module.__dict__) + return module + + +tree = load(P / 'tree.py') +w = load(ROOT / 'research/r437-preparation-composition/predecessor4025/source/words.py') +entry = load(ROOT / 'research/encoded-crt-entry-lifecycle/entry.py') +pins = [pin for pin in json.loads((P / 'SOURCES.json').read_text())['files'] + if pin['usage'] == 'input'] +for pin in pins: + raw = (ROOT / pin['path']).read_bytes() + need(sha256(raw).hexdigest() == pin['sha256'], 'SHA256 ' + pin['path']) + need(sha1(b'blob ' + str(len(raw)).encode() + b'\0' + raw).hexdigest() + == pin['git_blob'], 'Git blob ' + pin['path']) +seam = json.loads((P / 'SEAMS.json').read_text()) +actual = (ROOT / seam['source']).read_text() +for old, new in seam['replacements'].items(): + need(actual.count(old) == 1, 'unique seam') + actual = actual.replace(old, new) +need(actual == (P / 'workspace.py').read_text(), 'exact declared seam') + + +def independent_schedule(widths, ell): + nodes = [] + size = 2 + while size <= len(widths): + level = size.bit_length() - 1 + for row in range(2 * ell - 1): + nodes.extend((level, start, row) + for start in range(0, len(widths), size)) + size *= 2 + return tuple(nodes) + + +def independent_bill(widths, ell): + d, address = len(widths), sum(widths) + length = 2 + 3 * address + 4 * d + total, sums = 8, [0, 0, 0, 0] + size = 2 + while size <= d: + for start in range(0, d, size): + precision = 1 + sum(widths[start:start + size]) + right = widths[start + size // 2:start + size] + stream = 2 + sum(right) + len(right) + sums[0] += (precision + 2) ** 4 + sums[1] += (precision + 2) ** 2 + sums[2] += precision ** 2 * len(right) + sums[3] += (size + 1) * (precision + 2) + for row in range(2 * ell - 1): + active = [h for h in right + if h == ell or row < ell - 1 or row > ell] + if not active: + continue + numerical = ((1 << 20) * (precision + 2) ** 4 + + (1 << 16) * (precision + 2) ** 2 + + 128 * (length + precision + size + 1)) + rom = sum(2000000 * precision ** 2 * (2 ** h + 1) ** 3 + * (h + 1) ** 4 for h in active) + front = length + (size + 1) * (precision + 2) + front += sum(3 * h * 2 ** h + 3 * h + 5 for h in active) + total += (numerical + rom + 4096 * front + + 4096 * (length + stream) + + 370 + 4096 * (precision + 2)) + size *= 2 + return total, sums + + +rng = random.Random(20261110) +case_count, largest_ratio = 0, Fraction(0) +for ell in range(2, 33): + for d in (2, 4, 8, 16, 32, 64): + families = [tuple([ell - 1] * d), tuple([ell] * d), + tuple(ell - 1 + (i & 1) for i in range(d)), + tuple(ell - 1 + rng.randrange(2) for _ in range(d))] + for widths in families: + expected, sums = independent_bill(widths, ell) + need(expected == tree.whole_bound(widths, ell), 'independent invoice') + schedule = independent_schedule(widths, ell) + need(tree.commands(widths, ell) == schedule, 'independent topology order') + need(tree.commands(widths, ell, True) == tuple(reversed(schedule)), 'inverse order') + p = sum(widths) + first = [Fraction(8, 7) * (ell + 3) ** 4 * d ** 4, + 2 * (ell + 2) ** 2 * d ** 2, + Fraction(2, 3) * (ell + 1) ** 2 * d ** 3, + 3 * (ell + 3) * d ** 2] + final = [715 * p ** 4, 32 * p ** 2, 6 * p ** 3, 15 * p ** 2] + for observed, intermediate, bound in zip(sums, first, final): + need(observed < intermediate <= bound, 'corrected geometric bound') + ample = (1 << 34) * 2 ** (3 * ell) * (p + 2) ** 8 + need(expected <= ample, 'full explicit majorant') + if p >= 14: + need(ample <= 2 ** (4 * ell) * (p + 2) ** 16, 'E-shape comparison') + largest_ratio = max(largest_ratio, Fraction(expected, ample)) + case_count += 1 + +# The initial proof's quadratic inequality is false; this is an exact control. +_, counter_sums = independent_bill((20,) * 16, 20) +old_bound = Fraction(4, 3) * 23 ** 2 * 16 ** 2 +need(counter_sums[1] == 199815 and counter_sums[1] > old_bound, 'original inequality counterexample') + +guards = tree.ProtectedZeros(w, entry) +guard_cases, max_precision = [], 0 +for index, precision in enumerate((4, 5, 64, 4, 127, 9, 5, 256, 4)): + def traffic(): + return sum(p.meter.reads + p.meter.writes + p.meter.moves for p in guards.ports) + before = traffic() + guards.prepare(precision) + for port in guards.ports: + need(port.head == 1 and port.cells[0] == w.LEFT, 'prepared entry head') + need(port.cells[1:precision + 1] == bytes([w.ZERO]) * precision, 'exact current zero word') + need(port.cells[precision + 1] == w.RIGHT, 'current exact delimiter') + need(all(c == w.BLANK for c in port.cells[precision + 2:]), 'old tail remains blank') + guards.retire() + measured = traffic() - before + expected = 8 * (10 * precision + (23 if index == 0 else 24)) + need(measured == expected, 'independently derived guard lifecycle count') + need(measured <= 4096 * (precision + 2), 'paid guard allowance') + max_precision = max(max_precision, precision) + for port in guards.ports: + need(port.head == 1 and all(c == w.BLANK for c in port.cells), 'full retirement') + need(len(port.cells) == max_precision + 2, 'retained historical extent') + guard_cases.append({'precision': precision, 'actions': measured, + 'per_role_capacity': max_precision + 2}) + +controls = [] +guards.prepare(5) +try: + guards.prepare(4) +except ValueError: + controls.append('live_guard_resize_rejected') +else: + raise ValueError('live guard resize survived') +guards.retire() +guards.ports[0].cells[-1] = w.ONE +try: + need(all(c == w.BLANK for c in guards.ports[0].cells), 'historical blankness') +except ValueError: + controls.append('stale_tail_detected') +else: + raise ValueError('stale tail survived') +guards.ports[0].cells[-1] = w.BLANK +controls.append('false_quadratic_geometric_inequality_detected') + +receipt = { + 'status': 'PASS_INDEPENDENT_SCOPED_REVIEW', + 'base_commit': 'e54523517d0f03e58352e647c403a5af3e525a57', + 'source_pins': len(pins), 'budget_cases': case_count, + 'largest_full_majorant_ratio': [largest_ratio.numerator, largest_ratio.denominator], + 'initial_proof_counterexample': {'ell': 20, 'd': 16, 'all_widths': 20, + 'actual': counter_sums[1], + 'claimed_upper': [old_bound.numerator, old_bound.denominator]}, + 'guard_lifecycle_cases': guard_cases, 'negative_controls': controls, + 'reviewed_files': {name: sha256((P / name).read_bytes()).hexdigest() + for name in ('PROOF.md', 'tree.py', 'workspace.py', 'SEAMS.json', 'RESULT.json')}, + 'heavy_rom_suite_rerun': False, 'universal_proof_in_review': True, +} +if args.write_result: + (OUT / 'RESULT.json').write_text(json.dumps(receipt, indent=2) + '\n') +else: + need(receipt == json.loads((OUT / 'RESULT.json').read_text()), 'frozen independent receipt') +print(receipt['status'], case_count, len(guard_cases), len(controls)) diff --git a/research/crt-whole-tree-state/tree.py b/research/crt-whole-tree-state/tree.py new file mode 100644 index 0000000000..ea70f566a8 --- /dev/null +++ b/research/crt-whole-tree-state/tree.py @@ -0,0 +1,164 @@ +"""Whole-tree CRT current-state composition over the paid row providers. + +Topology is compiled data. Runtime coordinates, moduli and numerical values +stay on the unchanged predecessor tapes. The eight protected numerical slots +are owned zero words, physically prepared and retired at each node precision. +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Apache-2.0. See PROOF.md for the source-relative execution boundary. +""" + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def commands(widths, ell, reverse=False): + """Compile the published level/row order, with disjoint nodes serialized.""" + widths = tuple(widths) + d = len(widths) + need(type(ell) is int and ell >= 2, 'declared ell') + need(d >= 2 and d & (d - 1) == 0, 'dyadic axis count at least two') + need(all(type(h) is int and h in (ell - 1, ell) for h in widths), + 'declared width family') + result = tuple((level, start, row) + for level in range(1, d.bit_length()) + for row in range(2 * ell - 1) + for start in range(0, d, 1 << level)) + return tuple(reversed(result)) if reverse else result + + +class ProtectedZeros: + """Eight permanent owned roles, with paid current-width entry and erasure.""" + def __init__(self, w, entry): + self.w = w + self.ports = [] + for _ in range(8): + port = object.__new__(entry.Port) + port.w = w + port.cells = bytearray([w.BLANK]) + port.head = 0 + port.meter = w.Meter() + self.ports.append(port) + self.started = False + self.live = False + self.setup_cells = 8 + + def prepare(self, precision): + # precision is a constant in this compiled node, not a decoded value. + need(not self.live, 'protected-zero words must retire before resize') + need(type(precision) is int and precision >= 4, 'compiled precision') + w = self.w + for port in self.ports: + if self.started: + port.step(-1) + need(port.read() == w.BLANK, 'blank protected-zero origin') + port.write(w.LEFT) + port.step(1) + for _ in range(precision): + need(port.read() == w.BLANK, 'retired protected-zero body') + port.write(w.ZERO) + port.step(1) + need(port.read() == w.BLANK, 'retired protected-zero delimiter') + port.write(w.RIGHT) + port.rewind() + self.started = True + self.live = True + + def retire(self): + need(self.live, 'one retirement of protected-zero words') + for port in self.ports: + port.retire() + self.live = False + + +class WholeTree: + """One actual source owner and one reusable numerical/ROM workspace. + +The dependency modules and their theorems are explicit provider parameters. +No coordinate or numerical result is supplied by an observer/oracle. +""" + def __init__(self, modules, workspace_module, query_module, source, widths, ell): + helper, base, rom, original, adapter, program = modules + w, records, entry, numeric, caller_module, crt, row_module = base + self.w, self.records = w, records + self.entry, self.numeric, self.row_module = entry, numeric, row_module + self.rom, self.program = rom, program + self.query_module, self.adapter = query_module, adapter + self.source, self.widths, self.ell = source, tuple(widths), ell + self.schedule = commands(widths, ell) + self.workspace = workspace_module.Workspace() + self.guards = ProtectedZeros(w, entry) + self.staging = original.Tape() + + def step(self, command, fault=None): + level, start, row = command + size = 1 << level + middle, stop = start + size // 2, start + size + active = any(self.widths[i] == self.ell or row not in (self.ell - 1, self.ell) + for i in range(middle, stop)) + if not active: + return None # Literal idle: no provider and no tape operation. + precision = 1 + sum(self.widths[start:stop]) + self.guards.prepare(precision) + query = self.query_module.RowQuery( + self.w, self.records, self.entry, self.numeric, self.row_module, + self.rom, self.program, self.source, self.guards.ports, + self.widths, self.ell, level, start, row, self.workspace, + fault=fault) + self.adapter.consume_into_source(query, self.staging, self.widths, level, start) + self.guards.retire() + return query + + def run(self, reverse=False): + schedule = reversed(self.schedule) if reverse else self.schedule + for command in schedule: + self.step(command) + + +def bank_bound(precision, height): + n = 1 << height + return (5 * precision * n * (height * height + 3 * height + 1) + + n * (4 * height - 1) + 48 * precision + 2 * height + 104) + + +def row_bound(widths, ell, command): + """The complete predecessor sum plus paid variable-precision preparation.""" + level, start, row = command + size = 1 << level + middle, stop = start + size // 2, start + size + active = [i for i in range(middle, stop) + if widths[i] == ell or row not in (ell - 1, ell)] + if not active: + return 0 + precision = 1 + sum(widths[start:stop]) + length = 2 + sum(3 * h + 4 for h in widths) + stream = 2 + sum(widths[middle:stop]) + size // 2 + work = length + (size + 1) * (precision + 2) + work += sum(((1 << widths[i]) + 1) * (widths[i] + 1) + + (1 << widths[i]) * (2 * widths[i] - 1) + + 2 * widths[i] + 4 for i in active) + bound = (2**20 * (precision + 2)**4 + 2**16 * (precision + 2)**2 + + 128 * (length + precision + size + 1) + + 4096 * (work + length + stream)) + bound += sum(2 * 10**6 * precision**2 * ((1 << widths[i]) + 1)**3 + * (widths[i] + 1)**4 for i in active) + # Stable-workspace entry + explicit protected-zero prepare/retire. + return bound + 4 * 63 + 118 + 2**12 * (precision + 2) + + +def whole_bound(widths, ell, directions=1): + need(directions in (1, 2), 'one traversal or a forward/reverse pair') + return directions * sum(row_bound(widths, ell, c) for c in commands(widths, ell)) + 8 + + +def retained_bound(widths, ell): + """Rolewise maximum envelope, including the supplied axis tape and guards.""" + d, address = len(widths), sum(widths) + precision = address + 1 + source = 2 + sum(3 * h + 4 for h in widths) + stream = 2 + address + d + numerical = 58 * (precision + 2) + 5 * (d * (2 * precision + 4) + 2) + rom = 52 * bank_bound(precision, ell) + query = 2 * (ell + 2) + stream + return source + stream + 8 * (precision + 2) + numerical + rom + query diff --git a/research/crt-whole-tree-state/verify.py b/research/crt-whole-tree-state/verify.py new file mode 100644 index 0000000000..d1c753f5aa --- /dev/null +++ b/research/crt-whole-tree-state/verify.py @@ -0,0 +1,276 @@ +"""Source-authenticated checks of the changing-node whole-tree composition. + +Observer decoding and snapshots never feed coordinates or branches to runtime. +Finite corroboration is separate from the quantified proof in PROOF.md. +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +""" +from hashlib import sha256 +from pathlib import Path +from types import ModuleType +import itertools +import json +import math +import sys + +P = Path(__file__).resolve().parent +ROOT = P.parents[1] + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def load(name, path): + module = ModuleType(name) + module.__file__ = str(path) + sys.modules[name] = module + exec(compile(path.read_bytes(), str(path), 'exec'), module.__dict__) + return module + + +def source_check(): + manifest = json.loads((P / 'SOURCES.json').read_text()) + for pin in manifest['files']: + if pin['usage'] != 'input': + continue + raw = (ROOT / pin['path']).read_bytes() + need(sha256(raw).hexdigest() == pin['sha256'], 'source bytes: ' + pin['path']) + from hashlib import sha1 + blob = sha1(b'blob ' + str(len(raw)).encode() + b'\0' + raw).hexdigest() + need(blob == pin['git_blob'], 'source Git blob: ' + pin['path']) + seam = json.loads((P / 'SEAMS.json').read_text()) + text = (ROOT / seam['source']).read_text() + for old, new in seam['replacements'].items(): + need(text.count(old) == 1, 'unique declared geometry seam') + text = text.replace(old, new) + need(text == (P / 'workspace.py').read_text(), 'workspace exact declared source seam') + return sum(pin['usage'] == 'input' for pin in manifest['files']) + + +def retired(machine): + w, pool = machine.w, machine.workspace + need(not pool.live and not machine.guards.live, 'all per-row owners retired') + for role, cells in pool.backing.items(): + blank = w.BLANK if role.startswith('numeric.') else '_' + need(all(x == blank for x in cells), 'whole historical role blank: ' + role) + if role in pool.ports: + need(pool.ports[role].head == 1, 'numerical retirement head') + for port in machine.guards.ports: + need(all(x == w.BLANK for x in port.cells), 'whole protected-zero history blank') + need(port.head == (1 if machine.guards.started else 0), 'protected-zero head') + need(all(x == '_' for x in machine.staging.cells) and machine.staging.head == 0, + 'whole staging history blank at origin') + + +def endpoint(values, moduli): + """Independent defining CRT formula, only for globally valid input.""" + prefix, integer, prefixes = 1, 0, [] + for value, modulus in zip(values, moduli): + need(0 <= value < modulus, 'valid defining-formula fixture') + prefixes.append(prefix) + integer += prefix * value + prefix *= modulus + return tuple(integer * pow(pre, -1, modulus) % modulus + for pre, modulus in zip(prefixes, moduli)) + + +def run_case(modules, pred, tree, workspace, query_module, name, moduli, widths, values, ell): + helper, base, rom, original, adapter, program = modules + w, records, entry, numeric, caller_module, crt, row_module = base + source = helper.axis_stream(w, records, entry, moduli, widths, values) + initial = bytes(source.cells), source.head + source_identity = id(source), id(source.cells) + machine = tree.WholeTree(modules, workspace, query_module, source, widths, ell) + oracle = caller_module.Caller(moduli, widths, ell, crt) + expected = tuple(values) + ids, high, trace = {}, {}, [] + write = source.write + def guarded_write(value): + need(not machine.workspace.live, 'source mutation before query retirement') + write(value) + source.write = guarded_write + all_commands = machine.schedule + tuple(reversed(machine.schedule)) + forward = None + for position, command in enumerate(all_commands): + level, start, row = command + stop, middle = start + (1 << level), start + (1 << (level - 1)) + specs = [s for s in oracle.row(expected, level, row) if middle <= s[0] < stop] + expected = oracle.apply(expected, specs) + pool = machine.workspace + before = helper.traffic([source, *machine.guards.ports, *pool.ports.values()]) + setup_before, stage_before = pool.setup_actions, machine.staging.actions + result = machine.step(command) + retired(machine) + need((id(source), id(source.cells)) == source_identity, 'one source backing across all nodes') + need(pred.decode(source, widths, w, records) == expected, 'physical current-state row') + need(source.head == 1 and len(source.cells) == len(initial[0]), 'source shape and head') + for role, cells in pool.backing.items(): + need(role not in ids or ids[role] == id(cells), 'stable whole-tree role identity') + ids[role] = id(cells) + high[role] = max(high.get(role, 0), len(cells)) + need(len(cells) == high[role], 'historical backing never shrinks') + traffic = helper.traffic([source, *machine.guards.ports, *pool.ports.values()]) - before + traffic += pool.setup_actions - setup_before + machine.staging.actions - stage_before + producer_calls, producer_steps = 0, 0 + if result is not None: + producer_calls, producer_steps = result.invocations, result.producer_steps + traffic += sum(t.actions for t in result.ports) + producer_steps + meter = result.entry.context.arena.meter + traffic += meter.reads + meter.writes + meter.moves + # Independently compare to the predecessor's published complete row formula. + inherited, _ = pred.bounds(widths, ell, level, start, row) + precision = 1 + sum(widths[start:stop]) + need(tree.row_bound(widths, ell, command) + == inherited + 4 * 63 + 118 + 2**12 * (precision + 2), + 'only declared paid additions to predecessor row invoice') + else: + need(traffic == 0, 'literal idle has zero tape traffic') + allowance = tree.row_bound(widths, ell, command) + need(traffic <= allowance, 'measured source operations below complete written allowance') + trace.append({'command': list(command), 'state': list(expected), + 'precision': 1 + sum(widths[start:stop]), 'actions': traffic, + 'allowance': allowance, 'producer_calls': producer_calls, + 'producer_instructions': producer_steps, + 'retained_workspace_cells': sum(len(c) for c in pool.backing.values()), + 'guard_cells': [len(p.cells) for p in machine.guards.ports]}) + if position + 1 == len(machine.schedule): + forward = expected + need(forward == oracle.run(values), 'published whole-tree forward order') + if all(v < m for v, m in zip(values, moduli)): + need(forward == endpoint(values, moduli), 'independent defining CRT endpoint') + need((bytes(source.cells), source.head) == initial, 'entire physical source roundtrip') + retained = (len(source.cells) + len(machine.staging.cells) + + sum(len(p.cells) for p in machine.guards.ports) + + sum(high.values())) + need(len(pool.backing) == 118, 'unchanged actual row inventory') + need(retained <= tree.retained_bound(widths, ell), 'complete rolewise storage envelope') + return machine, {'name': name, 'moduli': list(moduli), 'widths': list(widths), + 'initial': list(values), 'forward': list(forward), 'trace': trace, + 'row_events': len(trace), 'active_rows': sum(t['producer_calls'] > 0 for t in trace), + 'producer_calls': sum(t['producer_calls'] for t in trace), + 'retained_total': retained, 'retained_bound': tree.retained_bound(widths, ell), + 'high_water': high, 'source_initializations': 1} + + +def arithmetic_checks(tree): + cases = 0 + worst = (0, 1) + def moments(widths, ell, p): + d = len(widths) + sums = [0, 0, 0, 0] + for level in range(1, d.bit_length()): + n = 1 << level + for start in range(0, d, n): + precision = 1 + sum(widths[start:start+n]) + values = ((precision+2)**4, (precision+2)**2, + precision**2 * (n//2), (n+1)*(precision+2)) + sums = [a+b for a, b in zip(sums, values)] + a, b, c, f = sums + need(7*a < 8*(ell+3)**4*d**4 and a <= 715*p**4, 'quartic tree moment') + need(b < 2*(ell+2)**2*d**2 and b <= 32*p**2, 'quadratic tree moment') + need(3*c < 2*(ell+1)**2*d**3 and c <= 6*p**3, 'ROM tree moment') + need(f < 3*(ell+3)*d**2 and f <= 15*p**2, 'stream tree moment') + return sums + for ell in range(2, 9): + for d in (2, 4, 8): + masks = range(1 << d) if d <= 4 else (0, 1, 85, 170, 254, 255) + for mask in masks: + widths = tuple(ell - 1 + ((mask >> i) & 1) for i in range(d)) + p = max(14, sum(widths)) + moments(widths, ell, p) + exact = tree.whole_bound(widths, ell) + ample = 2**34 * 2**(3 * ell) * (p + 2)**8 + envelope = 2**(4 * ell) * (p + 2)**16 + need(exact <= ample <= envelope, 'whole-tree geometric envelope calibration') + if exact * worst[1] > worst[0] * envelope: + worst = (exact, envelope) + cases += 1 + challenge = moments((20,)*16, 20, 320) + return {'cases': cases, 'worst_ratio_numerator': worst[0], 'worst_ratio_denominator': worst[1], + 'independent_moment_challenge': {'ell': 20, 'd': 16, 'moments': challenge}} + + +def controls(machine, modules, pred, tree, workspace, query_module): + failures = [] + def reject(label, fn): + try: + fn() + except ValueError: + failures.append(label) + else: + raise ValueError('negative control survived: ' + label) + pool, w = machine.workspace, machine.w + geometry = pool.geometry + pool.begin(geometry, machine.source, machine.guards.ports) + reject('live_query_reentry', lambda: pool.begin(geometry, machine.source, machine.guards.ports)) + reject('source_write_before_close', lambda: machine.source.write(machine.source.read())) + pool.live = False + changed = ((2,) * len(machine.widths), 2, 1, 0) + reject('changed_global_shape', lambda: pool.begin(changed, machine.source, machine.guards.ports)) + role = 'numeric.canonical_right' + port = pool.ports[role] + port.cells[-1] = w.ONE + reject('stale_historical_tail', lambda: retired(machine)) + port.cells[-1] = w.BLANK + machine.guards.prepare(5) + reject('unretired_guard_resize', lambda: machine.guards.prepare(7)) + machine.guards.retire() + old = load('old_fixed_node_workspace', ROOT / 'research/crt-stable-row-workspace/workspace.py').Workspace() + old.begin((machine.widths, machine.ell, 1, 0), machine.source, machine.guards.ports) + old.live = False + reject('predecessor_rejects_next_node', + lambda: old.begin((machine.widths, machine.ell, 1, 2), machine.source, machine.guards.ports)) + reject('non_dyadic_shape', lambda: tree.commands((3, 3, 2), 3)) + reject('invalid_declared_width', lambda: tree.commands((4, 2), 3)) + # Direct defining endpoint detects omission of the first nontrivial subtree. + values, moduli = (3, 2, 1, 1), (5, 7, 3, 2) + helper, base, *_ = modules + caller_module, crt = base[4], base[5] + oracle = caller_module.Caller(moduli, (3, 3, 2, 2), 3, crt) + state = values + for level, start, row in tree.commands((3, 3, 2, 2), 3): + if level == 1 and start == 0: + continue + middle, stop = start + (1 << (level - 1)), start + (1 << level) + state = oracle.apply(state, [s for s in oracle.row(state, level, row) if middle <= s[0] < stop]) + reject('omitted_subtree_endpoint', lambda: need(state == endpoint(values, moduli), 'incomplete tree')) + # This arithmetic fault is independent of the symbolic physical-row interpreter. + reject('max_of_totals_storage', lambda: need(max(9 + 1, 1 + 9) == max(9, 1) + max(1, 9), + 'crossed historical peaks')) + quadratic = sum((16//(1<