diff --git a/research/minimum-root-row-prefix/CONSUMER-INVENTORY.json b/research/minimum-root-row-prefix/CONSUMER-INVENTORY.json new file mode 100644 index 0000000000..afc6e4335a --- /dev/null +++ b/research/minimum-root-row-prefix/CONSUMER-INVENTORY.json @@ -0,0 +1,190 @@ +[ + { + "path": "research/physical-complex-controller/bank_packets.py", + "sha256": "83e2f80fb72c906ccc7857f2b5139758ca8a997b17f51a5db29e2bb3c1143477", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_bank.py", + "sha256": "6a5cd81ad980565c06f9e0df8c81eb6946dc69caf3704ee5b233ebdef6fb83c5", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_bounds.py", + "sha256": "697606202fbef8463f6ee736007b9630c55034246dcda17c23b03e97d270dcc7", + "consumer_tokens": [ + "stock" + ] + }, + { + "path": "research/physical-complex-controller/check_cover.py", + "sha256": "d50271a051d9d944dd7a5541756b508c8b19248d8d37bd30e729aaf7210435fd", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_failures.py", + "sha256": "785e9ff582aad9a6cee7cf339134309a863c8d4fa79367c31b2cc03b31282a5f", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_grid.py", + "sha256": "a08092d0bbcbb69459d936e2f6f7f431134cba9c31ffdc173c82878d00ea98e3", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_machine.py", + "sha256": "57deb4aac01d98bc5af7bdfbaf6624367fa5f84595b2b5902acada824db53eab", + "consumer_tokens": [ + "depth" + ] + }, + { + "path": "research/physical-complex-controller/check_monomial.py", + "sha256": "a301d39afb7475615716e2426c3df8fe0f6e8fa710c13f70ecb2a9026f52cd6d", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_parking.py", + "sha256": "7c84fa78dae732895ea016fcf3d1892f2519655dc5634b7e43a81b4ba7e187d8", + "consumer_tokens": [ + "depth" + ] + }, + { + "path": "research/physical-complex-controller/check_prime.py", + "sha256": "791a0233fa704eafa634b6968c68f81a83b95170b30c527ba93599b8b8e76643", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_root.py", + "sha256": "7f7be44511d67aa4920cf7de4a88b3b78aab39cc210d20c06a456ee807f53614", + "consumer_tokens": [ + "q0", + "depth", + "stock", + "padded_rows", + "original_rows" + ] + }, + { + "path": "research/physical-complex-controller/check_root_plan.py", + "sha256": "9f900532e6d564efd6af462f536f19301cb7674ab1b0670c0fc717ab63403da9", + "consumer_tokens": [ + "q0", + "depth" + ] + }, + { + "path": "research/physical-complex-controller/check_root_streams.py", + "sha256": "46711e474f8cd4b20c99c8a790c416f055da64e293e2cf9a33db9e60294cc0ed", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_scalar.py", + "sha256": "23b3077ed0bb15c3f5f402d841fbf36845a00a63bbbc845f776c221050c943a4", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/check_selected.py", + "sha256": "3572fa98bbb0312e66fd15a7e0ed494db5c4f7b32087a8c87aeee2528b83daea", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/cohort.py", + "sha256": "8fb650c0cc3dfaad94811149b0c0e725777a8cff195c5f21e21a7576494e84f1", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/cover.py", + "sha256": "d797daec10275f439f6019c596b89afbc32a7716cb657648adfcaae2408949da", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/fixture_binding.py", + "sha256": "efcb94cf050412ccd2d5eea592d77f294f6124f6feebc86580b16a73e5c2c202", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/grid_boundary.py", + "sha256": "55f32b8cfaa3482d5d62127ac90c2370fc0dc8122263815e1564ee95093ffccc", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/machine.py", + "sha256": "b648792a361fdf98597a2f56c634767508be8e818b82e482fbfc60b5c63cc855", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/monomial_packets.py", + "sha256": "6856e80c13ebf3b6e9e0e142ed65420579b5a1b4892f23859d3c6e5f17a334b4", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/native_program.py", + "sha256": "177d87445659d7ddbef11370d0b4cdc0596732147ed26c1fa11bad16ae53c93b", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/parking.py", + "sha256": "33e6d2a6fcdc648de31b374132bf885259eec9748bafa6facca3822a78427e94", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/production_native.py", + "sha256": "4c1f8f69212162bd297010c6e21a32e31755cbfe2e40f9935b8d87a9e4260d46", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/root_layer.py", + "sha256": "247b82feefecedc12142379fd7c9c6cdd5ac7e5309e443c4b4fa703d6b995c21", + "consumer_tokens": [ + "q0", + "padded_rows", + "original_rows" + ] + }, + { + "path": "research/physical-complex-controller/root_plan.py", + "sha256": "494cad3edc376928684f380cd16568076b286a53bd763d910d49efa5b03f07c9", + "consumer_tokens": [ + "q0", + "depth", + "stock", + "padded_rows", + "original_rows" + ] + }, + { + "path": "research/physical-complex-controller/root_streams.py", + "sha256": "b67daf3de591b6788220a016b0394cfe2cc8e94ffd41426bb2544ad578b715c8", + "consumer_tokens": [ + "padded_rows", + "original_rows" + ] + }, + { + "path": "research/physical-complex-controller/scalar_packets.py", + "sha256": "cc48f726325c000ab2304eb691feb950ff4abeab5c537d6165d5b3322dc45c35", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/scalar_program.py", + "sha256": "4c005167b4c2fe0d98d2dd93b7f931b251259417ff4392b67ee0fbe290f6d48a", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/selected_binding.py", + "sha256": "d6583458d00e4933c3a3fd83cc376f21c059e9fc6aa338c00d66c1deeaa0e985", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/selected_source.py", + "sha256": "02601c9e7d88e58e62d63509ff709c6498a40fbbc0f95fab328379ae6acaa87a", + "consumer_tokens": [] + }, + { + "path": "research/physical-complex-controller/verify.py", + "sha256": "529f7a1e90b279f03ba4c8c5b0aeb98cd6935a50b95eb3475e9eada5cb5670cb", + "consumer_tokens": [] + } +] diff --git a/research/minimum-root-row-prefix/PROOF.md b/research/minimum-root-row-prefix/PROOF.md new file mode 100644 index 0000000000..fbb40eab49 --- /dev/null +++ b/research/minimum-root-row-prefix/PROOF.md @@ -0,0 +1,229 @@ +# Minimum row-reservation prefix at the actual root core + +This is a conditional root-interface theorem and an exact reference compiler. +It concerns the original 73-dimensional physical backend retained by QQ16. +It does not install a production Count frontend or prove a new kappa. + +## 1. Source contract and changed parameter + +The retained RootPlan has precision p>=2, global width +`d=floor(p^(997/1000))`, spacing `K=floor(d^(1/500))`, selected width n<=d, +`G=4 ceil(log2 p)+6`, and H=dG. Keep these fields and + +```text +qF=ceil(2H/K), qB=ceil(H/K), M=n-qF-qB, +F=14336 Gamma, Gamma=2^1296 product_(j=1..36)(2^(2j)-1). +``` + +The selected-C backend has ranks {1,2,3,4,5,7,8,48}. It tests w<73 or +w^10000 below. For a proposed integer +q with 0<=qR, the left side is just S<2R. If S<=R, then +`ceil(R/S) S < R+S <=2R`, including equality R=S in the second inequality. +Thus the equivalence holds. For R=2^(Kq), it becomes + +```text +floor(log2 S(q)) <= Kq. (1) +``` + +This includes powers of two with the correct strict boundary. The source +condition R>=S is sufficient but stronger: a stock between R and 2R also +fits. The reference compiler uses `(S.bit_length()-1)`, with S=1 allowed. + +The left side of (1) is nonincreasing in q, and the right side is increasing. +There is a unique least feasible q. The value q=M-1 is feasible because its +core has width one and S=1. A smaller known upper bound is + +```text +U=min(M-1, ceil(2642 D(M)/K)). +``` + +If the second branch applies, K U>=2642 D(M)>=log2 S(U). The first branch +was already proved feasible. Binary search between the failed sentinel -1 +and U gives the exact minimum q*. Its certificate is the exact power-bit +comparison at q* and the failed comparison at q*-1, unless q*=0. +This proves the compiler for all inputs in the stated format; a finite +width scan is not used as its proof. + +No smaller prefix in this same complete-row format can keep the strict +factor-two volume bound. A different row encoding, a different permitted +volume factor or a different supplier can have a different minimum. + +## 3. Bind the complete root interface + +Set the plan's q0=q*, depth=D(M-q*), and stock=S(q*). Recompute all dependent +fields with the source formulas. Keep qF,qB and all global precision fields. +The actual consumers are recorded in CONSUMER-INVENTORY.json. Both a lexical +pass and an AST literal pass cover all 32 Python files in the retained +physical-complex-controller directory. Tests are distinguished from production. +The package pins all those files; it does not rely on their moving checkout. + +The production use chain is complete within this source module: + +1. RootPlan.compute derives Q0, original_rows, stock, padded_rows, core_width + and row_bits. No independent downstream depth consumer exists there. +2. RootLayer.reserved_leaves uses q0+qF at the high selected end and qB at + the low end. These leave exactly M-q0 core axes. +3. RootLayer.fast_core passes both row counts to RowPadding and passes + padded_rows as Machine's rows. It passes global d unchanged. +4. RowPadding copies every genuine row under every prefix, appends zero + rows, and checks every removed padding bit on return. Machine divides + its incoming rows by F at each nonterminal selected-C node. + +The following identities hold for any admissible q0, not only the old choice: + +```text +core_front=qF K-2H, core_back=qB K-H+right, +core_front+3H+(n-q0-qF-qB)K+core_back=(n-q0)K+right, +prefixes=outer_rows*2^left, +original_rows*2^((n-q0)K+right)=2^(nK+right). +``` + +Thus the root address partition and row serialization remain those proved +by Jose Manuel and independently refined by Sagar Thakrar. There is no +truncated high field, changed original payload or free private row. The +three selected-axis regions are disjoint and cover all n axes. At the +completed rowwise linear recursive endpoint, each added zero row is again +zero, even if intermediate operations mix rows. The unchanged removal test +therefore remains valid under that inherited endpoint premise. + +Since P is a positive multiple of F^depth, PR5515's exact-depth contract +supplies every reached row quotient. Sequential children reuse it. No +additional factor is lost at a sibling. Complete spectators stay in the +source rectangle. This is a source-relative proof; it does not reprove the +native, Ordinary, Compact or numerical endpoint. + +The compact guard also remains valid. Fast entry requires n>q0+qF+qB and +n<=d, hence K>3G. The source's sufficient inequality +`K>=3G+1>G+4 ceil(log2 p)+10` follows unchanged. Front/back residues lie in +[0,K). The changed q0 is at most the old 2642D0(d). Its reserved-leaf count +and descriptor extents therefore do not exceed that source allowance. The +recursive core stays at most d; padded volume remains strictly below twice +the original volume. The original exponent estimate can retain its former +upper bounds. No improved total exponent follows from this finite reduction. + +For source inputs that were direct only because of the old q0, the new plan +may choose a fast branch. The same guard and full endpoint argument apply; +this does not grant a zero cost to the new core or the reserved leaves. + +## 4. One axis suffices eventually + +Fix the source divisor F. For every integer p>=2^14000 and every source +selected width with M>0, the minimum is + +```text +q*=0 if M=2^v and v>=27. Two maximum child steps +contract by less than one half, since `2*48^2<73^2`. Hence + +```text +D0(d)<=2 ceil(log2 d), +2642 D0(d)<=5284(u+1). +``` + +For v>=27, `u+1 <= ceil(500000(v+1)/997)+1`. At v=27, + +```text +2^27 = 134217728 > 74208496 + = 5284(ceil(500000*28/997)+1). +``` + +Each increase in v raises the right side by at most 5284*502=2652568. +The right side at 27 already exceeds this increment. Doubling the left +side therefore preserves the strict inequality by induction. It follows +that K>2642D0(d). For q=1 this is more than the required stock bit count +at any core width at most d. If M>=T, q=0 has S>=F>1 and fails (1); q=1 +has a positive core and succeeds. If M