diff --git a/research/current-flat-guide-lifecycle/PROOF.md b/research/current-flat-guide-lifecycle/PROOF.md new file mode 100644 index 0000000000..3a4f96b207 --- /dev/null +++ b/research/current-flat-guide-lifecycle/PROOF.md @@ -0,0 +1,177 @@ +# A complete local flat-guide lifecycle + +## Domain and machine + +Let N and W be positive integers and L=N(2W+3). The caller supplies their +canonical positive binary encodings, least significant bit first, between +LEFT and RIGHT markers. Their heads start at the first bit. N is the +complete record count, including spectators. Its production from root +geometry, and the derivation of W, are outside this result. + +There are seven distinct tapes: two preserved descriptors, reusable binary +work, unary N, unary W, an owned guide and an owned target. The three work +tapes start blank at their origins. The guide has an exact granted window +of L+2 cells. Its old cells can be arbitrary. The target has L arbitrary +payload cells between fixed LEFT and RIGHT guards. Guide and target heads +start at their origins. Exterior cells are borrowed and must be preserved. +No hidden old private tail is admitted by this contract. + +The unchanged David Arias machine and counter are declared inputs. The +machine has seven symbols and six instruction forms: branch on a scanned +symbol, write, unit move, fixed goto, halt and reject. Only the external +interpreter stores head coordinates and resource statistics. The emitted +program cannot inspect them. Assembly accepts no runtime N or W. The +producer has 210 instructions; INIT and CLEAR each have 40; retirement has +16. All use the same seven physical tapes for every input size. + +The current source guide is encoded by + +| Source guide value | Tape symbol | +| --- | --- | +| left boundary | LEFT | +| right boundary | RIGHT | +| numeric zero cell | ZERO | +| real/imaginary separator | UNIT | +| end-of-record separator | MARK | +| represented blank cell | BLANK | + +This map is injective on the current zero-template format. Interior BLANK +is a legitimate guide value, not an end marker. The two consumers are the +unchanged PR7663 reset graph restricted to these produced values and +lowered by this symbol map. They are not callbacks into the source simulator. + +## Production and complete return + +Install LEFT at each of the three work origins. Apply the retained binary +converter first to N and then to W, reusing its fully cleared binary work. +It emits unary N and W, preserves the binary descriptors and returns all +three participating heads to their first cells. The converter's canonical +decrement proof covers every positive integer, including powers of two. + +Write LEFT at the guide origin. For each unary N mark, traverse unary W +twice. Write W numeric zero symbols, the first separator, another W zeros, +the second separator and one represented blank. Rewind W after each pass. +Advance the unary N head once per complete record. At its RIGHT marker, +write the guide's RIGHT marker. Rewind the guide to its origin. + +Induction on records proves that after j outer iterations the complete +first j records have the required values and the output head is at their +successor cell. The inner unary loop proves the two width counts. No old +guide symbol controls production. Every old cell in the granted guide +window has been overwritten before its rewind begins. The only LEFT in +the resulting guide is its origin, so the rewind returns correctly even +when the old guide had false markers or interior blanks. + +Erase both unary bodies, their RIGHT markers and their installed LEFT +markers. Erase the remaining binary-work LEFT marker. All three work +tapes are blank in every visited cell and their heads return to zero. +The descriptors keep their complete bytes and heads. The target is +untouched. The produced guide remains at head zero for its consumer. + +## Actual source consumption and retirement + +The finite INIT and CLEAR tables branch only on the produced guide. Their +outward pass writes exactly the L target payload cells. INIT writes the +scientific zero template, including both separators and represented blanks. +CLEAR writes physical blank. Both graphs return guide and target heads to +zero. The guide, target guards and exterior are unchanged. The source's +position induction applies to arbitrary old target payloads. + +After consumers return the immutable guide at its origin, retirement +scans its body to RIGHT and blanks every cell it crosses. It erases RIGHT, +rewinds through the now-blank body to LEFT, and erases LEFT last. Thus the +entire granted guide window is blank and its head is zero. The left marker +is retained only until the return finishes. No backward scan tries to use +a marker that was already erased. Descriptors, target and other tapes +remain unchanged during guide retirement. + +The composition is production, literal INIT, literal CLEAR and retirement. +Numerical work between the reset consumers is a separately charged service. +It must preserve the immutable guide and return its required heads. It is +not supplied by this theorem. + +## Exact instruction ledger + +Count every emitted instruction, including branches and fixed gotos. The +retained converter has exact cost + +```text +c(x) = 24x - 7 popcount(x) + 15 bitlength(x) + 12 <= 44x. +``` + +Its proof uses sum from k=1 to x of v2(k)=x-popcount(x), so binary borrow +scans are charged. A retained rewind from head h costs exactly 3h. + +One width pass emits W cells in 5W+1 instructions, then rewinds in 3W+3. +The two passes, three separator/blank writes and the outer advance cost +16W+17 per record. There is one final outer branch. Guide termination and +return cost 3L+5. Unary N cleanup costs 10N+11, including its initial +rewind; unary W cleanup costs 7W+8. Marker setup costs six, guide opening +costs two, binary-work cleanup costs two and the final halt costs one. +Consequently + +```text +T_produce = c(N)+c(W)+22NW+36N+7W+36. +T_INIT = T_CLEAR = 9L+11. +T_retire = 7L+10. +T_lifecycle = c(N)+c(W)+72NW+111N+7W+68. +``` + +For a reset, the outward cell costs five instructions and a return cell +costs four. Start, turn, final boundary and halt add eleven. For retirement, +each forward erased cell costs four; the rewind costs 3L+3, and entry, +delimiter erase, origin erase, final goto and halt add seven. + +The producer satisfies T_produce<=40L. After applying c(x)<=44x, the +difference is at least W(58N-51)+40N-36, which is positive for N,W>=1. +Retirement is at most 9L because L>=5. The two resets cost 18L+22. +Thus the complete lifecycle is at most 72L instructions. This is an +all-size count from the emitted paths, not an extrapolated timing result. +The smallest case takes 346 instructions for L=5. The complete N=512,W=1 +view takes 106258 instructions for L=2560. + +## Retained capacity + +Include every cell between an origin and the furthest visited position, +even after the cell is blank. Write ell_N=bitlength(N), ell_W=bitlength(W). +The exact total over the seven tapes is + +```text +2L + N + W + ell_N + ell_W + max(ell_N,ell_W) + 14 <= 7L. +``` + +The two full windows contribute 2L+4. The unary tapes contribute N+W+4. +Binary work contributes max(ell_N,ell_W)+2. Preserved descriptors contribute +ell_N+ell_W+4. Heads visit no negative position on valid inputs. Since +ell_x<=x, 2(N+W)<=L and L>=5, the displayed upper bound follows. + +This is the visited capacity of one invocation on the stated windows. +If tapes already have reserved historical spans H_i, charge +sum_i max(H_i,s_i), where s_i are the seven current spans. Prior empty +storage is not released by this proof. Changing an owned guide or target +window requires a separate complete old-extent contract. Borrowed exterior +cells in the fixtures do not become free private storage. + +## Evidence and limits + +The complete tables are saved in TABLES.json and regenerated exactly. +Forty-two shapes exercise binary shrink boundaries, both components, +width 17 and complete current views. A separate dense interpreter executes +every phase and agrees on all cells, heads and instruction counts. The +source guide producer supplies an independent expected-format oracle. +The checker inspects full visited spans and all borrowed exterior cells. + +Five actual instruction faults detect a wrong zero value, a skipped +represented-blank write, a premature RIGHT, a missing origin return and +an unerased guide LEFT. The retained binary converter also rejects a +redundant high zero. Rejection need not be atomic or restore dirty work; +the positive theorem assumes canonical descriptors and blank conversion +workspace. These controls are not a global malformed-input recognizer. + +Root descriptor production, arbitrary historical-window reuse, numerical +children, native adapter movement, the actual recursive owner map, complete +compiler workspace and the whole physical tariff remain open here. The +delayed-cover root producer in PR6719 has a different consumer; this work +reuses its retained machine/counter and does not repeat that root theorem. +No framework assumption or multiplication theorem is discharged. There +is no new kappa or selected-frontier change. diff --git a/research/current-flat-guide-lifecycle/README.md b/research/current-flat-guide-lifecycle/README.md new file mode 100644 index 0000000000..7e187c9fc2 --- /dev/null +++ b/research/current-flat-guide-lifecycle/README.md @@ -0,0 +1,128 @@ +# Produce, consume and retire the current flat guide + +This package emits the current native flat guide from physical binary +record count N and signed component width W. The actual emitted guide +drives the retained INIT and CLEAR graphs, then is completely retired. +All seven heads return. No host-decoded dimension controls execution. +There is no new kappa or complete recursive allocator. + +The source format and reset graph are from +[PR #7663](https://github.com/CrocSwap/integer-mult-bounds/pull/7663), exact +head `b81f40997de646de30749d367484d89e59fc3013`. The local selector in +[PR #7666](https://github.com/CrocSwap/integer-mult-bounds/pull/7666) starts +with a correct immutable guide. This result supplies that distinct local +producer/consumer connection. No code from PR7666 is imported. + +[PROOF.md](PROOF.md) gives the all-size loop and cost arguments. +[TABLES.json](TABLES.json) contains every emitted instruction, and +[RESULT.json](RESULT.json) records the exact executions and controls. +[program.py](program.py) builds tables before runtime descriptors exist. +[verify.py](verify.py) checks them with two different interpreters. + +## Exact contract and result + +The preserved inputs are positive canonical binary N and W. The output +has N complete records of W real bits, a separator, W imaginary bits, +a separator and one represented blank. Put L=N(2W+3). For the current +native view N=R*2^(9f), including all spectators; this package does not +produce that root descriptor or derive the root width. + +Three conversion work tapes start blank. The owned guide and target +windows may contain arbitrary old symbols. Every cell of the guide's +exact L+2-cell window is overwritten and later erased. INIT writes a +complete scientific-zero target, and CLEAR blanks its L payload cells +while preserving both guards. Borrowed exterior cells stay unchanged. + +The producer has 210 literal instructions, INIT and CLEAR each have 40, +and guide retirement has 16. All use seven fixed tapes and the retained +seven-symbol alphabet. With +`c(x)=24x-7 popcount(x)+15 bitlength(x)+12`, the exact counts are: + +| Phase | Instructions executed | +| --- | --- | +| Production | c(N)+c(W)+22NW+36N+7W+36 | +| Each reset | 9L+11 | +| Guide retirement | 7L+10 | +| Complete lifecycle | c(N)+c(W)+72NW+111N+7W+68 | + +The complete lifecycle costs at most 72L instructions. Its exact visited +capacity, including cells that were erased, is +`2L+N+W+bitlength(N)+bitlength(W)+max(bitlength(N),bitlength(W))+14`, +which is at most 7L for the stated fresh windows. On reused tapes, each +prior reserved span remains charged through `max(old_span,current_span)`. +No erased backing is released for free. + +## Evidence + +Forty-two shapes cover binary shrink boundaries, widths 1,2,3,17 and +complete native views. Every phase agrees with a separate dense opcode +interpreter on all cells, heads and instruction counts. The complete +N=512,W=1 lifecycle takes exactly 106258 instructions and retains 5668 +visited cells. The N=1024,W=3 case checks a second complete view. + +Five literal instruction faults detect wrong zero output, skipped blank +writes on a dirty guide, a premature boundary, a missing head return and +incomplete guide retirement. A sixth control rejects a redundant high +zero in a binary input. Failure atomicity and full recognition of every +malformed global state are not claimed. + +The unchanged source guide producer supplies the expected-format oracle. +The unchanged machine, assembler and binary-to-unary emitter come from +[PR #6719](https://github.com/CrocSwap/integer-mult-bounds/pull/6719)'s +retained source closure. The emitted program performs all loop control, +counter work, writes, head movement and cleanup on physical tapes. + +## Reproduce + +Use Python 3.12 and the standard library: + +```sh +python3.12 -B scripts/research_package.py --package research/current-flat-guide-lifecycle +``` + +Normal and optimized isolated replay must print +`PASS_CURRENT_FLAT_GUIDE_LIFECYCLE` and +`PASS_REGISTERED_RESEARCH_PACKAGE`. No Git, network or solver is used by +scientific replay. Normal replay writes no files. The explicit `--write` +option creates initial receipts and refuses to replace existing ones. + +## Limits + +This result assumes distinct tapes, canonical binary descriptors, blank +conversion workspace and exact granted guide/target windows. A larger old +private tail needs its own complete-extent treatment. Numerical work +between reset calls is a separate service that must preserve the guide +and return the required heads. + +Root descriptor production, adapter permutations, the actual compiled +owner map, numerical children, cross-depth workspace and common physical +pricing remain open. The source's full conditional application and the +selected multiplier were not replayed. All five framework assumptions +remain; the selected frontier is unchanged. + +## Open next questions + +Connect the output to one actual compiled owner map and charge guide +provisioning, storage and retirement at each occurrence. Use the earlier +root producer only after its different delayed-cover geometry has an +explicit consumer map. [TASK.json](TASK.json) records these boundaries. + +## Source and credit + +David Arias supplied the unchanged machine, assembler and counter, with +its exact counter proof. The [retained notice](../../research/delayed-cover-physical-batch-routing/NOTICE) +and file headers preserve that credit. thu-nmrc supplied the delayed-cover +physical/root package that retains those sources. This work does not +repeat its root or recursive shape theorem. + +Ali Romman supplied the PR7663 guide/reset construction with substantial +OpenAI Codex assistance. CubeJerry supplied its selected primitive and +prior typed reset. [source/NOTICE](source/NOTICE) and the copied notices +preserve the native lineage. The copied word module supplies only helper +imports here; no native word is loaded or numerically executed. +[SOURCES.json](SOURCES.json) and [VENDORED.json](VENDORED.json) bind every +consumed source. Original files are unchanged. + +Ali Romman directed this new emitted lifecycle, proof and verification +with substantial OpenAI Codex assistance. New work is Apache-2.0. The +canonical base is `e54523517d0f03e58352e647c403a5af3e525a57`. diff --git a/research/current-flat-guide-lifecycle/RESULT.json b/research/current-flat-guide-lifecycle/RESULT.json new file mode 100644 index 0000000000..6e89b1ec3e --- /dev/null +++ b/research/current-flat-guide-lifecycle/RESULT.json @@ -0,0 +1,965 @@ +{ + "cases": [ + { + "records": 1, + "width": 1, + "payload_extent": 5, + "steps": { + "produce": 189, + "INIT": 56, + "CLEAR": 56, + "retire": 45 + }, + "total_steps": 346, + "visited_spans": [ + 3, + 3, + 3, + 3, + 3, + 7, + 7 + ], + "retained_cells": 29 + }, + { + "records": 1, + "width": 2, + "payload_extent": 7, + "steps": { + "produce": 257, + "INIT": 74, + "CLEAR": 74, + "retire": 59 + }, + "total_steps": 464, + "visited_spans": [ + 3, + 4, + 4, + 3, + 4, + 9, + 9 + ], + "retained_cells": 36 + }, + { + "records": 1, + "width": 3, + "payload_extent": 9, + "steps": { + "produce": 303, + "INIT": 92, + "CLEAR": 92, + "retire": 73 + }, + "total_steps": 560, + "visited_spans": [ + 3, + 4, + 4, + 3, + 5, + 11, + 11 + ], + "retained_cells": 41 + }, + { + "records": 1, + "width": 17, + "payload_extent": 37, + "steps": { + "produce": 1090, + "INIT": 344, + "CLEAR": 344, + "retire": 269 + }, + "total_steps": 2047, + "visited_spans": [ + 3, + 7, + 7, + 3, + 19, + 39, + 39 + ], + "retained_cells": 117 + }, + { + "records": 2, + "width": 1, + "payload_extent": 10, + "steps": { + "produce": 286, + "INIT": 101, + "CLEAR": 101, + "retire": 80 + }, + "total_steps": 568, + "visited_spans": [ + 4, + 3, + 4, + 4, + 3, + 12, + 12 + ], + "retained_cells": 42 + }, + { + "records": 2, + "width": 2, + "payload_extent": 14, + "steps": { + "produce": 376, + "INIT": 137, + "CLEAR": 137, + "retire": 108 + }, + "total_steps": 758, + "visited_spans": [ + 4, + 4, + 4, + 4, + 4, + 16, + 16 + ], + "retained_cells": 52 + }, + { + "records": 2, + "width": 3, + "payload_extent": 18, + "steps": { + "produce": 444, + "INIT": 173, + "CLEAR": 173, + "retire": 136 + }, + "total_steps": 926, + "visited_spans": [ + 4, + 4, + 4, + 4, + 5, + 20, + 20 + ], + "retained_cells": 61 + }, + { + "records": 2, + "width": 17, + "payload_extent": 74, + "steps": { + "produce": 1539, + "INIT": 677, + "CLEAR": 677, + "retire": 528 + }, + "total_steps": 3421, + "visited_spans": [ + 4, + 7, + 7, + 4, + 19, + 76, + 76 + ], + "retained_cells": 193 + }, + { + "records": 3, + "width": 1, + "payload_extent": 15, + "steps": { + "produce": 361, + "INIT": 146, + "CLEAR": 146, + "retire": 115 + }, + "total_steps": 768, + "visited_spans": [ + 4, + 3, + 4, + 5, + 3, + 17, + 17 + ], + "retained_cells": 53 + }, + { + "records": 3, + "width": 2, + "payload_extent": 21, + "steps": { + "produce": 473, + "INIT": 200, + "CLEAR": 200, + "retire": 157 + }, + "total_steps": 1030, + "visited_spans": [ + 4, + 4, + 4, + 5, + 4, + 23, + 23 + ], + "retained_cells": 67 + }, + { + "records": 3, + "width": 3, + "payload_extent": 27, + "steps": { + "produce": 563, + "INIT": 254, + "CLEAR": 254, + "retire": 199 + }, + "total_steps": 1270, + "visited_spans": [ + 4, + 4, + 4, + 5, + 5, + 29, + 29 + ], + "retained_cells": 80 + }, + { + "records": 3, + "width": 17, + "payload_extent": 111, + "steps": { + "produce": 1966, + "INIT": 1010, + "CLEAR": 1010, + "retire": 787 + }, + "total_steps": 4773, + "visited_spans": [ + 4, + 7, + 7, + 5, + 19, + 113, + 113 + ], + "retained_cells": 268 + }, + { + "records": 4, + "width": 1, + "payload_extent": 20, + "steps": { + "produce": 465, + "INIT": 191, + "CLEAR": 191, + "retire": 150 + }, + "total_steps": 997, + "visited_spans": [ + 5, + 3, + 5, + 6, + 3, + 22, + 22 + ], + "retained_cells": 66 + }, + { + "records": 4, + "width": 2, + "payload_extent": 28, + "steps": { + "produce": 599, + "INIT": 263, + "CLEAR": 263, + "retire": 206 + }, + "total_steps": 1331, + "visited_spans": [ + 5, + 4, + 5, + 6, + 4, + 30, + 30 + ], + "retained_cells": 84 + }, + { + "records": 4, + "width": 3, + "payload_extent": 36, + "steps": { + "produce": 711, + "INIT": 335, + "CLEAR": 335, + "retire": 262 + }, + "total_steps": 1643, + "visited_spans": [ + 5, + 4, + 5, + 6, + 5, + 38, + 38 + ], + "retained_cells": 101 + }, + { + "records": 4, + "width": 17, + "payload_extent": 148, + "steps": { + "produce": 2422, + "INIT": 1343, + "CLEAR": 1343, + "retire": 1046 + }, + "total_steps": 6154, + "visited_spans": [ + 5, + 7, + 7, + 6, + 19, + 150, + 150 + ], + "retained_cells": 344 + }, + { + "records": 7, + "width": 1, + "payload_extent": 35, + "steps": { + "produce": 697, + "INIT": 326, + "CLEAR": 326, + "retire": 255 + }, + "total_steps": 1604, + "visited_spans": [ + 5, + 3, + 5, + 9, + 3, + 37, + 37 + ], + "retained_cells": 99 + }, + { + "records": 7, + "width": 2, + "payload_extent": 49, + "steps": { + "produce": 897, + "INIT": 452, + "CLEAR": 452, + "retire": 353 + }, + "total_steps": 2154, + "visited_spans": [ + 5, + 4, + 5, + 9, + 4, + 51, + 51 + ], + "retained_cells": 129 + }, + { + "records": 7, + "width": 3, + "payload_extent": 63, + "steps": { + "produce": 1075, + "INIT": 578, + "CLEAR": 578, + "retire": 451 + }, + "total_steps": 2682, + "visited_spans": [ + 5, + 4, + 5, + 9, + 5, + 65, + 65 + ], + "retained_cells": 158 + }, + { + "records": 7, + "width": 17, + "payload_extent": 259, + "steps": { + "produce": 3710, + "INIT": 2342, + "CLEAR": 2342, + "retire": 1823 + }, + "total_steps": 10217, + "visited_spans": [ + 5, + 7, + 7, + 9, + 19, + 261, + 261 + ], + "retained_cells": 569 + }, + { + "records": 8, + "width": 1, + "payload_extent": 40, + "steps": { + "produce": 808, + "INIT": 371, + "CLEAR": 371, + "retire": 290 + }, + "total_steps": 1840, + "visited_spans": [ + 6, + 3, + 6, + 10, + 3, + 42, + 42 + ], + "retained_cells": 112 + }, + { + "records": 8, + "width": 2, + "payload_extent": 56, + "steps": { + "produce": 1030, + "INIT": 515, + "CLEAR": 515, + "retire": 402 + }, + "total_steps": 2462, + "visited_spans": [ + 6, + 4, + 6, + 10, + 4, + 58, + 58 + ], + "retained_cells": 146 + }, + { + "records": 8, + "width": 3, + "payload_extent": 72, + "steps": { + "produce": 1230, + "INIT": 659, + "CLEAR": 659, + "retire": 514 + }, + "total_steps": 3062, + "visited_spans": [ + 6, + 4, + 6, + 10, + 5, + 74, + 74 + ], + "retained_cells": 179 + }, + { + "records": 8, + "width": 17, + "payload_extent": 296, + "steps": { + "produce": 4173, + "INIT": 2675, + "CLEAR": 2675, + "retire": 2082 + }, + "total_steps": 11605, + "visited_spans": [ + 6, + 7, + 7, + 10, + 19, + 298, + 298 + ], + "retained_cells": 645 + }, + { + "records": 15, + "width": 1, + "payload_extent": 75, + "steps": { + "produce": 1361, + "INIT": 686, + "CLEAR": 686, + "retire": 535 + }, + "total_steps": 3268, + "visited_spans": [ + 6, + 3, + 6, + 17, + 3, + 77, + 77 + ], + "retained_cells": 189 + }, + { + "records": 15, + "width": 2, + "payload_extent": 105, + "steps": { + "produce": 1737, + "INIT": 956, + "CLEAR": 956, + "retire": 745 + }, + "total_steps": 4394, + "visited_spans": [ + 6, + 4, + 6, + 17, + 4, + 107, + 107 + ], + "retained_cells": 251 + }, + { + "records": 15, + "width": 3, + "payload_extent": 135, + "steps": { + "produce": 2091, + "INIT": 1226, + "CLEAR": 1226, + "retire": 955 + }, + "total_steps": 5498, + "visited_spans": [ + 6, + 4, + 6, + 17, + 5, + 137, + 137 + ], + "retained_cells": 312 + }, + { + "records": 15, + "width": 17, + "payload_extent": 555, + "steps": { + "produce": 7190, + "INIT": 5006, + "CLEAR": 5006, + "retire": 3895 + }, + "total_steps": 21097, + "visited_spans": [ + 6, + 7, + 7, + 17, + 19, + 557, + 557 + ], + "retained_cells": 1170 + }, + { + "records": 16, + "width": 1, + "payload_extent": 80, + "steps": { + "produce": 1479, + "INIT": 731, + "CLEAR": 731, + "retire": 570 + }, + "total_steps": 3511, + "visited_spans": [ + 7, + 3, + 7, + 18, + 3, + 82, + 82 + ], + "retained_cells": 202 + }, + { + "records": 16, + "width": 2, + "payload_extent": 112, + "steps": { + "produce": 1877, + "INIT": 1019, + "CLEAR": 1019, + "retire": 794 + }, + "total_steps": 4709, + "visited_spans": [ + 7, + 4, + 7, + 18, + 4, + 114, + 114 + ], + "retained_cells": 268 + }, + { + "records": 16, + "width": 3, + "payload_extent": 144, + "steps": { + "produce": 2253, + "INIT": 1307, + "CLEAR": 1307, + "retire": 1018 + }, + "total_steps": 5885, + "visited_spans": [ + 7, + 4, + 7, + 18, + 5, + 146, + 146 + ], + "retained_cells": 333 + }, + { + "records": 16, + "width": 17, + "payload_extent": 592, + "steps": { + "produce": 7660, + "INIT": 5339, + "CLEAR": 5339, + "retire": 4154 + }, + "total_steps": 22492, + "visited_spans": [ + 7, + 7, + 7, + 18, + 19, + 594, + 594 + ], + "retained_cells": 1246 + }, + { + "records": 31, + "width": 1, + "payload_extent": 155, + "steps": { + "produce": 2681, + "INIT": 1406, + "CLEAR": 1406, + "retire": 1095 + }, + "total_steps": 6588, + "visited_spans": [ + 7, + 3, + 7, + 33, + 3, + 157, + 157 + ], + "retained_cells": 367 + }, + { + "records": 31, + "width": 2, + "payload_extent": 217, + "steps": { + "produce": 3409, + "INIT": 1964, + "CLEAR": 1964, + "retire": 1529 + }, + "total_steps": 8866, + "visited_spans": [ + 7, + 4, + 7, + 33, + 4, + 219, + 219 + ], + "retained_cells": 493 + }, + { + "records": 31, + "width": 3, + "payload_extent": 279, + "steps": { + "produce": 4115, + "INIT": 2522, + "CLEAR": 2522, + "retire": 1963 + }, + "total_steps": 11122, + "visited_spans": [ + 7, + 4, + 7, + 33, + 5, + 281, + 281 + ], + "retained_cells": 618 + }, + { + "records": 31, + "width": 17, + "payload_extent": 1147, + "steps": { + "produce": 14142, + "INIT": 10334, + "CLEAR": 10334, + "retire": 8039 + }, + "total_steps": 42849, + "visited_spans": [ + 7, + 7, + 7, + 33, + 19, + 1149, + 1149 + ], + "retained_cells": 2371 + }, + { + "records": 32, + "width": 1, + "payload_extent": 160, + "steps": { + "produce": 2806, + "INIT": 1451, + "CLEAR": 1451, + "retire": 1130 + }, + "total_steps": 6838, + "visited_spans": [ + 8, + 3, + 8, + 34, + 3, + 162, + 162 + ], + "retained_cells": 380 + }, + { + "records": 32, + "width": 2, + "payload_extent": 224, + "steps": { + "produce": 3556, + "INIT": 2027, + "CLEAR": 2027, + "retire": 1578 + }, + "total_steps": 9188, + "visited_spans": [ + 8, + 4, + 8, + 34, + 4, + 226, + 226 + ], + "retained_cells": 510 + }, + { + "records": 32, + "width": 3, + "payload_extent": 288, + "steps": { + "produce": 4284, + "INIT": 2603, + "CLEAR": 2603, + "retire": 2026 + }, + "total_steps": 11516, + "visited_spans": [ + 8, + 4, + 8, + 34, + 5, + 290, + 290 + ], + "retained_cells": 639 + }, + { + "records": 32, + "width": 17, + "payload_extent": 1184, + "steps": { + "produce": 14619, + "INIT": 10667, + "CLEAR": 10667, + "retire": 8298 + }, + "total_steps": 44251, + "visited_spans": [ + 8, + 7, + 8, + 34, + 19, + 1186, + 1186 + ], + "retained_cells": 2448 + }, + { + "records": 512, + "width": 1, + "payload_extent": 2560, + "steps": { + "produce": 42226, + "INIT": 23051, + "CLEAR": 23051, + "retire": 17930 + }, + "total_steps": 106258, + "visited_spans": [ + 12, + 3, + 12, + 514, + 3, + 2562, + 2562 + ], + "retained_cells": 5668 + }, + { + "records": 1024, + "width": 3, + "payload_extent": 9216, + "steps": { + "produce": 129351, + "INIT": 82955, + "CLEAR": 82955, + "retire": 64522 + }, + "total_steps": 359783, + "visited_spans": [ + 13, + 4, + 13, + 1026, + 5, + 9218, + 9218 + ], + "retained_cells": 19497 + } + ], + "controls": [ + { + "fault": "wrong zero bit", + "rejected_by": "exact immutable source guide" + }, + { + "fault": "missing represented blank write", + "rejected_by": "exact immutable source guide" + }, + { + "fault": "premature right marker", + "rejected_by": "exact immutable source guide" + }, + { + "fault": "missing guide origin return", + "rejected_by": "complete head return" + }, + { + "fault": "retained guide left marker", + "rejected_by": "complete guide retirement" + }, + { + "fault": "redundant high zero in binary N", + "rejected_by": "positive canonical binary extent and empty conversion workspace" + } + ], + "tapes": 7, + "table_rows": { + "produce": 210, + "INIT": 40, + "CLEAR": 40, + "retire": 16 + }, + "tables_sha256": "80dbda8b35725a8c459ebc4a9312e049d4ad79fa7e9d10b239f2a5319177d42d", + "all_cases_dense_checked": true, + "lifecycle_step_bound": "72L", + "historical_visited_cell_bound": "7L" +} diff --git a/research/current-flat-guide-lifecycle/SOURCES.json b/research/current-flat-guide-lifecycle/SOURCES.json new file mode 100644 index 0000000000..1c594e39a0 --- /dev/null +++ b/research/current-flat-guide-lifecycle/SOURCES.json @@ -0,0 +1,48 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/delayed-cover-physical-batch-routing/LICENSE", + "usage": "input", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "path": "research/delayed-cover-physical-batch-routing/NOTICE", + "usage": "input", + "git_blob": "bb50df155dbe56d9f43ad3bdfdd37a285a3c4d28", + "sha256": "f0837a654e53c575d4853caecf681a90ba9a14f40c7777da1ef81dbb2bf4bf7f" + }, + { + "path": "research/delayed-cover-physical-batch-routing/core/counters.py", + "usage": "input", + "git_blob": "c4878a7a7e3f390d193df496a579e4a788f25e32", + "sha256": "2b51181a3efd403be14111ed2d556ba10e63a8939756e69d488d12344d5a7ad1" + }, + { + "path": "research/delayed-cover-physical-batch-routing/core/inputs/COUNTER-PROOF.md", + "usage": "input", + "git_blob": "967eaeb4a17263194a6932b409a2637e133ad238", + "sha256": "2b5df8f57a9d36a8281e8267f1a9fefbccb4c5e5e044bdd73e911aa55acbfe24" + }, + { + "path": "research/delayed-cover-physical-batch-routing/core/machine.py", + "usage": "input", + "git_blob": "6ed03865cdb646d40573c132f841afbe335daba0", + "sha256": "04b7b76b9f06653d94d2158196cdd1bed7883dd1f59fcbc81a486e3ffb248681" + } + ] +} diff --git a/research/current-flat-guide-lifecycle/TABLES.json b/research/current-flat-guide-lifecycle/TABLES.json new file mode 100644 index 0000000000..4715a04169 --- /dev/null +++ b/research/current-flat-guide-lifecycle/TABLES.json @@ -0,0 +1,1935 @@ +{ + "produce": { + "tapes": 7, + "entry": 0, + "instructions": [ + [ + "write", + 2, + 1 + ], + [ + "move", + 2, + 1 + ], + [ + "write", + 3, + 1 + ], + [ + "move", + 3, + 1 + ], + [ + "write", + 4, + 1 + ], + [ + "move", + 4, + 1 + ], + [ + "goto", + 7 + ], + [ + "branch", + 0, + [ + [ + 3, + 8 + ], + [ + 4, + 14 + ] + ], + 69 + ], + [ + "branch", + 2, + [ + [ + 0, + 9 + ] + ], + 69 + ], + [ + "write", + 2, + 3 + ], + [ + "move", + 2, + 1 + ], + [ + "move", + 0, + 1 + ], + [ + "goto", + 13 + ], + [ + "branch", + 0, + [ + [ + 3, + 8 + ], + [ + 4, + 14 + ] + ], + 69 + ], + [ + "branch", + 2, + [ + [ + 0, + 15 + ] + ], + 69 + ], + [ + "write", + 2, + 4 + ], + [ + "move", + 2, + 1 + ], + [ + "move", + 0, + 1 + ], + [ + "goto", + 19 + ], + [ + "branch", + 0, + [ + [ + 2, + 20 + ], + [ + 3, + 8 + ], + [ + 4, + 14 + ] + ], + 69 + ], + [ + "branch", + 2, + [ + [ + 0, + 21 + ] + ], + 69 + ], + [ + "write", + 2, + 2 + ], + [ + "move", + 0, + -1 + ], + [ + "branch", + 0, + [ + [ + 1, + 26 + ] + ], + 24 + ], + [ + "move", + 0, + -1 + ], + [ + "goto", + 23 + ], + [ + "move", + 0, + 1 + ], + [ + "move", + 2, + -1 + ], + [ + "branch", + 2, + [ + [ + 1, + 31 + ] + ], + 29 + ], + [ + "move", + 2, + -1 + ], + [ + "goto", + 28 + ], + [ + "move", + 2, + 1 + ], + [ + "branch", + 3, + [ + [ + 0, + 33 + ] + ], + 69 + ], + [ + "write", + 3, + 5 + ], + [ + "move", + 3, + 1 + ], + [ + "branch", + 2, + [ + [ + 3, + 36 + ], + [ + 4, + 39 + ] + ], + 69 + ], + [ + "write", + 2, + 4 + ], + [ + "move", + 2, + 1 + ], + [ + "goto", + 35 + ], + [ + "write", + 2, + 3 + ], + [ + "move", + 2, + 1 + ], + [ + "branch", + 2, + [ + [ + 2, + 48 + ], + [ + 3, + 42 + ], + [ + 4, + 42 + ] + ], + 69 + ], + [ + "move", + 2, + -1 + ], + [ + "branch", + 2, + [ + [ + 1, + 46 + ] + ], + 44 + ], + [ + "move", + 2, + -1 + ], + [ + "goto", + 43 + ], + [ + "move", + 2, + 1 + ], + [ + "goto", + 32 + ], + [ + "write", + 2, + 0 + ], + [ + "move", + 2, + -1 + ], + [ + "write", + 2, + 2 + ], + [ + "move", + 2, + -1 + ], + [ + "branch", + 2, + [ + [ + 1, + 60 + ], + [ + 4, + 53 + ] + ], + 69 + ], + [ + "move", + 2, + 1 + ], + [ + "move", + 2, + -1 + ], + [ + "branch", + 2, + [ + [ + 1, + 58 + ] + ], + 56 + ], + [ + "move", + 2, + -1 + ], + [ + "goto", + 55 + ], + [ + "move", + 2, + 1 + ], + [ + "goto", + 32 + ], + [ + "move", + 2, + 1 + ], + [ + "write", + 2, + 0 + ], + [ + "write", + 3, + 2 + ], + [ + "move", + 3, + -1 + ], + [ + "branch", + 3, + [ + [ + 1, + 67 + ] + ], + 65 + ], + [ + "move", + 3, + -1 + ], + [ + "goto", + 64 + ], + [ + "move", + 3, + 1 + ], + [ + "goto", + 70 + ], + [ + "reject", + "positive canonical binary extent and empty conversion workspace" + ], + [ + "goto", + 71 + ], + [ + "branch", + 1, + [ + [ + 3, + 72 + ], + [ + 4, + 78 + ] + ], + 133 + ], + [ + "branch", + 2, + [ + [ + 0, + 73 + ] + ], + 133 + ], + [ + "write", + 2, + 3 + ], + [ + "move", + 2, + 1 + ], + [ + "move", + 1, + 1 + ], + [ + "goto", + 77 + ], + [ + "branch", + 1, + [ + [ + 3, + 72 + ], + [ + 4, + 78 + ] + ], + 133 + ], + [ + "branch", + 2, + [ + [ + 0, + 79 + ] + ], + 133 + ], + [ + "write", + 2, + 4 + ], + [ + "move", + 2, + 1 + ], + [ + "move", + 1, + 1 + ], + [ + "goto", + 83 + ], + [ + "branch", + 1, + [ + [ + 2, + 84 + ], + [ + 3, + 72 + ], + [ + 4, + 78 + ] + ], + 133 + ], + [ + "branch", + 2, + [ + [ + 0, + 85 + ] + ], + 133 + ], + [ + "write", + 2, + 2 + ], + [ + "move", + 1, + -1 + ], + [ + "branch", + 1, + [ + [ + 1, + 90 + ] + ], + 88 + ], + [ + "move", + 1, + -1 + ], + [ + "goto", + 87 + ], + [ + "move", + 1, + 1 + ], + [ + "move", + 2, + -1 + ], + [ + "branch", + 2, + [ + [ + 1, + 95 + ] + ], + 93 + ], + [ + "move", + 2, + -1 + ], + [ + "goto", + 92 + ], + [ + "move", + 2, + 1 + ], + [ + "branch", + 4, + [ + [ + 0, + 97 + ] + ], + 133 + ], + [ + "write", + 4, + 5 + ], + [ + "move", + 4, + 1 + ], + [ + "branch", + 2, + [ + [ + 3, + 100 + ], + [ + 4, + 103 + ] + ], + 133 + ], + [ + "write", + 2, + 4 + ], + [ + "move", + 2, + 1 + ], + [ + "goto", + 99 + ], + [ + "write", + 2, + 3 + ], + [ + "move", + 2, + 1 + ], + [ + "branch", + 2, + [ + [ + 2, + 112 + ], + [ + 3, + 106 + ], + [ + 4, + 106 + ] + ], + 133 + ], + [ + "move", + 2, + -1 + ], + [ + "branch", + 2, + [ + [ + 1, + 110 + ] + ], + 108 + ], + [ + "move", + 2, + -1 + ], + [ + "goto", + 107 + ], + [ + "move", + 2, + 1 + ], + [ + "goto", + 96 + ], + [ + "write", + 2, + 0 + ], + [ + "move", + 2, + -1 + ], + [ + "write", + 2, + 2 + ], + [ + "move", + 2, + -1 + ], + [ + "branch", + 2, + [ + [ + 1, + 124 + ], + [ + 4, + 117 + ] + ], + 133 + ], + [ + "move", + 2, + 1 + ], + [ + "move", + 2, + -1 + ], + [ + "branch", + 2, + [ + [ + 1, + 122 + ] + ], + 120 + ], + [ + "move", + 2, + -1 + ], + [ + "goto", + 119 + ], + [ + "move", + 2, + 1 + ], + [ + "goto", + 96 + ], + [ + "move", + 2, + 1 + ], + [ + "write", + 2, + 0 + ], + [ + "write", + 4, + 2 + ], + [ + "move", + 4, + -1 + ], + [ + "branch", + 4, + [ + [ + 1, + 131 + ] + ], + 129 + ], + [ + "move", + 4, + -1 + ], + [ + "goto", + 128 + ], + [ + "move", + 4, + 1 + ], + [ + "goto", + 134 + ], + [ + "reject", + "positive canonical binary extent and empty conversion workspace" + ], + [ + "write", + 5, + 1 + ], + [ + "move", + 5, + 1 + ], + [ + "branch", + 3, + [ + [ + 2, + 165 + ], + [ + 5, + 137 + ] + ], + 208 + ], + [ + "branch", + 4, + [ + [ + 2, + 142 + ], + [ + 5, + 138 + ] + ], + 209 + ], + [ + "write", + 5, + 3 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 4, + 1 + ], + [ + "goto", + 137 + ], + [ + "move", + 4, + -1 + ], + [ + "branch", + 4, + [ + [ + 1, + 146 + ] + ], + 144 + ], + [ + "move", + 4, + -1 + ], + [ + "goto", + 143 + ], + [ + "move", + 4, + 1 + ], + [ + "write", + 5, + 5 + ], + [ + "move", + 5, + 1 + ], + [ + "branch", + 4, + [ + [ + 2, + 154 + ], + [ + 5, + 150 + ] + ], + 209 + ], + [ + "write", + 5, + 3 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 4, + 1 + ], + [ + "goto", + 149 + ], + [ + "move", + 4, + -1 + ], + [ + "branch", + 4, + [ + [ + 1, + 158 + ] + ], + 156 + ], + [ + "move", + 4, + -1 + ], + [ + "goto", + 155 + ], + [ + "move", + 4, + 1 + ], + [ + "write", + 5, + 6 + ], + [ + "move", + 5, + 1 + ], + [ + "write", + 5, + 0 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 3, + 1 + ], + [ + "goto", + 136 + ], + [ + "write", + 5, + 2 + ], + [ + "move", + 5, + -1 + ], + [ + "branch", + 5, + [ + [ + 1, + 170 + ] + ], + 168 + ], + [ + "move", + 5, + -1 + ], + [ + "goto", + 167 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 3, + -1 + ], + [ + "branch", + 3, + [ + [ + 1, + 176 + ] + ], + 174 + ], + [ + "move", + 3, + -1 + ], + [ + "goto", + 173 + ], + [ + "move", + 3, + 1 + ], + [ + "branch", + 3, + [ + [ + 2, + 181 + ], + [ + 5, + 178 + ] + ], + 190 + ], + [ + "write", + 3, + 0 + ], + [ + "move", + 3, + 1 + ], + [ + "goto", + 177 + ], + [ + "write", + 3, + 0 + ], + [ + "move", + 3, + -1 + ], + [ + "branch", + 3, + [ + [ + 1, + 186 + ] + ], + 184 + ], + [ + "move", + 3, + -1 + ], + [ + "goto", + 183 + ], + [ + "move", + 3, + 1 + ], + [ + "move", + 3, + -1 + ], + [ + "write", + 3, + 0 + ], + [ + "goto", + 191 + ], + [ + "reject", + "complete marked body" + ], + [ + "branch", + 4, + [ + [ + 2, + 195 + ], + [ + 5, + 192 + ] + ], + 204 + ], + [ + "write", + 4, + 0 + ], + [ + "move", + 4, + 1 + ], + [ + "goto", + 191 + ], + [ + "write", + 4, + 0 + ], + [ + "move", + 4, + -1 + ], + [ + "branch", + 4, + [ + [ + 1, + 200 + ] + ], + 198 + ], + [ + "move", + 4, + -1 + ], + [ + "goto", + 197 + ], + [ + "move", + 4, + 1 + ], + [ + "move", + 4, + -1 + ], + [ + "write", + 4, + 0 + ], + [ + "goto", + 205 + ], + [ + "reject", + "complete marked body" + ], + [ + "move", + 2, + -1 + ], + [ + "write", + 2, + 0 + ], + [ + "halt" + ], + [ + "reject", + "positive unary record count" + ], + [ + "reject", + "positive unary component width" + ] + ] + }, + "INIT": { + "tapes": 7, + "entry": 0, + "instructions": [ + [ + "branch", + 5, + [ + [ + 1, + 1 + ] + ], + 39 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "branch", + 5, + [ + [ + 0, + 5 + ], + [ + 2, + 9 + ], + [ + 3, + 12 + ], + [ + 5, + 16 + ], + [ + 6, + 20 + ] + ], + 39 + ], + [ + "write", + 6, + 0 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "write", + 6, + 3 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "write", + 6, + 5 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "write", + 6, + 6 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "branch", + 5, + [ + [ + 0, + 25 + ], + [ + 1, + 28 + ], + [ + 3, + 29 + ], + [ + 5, + 32 + ], + [ + 6, + 35 + ] + ], + 39 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "goto", + 38 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "halt" + ], + [ + "reject", + "current flat zero guide" + ] + ] + }, + "CLEAR": { + "tapes": 7, + "entry": 0, + "instructions": [ + [ + "branch", + 5, + [ + [ + 1, + 1 + ] + ], + 39 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "branch", + 5, + [ + [ + 0, + 5 + ], + [ + 2, + 9 + ], + [ + 3, + 12 + ], + [ + 5, + 16 + ], + [ + 6, + 20 + ] + ], + 39 + ], + [ + "write", + 6, + 0 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "write", + 6, + 0 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "write", + 6, + 0 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "write", + 6, + 0 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 6, + 1 + ], + [ + "goto", + 4 + ], + [ + "branch", + 5, + [ + [ + 0, + 25 + ], + [ + 1, + 28 + ], + [ + 3, + 29 + ], + [ + 5, + 32 + ], + [ + 6, + 35 + ] + ], + 39 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "goto", + 38 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "move", + 5, + -1 + ], + [ + "move", + 6, + -1 + ], + [ + "goto", + 24 + ], + [ + "halt" + ], + [ + "reject", + "current flat zero guide" + ] + ] + }, + "retire": { + "tapes": 7, + "entry": 0, + "instructions": [ + [ + "move", + 5, + 1 + ], + [ + "branch", + 5, + [ + [ + 0, + 2 + ], + [ + 2, + 5 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 6, + 2 + ] + ], + 14 + ], + [ + "write", + 5, + 0 + ], + [ + "move", + 5, + 1 + ], + [ + "goto", + 1 + ], + [ + "write", + 5, + 0 + ], + [ + "move", + 5, + -1 + ], + [ + "branch", + 5, + [ + [ + 1, + 10 + ] + ], + 8 + ], + [ + "move", + 5, + -1 + ], + [ + "goto", + 7 + ], + [ + "move", + 5, + 1 + ], + [ + "move", + 5, + -1 + ], + [ + "write", + 5, + 0 + ], + [ + "goto", + 15 + ], + [ + "reject", + "complete marked body" + ], + [ + "halt" + ] + ] + } +} diff --git a/research/current-flat-guide-lifecycle/TASK.json b/research/current-flat-guide-lifecycle/TASK.json new file mode 100644 index 0000000000..59bb1fad99 --- /dev/null +++ b/research/current-flat-guide-lifecycle/TASK.json @@ -0,0 +1,92 @@ +{ + "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": "Produce the current flat guide from physical binary N,W, feed it to literal source INIT/CLEAR and retire it on seven fixed tapes with a complete local bill.", + "scope_change_reason": "The new current-native selector leaves guide production open. Reuse the retained literal counter and interpreter, then connect the different current flat-guide format to its actual reset consumer.", + "bottleneck_link": "This supplies the missing binary-descriptor to immutable-guide lifecycle for the local native reset interface. It keeps root descriptor production and the actual recursive owner map separate.", + "budget_minutes": 100, + "stop_rule": "Stop at fixed tables, all-size local proof and complete instruction/visited-capacity counts with independent finite execution and real faults. Do not claim numerical children or a complete compiler.", + "outcome": "completed", + "evidence": "PROOF.md, TABLES.json and RESULT.json give seven fixed tapes, 210/40/40/16 instruction tables, 42 shapes checked by two interpreters, six controls, a 72L lifecycle bound and retained historical spans.", + "author": "Ali Romman", + "ai_assistance": "Ali Romman directed the work with substantial OpenAI Codex assistance. The David Arias machine/counter and the PR7663 guide/reset source are unchanged. New work is the emitted producer/consumer lifecycle and its proof/checker.", + "open_questions": [ + { + "question": "Can one actual compiled owner map supply the binary descriptors and complete guide windows for this lifecycle?", + "why_it_matters": "The local program starts with binary N,W and exact granted windows. It does not derive their full recursive allocation.", + "first_step": "Export one current compiled parent/child owner map and its root width and spectator counts, then bind these physical descriptors and guide windows.", + "blocked_by": "The retained compiler and native adapter interfaces must deliver the concrete map." + }, + { + "question": "Can the guide be shared across same-format owners with complete selector, lifetime and retirement charges?", + "why_it_matters": "Immutability allows borrowing but does not make guide access or retained capacity free.", + "first_step": "Compose this physical producer with the charged selector on one actual owner schedule and keep all guide and parent backing resident until the last borrow returns.", + "blocked_by": "The complete source schedule and physical owner locations must be supplied." + } + ], + "coordination_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19700192", + "handoff_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19699833", + "family_decision": "Continue one local producer/consumer completion after the selector. The donor-based typed initializer and delayed-cover root producer have different contracts. Known counter costs and complete local scans are charged. Root descriptors, numerical children, actual cross-depth allocation and common physical pricing remain open." +} diff --git a/research/current-flat-guide-lifecycle/VENDORED.json b/research/current-flat-guide-lifecycle/VENDORED.json new file mode 100644 index 0000000000..e8b7da8092 --- /dev/null +++ b/research/current-flat-guide-lifecycle/VENDORED.json @@ -0,0 +1,76 @@ +{ + "files": [ + { + "path": "source/LICENSE", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/LICENSE", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "path": "source/NOTICE", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/NOTICE", + "git_blob": "6ce1bc49a3612c9e906df02de81bcba84be8e803", + "sha256": "5fd4367578d2339fbdcd7dc116b6c12cb4fa72e92d2e3d67be537a36c8bd9d40" + }, + { + "path": "source/PROOF.md", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/PROOF.md", + "git_blob": "8e0c250e1befc08be6fffe64e1b9e9c27d9fe7dc", + "sha256": "e3e4979914a839915ded5e2675cfbecd8bf9abe00052c7ddd080da1934d5b481" + }, + { + "path": "source/README.md", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/README.md", + "git_blob": "dc4f1e1ce03afb572338fd756daa697cda35d5a2", + "sha256": "8e4d7ab5472b7f7ced01384d40ae1dd952e8441db1ad772bb1f9bdaca344e03b" + }, + { + "path": "source/banks.py", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/banks.py", + "git_blob": "4ff2ba398b8975802c29a4683750341585158907", + "sha256": "a3f6ee279ea6ca5555f3e21911648063f2ebc1aa7b015b9666d8020865f8d518" + }, + { + "path": "source/source/parent-NOTICE", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/source/parent-NOTICE", + "git_blob": "cd7d35e2cb65e0945b17650aba43ade6e0676856", + "sha256": "a747270c15ce19ff629dfcf86b959de43cf8bf26e1a01c981f6b22961337030c" + }, + { + "path": "source/source/physical-NOTICE", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/source/physical-NOTICE", + "git_blob": "6bec37798ca6e281611b27d05281015c8e6897a7", + "sha256": "2a6866cd67ac34a9a3cb82df4faffe19a08ba1aeab9f67436764c15bb443b07c" + }, + { + "path": "source/source/word-NOTICE", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/source/word-NOTICE", + "git_blob": "2baa2a719ea3a9ec94c2e7aec72702ec8c92b346", + "sha256": "2732575164931c53cc4bc57145c31d87741489e3048afee6899e856c0ea503b5" + }, + { + "path": "source/word.py", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/word.py", + "git_blob": "d497414bba265eb332ec45c508f7f5ca29053978", + "sha256": "7bc01b0c42506580230a1d5e6fb856f08420bbbdab502611a5c090c5120b4f4a" + } + ] +} diff --git a/research/current-flat-guide-lifecycle/VERIFY.json b/research/current-flat-guide-lifecycle/VERIFY.json new file mode 100644 index 0000000000..0c6a638cf4 --- /dev/null +++ b/research/current-flat-guide-lifecycle/VERIFY.json @@ -0,0 +1,40 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/delayed-cover-physical-batch-routing/LICENSE", + "research/delayed-cover-physical-batch-routing/NOTICE", + "research/delayed-cover-physical-batch-routing/core/counters.py", + "research/delayed-cover-physical-batch-routing/core/inputs/COUNTER-PROOF.md", + "research/delayed-cover-physical-batch-routing/core/machine.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Exact fixed tables, 42 producer/consumer/retire shapes under two interpreters, complete instruction/span bounds and six semantic controls." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Exact fixed tables, 42 producer/consumer/retire shapes under two interpreters, complete instruction/span bounds and six semantic controls with assertions disabled." + } + ] +} diff --git a/research/current-flat-guide-lifecycle/program.py b/research/current-flat-guide-lifecycle/program.py new file mode 100644 index 0000000000..0a19625a97 --- /dev/null +++ b/research/current-flat-guide-lifecycle/program.py @@ -0,0 +1,121 @@ +"""Emit one fixed guide producer, two source consumers and a retire program.""" +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +RUNTIME = HERE.parents[1] / 'research/delayed-cover-physical-batch-routing/core' +sys.path.insert(0, str(RUNTIME)) +from machine import Assembler, BLANK, LEFT, RIGHT, ZERO, ONE, UNIT, MARK +from counters import emit_binary_to_unary, emit_rewind +sys.path.insert(0, str(HERE / 'source')) +import banks + +N, W, WORK, ROWS, WIDTH, GUIDE, TARGET = range(7) +ENCODE = {('left', None): LEFT, ('right', None): RIGHT, + ('cell', '0'): ZERO, ('cell', ':'): UNIT, + ('cell', '|'): MARK, ('cell', '_'): BLANK} +PAYLOAD = {'0': ZERO, ':': UNIT, '|': MARK, '_': BLANK} + + +def erase(asm, tape, symbols): + """Erase a marked body and both markers; return to its blank origin.""" + loop, cell, end, fail = [asm.fresh('erase_' + name) for name in ('loop', 'cell', 'end', 'fail')] + asm.label(loop) + asm.branch(tape, {**{s: cell for s in symbols}, RIGHT: end}, fail) + asm.label(cell) + asm.write(tape, BLANK) + asm.move(tape, 1) + asm.goto(loop) + asm.label(end) + asm.write(tape, BLANK) + emit_rewind(asm, tape) + asm.move(tape, -1) + asm.write(tape, BLANK) + done = asm.fresh('erase_done') + asm.goto(done) + asm.label(fail) + asm.reject('complete marked body') + asm.label(done) + + +def producer(): + asm = Assembler(7) + for tape in (WORK, ROWS, WIDTH): + asm.write(tape, LEFT) + asm.move(tape, 1) + emit_binary_to_unary(asm, N, WORK, ROWS, 'rows') + emit_binary_to_unary(asm, W, WORK, WIDTH, 'width') + asm.write(GUIDE, LEFT) + asm.move(GUIDE, 1) + asm.label('next_record') + asm.branch(ROWS, {UNIT: 'record', RIGHT: 'finished'}, 'bad_rows') + asm.label('record') + for component in ('real', 'imaginary'): + loop, cell, done = [asm.fresh(component + '_' + name) for name in ('loop', 'cell', 'done')] + asm.label(loop) + asm.branch(WIDTH, {UNIT: cell, RIGHT: done}, 'bad_width') + asm.label(cell) + asm.write(GUIDE, ZERO) + asm.move(GUIDE, 1) + asm.move(WIDTH, 1) + asm.goto(loop) + asm.label(done) + emit_rewind(asm, WIDTH) + asm.write(GUIDE, UNIT if component == 'real' else MARK) + asm.move(GUIDE, 1) + asm.write(GUIDE, BLANK) + asm.move(GUIDE, 1) + asm.move(ROWS, 1) + asm.goto('next_record') + asm.label('finished') + asm.write(GUIDE, RIGHT) + emit_rewind(asm, GUIDE) + asm.move(GUIDE, -1) + emit_rewind(asm, ROWS) + erase(asm, ROWS, (UNIT,)) + erase(asm, WIDTH, (UNIT,)) + asm.move(WORK, -1) + asm.write(WORK, BLANK) + asm.halt() + asm.label('bad_rows') + asm.reject('positive unary record count') + asm.label('bad_width') + asm.reject('positive unary component width') + return asm.finish() + + +def retire(): + asm = Assembler(7) + asm.move(GUIDE, 1) + erase(asm, GUIDE, (ZERO, UNIT, MARK, BLANK)) + asm.halt() + return asm.finish() + + +def consumer(operation): + source = banks.graph(operation) + asm = Assembler(7) + for state in ('start', 'out', 'back'): + cases = {token: source[state, *token] for token in sorted(ENCODE, key=ENCODE.get) + if (state, *token) in source} + labels = {token: asm.fresh(state + '_action') for token in cases} + asm.label(state) + asm.branch(GUIDE, {ENCODE[t]: labels[t] for t in cases}, 'bad_guide') + for token, (next_state, write, move) in cases.items(): + asm.label(labels[token]) + if write is not None: + asm.write(TARGET, PAYLOAD[write]) + if move: + asm.move(GUIDE, move) + asm.move(TARGET, move) + asm.goto(next_state) + asm.label('done') + asm.halt() + asm.label('bad_guide') + asm.reject('current flat zero guide') + return asm.finish('start') + + +def build(): + return {'produce': producer(), 'INIT': consumer('INIT'), + 'CLEAR': consumer('CLEAR'), 'retire': retire()} diff --git a/research/current-flat-guide-lifecycle/source/LICENSE b/research/current-flat-guide-lifecycle/source/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/current-flat-guide-lifecycle/source/NOTICE b/research/current-flat-guide-lifecycle/source/NOTICE new file mode 100644 index 0000000000..6ce1bc49a3 --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/NOTICE @@ -0,0 +1,7 @@ +Apache-2.0. Ali Romman with substantial OpenAI Codex assistance. + +The new material is the joint chart assignment, its source-bound operator and caller checks, and the fresh-cost complete-root scalar and private-bank specialization. The parent data are from Clear1nsight's PR #7660 on DreamingOfClouds' PRs #7658 and #7641 and SYLforge's PR #7637. The contributors credited in those sources retain their credit. Original notices are in source/parent-NOTICE, source/physical-NOTICE and source/word-NOTICE. + +Rohan Arun supplied the 17-stage signed caller in PR #7113. The unmodified interval gate and the exact caller data come from its pinned source. See source/caller-NOTICE and source/independent-NOTICE, and the source file inventory for all consumed bytes. The two operator engines and integer power evaluator come from the declared current-main inputs. + +Jerry Chen (CubeJerry) supplied selected PRs #7000 and #7001. The selected application and its phase, common-root, finite-cost and compiler arguments, the odd-native common-grid package, the prior typed six-Gamma reset of PR #7586 and the contributors credited in those records provided the foundations used here. PR #7661 independently derives the fixed caller residuals. PR #7662 supplies a rounded parent-clock alternative. This package uses neither implementation. diff --git a/research/current-flat-guide-lifecycle/source/PROOF.md b/research/current-flat-guide-lifecycle/source/PROOF.md new file mode 100644 index 0000000000..8e0c250e1b --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/PROOF.md @@ -0,0 +1,71 @@ +# A joint change of native charts with a full-extent implementation + +## Result and comparison + +Under the five assumptions in the selected record, the construction below gives a conditional multiplication saving of **κ = 0.0037194530062**. The selected conditional saving at the base commit is 0.00363005817. Most of the numerical difference comes from the open P104 constructions that led to PR #7660. That PR gave 0.0037170835567 under an additional fixed-tariff supplier condition. The new numerical step above its stated bound is 0.0000023694495. The contribution also gives an exact digital implementation of the scalar and private-extent parts of this changed word with new finite costs. This implementation has its own input domain and physical cost definition. + +The base is `e54523517d0f03e58352e647c403a5af3e525a57`. The open parent is Clear1nsight's [PR #7660](https://github.com/CrocSwap/integer-mult-bounds/pull/7660) at `d12b854d4825e9edfa3a3466909e1abf3525e929`. Its [review](https://github.com/CrocSwap/integer-mult-bounds/blob/d12b854d4825e9edfa3a3466909e1abf3525e929/research/p104-role379-idle-stop/REVIEW.md) identifies the dirty-storage and signed half-ADD obligations. The selected [application proof, sections 2–7](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md) supplies the root layout, complete axes, primitive movement rate, delayed-cover BIT backend and finite-template substitution used below. + +## 1. Construction and exact local identity + +Interpret each chart as a subspace of the nine-dimensional binary vector space. Start with the parent word. Intersect the selected chart at 15 scalar contacts with the hyperplane of normal 42. Adjoin direction 384 at 18 other scalar contacts. Apply the same restriction to four helper exits and the same extension to two helper entrances. At each changed contact both operands have the new chart. Emit the intervening nested MOVEs in chronological order. The published edit also assigns the appropriate chart labels to eight SCALEs and to the INIT and CLEAR of one stationary lifetime of role 1523. The scalar sequence, operand roles and coefficients have exact parent equality. + +The construction used inclusion constraints between consecutive contacts. Main endpoints were fixed. At a trial direction, adding that direction at a smaller node implies its addition at a larger node that does not already contain it. Restriction gives the reverse implication. A minimum-weight closure at a trial power nominated the two sets. The witness consists of the actual 87 replacements in [EDIT.json](EDIT.json). The proof and the price use that witness directly. The search gives no global optimality claim. + +The three appended ordered bases are `[51,196,324]`, `[30,193,321]` and `[52,82,384]`. The last index of the extended table is 1098. The two starts are 740 and 1356. The four ends are 289, 325, 1052 and 1087. There are 6,161 native MOVEs. Six parent MOVEs disappear and two new ones occur. The remaining substitutions preserve the 47 private MOVEs. The reconstructed 150,005-event word has canonical SHA-256 `f95eabd1734c7a74f58428cb12f261a81032bef01aed78c8147a4e4f90636939`. + +Let a register at chart A denote the physical array T_A z. At native column multiplicity f replace T_A by its f-fold tensor product and include the identity on all spectators. A MOVE from A to B acts by T_B T_A⁻¹. An equal-chart ADD acts on z by its literal scalar operation. A fresh private zero has this representation at every chart. The exact integer interpreter uses an independent basis vector for each of the 1,501 public inputs and checks every main port, every autonomous helper and all 234 chronological erasure identities. Each identity uses only distinct live donors. When role 1523 changes chart, its normalized row and live-donor identity stay valid. Its physical retirement is a complete overwrite as described in section 4. + +For a helper at entrance E, assign the arbitrary *actual* input array x to z = T_E⁻¹ x in the proof. Its independent normalized endpoint is z, so the physical endpoint is T_G T_E⁻¹ x. The two checked monomial adapters for this pair expose one positive rank-(dim G − dim E) child. This applies also to the two new chart-1098 starts and the inherited chart-281 start of role 457. Each helper has its own physical owner. The expression defining z requires no physical preparation of a correlated input. + +The union of paid pairs and helper boundary pairs contains 3,023 distinct operators. The two base engines build the monomial–positive-child–monomial recipe and check its complete signed Pauli action and its absolute Gaussian phase for every pair. Equal Clifford action on the Pauli generators fixes a matrix up to a scalar. Equality on the image of the zero-basis vector fixes that scalar. We also compare *every* one of 512 forward and 512 adjoint columns on each of the 18 pairs absent from the parent's catalogue. All 104 main boundaries get a separate two-sided phase check. Every slice rejects a phase-only corruption with unchanged Pauli action. The retained native all-columns assumption supplies the actual adapters at each multiplicity and their complete physical returns. + +## 2. Complete signed caller and funding + +Use Rohan Arun's [17-stage signed caller](https://github.com/CrocSwap/integer-mult-bounds/pull/7113) at `07a76c5e2738882c0cb322278e56f6cae3c9885d`. Its literal bytes have SHA-256 `255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc`. Each stage uses its own eight body axes and the nine central axes, for actual ambient rank 145. The port q and its eight complementary directions determine the original stage exchange. All main port and caller bytes that determine those exchanges agree with the parent. The input and output correction maps for each such port have rank zero, including absolute phase. A second plane uses separate owners with the same charts. Each stage binds exactly 400 distinct main owners and 1,101 fresh arbitrary helpers. Its two A shears and B butterfly have the literal normalized endpoint operators checked in the native replay. + +The caller replay uses exact Gaussian integer coefficients at grid scale 675 × 2³⁸¹. Its monomials have an independent nonnegative exponent for each stage and a head power modulo four. The stage factors commute on disjoint complete axes, and the head commutes with each stage. Equality in this algebra therefore gives equality after physical substitution. At a joint instruction both B outputs consume the old two B rows. All 72 formal output rows return the declared diagonal monomials on the same input owner. Replication on their actual ports gives 3,744 distinct root owners. Every one has positive body degree. All 18,717 fresh helper owners have separate stage and role tags. QUERY and both kinds of idle retain their cost. LAMBDA uses the original ordinary signed lowering. + +| Complete count | Open parent | New word | +| --- | ---: | ---: | +| Paid positions | 108,581 | 108,513 | +| Productive fields | 22,461 | 22,461 | +| Rank-mass surplus | 1,424 | 1,424 | + +Across all 17 calls, the paid changes at ranks 1 through 7 are +17, −136, +85, −102, +68, +34, −34. The target changes at ranks 4 through 7 are +68, −68, +34, −34. The verifier derives both complete histograms from their literal words and caller operations. + +Let M(k) be the sum of (target count − paid count) times r^(1−k). Directed integer powers at 256 bits and an independent directed log/exp evaluator both give positive M at 0.00371945300635 and negative M at 0.00371945300636. The complete application uses the interior probe 0.00371945300627, seven gaps above the claim. Each gap is 10⁻¹⁴. The bound on the derivative is negative throughout the required interval. With the retained product power 1,920, paid cutoff 11, target floor 12 and offset 1/7, alpha is strictly below 1 − 10⁻²⁷ and both tail ratios are below 31/32. The separated compiler and input-lift tests pass. The logarithm power is 2,283 and the recovered H is 14,532,700,000,000,000,000. All 54 strict and four functional outer predicates pass. The weakest margin is 10⁻¹⁵. The selected BIT saving 0.00385248 supplies the weaker 0.00376669 used here. Fixing this caller and word gives only the displayed raw crossing as compiler headroom. + +## 3. Common exact grid on the complete root + +Use the [per-call common-grid induction](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/research/odd-native-common-grid/PROOF.md). Scale each of the 3,744 actual caller entrance arrays by 675 and unscale each corresponding exit. At each native invocation scale all 1,501 actual public entrance arrays by 225 and unscale their completed outputs. Here “array” includes both signed components. These give 58,522 complete-array conversions, including the native helpers. Fresh native helpers are outside the caller's main-root conversion. Both source and destination remain on the common numerical grid. + +For the native prefix, represent every coefficient in units 1/(225 × 2¹⁴). The integer interpreter checks every nonzero pre-ADD product before addition and every SCALE product, and verifies the endpoint matrix exactly. The maximum scaled coefficient l1 mass is 58,120,605/2, including partial rows at logical cuts and the pre-products. For the caller, the corresponding scaled mass is 113,707,503,000. The Laurent interpreter tracks each live symbolic coefficient and every separated pre-product, including the two terms of LAMBDA. It checks 176,874 exact pre-product divisions. Physical port replication duplicates independent rows and does not multiply the mass of a row. + +In one unfinished raw context the exterior coefficient height is at most 381 + 14 = 395. The product of these two mass bounds is 3,304,374,433,699,657,500 < 2⁶². This also bounds a fresh helper at unit mass. At the entrance of an inner word, a left multiplication by a whole Clifford preserves the exterior coefficients. After a completed child, its positive Gaussian map joins the parent Clifford and all previous exterior debt is retained. This gives an induction in the *ideal finite instruction tree*. It does not require separately rounded descendants to return exact results. A partially executed ordinary SWAP contributes the one factor two of the selected proof. No SWAP encloses a child. + +In the notation of the selected root proof, c = 2 max(395,62) = 790. Write K* = 1920 × 153^1920 × (H+1)². The checked bit length of 790 K* is 14,083, which is strictly less than H. At incomplete context depth t ≤ K* floor(log_(2^H) D), recursion gives 790t < D. With root inputs on grid 2⁻ᵖ and component magnitudes below 2ʰ, the Clifford row bound gives required fractional width at most p + ceil(D/2) + 395t. The mass bound gives fewer than h + D + 2 magnitude bits. Use F = p+D fractional bits, W = p+h+2D+3 signed bits and W+26 temporary bits. Each instruction with an exact representable input has its exact result in this same root format. All scalar numerators, including scale conversions, have at most 18 bits. The initial/final layer passes, the remaining root axes, reserved ROW factors, final H0 normalization and single final truncation follow sections 5–7 of the selected application with these substituted constants. + +At candidate clock 100501 the MOVE of 457 into chart 218 completes. At clock 100502 role 210 consumes −457/2. The native integer replay finds 187 supported input coordinates and even numerators for all of them on its local grid. The all-width conclusion uses the complete-root argument above for the *physical* Clifford state, including the pre-product. A physical odd last tick on an independently rounded child can fail exact division. Such a supplier needs a different rounding/error contract. [PR #7662](https://github.com/CrocSwap/integer-mult-bounds/pull/7662) studies a rounded alternative at the parent clock. + +## 4. Full private extent, fixed tapes and physical cost + +Choose a fresh tagged home for each actual lifetime. In a raw caller a tag is (stage, chronological INIT ordinal). The 17 invocations have 3,978 distinct full native homes, 7,956 INIT/CLEAR services and peak 50 simultaneous live labels within a native invocation. The program declares 68 native labels and uses 52. Reserve each physical home until its entire enclosing occurrence returns. This charge includes inactive lifetime banks and all prior physical backing. A private home never supplies a productive target. The surrounding compiler adds an occurrence path to each tag and reserves separate caller, adapter, compiler and BIT workspace. A child cannot borrow a live ancestor's bank. + +At a complete field view, use a read-only shape stream on a separate track. It contains a typed left guide marker, one typed cell for every position of the padded physical representation, and a typed right marker. A cell carries the symbol that represents scientific zero at that position, including header, delimiter, padding or represented blank when the format uses it. Raw erasure can write the physical blank to every payload position. A literal marker value in a payload cell has a distinct guide tag. The two exterior guard cells stay out of the write set. + +Construct the guide from the selected view's fixed geometry. The explicit flat format stores W signed bits of the real part, a separator, W signed bits of the imaginary part, a second separator and one represented blank per complete address. For R external rows the payload extent is L = (2W+3) R 2ᴰ. The function make_guide emits these typed cells from R, D and W alone. A layout conversion between this format and a selected padded component stream takes a fixed number of complete scans once the selected primitive supplies the view. Charge each conversion, including head returns and complete staging, in G. The machine can first emit one component template, then duplicate it once per complete address on a separate track; rewind the component template between copies. A binary repetition count can decrease least-significant bit first: clear its borrow by scanning through the low zeros and return the head to its low end. Over m decrements the total length of these scans is less than 4m plus the terminal bit length. Binary products and shifts for the fixed number of shape parameters cost a polynomial in the descriptor length. For an extent of L cells in this layout the scientific shape parameters have O(log(L+2)) bits. The compiler's separate address and route descriptors keep their selected setup charge. Thus production, head return and retirement of the shape stream take O(L+1) steps plus that setup. The initial guide is generated from the root counts and format, independently of the contents or old length of any private bank. Propagate or regenerate it for every child view. Suspended views keep their own geometry. Equal extent alone is insufficient to identify a format. + +At each INIT or CLEAR align the two heads at their reserved origins. The finite transition graph takes one step to the right. Its outward scan reads the guide, writes one symbol on the target and advances both heads together. INIT writes the template symbol. CLEAR writes the raw blank. At the right guide marker, take one step left. Move both heads left across all cells, then halt at the left guide marker. Induction on the position shows that after j outward steps the entire prefix has its specified value and the suffix and exterior are intact. The return has no writes. The action takes exactly **2L+3** transitions for every L ≥ 0, including internal old blanks, dirty structural symbols and all binary strings. The old private contents never control a transition. The target is exclusively inactive before INIT or belongs to the clearing program at retirement. Arbitrary dirty *public* inputs retain their full scientific obligations. This supplies the local erasure action under the selected allocation and movement interfaces. CubeJerry's [PR #7586](https://github.com/CrocSwap/integer-mult-bounds/pull/7586) previously supplied a typed initializer on a six-Gamma packet with a valid donor. The new binding uses the common root geometry to produce its own extent guide. + +A fixed number of heads suffices. At a raw occurrence place its fixed finite bank tuple in parallel tracks or at fixed offsets in each complete row. The efficient choice of a field view, row packing and restoration through the integer compiler use the selected movement prescription with the new finite tuple size. Its fixed constant is charged. When processing a child, park the parent's tuple and retain its backing. Only the selected child view is streamed for the local cost. Return the child and its adapters completely before any caller consumer resumes. This is the part of the argument that retains `owned_erasure`, `compiler`, and `precision_tape` for the expanded template. A bare count of live labels would give no such access or space conclusion. + +For each fixed a/b, multiplication scans the sign/magnitude bits from low to high with carry at most |a|. Division scans the product from high to low with remainder less than b, emitting one quotient bit at each step. These positional invariants prove the exact result at every width when the final remainder is zero. Select the sign, form a complete product before division, and install the result with a ripple addition as in the selected scalar service. Its bound is 2²⁰ steps per padded component bit, with complete staging, return and scratch retirement. The 2,332 source/conversion scalars give 13,992 signed bit-level test cases, including magnitudes exceeding 64 bits. Replaying a finite list of magnitudes supplements the transducer proof. + +The positive ordinary bill has 83,895,232 scalar services, hence a coefficient of 87,970,526,789,632 per padded component-bit volume. In addition charge 7,956(2L+3) local reset steps per raw caller for equal complete extent L, all guide and bank provisioning, addressing, retirement and home selection. If extents differ, apply the local formula at each actual invocation. The fixed setup and guide costs can be charged even where the scalar allowance already counts a logical INIT or CLEAR. The 294,796 monomial map slots receive at most 4(153+1)² elementary records apiece, for a total of 27,965,527,744. The selected primitive charges each record at its complete-volume movement rate, including preparation, spectator preservation, control stock and restoration. This physical accounting uses fresh constants. The historical model tariff of 10⁹ does not serve as its bound. + +More explicitly, fix the priced finite compiler first. For its J native occurrences and U raw callers, reserve at least 234J private native homes, a private guide or a separately charged shared immutable guide for each occupied view, U caller query/normalizer tuples of sufficient fixed size, plus the actually allocated compiler and primitive auxiliary stock. Reserve guards, per-view guide storage, reset scratch and the suspended tuples before recursion; add the full finite setup and traversal costs to G. Use the actual productive width Wp and owned reserve O in Z=Wp+O, E0=64(Z+N+P+G+1)³, B0=P+E0 and C0=32NB0² of the selected substitution. Wp also enters the selected row-divisibility stock and the simultaneous BIT and complex reservations. Increasing these finite occurrence constants changes the node multiplier and cutoff. The proof of section 6 of the selected application increases the cutoff for each positive outer gap after those constants are fixed. N and the tested rank moments already come from the priced compiler; no new child or productive credit is introduced by a guide, scale or reset. + +## Review boundary + +The numerical claim is an application of the five [selected assumptions](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/certificates/selected-result.json) to this fixed program. They are native all-column and adapter realization, owned allocation and erasure, uniform compiler closure, fixed-tape movement and storage, and analytic recovery. The all-width arguments for divisibility and local reset specify one exact implementation inside those interfaces. Literal compilation of the full multiplier and independent human review remain open. In particular, the earlier common-U statement covering *arbitrary rounded residuals at its historical tariff* remains an obligation for that different implementation contract. diff --git a/research/current-flat-guide-lifecycle/source/README.md b/research/current-flat-guide-lifecycle/source/README.md new file mode 100644 index 0000000000..dc4f1e1ce0 --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/README.md @@ -0,0 +1,36 @@ +# Conditional κ ≥ 0.0037194530062 with jointly changed P104 charts + +The new word improves the conservative [PR #7660](https://github.com/CrocSwap/integer-mult-bounds/pull/7660) bound by **0.0000023694495 (0.06374%)**. It gives an application **2.46263% above the selected 0.00363005817** under the five retained assumptions. Most of that second difference is predecessor work. Joint changes at 33 scalar contacts remove four native paid positions per invocation. A complete signed caller uses the changed word 17 times. A separate exact-arithmetic and full-extent construction supplies the scalar and private reset actions with new finite physical costs. + +| | Selected record | Open parent | This package | +| --- | ---: | ---: | ---: | +| Conditional κ | 0.00363005817 | 0.0037170835567 | **0.0037194530062** | +| Complete paid positions | 117,612 | 108,581 | **108,513** | +| Complete productive fields | 23,392 | 22,461 | 22,461 | + +The [proof](PROOF.md) identifies the hypothesis and physical cost of each step. The [literal edit](EDIT.json) reconstructs the candidate from the pinned parent. The [result](RESULT.json) contains the complete paid and target histograms, two independent price signs, compiler and outer bounds, chart verification digests, storage counts and numerical guards. The [input inventory](SOURCE-PINS.json) and [notice](NOTICE) identify the consumed sources. The [coordination claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19697298) tracks this investigation. + +## Verification + +From the repository root, use Python 3.12 with the standard library. + +```sh +python3.12 -B scripts/research_package.py --package research/p104-joint-chart-banks +``` + +The decisive output includes the following markers. Each of the six disjoint catalogue commands prints its own shard number and coverage. + +```text +PASS_JOINT_NATIVE 1501 234 [100502, 187, True] +PASS_JOINT_APPLICATION 0.0037194530062 108513 22461 +PASS_REGISTERED_RESEARCH_PACKAGE research/p104-joint-chart-banks outcome=completed +``` + +The exact arbitrary-input replay checks the 96 A ports, eight B ports, 1,101 helper identities, 234 live-donor erasure witnesses, changed private chart and signed half-ADD. The complete catalogue checks 3,023 operators and 104 main boundary pairs. On the 18 new pairs, the checker also compares all 512 forward and all 512 adjoint columns. Tests reject a phase-only error, a legal scalar sign change with the same invoice, an aliased caller stage, a self-referential witness, a shortened reset extent and an odd last-tick exact division. + +The directed raw crossing is between 0.00371945300635 and 0.00371945300636. At the interior probe the compiler passes all 54 strict and four functional outer predicates. Native all-column and adapter realization, owned allocation, compiler closure, fixed-tape movement and storage, and analytic recovery remain conditional. The full multiplier, the historical rounded supplier's fixed tariff and independent human review remain open. + +## Open next questions + +1. Can a reviewer instantiate the retained allocator and view selector at one materialized compiled parent/child boundary using these immutable guides, including suspended-parent backing and charged movement? +2. Can a different native communication program improve the signed rank surplus of 1,424? A proposed extra saving should retain every independent input, price all new children, and pass the full caller. The fixed word reaches its raw crossing within 1.6 × 10⁻¹³ of the stated claim. diff --git a/research/current-flat-guide-lifecycle/source/banks.py b/research/current-flat-guide-lifecycle/source/banks.py new file mode 100644 index 0000000000..4ff2ba398b --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/banks.py @@ -0,0 +1,182 @@ +"""Execute the local two-head reset graph and bind each use to its allocation.""" +from fractions import Fraction +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from word import encoded, need +from hashlib import sha256 + +LEFT, RIGHT = "<", ">" +BLANK = "_" +ALPHABET = "01_:|#<>" +# The two control markers use a separate guide tag. A literal marker inside data is a payload symbol. +ALLOWED = frozenset(ALPHABET) + + +def bits(value): + need(value > 0, "positive shape count") + return [(value >> i) & 1 for i in range(value.bit_length())] + + +def repetitions(low_first): + """Read a binary counter from its low end on each decrement.""" + digits = low_first.copy() + while True: + i = 0 + while i < len(digits) and digits[i] == 0: + digits[i] = 1 + i += 1 + if i == len(digits): + return + digits[i] = 0 + yield None + + +def make_guide(rows, axes, width): + """Emit the complete zero layout using shape parameters alone.""" + need(axes >= 0, "selected axis count") + component = [("cell", "0") for _ in repetitions(bits(width))] + record = component + [("cell", ":")] + component + [("cell", "|"), ("cell", BLANK)] + guide = [("left", None)] + address_count = [0] * axes + bits(rows) + for _ in repetitions(address_count): + guide.extend(record) + guide.append(("right", None)) + return guide + + +def graph(action): + need(action in ("INIT", "CLEAR"), "reset operation") + table = {("start", "left", None): ("out", None, 1), + ("out", "right", None): ("back", None, -1), + ("back", "left", None): ("done", None, 0)} + for symbol in ALLOWED: + table["out", "cell", symbol] = ("out", symbol if action == "INIT" else BLANK, 1) + table["back", "cell", symbol] = ("back", None, -1) + return table + + +def run_reset(action, guide, private): + table = graph(action) + need(guide is not private, "aliased reset bank") + gpos = ppos = 0 + state, steps = "start", 0 + while state != "done": + tag, symbol = guide[gpos] + state, write, move = table[state, tag, symbol] + if write is not None: + private[ppos] = write + gpos += move + ppos += move + steps += 1 + need(gpos == ppos == 0, "reset head return") + return steps + + +def plan(word): + live = {} + sites = [] + for t, evt in enumerate(word["program"]): + op, role = evt[:2] + if op == "INIT": + need(role >= word["public"] and role not in live, "private lifetime alias") + ordinal = len(sites) + sites.append([role, t, evt[2], None, None]) + live[role] = ordinal + elif op == "CLEAR": + need(role in live, "unknown private lifetime") + row = sites[live.pop(role)] + row[3:] = [t, evt[2]] + need(not live and all(a[3] is not None for a in sites), "private lifetime not closed") + return sites + + +def scaled_bits(value, coefficient): + a = abs(coefficient.numerator) + b = coefficient.denominator + carry = 0 + product_bits = [] + mag = abs(value) + for j in range(max(1, mag.bit_length()) + a.bit_length() + 1): + total = carry + a * ((mag >> j) & 1) + product_bits.append(total & 1) + carry = total >> 1 + need(carry == 0, "constant product drain") + remainder = result = 0 + for bit in reversed(product_bits): + trial = 2 * remainder + bit + output = int(trial >= b) + remainder = trial - output * b + result = 2 * result + output + need(not remainder, "nonintegral physical division") + return -result if (value < 0) ^ (coefficient < 0) else result + + +def verify(word, caller, calls): + sites = plan(word) + tags = {(call, ordinal) for call in range(calls) for ordinal in range(len(sites))} + need(len(tags) == calls * len(sites), "cross-call lifetime alias") + steps = count = 0 + template = "00:00_00|00#00" + for body in (template, "", "0", ALPHABET, template * 23): + guide = [("left", None)] + [("cell", c) for c in body] + [("right", None)] + for old in ALPHABET: + private = [LEFT] + [old] * len(body) + [RIGHT] + for op, expected in (("INIT", list(body)), ("CLEAR", [BLANK] * len(body))): + number = run_reset(op, guide, private) + need(private == [LEFT] + expected + [RIGHT] and number == 2 * len(body) + 3, "complete extent") + steps += number + count += 1 + # Run every lifetime on a common flat format with a distinct parked ancestor. + shapes = 0 + for rows in (1, 2, 3): + for axes in (0, 1, 4): + for width in (1, 2, 17): + scientific = "0" * width + ":" + "0" * width + "|_" + actual = make_guide(rows, axes, width) + need(actual == [("left", None)] + [("cell", c) for c in scientific * (rows * 2**axes)] + [("right", None)], "shape producer") + shapes += 1 + guide = make_guide(1, 1, 3) + payload = "".join(c for _, c in guide[1:-1]) + ancestor = [LEFT] + ["#"] * len(payload) + [RIGHT] + parked = ancestor.copy() + homes = {tag: [LEFT] + [ALPHABET[(sum(tag) + j) % len(ALPHABET)] for j in range(len(payload))] + [RIGHT] for tag in tags} + for stage in range(calls): + for ordinal, _ in enumerate(sites): + target = homes[stage, ordinal] + run_reset("INIT", guide, target) + need(target[1:-1] == list(payload), "formatted owned zero") + target[1:-1] = list("1" * len(payload)) + run_reset("CLEAR", guide, target) + need(all(body == [LEFT] + [BLANK] * len(payload) + [RIGHT] for body in homes.values()) and ancestor == parked, "bank completion") + short = [LEFT] + ["1"] * len(payload) + [RIGHT] + run_reset("CLEAR", guide[:-2] + guide[-1:], short) + need(short[-2] == "1", "short-guide control must leave the last old cell") + try: + run_reset("INIT", guide, guide) + except ValueError: + pass + else: + raise ValueError("alias control escaped") + scalars = {Fraction(e[-2]) for e in word["program"] if e[0] in ("ADD", "COPY", "SCALE")} + scalars.update(Fraction(e[-1]) for e in caller["events"] if e[0] != "J" and e[1] in ("ADD", "SCALE")) + scalars.update(map(Fraction, (225, "1/225", 675, "1/675", "1/2", "-1/2"))) + cases = 0 + for q in sorted(scalars): + for multiple in (0, -127, -1, 1, 19, 2**67 + 1): + x = multiple * q.denominator + need(scaled_bits(x, q) == x * q, "physical signed scalar") + cases += 1 + try: + scaled_bits(1, Fraction(-1, 2)) + except ValueError as exc: + need(str(exc) == "nonintegral physical division", "last-tick countercontrol") + else: + raise ValueError("odd half-tick escaped") + return dict(lifetimes=len(sites), physical_native_homes=len(tags), physical_native_resets=2 * len(tags), + plan_sha256=sha256(encoded(sites)).hexdigest(), reset_graph_runs=count, shape_cases=shapes, + reset_steps=steps, signed_scalar_cases=cases, distinct_scalars=len(scalars), + numerator_bits=max(abs(q.numerator).bit_length() for q in scalars), + odd_half_tick_rejected=True, extent_control_rejected=True, alias_control_rejected=True) diff --git a/research/current-flat-guide-lifecycle/source/source/parent-NOTICE b/research/current-flat-guide-lifecycle/source/source/parent-NOTICE new file mode 100644 index 0000000000..cd7d35e2cb --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/source/parent-NOTICE @@ -0,0 +1,15 @@ +Apache-2.0. Clear1nsight, with substantial OpenAI Codex assistance. + +The unchanged data and upstream phase-check implementation for each +published word are under retained/pr7636 and retained/pr7658. Their +original NOTICE files credit DreamingOfClouds, Claude Opus 5.5 and the +full predecessor lineage. #7630 E6 and #7658 E2 are the source of the +silent stop used here. See SOURCE-PINS.json for exact source identities. + +The unmodified compare_recursive_invoices.py and +evaluate_recursive_power.py are from CrocSwap/integer-mult-bounds at +e54523517d0f03e58352e647c403a5af3e525a57. They retain the concave order +and invoice schema credits in their headers. The directed power +evaluator was prepared for aliromman with OpenAI Codex assistance. +The application appendix records the reused native, signed +caller and resource components with their own exact source notices. diff --git a/research/current-flat-guide-lifecycle/source/source/physical-NOTICE b/research/current-flat-guide-lifecycle/source/source/physical-NOTICE new file mode 100644 index 0000000000..6bec37798c --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/source/physical-NOTICE @@ -0,0 +1,15 @@ +The role-379 finite application evidence and wrappers were prepared by +Clear1nsight with substantial OpenAI Codex assistance. Apache-2.0, see the +registered package LICENSE. + +DreamingOfClouds authored #7658, #7641 and the pinned phase source used in +the predecessor archive. The archived derived word applies Clear1nsight's +51 exact ADD splits to that word. The historical catalogue belongs to the +234-lifetime repair at decoded SHA-256 +f9f9a485712c0c94c9d14370e2a8436414e1b53bdf86550d9d6436835e9e06cb. The upstream +source and predecessor credits are preserved in native-replay/NOTICE-7641. + +The resource rerun preserves the earlier #7641 resource driver and engines +and uses #7113's exact caller by Rohan Arun. Ali Romman, SYLforge, CubeJerry, +DreamingOfClouds and the authors in resource-replay/NOTICE-RETAINED retain +credit for the underlying algorithms, bounds and verifier implementations. diff --git a/research/current-flat-guide-lifecycle/source/source/word-NOTICE b/research/current-flat-guide-lifecycle/source/source/word-NOTICE new file mode 100644 index 0000000000..2baa2a719e --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/source/word-NOTICE @@ -0,0 +1,21 @@ +Apache-2.0. DreamingOfClouds with Claude Opus 5.5 (Anthropic), via Claude Code. + +The base word (data/base-7641-word.json.gz, unmodified bytes, sha256 de43ed04f58133eaef8f8d12a9dae1e6e8aa7f9721044200cc839673d86fd7c1) +is the word of our #7641 (20 swap-then-delete composites on SYLforge's #7637), vendored as data only. #7641's own base is SYLforge's +#7637 candidate word, whose notices read: + + "Apache-2.0. Local H5B + E1/E4 combination experiment, prepared with OpenAI assistance. + All earlier contributors and notices in hydrogen-bounded-verification-20261117/NOTICE remain credited. In particular: Ali Romman + (#7605), SYLforge, Clear1nsight, DreamingOfClouds, and all upstream contributors listed there." + +#7637's recorded technique credits: DreamingOfClouds #7630 (E1 rebirth/canceller, E4 existing-co-presence reroute), Clear1nsight +#7631/#7633 (efficient E4 integration, E1 prefix/tail settlement), and SYLforge's H5B literal-frame-restored archive. Its lineage +also carries Clear1nsight's #7626/#7314/#7274, Rohan Arun's #7277 and signed #7113 caller, and the contributors named in the +retained sources. #7641, #7637 and their code are not run by this package; only their words are read as data. + +This package adds five edits found by a large-neighbourhood search (one SWAP-NULL relabel of two helpers with a stay deletion, one main +stop removal, three helper stay deletions with re-placed contacts) and one hub re-settle. The helper-stay deletion with re-charted +contacts (E3) is of the type introduced by Clear1nsight's #7612 and ToikY's #7643. check.py is our own code: its replay, crossing and +column-test sections come from our #7630-on-#7623, swap-composite and #7641 packages; its column tests follow the description of the +affected-pair tests in #7620's README and native runner. The CLEAR certificate check implements the acceptance rule of #7620's +verify_certificates (read, not run). No other author's code was run; their words are read as data. diff --git a/research/current-flat-guide-lifecycle/source/word.py b/research/current-flat-guide-lifecycle/source/word.py new file mode 100644 index 0000000000..d497414bba --- /dev/null +++ b/research/current-flat-guide-lifecycle/source/word.py @@ -0,0 +1,56 @@ +"""Apply the published edits to the pinned parent word.""" +from hashlib import sha256 +from pathlib import Path +import gzip +import json + +HERE = Path(__file__).resolve().parent +PARENT = "f0753b6614b2d351723dddc307a39b6ecd748a43008c6fdb9335b01feeec9669" +CANDIDATE = "f95eabd1734c7a74f58428cb12f261a81032bef01aed78c8147a4e4f90636939" + + +def need(condition, reason): + if not condition: + raise ValueError(reason) + + +def encoded(obj): + return json.dumps(obj, sort_keys=True, separators=(",", ":")).encode() + + +def words(): + raw = gzip.decompress((HERE / "data/source-word.json.gz").read_bytes()) + need(sha256(raw).hexdigest() == PARENT, "parent word digest") + parent = json.loads(raw) + edit = json.loads((HERE / "EDIT.json").read_bytes()) + result = dict(parent, frames=parent["frames"] + edit["append_frames"]) + for side in ("initial", "final"): + result[side] = parent[side].copy() + for role, old, new in edit[side]: + need(result[side][role] == old, "boundary edit origin") + result[side][role] = new + start = 0 + program = [] + for item in edit["events"]: + at = item["at"] + need(start <= at < len(parent["program"]), "edit order") + need(parent["program"][at] == item["old"], "edit origin") + program.extend(parent["program"][start:at]) + program.extend(item["new"]) + start = at + 1 + program.extend(parent["program"][start:]) + result["program"] = program + need(sha256(encoded(result)).hexdigest() == CANDIDATE, "candidate word digest") + return parent, result + + +def main_roles(word): + hosted = word["hosted"] + return set(word["live"]) | {r + 112 for r in word["live"]} | set(hosted["X2"]) | set(hosted["Y2"]) + + +def catalogue(word): + paid = {(e[2], e[3]) for e in word["program"] if e[0] == "MOVE"} + main = main_roles(word) + helpers = {(u, v) for r, (u, v) in enumerate(zip(word["initial"], word["final"], strict=True)) if r not in main} + return paid | helpers diff --git a/research/current-flat-guide-lifecycle/verify.py b/research/current-flat-guide-lifecycle/verify.py new file mode 100644 index 0000000000..f34b965107 --- /dev/null +++ b/research/current-flat-guide-lifecycle/verify.py @@ -0,0 +1,201 @@ +#!/usr/bin/env python3 +"""Check emitted guide lifecycles with sparse and independent dense execution.""" +from hashlib import sha1, sha256 +import json +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent + + +def need(ok, reason): + if not ok: + raise ValueError(reason) + + +def encoded(value): + return json.dumps(value, sort_keys=True, separators=(',', ':')).encode() + + +def authenticate(): + for row in json.loads((HERE / 'SOURCES.json').read_text())['files']: + if row['usage'] == 'input': + need(sha256((HERE.parents[1] / row['path']).read_bytes()).hexdigest() == row['sha256'], 'retained source hash') + for row in json.loads((HERE / 'VENDORED.json').read_text())['files']: + raw = (HERE / row['path']).read_bytes() + need(sha256(raw).hexdigest() == row['sha256'], 'copied source hash') + need(sha1(b'blob ' + str(len(raw)).encode() + b'\0' + raw).hexdigest() == row['git_blob'], 'copied source Git blob') + + +authenticate() +sys.path.insert(0, str(HERE)) +import program as p +from machine import Machine, Tape, Program, Rejected, binary + + +def fixture(n, width): + length = n * (2 * width + 3) + ends = [n.bit_length() + 1, width.bit_length() + 1, + max(n.bit_length(), width.bit_length()) + 1, n + 1, width + 1, + length + 1, length + 1] + tapes = [binary(n), binary(width), Tape(), Tape(), Tape(), + Tape({i: (i + 2) % 7 for i in range(length + 2)}, 0), + Tape({0: p.LEFT, **{i: (i + 3) % 7 for i in range(1, length + 1)}, length + 1: p.RIGHT}, 0)] + for tape, end in zip(tapes, ends): + tape.cells[-2] = p.MARK + tape.cells[end + 4] = p.ONE + return tapes, ends + + +def sparse_snapshot(tapes): + return [(dict(t.cells), t.head) for t in tapes] + + +def dense_run(program, initial, ends): + """Walk the emitted opcodes without the retained machine executor.""" + offset = 3 + cells = [[p.BLANK] * (end + 10) for end in ends] + heads = [] + for row, (source, head) in zip(cells, initial): + for index, symbol in source.items(): + row[index + offset] = symbol + heads.append(head + offset) + pc, steps = program.entry, 0 + while True: + instruction = program.instructions[pc] + op = instruction[0] + steps += 1 + need(steps < 5000000, 'dense fixture step cap') + if op == 'branch': + _, tape, choices, fallback = instruction + symbol = cells[tape][heads[tape]] + pc = next((target for value, target in choices if value == symbol), fallback) + elif op == 'write': + cells[instruction[1]][heads[instruction[1]]] = instruction[2] + pc += 1 + elif op == 'move': + heads[instruction[1]] += instruction[2] + need(0 <= heads[instruction[1]] < len(cells[instruction[1]]), 'dense fixture extent') + pc += 1 + elif op == 'goto': + pc = instruction[1] + elif op == 'halt': + break + else: + raise ValueError('dense rejection: ' + instruction[1]) + return [({i - offset: symbol for i, symbol in enumerate(row) if symbol != p.BLANK}, head - offset) + for row, head in zip(cells, heads)], steps + + +def check_shape(n, width, programs, independent=True): + length = n * (2 * width + 3) + tapes, ends = fixture(n, width) + initial = sparse_snapshot(tapes) + outside = [{k: v for k, v in cells.items() if k < 0 or k > end} + for (cells, _), end in zip(initial, ends)] + guide = [p.ENCODE[token] for token in p.banks.make_guide(n, 0, width)] + target_zero = [p.PAYLOAD[c] for _, c in p.banks.make_guide(n, 0, width)[1:-1]] + c = lambda x: 24 * x - 7 * x.bit_count() + 15 * x.bit_length() + 12 + expected_steps = {'produce': c(n) + c(width) + 22 * n * width + 36 * n + 7 * width + 36, + 'INIT': 9 * length + 11, 'CLEAR': 9 * length + 11, + 'retire': 7 * length + 10} + visited = [set() for _ in tapes] + charges = {} + for name in ('produce', 'INIT', 'CLEAR', 'retire'): + before = sparse_snapshot(tapes) + machine = Machine(programs[name], tapes).run(5000000) + charges[name] = machine.steps + need(machine.steps == expected_steps[name], 'exact instruction ledger') + after = sparse_snapshot(tapes) + if independent: + other, steps = dense_run(programs[name], before, ends) + need(other == after and steps == machine.steps, 'independent dense execution') + need(after[:2] == initial[:2], 'preserved binary descriptors and heads') + need([t.head for t in tapes] == [1, 1, 0, 0, 0, 0, 0], 'complete head return') + for i, tape in enumerate(tapes): + need({k: v for k, v in tape.cells.items() if k < 0 or k > ends[i]} == outside[i], 'borrowed exterior cells') + visited[i].update(machine.visits[i]) + for i in (p.WORK, p.ROWS, p.WIDTH): + need(tapes[i].cells == outside[i], 'all conversion markers and work retired') + if name != 'retire': + need([tapes[p.GUIDE].cells.get(i, p.BLANK) for i in range(length + 2)] == guide, 'exact immutable source guide') + else: + need(tapes[p.GUIDE].cells == outside[p.GUIDE], 'complete guide retirement') + if name == 'produce': + need(after[p.TARGET] == initial[p.TARGET], 'target untouched during production') + elif name == 'INIT': + need([tapes[p.TARGET].cells.get(i, p.BLANK) for i in range(1, length + 1)] == target_zero, 'literal source INIT consumer') + else: + need(all(tapes[p.TARGET].cells.get(i, p.BLANK) == p.BLANK for i in range(1, length + 1)), 'literal source CLEAR consumer') + need(tapes[p.TARGET].cells.get(0) == p.LEFT and tapes[p.TARGET].cells.get(length + 1) == p.RIGHT, 'target guards preserved') + spans = [max(positions) - min(positions) + 1 for positions in visited] + expected_span = 2 * length + n + width + n.bit_length() + width.bit_length() + max(n.bit_length(), width.bit_length()) + 14 + need(spans == [end + 1 for end in ends] and sum(spans) == expected_span, 'complete historical visited capacity') + need(sum(charges.values()) <= 72 * length and sum(spans) <= 7 * length, 'uniform lifecycle bounds') + return {'records': n, 'width': width, 'payload_extent': length, + 'steps': charges, 'total_steps': sum(charges.values()), + 'visited_spans': spans, 'retained_cells': sum(spans)} + + +def controls(programs): + table = programs['produce'].instructions + first_zero = next(i for i, row in enumerate(table) if row == ('write', p.GUIDE, p.ZERO)) + blank_write = next(i for i, row in enumerate(table) if row == ('write', p.GUIDE, p.BLANK)) + last_return = max(i for i, row in enumerate(table) if row == ('move', p.GUIDE, -1)) + retirement = programs['retire'].instructions + final_erase = max(i for i, row in enumerate(retirement) if row == ('write', p.GUIDE, p.BLANK)) + faults = [('wrong zero bit', 'produce', first_zero, ('write', p.GUIDE, p.ONE)), + ('missing represented blank write', 'produce', blank_write, ('goto', blank_write + 1)), + ('premature right marker', 'produce', first_zero, ('write', p.GUIDE, p.RIGHT)), + ('missing guide origin return', 'produce', last_return, ('goto', last_return + 1)), + ('retained guide left marker', 'retire', final_erase, ('goto', final_erase + 1))] + results = [] + for label, phase, index, row in faults: + changed = list(programs[phase].instructions) + changed[index] = row + mutant = dict(programs, **{phase: Program(tuple(changed), 7, programs[phase].entry)}) + try: + check_shape(3, 2, mutant, independent=False) + except ValueError as error: + need(str(error) in ('exact immutable source guide', 'complete head return', 'complete guide retirement'), 'semantic mutation rejection') + results.append({'fault': label, 'rejected_by': str(error)}) + else: + raise ValueError('instruction fault accepted') + tapes, _ = fixture(3, 2) + tapes[p.N].cells[3] = p.ZERO + tapes[p.N].cells[4] = p.RIGHT + try: + Machine(programs['produce'], tapes).run(10000) + except Rejected as error: + need(str(error) == 'positive canonical binary extent and empty conversion workspace', 'noncanonical descriptor cause') + results.append({'fault': 'redundant high zero in binary N', 'rejected_by': str(error)}) + else: + raise ValueError('noncanonical descriptor accepted') + return results + + +def main(): + programs = p.build() + tables = {name: {'tapes': obj.tapes, 'entry': obj.entry, 'instructions': obj.instructions} + for name, obj in programs.items()} + cases = [check_shape(n, width, programs) for n in (1, 2, 3, 4, 7, 8, 15, 16, 31, 32) for width in (1, 2, 3, 17)] + cases.extend(check_shape(n, width, programs) for n, width in ((512, 1), (1024, 3))) + result = {'cases': cases, 'controls': controls(programs), 'tapes': 7, + 'table_rows': {name: len(obj.instructions) for name, obj in programs.items()}, + 'tables_sha256': sha256(encoded(tables)).hexdigest(), + 'all_cases_dense_checked': True, 'lifecycle_step_bound': '72L', + 'historical_visited_cell_bound': '7L'} + files = {'TABLES.json': tables, 'RESULT.json': result} + if sys.argv[1:] == ['--write']: + need(all(not (HERE / file).exists() for file in files), 'do not replace checked receipts') + for file, value in files.items(): + (HERE / file).write_text(json.dumps(value, indent=2) + '\n') + else: + need(not sys.argv[1:], 'unexpected arguments') + for file, value in files.items(): + need(encoded(value) == encoded(json.loads((HERE / file).read_text())), 'complete emitted receipt') + print('PASS_CURRENT_FLAT_GUIDE_LIFECYCLE ' + json.dumps({k: v for k, v in result.items() if k != 'cases'}, sort_keys=True)) + + +if __name__ == '__main__': + main()