diff --git a/research/current-native-bank-selector/PROOF.md b/research/current-native-bank-selector/PROOF.md new file mode 100644 index 0000000000..fe29c3eb4c --- /dev/null +++ b/research/current-native-bank-selector/PROOF.md @@ -0,0 +1,149 @@ +# A charged selector at one native child view + +## Contract and exact source + +Fix the source in VENDORED.json. At zero-based clock 88263 the current +PR7663 word executes `MOVE 1510,477,1090,True`. Role 1510 has lifetime +ordinal 35, from INIT 88260 to CLEAR 91760. There are 34 live parent +lifetimes at this cut. The complete raw native plan has 234 lifetimes. +The verifier reconstructs the edited word and checks these facts directly. + +Chart 1090 is a four-dimensional subspace of the eight-dimensional chart +477 in the nine-dimensional native frame. The retained native adapter +contract therefore exposes a positive rank-four child. This result does +not reconstruct or execute those adapters. It starts after they put the +complete view in canonical spectator-first order. + +Let R,f,W be positive integers. Each complete complex address has W real +bits, a separator, W imaginary bits, a separator and one represented blank. +Its record length is 2W+3. The parent has R external rows and 9f native axes. +The child has R*2^(5f) external rows and 4f active axes. Both use the same +root width W. Both complete extents are + +```text +L = (2W+3) R 2^(9f). +``` + +For parent address (r,s,c), with s in [0,2^(5f)) and c in [0,2^(4f)), +the linear index is r*2^(9f)+s*2^(4f)+c. The child index is +(r*2^(5f)+s)*2^(4f)+c. They are equal, and Euclidean division gives the +unique inverse. Every bit and structural cell of every record is thus in +the same position. No data permutation or physical copy implements this +reshape. The preceding adapters, their control, and any different address +order remain separate costs. Equal total extent without this shape and +order identity is insufficient. + +## Two tapes, fixed banks and a finite selector + +Fix P parent slots and C child slots before input sizes vary. Let B=P+C. +Each slot has L payload cells between two guards, so slot k begins at +k(L+2). Slots 0 through P-1 retain the parent. Slots P through B-1 are +distinct child homes. A child may borrow an explicitly named parent slot; +that slot is not also an owned child home. + +The data tape and a separate read-only guide tape have B(L+2) cells each. +Each guide slot contains a typed left marker, L typed template cells and +a typed right marker. These are the unchanged PR7663 guide values. A +literal marker in old data cannot act as a guide boundary. The guide and +data heads start at the first slot's left guard. The construction retains +every slot, including inactive or cleared homes. Resident tape capacity +is exactly 2B(L+2) cells for this subsystem, plus its fixed control and +separately charged preparation workspace. + +The forward selector starts in finite state k. At each typed left marker +it stops if the state is zero, or decreases the state by one. At all other +guide cells it keeps the state. A nonterminal step moves both heads one +cell right. Induction on the crossed left markers proves that it stops +at slot k, after exactly t=k(L+2) moves of each head. The reverse selector +uses the same states and moves left. From slot k it returns to slot zero +in exactly t moves of each head. Neither selector reads or writes data. + +The state range is 0 through B-1. It is finite and independent of R,f,W. +Each selector has 10B literal rows: eight template symbols and two typed +boundaries per state. There is no variable-distance head instruction. +The two heads stay aligned but address distinct tapes. + +## Exact local charge and restoration + +Count each guide read, payload write, unit move of either head and executed +control row as one unit. One selector executes t+1 guide reads and control +rows, and 2t unit moves. Its cost is 4t+2. + +Use the unchanged source reset graph at the selected slot. It executes +2L+3 guide reads and control rows, L payload writes and 4L+4 unit moves. +Its cost is 9L+10. INIT writes the complete scientific-zero template; +CLEAR writes the raw blank. The graph returns to the selected left guard. +The source's position induction applies to arbitrary old payload symbols. +The guide and both exterior guards stay unchanged. + +Compose forward selection, reset and reverse selection. The complete +service has exact cost + +```text +8k(L+2) + 9L + 14. +``` + +Only the selected payload is written. Both heads return to the first +slot's origin. Thus every suspended parent, every other child slot, all +guards and the guide are unchanged when k>=P. The conclusion concerns +complete historical backing, not just the current scientific length. + +A borrower of parent slot j can instead enter through the two selectors. +If its own service returns both heads at that slot's origin and writes +only the granted payload and its distinct child homes, composition adds +8j(L+2)+4 to its separately charged service cost. The rest of the parent +remains unchanged. This is a frame-condition theorem. It does not provide +the child's Gaussian arithmetic or its internal allocation. + +## Apply the complete raw lifetime plan + +Give the source's 234 child lifetimes slots 234 through 467, and retain +234 distinct parent slots. Each child ordinal receives one INIT and one +CLEAR at the source clocks. The exact plan supplies the chronology; no +label reuse aliases two lifetime homes. Summing the formula above gives + +```text +2 sum_(k=P)^(P+C-1) [8k(L+2)+9L+14] + = C(16P+8C+10)L + C(32P+16C+12). +``` + +For P=C=234 this is 1316484L+2631096. The 468-command literal replay checks +that sum at L=5 while preserving the complete parked parent. A separate +actual-extent fixture has R=f=W=1, L=2560 and 1199016 cells on each tape. +It executes INIT and CLEAR at the first and last child slots, checks every +unselected cell and guard, and tests a borrower confined to parent slot 35. +That borrower writes a fixed valid bit pattern. It is not a Gaussian child. + +The two selectors and both reset graphs contain 9398 reusable service +rows at B=468. A complete static dispatcher is not free. For example, +unroll the fixed 468-command schedule, retain one operation's 19 reset +rows per command, and connect each terminal transition to the next phase. +This gives at most 468(20*468+19)+1 = 4389373 finite control rows. The +terminal transitions already appear in the charged row count; no extra +unpriced jump is needed. This is a constructive representation bound, +not a claim that the verifier stores that full unrolled table. + +The same proof applies to any fixed P,C and a caller-supplied finite +schedule. The 234-slot child tuple here exercises one raw native lifetime +plan. It is not the actual inventory of an entire compiled recursive child. +That inventory can contain many raw occurrences and other workspace. + +## Coverage and remaining obligations + +The local position and frame-condition arguments hold for every stated +shape and arbitrary old private symbols. The finite cases corroborate +them. Controls detect equal-size wrong formats, missing spectators, +parent/child aliasing, a shortened guide and an omitted head return. + +Guide production, staging and retirement have positive costs. The retained +source gives an O(L+1) construction per guide plus descriptor setup. The +verifier uses that producer, but does not compile its full bit-level +production, or provide a common physical tariff for the whole algorithm. +This proof charges the complete local service once the guide and slots +exist. It does not claim that their initial allocation or preparation is free. + +The native adapter permutation, actual compiled occurrence tree, complete +child arithmetic, cross-depth ownership, compiler/primitive workspace, +root format delivery and analytic recovery remain open here. The source's +full conditional application was not replayed. No framework assumption is +discharged, no new kappa is established and the selected frontier is unchanged. diff --git a/research/current-native-bank-selector/README.md b/research/current-native-bank-selector/README.md new file mode 100644 index 0000000000..c1781b9d9a --- /dev/null +++ b/research/current-native-bank-selector/README.md @@ -0,0 +1,107 @@ +# Charged selection and return for current native banks + +This package proves a local two-head bank-selection theorem and binds it +to the owned MOVE at clock 88263 in +[PR #7663](https://github.com/CrocSwap/integer-mult-bounds/pull/7663). +It adds the travel to and from a private bank to the retained reset cost, +and proves that all other parent and child cells stay unchanged. +No new kappa or complete recursive allocator is claimed. + +The exact source head is `b81f40997de646de30749d367484d89e59fc3013`. +The reconstructed word has SHA256 +`f95eabd1734c7a74f58428cb12f261a81032bef01aed78c8147a4e4f90636939`. +The source executes `MOVE 1510,477,1090,True` during lifetime ordinal 35, +with 34 parent lifetimes live. A direct binary span check confirms the +nested rank-four boundary. The retained native adapter contract supplies +its canonical post-adapter view; those adapters are not replayed here. + +## Result + +[PROOF.md](PROOF.md) gives the all-size position and frame-condition proofs. +[RESULT.json](RESULT.json) records source binding, literal charges and +controls. [controller.py](controller.py) uses only guide reads, payload +writes, unit moves of two distinct heads and finite control transitions. +It does not jump to a bank address. + +If bank k has L payload cells and two guards, selection, complete reset +and return cost exactly `8k(L+2)+9L+14` in those physical/control units. +The complete 234-lifetime plan, placed after 234 retained parent banks, +has reset overhead `1316484L+2631096`. Guide construction, all numerical +child work, adapters and complete recursive allocation have separate costs. +The general formula for P parent and C child banks is +`C(16P+8C+10)L+C(32P+16C+12)`. + +In the canonical view, parent shape `(R,9f,W)` and child shape +`(R*2^(5f),4f,W)` have the same complete records in the same order. +The proof gives an inverse address map. Matching extent alone does not +establish that fact. All banks, including inactive historical homes, +remain resident. Data and immutable guide capacity is `2(P+C)(L+2)` +cells, with positive fixed control and preparation costs in addition. + +The source-bound fixture reserves 234 parent and 234 child slots. It +checks every INIT and CLEAR in the native lifetime chronology at L=5. +A separate R=f=W=1 fixture uses L=2560 and 1199016 cells on each tape. +It executes both resets at the first and last child slots, then checks +every other cell and all guards. A confined write-only borrower checks +that parent slot 35 can change while all other parent cells stay fixed. +This borrower is a frame-condition witness, not a Gaussian transform. + +The three shape checks cover 263680 complete addresses. Five controls +detect a same-size wrong format, missing spectators, aliased ownership, +a shortened guide and an omitted return. The proof quantifies over all +stated shapes and arbitrary old private symbols; finite cases supplement it. + +## Scope and remaining obligations + +The source's reset and guide functions are copied unchanged. This work +adds a two-head selector, a precise travel charge and a local composition +proof. Correct complete guides, distinct slots, the same root bit width +and canonical adapter order are premises. The guide producer has a +retained constructive source bound; its full physical compilation is open. + +The 234-slot child tuple represents one raw native lifetime plan. It is +not the inventory of an entire compiled recursive child. The general P,C +formula is available once that actual inventory and schedule are supplied. +The complete occurrence tree, numerical child, root format delivery, +adapter movement, private auxiliary stock and common whole-algorithm +tariff remain outside this result. The five framework assumptions and +the selected frontier are unchanged. The full source application and +selected multiplier were not replayed. + +## Reproduce + +Use Python 3.12 and the standard library: + +```sh +python3.12 -B scripts/research_package.py --package research/current-native-bank-selector +``` + +Normal and optimized isolated commands must each print +`PASS_CURRENT_NATIVE_BANK_SELECTOR`. The runner must print +`PASS_REGISTERED_RESEARCH_PACKAGE`. Normal verification writes no files +and needs no Git, network or solver. `--write` creates only an initial +receipt and refuses to replace an existing one. + +## Open next questions + +Export one actual finite compiled parent/child owner map, including every +raw occurrence and all caller and primitive workspace. Then instantiate +the general bank-count and schedule formulas. Separately compile and +charge the guide producer through production, head return and retirement. +[TASK.json](TASK.json) gives the exact scope and stop boundary. + +## Credit + +Ali Romman supplied the PR7663 construction and its reset/guide source +with substantial OpenAI Codex assistance. CubeJerry supplied the selected +primitive and prior typed reset in +[PR #7586](https://github.com/CrocSwap/integer-mult-bounds/pull/7586). +The exact candidate retains Clear1nsight, DreamingOfClouds, SYLforge, +Rohan Arun and the selected predecessor credit in [source/NOTICE](source/NOTICE) +and its copied notices. [VENDORED.json](VENDORED.json) authenticates each +copied file. The main selected proof is a declared input in +[SOURCES.json](SOURCES.json). + +Ali Romman directed this new selector, cost proof and verification with +substantial OpenAI Codex assistance. New work is Apache-2.0. Canonical base: +`e54523517d0f03e58352e647c403a5af3e525a57`. diff --git a/research/current-native-bank-selector/RESULT.json b/research/current-native-bank-selector/RESULT.json new file mode 100644 index 0000000000..a76affcfb2 --- /dev/null +++ b/research/current-native-bank-selector/RESULT.json @@ -0,0 +1,138 @@ +{ + "boundary": { + "clock": 88263, + "event": [ + "MOVE", + 1510, + 477, + 1090, + true + ], + "parent_owner_ordinal": 35, + "active_parent_ordinals": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 35 + ], + "parent_bank_count": 234, + "child_rank": 4, + "native_rank": 9, + "word_sha256": "f95eabd1734c7a74f58428cb12f261a81032bef01aed78c8147a4e4f90636939", + "lifetime_plan_sha256": "de16f7a197352722403440b3a33ffa77ed010c168f02fe1757f26db802cd8463" + }, + "shapes": [ + { + "rows": 1, + "factor": 1, + "width": 1, + "child_rows": 32, + "child_axes": 4, + "addresses": 512, + "extent": 2560 + }, + { + "rows": 2, + "factor": 1, + "width": 3, + "child_rows": 64, + "child_axes": 4, + "addresses": 1024, + "extent": 9216 + }, + { + "rows": 1, + "factor": 2, + "width": 1, + "child_rows": 1024, + "child_axes": 8, + "addresses": 262144, + "extent": 1310720 + } + ], + "source_lifetimes": { + "services": 468, + "extent": 5, + "charged": 9213516, + "trace_sha256": "ca72a87e69d936292b0da3218e5c6cbf6056befba6d91709183c78fcfcf38965", + "counts": { + "guide_reads": 2303496, + "control_rows": 2303496, + "unit_moves": 4604184, + "data_writes": 2340 + } + }, + "actual_boundary": { + "extent": 2560, + "banks": 468, + "payload_cells": 1199016, + "immutable_guide_cells": 1199016, + "reset_receipts": [ + { + "slot": 234, + "operation": "INIT", + "charged": 4819118 + }, + { + "slot": 234, + "operation": "CLEAR", + "charged": 4819118 + }, + { + "slot": 467, + "operation": "INIT", + "charged": 9594686 + }, + { + "slot": 467, + "operation": "CLEAR", + "charged": 9594686 + } + ], + "borrowed_slot": 35, + "borrower_scope": "write-only frame-condition witness, not a Gaussian child" + }, + "controls": [ + "same extent with a different format rejected", + "missing child spectators rejected", + "aliased child slot changes parent", + "short guide leaves old backing", + "omitted selector return leaves both heads displaced" + ], + "fixed_control_rows": 9398, + "single_service_cost": "8k(L+2)+9L+14", + "complete_child_reset_cost": { + "L": 1316484, + "constant": 2631096 + } +} diff --git a/research/current-native-bank-selector/SOURCES.json b/research/current-native-bank-selector/SOURCES.json new file mode 100644 index 0000000000..a6234ea656 --- /dev/null +++ b/research/current-native-bank-selector/SOURCES.json @@ -0,0 +1,24 @@ +{ + "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": "docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md", + "usage": "input", + "git_blob": "3dd1af2285e597676725e85ad4f65e7ad326d695", + "sha256": "4501502c2ceb9759b20372435fe4beb51082c5a5e2910c1fd5dbe6edca415055" + } + ] +} diff --git a/research/current-native-bank-selector/TASK.json b/research/current-native-bank-selector/TASK.json new file mode 100644 index 0000000000..755d876505 --- /dev/null +++ b/research/current-native-bank-selector/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": "Prove a charged two-head selector/reset composition at the current owned MOVE boundary, with complete child extent and suspended-parent isolation.", + "scope_change_reason": "PR7663 explicitly requests an allocator/view review. This check isolates one local tape implication under its post-adapter view contract; it does not materialize the full compiled child.", + "bottleneck_link": "The retained local reset starts at its own bank origin. This construction adds bank selection and complete return with an explicit physical charge, and binds the loan view to one actual owned MOVE.", + "budget_minutes": 100, + "stop_rule": "Stop at the all-size local selection/extent/frame theorem, exact current source binding, literal service replay and controls. Retain full compiled allocation and arithmetic as separate obligations.", + "outcome": "completed", + "evidence": "PROOF.md and RESULT.json give the exact 8k(L+2)+9L+14 cost, the full 234-lifetime reset sum, a 1199016-cell-per-tape fixture and five controls.", + "author": "Ali Romman", + "ai_assistance": "Ali Romman directed this work with substantial OpenAI Codex assistance. The copied PR7663 guide/reset source and its predecessor notices are unchanged.", + "open_questions": [ + { + "question": "Can the actual finite compiled child inventory instantiate P,C and the ownership schedule in this selector theorem?", + "why_it_matters": "The 234-slot fixture is one raw native plan, not the full recursive child inventory.", + "first_step": "Export one actual compiled parent/child owner map, including all raw occurrences, caller and primitive workspace, then apply the general P,C formula.", + "blocked_by": "The full compiler allocation and retained view interfaces must supply the concrete schedule." + }, + { + "question": "Can the immutable guide producer be compiled and charged through its complete lifecycle?", + "why_it_matters": "The selector starts with a correct guide. Its creation, storage, staging and retirement are separate positive costs.", + "first_step": "Compile the retained binary repetition and template-copy algorithm with an explicit descriptor and head-return contract.", + "blocked_by": "No local scalar or native arithmetic proof replaces this producer contract." + } + ], + "coordination_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19699833", + "handoff_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19699480", + "family_decision": "Narrow the released guide/view handoff to one raw native boundary. Local selection, restoration and capacity are proved; guide production retains a constructive source bound. Full compiler allocation, adapter delivery and common physical pricing remain open. A further scalar specialization would repeat covered work." +} diff --git a/research/current-native-bank-selector/VENDORED.json b/research/current-native-bank-selector/VENDORED.json new file mode 100644 index 0000000000..7fe107151a --- /dev/null +++ b/research/current-native-bank-selector/VENDORED.json @@ -0,0 +1,100 @@ +{ + "files": [ + { + "path": "source/EDIT.json", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/EDIT.json", + "git_blob": "1589b1a98b6ef5f56b23440a8bf5120aff22c3d8", + "sha256": "8e57b3f1b1ea75076b678169fe04d2473a96a912d01afd140e5fe62313de3691" + }, + { + "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/RESULT.json", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/RESULT.json", + "git_blob": "f289e709149027ec7cf3bbd3a23c8f65496218ee", + "sha256": "0863f1ccd61ed85c282df74bf02819636dd02bc2b427b3a4fb6d1b3380927c28" + }, + { + "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/data/source-word.json.gz", + "repository": "aliromman/integer-mult-bounds", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "source_path": "research/p104-joint-chart-banks/data/source-word.json.gz", + "git_blob": "e05407f54fc3534781ae0af989a973bd165d162b", + "sha256": "4e9cd9cc70a5423db44f870b35d8d6da9ac5746aa352f3af1420443f6dda350e" + }, + { + "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-native-bank-selector/VERIFY.json b/research/current-native-bank-selector/VERIFY.json new file mode 100644 index 0000000000..7e2f7feb46 --- /dev/null +++ b/research/current-native-bank-selector/VERIFY.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 240, + "checks": "Source word/lifetime binding, complete address/format identity, charged two-head services, parked parent and guard preservation, and five controls." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 240, + "checks": "Source word/lifetime binding, complete address/format identity, charged two-head services, parked parent and guard preservation, and five controls with assertions disabled." + } + ] +} diff --git a/research/current-native-bank-selector/controller.py b/research/current-native-bank-selector/controller.py new file mode 100644 index 0000000000..aea2bbc4aa --- /dev/null +++ b/research/current-native-bank-selector/controller.py @@ -0,0 +1,72 @@ +"""Run bank selection and reset through two charged unit-step heads.""" +from collections import Counter + + +def need(condition, reason): + if not condition: + raise ValueError(reason) + + +def seek_table(count, direction, alphabet): + need(direction in (-1, 1), 'unit selector direction') + table = {} + for remaining in range(count): + table[remaining, 'left', None] = ('done', None, 0) if remaining == 0 else (remaining - 1, None, direction) + table[remaining, 'right', None] = (remaining, None, direction) + for symbol in alphabet: + table[remaining, 'cell', symbol] = (remaining, None, direction) + return table + + +class Machine: + """The controller can access cells only at its two current heads.""" + def __init__(self, guide, count, parent_count, source): + self.source = source + self.unit = tuple(guide) + self.extent = len(guide) - 2 + self.count = count + self.guide = self.unit * count + self.data = [] + for owner in range(count): + body = [] + for index, (_, symbol) in enumerate(guide[1:-1]): + if owner < parent_count: + body.append(str((owner + index) % 2) if symbol == '0' else symbol) + else: + body.append(source.ALPHABET[(owner + index) % len(source.ALPHABET)]) + self.data.extend([source.LEFT, *body, source.RIGHT]) + self.guide_head = self.data_head = 0 + self.counts = Counter() + self.forward = seek_table(count, 1, source.ALLOWED) + self.backward = seek_table(count, -1, source.ALLOWED) + + def execute(self, table, state): + while state != 'done': + token = self.guide[self.guide_head] + self.counts['guide_reads'] += 1 + self.counts['control_rows'] += 1 + state, write, move = table[state, *token] + if write is not None: + self.data[self.data_head] = write + self.counts['data_writes'] += 1 + need(move in (-1, 0, 1), 'physical unit move') + self.guide_head += move + self.data_head += move + self.counts['unit_moves'] += 2 * abs(move) + need(self.guide_head == self.data_head, 'aligned distinct heads') + + def reset(self, slot, operation): + need(0 <= slot < self.count and self.guide_head == self.data_head == 0, 'selector entry') + before = self.counts.total() + self.execute(self.forward, slot) + need(self.guide_head == slot * len(self.unit), 'selected physical origin') + self.execute(self.source.graph(operation), 'start') + self.execute(self.backward, slot) + need(self.guide_head == self.data_head == 0, 'complete head return') + charged = self.counts.total() - before + need(charged == 8 * slot * (self.extent + 2) + 9 * self.extent + 14, 'exact complete reset cost') + return charged + + +def require_view(parent, child): + need(tuple(parent) == tuple(child), 'complete shape and order equality') diff --git a/research/current-native-bank-selector/source/EDIT.json b/research/current-native-bank-selector/source/EDIT.json new file mode 100644 index 0000000000..1589b1a98b --- /dev/null +++ b/research/current-native-bank-selector/source/EDIT.json @@ -0,0 +1,1650 @@ +{ + "initial": [ + [ + 740, + 603, + 1098 + ], + [ + 1356, + 603, + 1098 + ] + ], + "final": [ + [ + 289, + 233, + 234 + ], + [ + 325, + 238, + 237 + ], + [ + 1052, + 233, + 234 + ], + [ + 1087, + 238, + 237 + ] + ], + "append_frames": [ + [ + 51, + 196, + 324 + ], + [ + 30, + 193, + 321 + ], + [ + 52, + 82, + 384 + ] + ], + "events": [ + { + "at": 89156, + "old": [ + "MOVE", + 824, + 330, + 616, + false + ], + "new": [] + }, + { + "at": 89157, + "old": [ + "MOVE", + 977, + 3, + 616, + false + ], + "new": [ + [ + "MOVE", + 977, + 3, + 330, + false + ] + ] + }, + { + "at": 89158, + "old": [ + "ADD", + 824, + 977, + "1/2", + 616 + ], + "new": [ + [ + "ADD", + 824, + 977, + "1/2", + 330 + ] + ] + }, + { + "at": 89160, + "old": [ + "MOVE", + 871, + 327, + 721, + false + ], + "new": [ + [ + "MOVE", + 871, + 327, + 1096, + false + ] + ] + }, + { + "at": 89161, + "old": [ + "MOVE", + 824, + 616, + 721, + false + ], + "new": [ + [ + "MOVE", + 824, + 330, + 1096, + false + ] + ] + }, + { + "at": 89162, + "old": [ + "ADD", + 871, + 824, + "-1", + 721 + ], + "new": [ + [ + "ADD", + 871, + 824, + "-1", + 1096 + ] + ] + }, + { + "at": 89878, + "old": [ + "MOVE", + 54, + 330, + 616, + false + ], + "new": [] + }, + { + "at": 89880, + "old": [ + "MOVE", + 101, + 327, + 721, + false + ], + "new": [ + [ + "MOVE", + 101, + 327, + 1096, + false + ] + ] + }, + { + "at": 89881, + "old": [ + "MOVE", + 1455, + 3, + 721, + false + ], + "new": [ + [ + "MOVE", + 1455, + 3, + 1096, + false + ] + ] + }, + { + "at": 89882, + "old": [ + "ADD", + 824, + 1455, + "-3/2", + 721 + ], + "new": [ + [ + "ADD", + 824, + 1455, + "-3/2", + 1096 + ] + ] + }, + { + "at": 90070, + "old": [ + "MOVE", + 213, + 3, + 616, + false + ], + "new": [ + [ + "MOVE", + 213, + 3, + 330, + false + ] + ] + }, + { + "at": 90071, + "old": [ + "ADD", + 213, + 54, + "-1/2", + 616 + ], + "new": [ + [ + "ADD", + 213, + 54, + "-1/2", + 330 + ] + ] + }, + { + "at": 90073, + "old": [ + "MOVE", + 54, + 616, + 721, + false + ], + "new": [ + [ + "MOVE", + 54, + 330, + 1096, + false + ] + ] + }, + { + "at": 90074, + "old": [ + "ADD", + 54, + 101, + "1", + 721 + ], + "new": [ + [ + "ADD", + 54, + 101, + "1", + 1096 + ] + ] + }, + { + "at": 90075, + "old": [ + "ADD", + 824, + 54, + "-1", + 721 + ], + "new": [ + [ + "ADD", + 824, + 54, + "-1", + 1096 + ] + ] + }, + { + "at": 90076, + "old": [ + "ADD", + 1455, + 54, + "1/2", + 721 + ], + "new": [ + [ + "ADD", + 1455, + 54, + "1/2", + 1096 + ] + ] + }, + { + "at": 90077, + "old": [ + "MOVE", + 1455, + 721, + 724, + false + ], + "new": [ + [ + "MOVE", + 1455, + 1096, + 724, + false + ] + ] + }, + { + "at": 90084, + "old": [ + "ADD", + 1206, + 977, + "1/2", + 616 + ], + "new": [ + [ + "MOVE", + 977, + 330, + 616, + false + ], + [ + "ADD", + 1206, + 977, + "1/2", + 616 + ] + ] + }, + { + "at": 90085, + "old": [ + "ADD", + 213, + 1206, + "-1/2", + 616 + ], + "new": [ + [ + "MOVE", + 213, + 330, + 616, + false + ], + [ + "ADD", + 213, + 1206, + "-1/2", + 616 + ] + ] + }, + { + "at": 93802, + "old": [ + "MOVE", + 1093, + 374, + 733, + false + ], + "new": [ + [ + "MOVE", + 1093, + 374, + 1097, + false + ] + ] + }, + { + "at": 93918, + "old": [ + "MOVE", + 871, + 721, + 233, + false + ], + "new": [ + [ + "MOVE", + 871, + 1096, + 234, + false + ] + ] + }, + { + "at": 93919, + "old": [ + "MOVE", + 1052, + 234, + 233, + false + ], + "new": [] + }, + { + "at": 93920, + "old": [ + "ADD", + 871, + 1052, + "1", + 233 + ], + "new": [ + [ + "ADD", + 871, + 1052, + "1", + 234 + ] + ] + }, + { + "at": 95643, + "old": [ + "MOVE", + 1091, + 373, + 733, + false + ], + "new": [ + [ + "MOVE", + 1091, + 373, + 1097, + false + ] + ] + }, + { + "at": 95644, + "old": [ + "ADD", + 1091, + 1093, + "-1", + 733 + ], + "new": [ + [ + "ADD", + 1091, + 1093, + "-1", + 1097 + ] + ] + }, + { + "at": 95646, + "old": [ + "MOVE", + 1091, + 733, + 238, + false + ], + "new": [ + [ + "MOVE", + 1091, + 1097, + 237, + false + ] + ] + }, + { + "at": 95647, + "old": [ + "MOVE", + 1087, + 237, + 238, + false + ], + "new": [] + }, + { + "at": 95648, + "old": [ + "ADD", + 1091, + 1087, + "1", + 238 + ], + "new": [ + [ + "ADD", + 1091, + 1087, + "1", + 237 + ] + ] + }, + { + "at": 95650, + "old": [ + "SCALE", + 1087, + "-1", + 238 + ], + "new": [ + [ + "SCALE", + 1087, + "-1", + 237 + ] + ] + }, + { + "at": 97003, + "old": [ + "MOVE", + 331, + 374, + 733, + false + ], + "new": [ + [ + "MOVE", + 331, + 374, + 1097, + false + ] + ] + }, + { + "at": 97004, + "old": [ + "MOVE", + 329, + 373, + 733, + false + ], + "new": [ + [ + "MOVE", + 329, + 373, + 1097, + false + ] + ] + }, + { + "at": 97005, + "old": [ + "ADD", + 331, + 329, + "1", + 733 + ], + "new": [ + [ + "ADD", + 331, + 329, + "1", + 1097 + ] + ] + }, + { + "at": 97013, + "old": [ + "MOVE", + 508, + 3, + 733, + false + ], + "new": [ + [ + "MOVE", + 508, + 3, + 1097, + false + ] + ] + }, + { + "at": 97014, + "old": [ + "ADD", + 508, + 331, + "1", + 733 + ], + "new": [ + [ + "ADD", + 508, + 331, + "1", + 1097 + ] + ] + }, + { + "at": 97015, + "old": [ + "ADD", + 1093, + 508, + "-1", + 733 + ], + "new": [ + [ + "ADD", + 1093, + 508, + "-1", + 1097 + ] + ] + }, + { + "at": 97016, + "old": [ + "MOVE", + 1093, + 733, + 785, + false + ], + "new": [ + [ + "MOVE", + 1093, + 1097, + 785, + false + ] + ] + }, + { + "at": 97038, + "old": [ + "MOVE", + 508, + 733, + 736, + false + ], + "new": [ + [ + "MOVE", + 508, + 1097, + 736, + false + ] + ] + }, + { + "at": 97319, + "old": [ + "MOVE", + 824, + 721, + 807, + false + ], + "new": [ + [ + "MOVE", + 824, + 1096, + 807, + false + ] + ] + }, + { + "at": 97919, + "old": [ + "MOVE", + 331, + 733, + 785, + false + ], + "new": [ + [ + "MOVE", + 331, + 1097, + 785, + false + ] + ] + }, + { + "at": 98063, + "old": [ + "MOVE", + 54, + 721, + 807, + false + ], + "new": [ + [ + "MOVE", + 54, + 1096, + 807, + false + ] + ] + }, + { + "at": 98670, + "old": [ + "MOVE", + 757, + 3, + 603, + false + ], + "new": [ + [ + "MOVE", + 757, + 3, + 1098, + false + ] + ] + }, + { + "at": 98686, + "old": [ + "MOVE", + 1255, + 597, + 603, + false + ], + "new": [ + [ + "MOVE", + 1255, + 597, + 1098, + false + ] + ] + }, + { + "at": 98687, + "old": [ + "SCALE", + 1255, + "-1", + 603 + ], + "new": [ + [ + "SCALE", + 1255, + "-1", + 1098 + ] + ] + }, + { + "at": 98688, + "old": [ + "INIT", + 1523, + 603 + ], + "new": [ + [ + "INIT", + 1523, + 1098 + ] + ] + }, + { + "at": 98689, + "old": [ + "ADD", + 1523, + 1255, + "-1", + 603 + ], + "new": [ + [ + "ADD", + 1523, + 1255, + "-1", + 1098 + ] + ] + }, + { + "at": 98690, + "old": [ + "ADD", + 1255, + 1523, + "1", + 603 + ], + "new": [ + [ + "ADD", + 1255, + 1523, + "1", + 1098 + ] + ] + }, + { + "at": 98692, + "old": [ + "MOVE", + 709, + 595, + 603, + false + ], + "new": [ + [ + "MOVE", + 709, + 595, + 1098, + false + ] + ] + }, + { + "at": 98693, + "old": [ + "ADD", + 709, + 757, + "1/8", + 603 + ], + "new": [ + [ + "ADD", + 709, + 757, + "1/8", + 1098 + ] + ] + }, + { + "at": 98694, + "old": [ + "ADD", + 709, + 1523, + "-1/32", + 603 + ], + "new": [ + [ + "ADD", + 709, + 1523, + "-1/32", + 1098 + ] + ] + }, + { + "at": 98695, + "old": [ + "ADD", + 1523, + 1255, + "2", + 603 + ], + "new": [ + [ + "ADD", + 1523, + 1255, + "2", + 1098 + ] + ] + }, + { + "at": 98696, + "old": [ + "ADD", + 757, + 1255, + "1", + 603 + ], + "new": [ + [ + "ADD", + 757, + 1255, + "1", + 1098 + ] + ] + }, + { + "at": 98697, + "old": [ + "ADD", + 1255, + 757, + "-1", + 603 + ], + "new": [ + [ + "ADD", + 1255, + 757, + "-1", + 1098 + ] + ] + }, + { + "at": 98698, + "old": [ + "ADD", + 1523, + 757, + "-2", + 603 + ], + "new": [ + [ + "ADD", + 1523, + 757, + "-2", + 1098 + ] + ] + }, + { + "at": 98699, + "old": [ + "ADD", + 1356, + 1523, + "-1/2", + 603 + ], + "new": [ + [ + "ADD", + 1356, + 1523, + "-1/2", + 1098 + ] + ] + }, + { + "at": 98700, + "old": [ + "SCALE", + 757, + "-1", + 603 + ], + "new": [ + [ + "SCALE", + 757, + "-1", + 1098 + ] + ] + }, + { + "at": 98701, + "old": [ + "ADD", + 757, + 1523, + "1/2", + 603 + ], + "new": [ + [ + "ADD", + 757, + 1523, + "1/2", + 1098 + ] + ] + }, + { + "at": 98702, + "old": [ + "SCALE", + 1356, + "-1", + 603 + ], + "new": [ + [ + "SCALE", + 1356, + "-1", + 1098 + ] + ] + }, + { + "at": 98703, + "old": [ + "ADD", + 1523, + 1356, + "-2", + 603 + ], + "new": [ + [ + "ADD", + 1523, + 1356, + "-2", + 1098 + ] + ] + }, + { + "at": 98705, + "old": [ + "MOVE", + 1356, + 603, + 763, + false + ], + "new": [ + [ + "MOVE", + 1356, + 1098, + 763, + false + ] + ] + }, + { + "at": 98732, + "old": [ + "MOVE", + 572, + 595, + 603, + false + ], + "new": [ + [ + "MOVE", + 572, + 595, + 1098, + false + ] + ] + }, + { + "at": 98733, + "old": [ + "ADD", + 572, + 709, + "-2", + 603 + ], + "new": [ + [ + "ADD", + 572, + 709, + "-2", + 1098 + ] + ] + }, + { + "at": 98734, + "old": [ + "ADD", + 709, + 740, + "1/4", + 603 + ], + "new": [ + [ + "ADD", + 709, + 740, + "1/4", + 1098 + ] + ] + }, + { + "at": 98735, + "old": [ + "SCALE", + 709, + "2", + 603 + ], + "new": [ + [ + "SCALE", + 709, + "2", + 1098 + ] + ] + }, + { + "at": 98736, + "old": [ + "ADD", + 709, + 572, + "1/2", + 603 + ], + "new": [ + [ + "ADD", + 709, + 572, + "1/2", + 1098 + ] + ] + }, + { + "at": 98737, + "old": [ + "SCALE", + 740, + "-1", + 603 + ], + "new": [ + [ + "SCALE", + 740, + "-1", + 1098 + ] + ] + }, + { + "at": 98988, + "old": [ + "ADD", + 740, + 709, + "2", + 603 + ], + "new": [ + [ + "ADD", + 740, + 709, + "2", + 1098 + ] + ] + }, + { + "at": 99090, + "old": [ + "MOVE", + 740, + 603, + 763, + false + ], + "new": [ + [ + "MOVE", + 740, + 1098, + 763, + false + ] + ] + }, + { + "at": 99099, + "old": [ + "MOVE", + 572, + 603, + 762, + false + ], + "new": [ + [ + "MOVE", + 572, + 1098, + 762, + false + ] + ] + }, + { + "at": 99102, + "old": [ + "MOVE", + 1255, + 603, + 762, + false + ], + "new": [ + [ + "MOVE", + 1255, + 1098, + 762, + false + ] + ] + }, + { + "at": 101478, + "old": [ + "MOVE", + 289, + 234, + 233, + false + ], + "new": [] + }, + { + "at": 101479, + "old": [ + "MOVE", + 101, + 721, + 233, + false + ], + "new": [ + [ + "MOVE", + 101, + 1096, + 234, + false + ] + ] + }, + { + "at": 101480, + "old": [ + "ADD", + 289, + 101, + "-1", + 233 + ], + "new": [ + [ + "ADD", + 289, + 101, + "-1", + 234 + ] + ] + }, + { + "at": 101495, + "old": [ + "MOVE", + 325, + 237, + 238, + false + ], + "new": [] + }, + { + "at": 101496, + "old": [ + "MOVE", + 329, + 733, + 238, + false + ], + "new": [ + [ + "MOVE", + 329, + 1097, + 237, + false + ] + ] + }, + { + "at": 101497, + "old": [ + "ADD", + 325, + 329, + "-1", + 238 + ], + "new": [ + [ + "ADD", + 325, + 329, + "-1", + 237 + ] + ] + }, + { + "at": 101499, + "old": [ + "SCALE", + 325, + "-1", + 238 + ], + "new": [ + [ + "SCALE", + 325, + "-1", + 237 + ] + ] + }, + { + "at": 102167, + "old": [ + "MOVE", + 1091, + 238, + 127, + false + ], + "new": [ + [ + "MOVE", + 1091, + 237, + 127, + false + ] + ] + }, + { + "at": 102199, + "old": [ + "MOVE", + 709, + 603, + 127, + false + ], + "new": [ + [ + "MOVE", + 709, + 1098, + 127, + false + ] + ] + }, + { + "at": 102303, + "old": [ + "MOVE", + 871, + 233, + 127, + false + ], + "new": [ + [ + "MOVE", + 871, + 234, + 127, + false + ] + ] + }, + { + "at": 102549, + "old": [ + "MOVE", + 329, + 238, + 127, + false + ], + "new": [ + [ + "MOVE", + 329, + 237, + 127, + false + ] + ] + }, + { + "at": 102657, + "old": [ + "SCALE", + 757, + "-1", + 603 + ], + "new": [ + [ + "SCALE", + 757, + "-1", + 1098 + ] + ] + }, + { + "at": 102658, + "old": [ + "ADD", + 757, + 1523, + "1", + 603 + ], + "new": [ + [ + "ADD", + 757, + 1523, + "1", + 1098 + ] + ] + }, + { + "at": 102659, + "old": [ + "ADD", + 1523, + 757, + "-1", + 603 + ], + "new": [ + [ + "ADD", + 1523, + 757, + "-1", + 1098 + ] + ] + }, + { + "at": 102660, + "old": [ + "ADD", + 757, + 1523, + "1", + 603 + ], + "new": [ + [ + "ADD", + 757, + 1523, + "1", + 1098 + ] + ] + }, + { + "at": 102661, + "old": [ + "CLEAR", + 1523, + 603 + ], + "new": [ + [ + "CLEAR", + 1523, + 1098 + ] + ] + }, + { + "at": 102662, + "old": [ + "MOVE", + 757, + 603, + 127, + false + ], + "new": [ + [ + "MOVE", + 757, + 1098, + 127, + false + ] + ] + }, + { + "at": 102720, + "old": [ + "MOVE", + 101, + 233, + 127, + false + ], + "new": [ + [ + "MOVE", + 101, + 234, + 127, + false + ] + ] + } + ] +} diff --git a/research/current-native-bank-selector/source/LICENSE b/research/current-native-bank-selector/source/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/source/NOTICE b/research/current-native-bank-selector/source/NOTICE new file mode 100644 index 0000000000..6ce1bc49a3 --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/source/PROOF.md b/research/current-native-bank-selector/source/PROOF.md new file mode 100644 index 0000000000..8e0c250e1b --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/source/README.md b/research/current-native-bank-selector/source/README.md new file mode 100644 index 0000000000..dc4f1e1ce0 --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/source/RESULT.json b/research/current-native-bank-selector/source/RESULT.json new file mode 100644 index 0000000000..f289e70914 --- /dev/null +++ b/research/current-native-bank-selector/source/RESULT.json @@ -0,0 +1,405 @@ +{ + "native": { + "events": 150005, + "paid": { + "1": 3965, + "2": 878, + "3": 608, + "4": 241, + "5": 363, + "6": 86, + "7": 9, + "8": 7, + "9": 4 + }, + "helper": { + "1": 18, + "2": 21, + "3": 47, + "4": 229, + "5": 76, + "6": 46, + "7": 17, + "8": 32, + "9": 615 + }, + "all_public_rows": 1501, + "mains": 400, + "lifetimes": 234, + "used_labels": 52, + "peak_live": 50, + "owned_moves": 47, + "peak_scaled_mass": "58120605/2", + "grid": [ + 225, + 14 + ], + "visits": 8519290, + "half_grid": [ + 100502, + 187, + true + ], + "lifetime_sha256": "51d194c7d37fa00c7f85d447b802a12b6f6c8450c2ad4309d084ae33896107af", + "equal_price_sign_rejected": true + }, + "application": { + "caller": { + "paid": { + "8": 656, + "9": 32, + "56": 416, + "48": 416, + "40": 416, + "32": 416, + "24": 416, + "16": 416, + "1": 384, + "64": 208 + }, + "targets": { + "137": 208, + "65": 416, + "57": 416, + "49": 416, + "41": 416, + "33": 416, + "25": 416, + "17": 416, + "9": 416, + "73": 208 + }, + "uses": { + "ADD": 90208, + "SCALE": 11472, + "IDLE_ONE": 3360, + "LAMBDA": 11280, + "IDLE_ODD": 32, + "SWAP": 1120, + "QUERY": 384 + }, + "calls": 17, + "dyadic_height": 381, + "odd_scale": 675, + "peak_scaled_mass": "113707503000", + "exact_preproduct_divisions": 176874, + "root_owners": 3744, + "fresh_helpers": 18717 + }, + "main_owners_by_stage": [ + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400 + ], + "invoice": { + "schema": "integer-mult-recursive-invoice/v1", + "contract": { + "model": "mixed-target-unnormalized-power-v1", + "ambient_rank": 145, + "rank_semantics": "One positive rank-r child costs r^(1-C).", + "boundary": "All 17 signed native calls and all caller operations." + }, + "paid": { + "1": 67789, + "2": 14926, + "3": 10336, + "4": 4097, + "5": 6171, + "6": 1462, + "7": 153, + "8": 775, + "9": 100, + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 208 + }, + "targets": { + "1": 306, + "2": 357, + "3": 799, + "4": 3893, + "5": 1292, + "6": 782, + "7": 289, + "8": 544, + "9": 10871, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208, + "137": 208 + } + }, + "paid_delta": { + "1": 17, + "2": -136, + "3": 85, + "4": -102, + "5": 68, + "6": 34, + "7": -34 + }, + "target_delta": { + "4": 68, + "5": -68, + "6": 34, + "7": -34 + }, + "paid_count": 108513, + "productive_count": 22461, + "surplus": 1424, + "gate": { + "claim": "18597265031/5000000000000", + "tested": "371945300627/100000000000000", + "raw_bracket": [ + "74389060127/20000000000000", + "92986325159/25000000000000" + ], + "moment_margins": { + "74389060127/20000000000000": [ + "10369871026609076494476957737239999842150205823816426559884674211866267/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "1036987102660907649447695773723999984215020582381642655988467425071203/10000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "92986325159/25000000000000": [ + "-369543914538537582204366334166949603160674496215987680937361991669722517/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "-369543914538537582204366334166949603160674496215987680937361991631022633/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "371945300627/100000000000000": [ + "762420038887087045385347799461885630415543958258819864996723916467592789/25000000000000000000000000000000000000000000000000000000000000000000000000000000", + "304968015554834818154139119784754252166217583303527945998689566590911917/10000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "moment_margin_float": { + "74389060127/20000000000000": [ + 1.0369871026609076e-10, + 1.0369871026609076e-10 + ], + "92986325159/25000000000000": [ + -3.6954391453853756e-09, + -3.6954391453853756e-09 + ], + "371945300627/100000000000000": [ + 3.0496801555483483e-08, + 3.0496801555483483e-08 + ] + }, + "derivative_upper": -373929.47271899, + "alpha": [ + 0.9999999999998963, + 0.9999999999998963 + ], + "gamma": [ + 0.9438898234922328, + 0.9438898234922328 + ], + "delta": [ + 0.9086620773986241, + 0.9086620773986241 + ], + "minimum_log_power": 2282, + "written_log_power": 2283, + "compiler_gap": "1/100000000000000", + "H": "14532700000000000000", + "BIT_pin": "376669/100000000", + "BIT_margin": "4723699373/100000000000000", + "outer": { + "strict_count": 54, + "functional_count": 4, + "minimum_margin": "1/1000000000000000", + "BIT_just_below_effective_rejected": true + }, + "input_lift": { + "margins": { + "18597265031/5000000000000": [ + "126789351285634050773010099988556610328829457196715721406354407314897672653341/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "1584866891070425634662626249856957629110368214958946517579430091436220908191/1250000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "371945300627/100000000000000": [ + "126789351287916263770471128728957527839130814069223105346455529612056768201861/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "25357870257583252754094225745791505567826162813844621069291105922411353640761/20000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "interval_kappa_cap": "376669/100000000", + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } + }, + "directed_checks": [ + [ + "0.0037170835568", + "lower", + { + "lower": "-122147629150741423678248145975343527365937548063269761930638786961579/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "upper": "-122147629150741423678248145975343527365937548063269761930638669150667/115792089237316195423570985008687907853269984665640564039457584007913129639936" + } + ], + [ + "0.0037170835569", + "higher", + { + "lower": "4279787279132137043662569549418940480060944228490770390256070451356347/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "upper": "2139893639566068521831284774709470240030472114245385195128035280306403/57896044618658097711785492504343953926634992332820282019728792003956564819968" + } + ], + [ + "0.0037194530062", + "higher", + { + "lower": "1629704828885773885696581606130096604155373961920373262077497640535606286075/1809251394333065553493296640760748560207343510400633813116524750123642650624", + "upper": "13037638631086191085572652849040772833242991695362986096619981124284865974931/14474011154664524427946373126085988481658748083205070504932198000989141204992" + } + ], + [ + "0.0037194530062", + "lower", + { + "lower": "-6610659134412020461791128201634575200480008342073131288606108454850885/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "upper": "-826332391801502557723891025204321900060001042759141411075763541172059/14474011154664524427946373126085988481658748083205070504932198000989141204992" + } + ], + [ + "0.00371945300627", + "lower", + { + "lower": "-1765644183582633341067635415953069203655290419206772177821536404874533/57896044618658097711785492504343953926634992332820282019728792003956564819968", + "upper": "-441411045895658335266908853988267300913822604801693044455384085567043/14474011154664524427946373126085988481658748083205070504932198000989141204992" + } + ], + [ + "0.00371945300635", + "lower", + { + "lower": "-12007490312925778927242701700468030260952750708247742593281940609831/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "upper": "-12007490312925778927242701700468030260952750708247742593281817230129/115792089237316195423570985008687907853269984665640564039457584007913129639936" + } + ], + [ + "0.00371945300636", + "higher", + { + "lower": "427902619293534934886718025127578477493638893304321912725217146303353/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "upper": "53487827411691866860839753140947309686704861663040239090652158945109/14474011154664524427946373126085988481658748083205070504932198000989141204992" + } + ] + ], + "physical": { + "context_height": 395, + "context_mass_upper": "3304374433699657500", + "context_mass_bits": 62, + "context_c": 790, + "depth_times_c_bits": 14083, + "H": 14532700000000000000, + "conversions": 58522, + "scalar_services": 83895232, + "scalar_bit_step_coefficient": 87970526789632, + "native_contact_boundaries": 13600, + "monomial_maps": 294796, + "elementary_records": 27965527744, + "fresh_private": { + "lifetimes": 234, + "physical_native_homes": 3978, + "physical_native_resets": 7956, + "plan_sha256": "de16f7a197352722403440b3a33ffa77ed010c168f02fe1757f26db802cd8463", + "reset_graph_runs": 80, + "shape_cases": 27, + "reset_steps": 11280, + "signed_scalar_cases": 13992, + "distinct_scalars": 2332, + "numerator_bits": 18, + "odd_half_tick_rejected": true, + "extent_control_rejected": true, + "alias_control_rejected": true + } + } + }, + "catalogue": [ + { + "shard": 0, + "of": 6, + "catalogue": 3023, + "new": 18, + "checked": 504, + "all_columns": 1, + "main_boundaries": 104, + "wrong_phase_rejected": true, + "recipe_sha256": "9e32964b69692e7b17aa0423f0dfbf1f59a96d0fe6ff1dbcccbb14da8b4040b1" + }, + { + "shard": 1, + "of": 6, + "catalogue": 3023, + "new": 18, + "checked": 504, + "all_columns": 5, + "main_boundaries": 0, + "wrong_phase_rejected": true, + "recipe_sha256": "5fcec518547ccbda35dddfcd3f1f664dd8346510e3159891d98fc2002b8dc5bc" + }, + { + "shard": 2, + "of": 6, + "catalogue": 3023, + "new": 18, + "checked": 504, + "all_columns": 4, + "main_boundaries": 0, + "wrong_phase_rejected": true, + "recipe_sha256": "d487eeaa173c01ad91ea7c223291f6fb2db8986719541c57ea1f94098abc70a8" + }, + { + "shard": 3, + "of": 6, + "catalogue": 3023, + "new": 18, + "checked": 504, + "all_columns": 5, + "main_boundaries": 0, + "wrong_phase_rejected": true, + "recipe_sha256": "4e70d7fc788808d187e28507810de7ebe723b0a31cdff38e9e26476027c06dc0" + }, + { + "shard": 4, + "of": 6, + "catalogue": 3023, + "new": 18, + "checked": 504, + "all_columns": 2, + "main_boundaries": 0, + "wrong_phase_rejected": true, + "recipe_sha256": "8ed5a7b8e2296cfcdb90bdccd12aa9c261a3998198f5d62e94e14aad0de858ee" + }, + { + "shard": 5, + "of": 6, + "catalogue": 3023, + "new": 18, + "checked": 503, + "all_columns": 1, + "main_boundaries": 0, + "wrong_phase_rejected": true, + "recipe_sha256": "d5d4fc14ad132a446531e396d66d782aabc5309ae0b4ae4d1b0690b45d7351be" + } + ] +} diff --git a/research/current-native-bank-selector/source/banks.py b/research/current-native-bank-selector/source/banks.py new file mode 100644 index 0000000000..4ff2ba398b --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/source/data/source-word.json.gz b/research/current-native-bank-selector/source/data/source-word.json.gz new file mode 100644 index 0000000000..e05407f54f Binary files /dev/null and b/research/current-native-bank-selector/source/data/source-word.json.gz differ diff --git a/research/current-native-bank-selector/source/source/parent-NOTICE b/research/current-native-bank-selector/source/source/parent-NOTICE new file mode 100644 index 0000000000..cd7d35e2cb --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/source/source/physical-NOTICE b/research/current-native-bank-selector/source/source/physical-NOTICE new file mode 100644 index 0000000000..6bec37798c --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/source/source/word-NOTICE b/research/current-native-bank-selector/source/source/word-NOTICE new file mode 100644 index 0000000000..2baa2a719e --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/source/word.py b/research/current-native-bank-selector/source/word.py new file mode 100644 index 0000000000..d497414bba --- /dev/null +++ b/research/current-native-bank-selector/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-native-bank-selector/verify.py b/research/current-native-bank-selector/verify.py new file mode 100644 index 0000000000..a71086002a --- /dev/null +++ b/research/current-native-bank-selector/verify.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +"""Check the source-bound selector, complete extent and parked parent state.""" +from hashlib import sha1, sha256 +import json +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from controller import Machine, need, require_view, seek_table + + +def encoded(value): + return json.dumps(value, sort_keys=True, separators=(',', ':')).encode() + + +def authenticate(): + for row in json.loads((HERE / 'VENDORED.json').read_text())['files']: + raw = (HERE / row['path']).read_bytes() + need(sha256(raw).hexdigest() == row['sha256'], 'source SHA256') + need(sha1(b'blob ' + str(len(raw)).encode() + b'\0' + raw).hexdigest() == row['git_blob'], 'source Git blob') + 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 proof input') + + +authenticate() +sys.path.insert(0, str(HERE / 'source')) +import banks +import word + + +def span(basis): + result = {0} + for vector in basis: + need(vector not in result, 'independent source basis') + result |= {x ^ vector for x in result} + return result + + +def source_boundary(): + _, native = word.words() + sites = banks.plan(native) + at = 88263 + event = native['program'][at] + need(event == ['MOVE', 1510, 477, 1090, True], 'exact owned MOVE') + need(sites[35] == [1510, 88260, 477, 91760, 1090], 'exact parent owner') + active = [i for i, site in enumerate(sites) if site[1] < at < site[3]] + need(len(sites) == 234 and len(active) == 34 and 35 in active, 'current owner plan') + large = span(native['frames'][477]) + small = span(native['frames'][1090]) + need(len(large) == 256 and len(small) == 16 and small < large, 'rank-four nested boundary') + return native, sites, {'clock': at, 'event': event, 'parent_owner_ordinal': 35, + 'active_parent_ordinals': active, 'parent_bank_count': len(sites), + 'child_rank': 4, 'native_rank': 9, + 'word_sha256': sha256(word.encoded(native)).hexdigest(), + 'lifetime_plan_sha256': sha256(word.encoded(sites)).hexdigest()} + + +def check_shapes(): + cases = [] + for rows, factor, width in [(1, 1, 1), (2, 1, 3), (1, 2, 1)]: + parent = banks.make_guide(rows, 9 * factor, width) + child_rows = rows * 2 ** (5 * factor) + child = banks.make_guide(child_rows, 4 * factor, width) + require_view(parent, child) + address_count = rows * 2 ** (9 * factor) + child_size = 2 ** (4 * factor) + for address in range(address_count): + outer, native = divmod(address, 2 ** (9 * factor)) + spectator, inner = divmod(native, child_size) + child_outer = outer * 2 ** (5 * factor) + spectator + need(child_outer * child_size + inner == address, 'ordered complete child record map') + cases.append({'rows': rows, 'factor': factor, 'width': width, + 'child_rows': child_rows, 'child_axes': 4 * factor, + 'addresses': address_count, 'extent': len(parent) - 2}) + same_length_wrong_format = (banks.make_guide(3, 0, 1), banks.make_guide(1, 0, 6)) + need(len(same_length_wrong_format[0]) == len(same_length_wrong_format[1]), 'equal-extent control') + for wrong_pair in [same_length_wrong_format, + (banks.make_guide(1, 9, 1), banks.make_guide(16, 4, 1))]: + try: + require_view(*wrong_pair) + except ValueError as exc: + need(str(exc) == 'complete shape and order equality', 'shape rejection cause') + else: + raise ValueError('invalid child view accepted') + return cases + + +def check_lifetimes(native, sites): + count = len(sites) + guide = banks.make_guide(1, 0, 1) + machine = Machine(guide, 2 * count, count, banks) + parent = machine.data[:count * len(guide)] + lookup = {s[1]: (i, 'INIT') for i, s in enumerate(sites)} + lookup.update({s[3]: (i, 'CLEAR') for i, s in enumerate(sites)}) + total, trace = 0, [] + for clock in sorted(lookup): + ordinal, operation = lookup[clock] + need(native['program'][clock][0] == operation, 'chronological source service') + slot = count + ordinal + cost = machine.reset(slot, operation) + total += cost + trace.append([clock, ordinal, operation, cost]) + body = machine.data[slot * len(guide) + 1:(slot + 1) * len(guide) - 1] + need(body == ([c for _, c in guide[1:-1]] if operation == 'INIT' else [banks.BLANK] * (len(guide) - 2)), 'exact selected reset body') + need(machine.data[:len(parent)] == parent, 'all suspended parents unchanged') + need(machine.guide == tuple(guide) * (2 * count), 'immutable complete guide') + extent = len(guide) - 2 + need(total == 1316484 * extent + 2631096, 'complete source reset overhead') + return {'services': len(trace), 'extent': extent, 'charged': total, + 'trace_sha256': sha256(encoded(trace)).hexdigest(), 'counts': dict(machine.counts)} + + +def check_actual_boundary(sites): + count = len(sites) + guide = banks.make_guide(1, 9, 1) + require_view(guide, banks.make_guide(32, 4, 1)) + machine = Machine(guide, 2 * count, count, banks) + old = machine.data.copy() + receipts = [] + for slot in (count, 2 * count - 1): + for operation in ('INIT', 'CLEAR'): + receipts.append({'slot': slot, 'operation': operation, + 'charged': machine.reset(slot, operation)}) + for slot in range(2 * count): + start = slot * len(guide) + need(machine.data[start] == old[start] and machine.data[start + len(guide) - 1] == old[start + len(guide) - 1], 'all exterior guards unchanged') + if slot not in (count, 2 * count - 1): + need(machine.data[start:start + len(guide)] == old[start:start + len(guide)], 'all unselected cells unchanged') + need(machine.guide == tuple(guide) * (2 * count), 'guide preserved at actual extent') + # This borrower tests the frame condition. It is not a Gaussian child. + loan = {key: (state, '1' if write == '0' else write, move) + for key, (state, write, move) in banks.graph('INIT').items()} + before = machine.data.copy() + machine.execute(machine.forward, 35) + machine.execute(loan, 'start') + machine.execute(machine.backward, 35) + lo, hi = 35 * len(guide), 36 * len(guide) + need(machine.data[:lo] == before[:lo] and machine.data[hi:] == before[hi:] and machine.data[lo:hi] != before[lo:hi], 'borrowed view isolation') + need(machine.guide_head == machine.data_head == 0, 'borrower head return') + return {'extent': len(guide) - 2, 'banks': 2 * count, + 'payload_cells': len(machine.data), 'immutable_guide_cells': len(machine.guide), + 'reset_receipts': receipts, 'borrowed_slot': 35, + 'borrower_scope': 'write-only frame-condition witness, not a Gaussian child'} + + +def check_controls(): + guide = banks.make_guide(1, 0, 1) + machine = Machine(guide, 2, 1, banks) + parked = machine.data[:len(guide)] + machine.reset(0, 'CLEAR') + need(machine.data[:len(guide)] != parked, 'aliased child owner changes the parked parent') + private = [banks.LEFT] + ['1'] * (len(guide) - 2) + [banks.RIGHT] + banks.run_reset('CLEAR', guide[:-2] + guide[-1:], private) + need(private[-2] == '1', 'short guide leaves old backing') + machine = Machine(guide, 2, 1, banks) + machine.execute(machine.forward, 1) + machine.execute(banks.graph('CLEAR'), 'start') + need(machine.guide_head != 0 and machine.data_head != 0, 'omitted selector return leaves displaced heads') + return ['same extent with a different format rejected', 'missing child spectators rejected', + 'aliased child slot changes parent', 'short guide leaves old backing', + 'omitted selector return leaves both heads displaced'] + + +def main(): + native, sites, boundary = source_boundary() + count = 2 * len(sites) + result = {'boundary': boundary, 'shapes': check_shapes(), + 'source_lifetimes': check_lifetimes(native, sites), + 'actual_boundary': check_actual_boundary(sites), 'controls': check_controls(), + 'fixed_control_rows': 2 * len(seek_table(count, 1, banks.ALLOWED)) + len(banks.graph('INIT')) + len(banks.graph('CLEAR')), + 'single_service_cost': '8k(L+2)+9L+14', + 'complete_child_reset_cost': {'L': 1316484, 'constant': 2631096}} + path = HERE / 'RESULT.json' + if sys.argv[1:] == ['--write']: + need(not path.exists(), 'do not replace a checked receipt') + path.write_text(json.dumps(result, indent=2) + '\n') + else: + need(not sys.argv[1:], 'unexpected arguments') + need(result == json.loads(path.read_text()), 'complete source-bound receipt') + print('PASS_CURRENT_NATIVE_BANK_SELECTOR ' + json.dumps(result, sort_keys=True)) + + +if __name__ == '__main__': + main()