From c3bb07da2384ac967bca94f81017a23ed1983477 Mon Sep 17 00:00:00 2001 From: Ali Romman <226877337+aliromman@users.noreply.github.com> Date: Mon, 26 Oct 2026 00:23:47 -0500 Subject: [PATCH 1/3] Retain the exact root plan and its stock consumers --- .../CONSUMER-INVENTORY.json | 190 +++++++ .../vendor/ADDRESS-PROOF.md | 264 ++++++++++ .../vendor/PR5515-PROOF.md | 262 ++++++++++ .../vendor/PR5515-README.md | 131 +++++ .../vendor/ROOT-PROOF.md | 288 +++++++++++ .../minimum-root-row-prefix/vendor/machine.py | 477 ++++++++++++++++++ .../vendor/root_layer.py | 160 ++++++ .../vendor/root_plan.py | 222 ++++++++ .../vendor/root_streams.py | 141 ++++++ 9 files changed, 2135 insertions(+) create mode 100644 research/minimum-root-row-prefix/CONSUMER-INVENTORY.json create mode 100644 research/minimum-root-row-prefix/vendor/ADDRESS-PROOF.md create mode 100644 research/minimum-root-row-prefix/vendor/PR5515-PROOF.md create mode 100644 research/minimum-root-row-prefix/vendor/PR5515-README.md create mode 100644 research/minimum-root-row-prefix/vendor/ROOT-PROOF.md create mode 100644 research/minimum-root-row-prefix/vendor/machine.py create mode 100644 research/minimum-root-row-prefix/vendor/root_layer.py create mode 100644 research/minimum-root-row-prefix/vendor/root_plan.py create mode 100644 research/minimum-root-row-prefix/vendor/root_streams.py 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/vendor/ADDRESS-PROOF.md b/research/minimum-root-row-prefix/vendor/ADDRESS-PROOF.md new file mode 100644 index 0000000000..158cd78492 --- /dev/null +++ b/research/minimum-root-row-prefix/vendor/ADDRESS-PROOF.md @@ -0,0 +1,264 @@ +# The original root's reserved axes and padded core rectangle + +Copyright 2026 Sagar Thakrar. Apache-2.0. +Prepared with substantial OpenAI Codex assistance. + +This is a conditional address refinement of `reserved_leaves` and `fast_core` +in Jose Manuel's original PR3385 `root_layer.py`, at +`7e5a187214126d31afc241a8f89f4a652352b58c`. It explains how the three source +calls cover exactly the selected tensor axes and why the temporary row +padding can be removed. It does not independently prove the recursive +machine, its numerical precision, the normalized root, or its cost bound. +The source and its predecessors already claim the tensor decomposition; +the contribution here is an independent derivation at these literal +descriptor and serialization boundaries. + +## 1. Domain and endpoint contracts + +Let $D,q_0,q_F,q_B,H,l,r$ be nonnegative integers, and let $K,O,F,w$ +be positive integers. Here $l,r$ are the left and right spectator widths, +$O$ is the outer-row count, $F$ is the number of Gaussian coefficients per +address, and $w$ is a signed component width. Let $0\le\rho0, + \qquad f=q_FK-2H\ge0,\qquad b=q_BK-H+r\ge0. +\] + +The fast branch has the strict inequality $D>Q_0=q_0+q_F+q_B$. +The two nonnegative-width conditions hold for the production choices +$q_F=\lceil2H/K\rceil$ and $q_B=\lceil H/K\rceil$. + +Within each outer row the payload is ordered by increasing binary address +of width $l+DK+r$. Within each address the $F$ Gaussian coefficients occur +in order, each with a real and imaginary component of width $w$. +Address bit positions are counted from the least significant bit. The +selected positions are + +\[ + S=\{r+\rho+jK:0\le j1$; the source loops over prefixes. + +## 4. The recursive descriptor selects the middle axes + +The source passes `before=after=0`, `width=c`, `spacing=K`, `residue=rho`, +`compact_bits=H`, `front=f`, and `back=b` to the recursive machine. Its +row geometry is therefore + +\[ + [f]\ [H]\ [H]\ [cK]\ [H]\ [b]. +\] + +The source identifies this with the preceding rectangle because + +\[ + f+2H=q_FK,\qquad H+b=q_BK+r, +\] + +and hence + +\[ + f+3H+cK+b=(D-q_0)K+r=A. +\] + +Thus its selected position $t$ is + +\[ + b+H+\rho+tK=r+\rho+(q_B+t)K,\qquad0\le t1$ and coarse depth $h\ge0$, the +plan sets + +\[ + q_0=h\lceil\log_2 L\rceil,\qquad T=L^h. +\] + +Since $K\ge1$, $R=2^{q_0K}\ge L^h=T$. For positive $R,T$, + +\[ + R\le R'=T\lceil R/T\rceil= 1 define + +\[ +T_d=\max(73,\lceil d^{1/1000}\rceil),\qquad +H_d(w)=\begin{cases} +0,&w 1`, `M(1)=1041408/1046528 < 1`. +This is exactly #4865's existing exponent, not a new root search. Its +published bracket is `0.9983245373 < s < 0.9983245374`; the present proof +needs only the defining equation and `0= 1`. For every w >= T_d, + +\[ +\boxed{\quad +\frac{((w+a)/(T_d-1+a))^s-1}{C-1} +\le H_d(w)\le +\frac{(w/q_T)^s-1}{C-1}. +\quad} +\] + +The proof uses Nick Petalas's #4865 weighted-leaf argument with the cutoff +kept as a parameter. To make the extension's dependence explicit, let L be +the total terminal-leaf weight in the finite rank tree. Replacing one +frontier vertex by its children multiplies that vertex's weight by C. +Telescoping gives `L=1+(C-1)H_d(w)`. Every terminal leaf below a nonterminal +root has width in `[floor(T_d/73), T_d-1]`. + +For phi(x)=x^s, at an internal width w=73q+delta, +`sum c_r phi(rq)=(73q)^s <= phi(w)`. Telescoping implies +`q_T^s L <= w^s`, giving the upper bound. For psi(x)=(x+a)^s, + +\[ +a\ge\max_{r,0\le\delta\le72}\frac{r\delta}{73-r} + =\frac{48\cdot72}{25},\qquad +rq+a\ge(r/73)(w+a). +\] + +Thus `sum c_r psi(rq) >= psi(w)`. Terminal widths are at most T_d-1, +so `(T_d-1+a)^s L >= (w+a)^s`, giving the lower bound. The potential +functions and sharp per-edge affine shift are predecessor work; retaining +the moving cutoff and applying the result to changing d is the new scope. + +The constants can also be made uniform simultaneously in both parameters. +Put `A=1+a/73=5281/1825` and `X=(w/T_d)^s`. Since +`T_d-1+a <= A*T_d` and `floor(T_d/73) >= T_d/146`, the envelope and H>=1 give + +\[ +\frac{X}{C A^s}\le H_d(w)\le\frac{146^s}{C-1}X +\quad (w\ge T_d). +\] + +For the lower bound combine `H>=1` with +`H>=(X/A^s-1)/(C-1)`: the first suffices when X<=C A^s and the second when +X>=C A^s. Thus `H_d(w)=Theta((w/T_d)^s)` uniformly over the whole nonterminal +domain, with constants independent of d and w. There is no positive estimate +of this form for terminal widths, where H=0. + +## The diagonal recurrence and a growing root descriptor + +At w=d, let t=d^(1/1000). For t>=a, `T_d=ceil(t)`, +`T_d-1+a <= 2t`, and `floor(T_d/73) >= T_d/146 >= t/146`. +The latter inequality follows from `floor(x)>=x/2` for x>=1. Therefore + +\[ +\frac{(d^{999/1000}/2)^s-1}{C-1} +\le H_d(d)\le +\frac{(146d^{999/1000})^s-1}{C-1}, +\qquad H_d(d)=\Theta(d^{999s/1000}). +\] + +The implicit constants are independent of d. The same exponent applies +conditionally to any family with `epsilon*d <= w(d) <= d`, for fixed +epsilon>0. For other width families use the explicit envelope. Multiplying +the predecessor's bracket by 999/1000 gives the inherited numerical interval +`0.9973262127627 < 999s/1000 < 0.9973262128626`; it is not newly certified +numerical root information. + +This is a diagonal statement about a two-parameter recurrence. It neither +constructs an admitted RootPlan with w=d nor treats physical volume v as +constant while d grows. The full physical term has the extra factor +`N Gamma v(d)`. It does not follow that total runtime has this exponent. +The earlier fixed-cutoff `Theta(w^s)` remains correct on its stated domain. + +## Exact selected-C row-division depth + +Define + +\[ +D_d(w)=0\ (w=j` if and only if `w>=B_j`. The base case is the source cutoff. +Inductively, another internal level requires +`48 floor(w/73)>=B_j`, exactly equivalent to the displayed ceiling threshold. +These thresholds increase strictly. The source's pre-remainder test is why +`B_1` is T_d, not the next multiple of 73. For T_d=356, the first three +thresholds are 356, 584 and 949. The verifier checks this inverse oracle +against all finite DP depths and the giant historical maximum path. + +For a positive integer incoming row count R, every selected-C row division +in this reached tree is positive and exact **if and only if** + +\[ +F^{D_d(w)}\mid R. +\] + +Sufficiency follows since a depth-j node receives R/F^j and no path has more +than D internal nodes. Necessity follows on an attained longest path: its D +successive exact divisions imply divisibility by F^D. In particular the +smallest positive row count for this arithmetic contract is F^D. This is +not a minimum for all supplier stock or native/Ordinary internals. Sequential +sibling invocations reuse the same quotient; the total child count does not +create an additional stock power. + +There are explicit depth estimates. With rho=48/73 and a=3456/25, for w>=T_d, + +\[ +\left\lceil\frac{\log((w+a)/(T_d-1+a))}{\log(73/48)}\right\rceil +\le D_d(w)\le +1+\left\lfloor\frac{\log(w/T_d)}{\log(73/48)}\right\rfloor. +\] + +Along the maximum path, `w_j <= rho^j w` and +`w_j+a >= rho^j(w+a)`. The first terminal width is at most T_d-1; +the last internal width is at least T_d. Substituting these two facts gives +the displayed inequalities, with the strict threshold explaining the upper +`1+floor`. The checker verifies their integral equivalents, using powers +of 48 and 73, without floating-point logs. + +Consequently + +\[ +D_d(d)=\frac{999}{1000}\frac{\log d}{\log(73/48)}+O(1). +\] + +For fixed F, the arithmetic row minimum therefore satisfies +`F**D_d(d) = Theta_F(d**((999/1000)*log(F)/log(73/48)))`. +For variable F use the exact power; the constants in `Theta_F` are not +asserted uniform in F. This is a row-divisibility statement, not an installed +storage improvement. + +In #4753's historical descriptor `d=isqrt(2**16949)`, exact integer iteration +gives T_d=356 and D_d(d)=13997, ending at width 240. The cutoff-free +recurrence with T=73 gives 13999, ending at 48. The original conservative +RootPlan and its stock remain unchanged. Replacing its depth needs its own +root-layout, padding, all-caller and admission argument. + +## Boundary of the result + +No matched D* versus B* sign is established. All retained later calls, +candidate-only nonchild/shell/control work and the exact return credits must +still appear in that comparison. Lower bounds on both sides do not compare +their difference. No new recursive invoice is proposed, so the signed +invoice preflight is not an admission substitute or a claimed improvement. + +Source histogram/physical correctness, actual RootPlan admissibility, stock +construction, numerical precision, restoration, native/Ordinary implementations +and the selected framework assumptions remain inherited or unchecked. The +finite checker corroborates the written proof and its source descriptor +boundary; it is not a proof-assistant derivation or production execution. diff --git a/research/minimum-root-row-prefix/vendor/PR5515-README.md b/research/minimum-root-row-prefix/vendor/PR5515-README.md new file mode 100644 index 0000000000..ca14cf60fd --- /dev/null +++ b/research/minimum-root-row-prefix/vendor/PR5515-README.md @@ -0,0 +1,131 @@ +# QQ16 parking with its global-root cutoff + +**Scoped proof with exact finite corroboration; no new kappa.** The literal +historical QQ16 child backend stops at `w < 73 or w**1000 < d`, where d is +the global root-width descriptor. This package extends Nick Petalas's +[#4865 fixed-cutoff parking law](../qq16-parking-power-law/README.md) to that +varying cutoff and determines the exact selected-C row-division depth. +It answers part of that package's second open question. The complete +matched QQ16 cost comparison remains open. + +Put `T_d=max(73,ceil(d**(1/1000)))`, `C=255331/7168`, `a=3456/25`, and let s +be #4865's existing moment root. For w>=T_d, the normalized parking mass is +bounded uniformly by + +\[ +\frac{((w+a)/(T_d-1+a))^s-1}{C-1} +\le H_d(w)\le +\frac{(w/\lfloor T_d/73\rfloor)^s-1}{C-1}. +\] + +In fact `H_d(w)=Theta((w/T_d)**s)` uniformly for w>=T_d. Thus the diagonal +recurrence has `H_d(d)=Theta(d**(999*s/1000))`, with constants independent of d. +This concerns normalized current-bank parking volume; +physical volume, admission and the complete cost are additional obligations. +The fixed-cutoff theorem remains unchanged and correctly scoped. + +The maximum-rank path +`w -> 48 floor(w/73)`, stopped at T_d, gives the exact division depth D_d(w). +Equivalently, the smallest widths reaching j divisions are `B_1=T_d` and +`B_(j+1)=73 ceil(B_j/48)`; this supplies a separate exact depth oracle. +Every selected-C row division is positive and exact precisely when +`(14336 Gamma)**D_d(w)` divides the positive incoming row count. At the +historical `d=isqrt(2**16949)`, the depth is **13997**, versus the existing +cutoff-free sufficient depth **13999**. This does not install smaller root +stock. [PROOF.md](PROOF.md) proves the envelope, its changing-root consequence, +the exact divisibility statement and logarithmic depth bounds. + +## Evidence and reproduction + +```sh +python3 -B scripts/research_package.py --package research/qq16-root-cutoff-parking --check-only +python3 -B scripts/research_package.py --package research/qq16-root-cutoff-parking +``` + +Expected scientific status: `PASS_QQ16_ROOT_CUTOFF_PARKING`. Python 3.12 and +the standard library suffice. The registered normal and optimized runs are +read-only and compare the full deterministic [RESULT.json](RESULT.json). +Only `verify.py --write` regenerates that receipt. + +The checker uses exact rational dynamic programming at ten cutoffs and every +width 0..8192, an independent breadth census on 70 boundary/large-width cases, +30 exact 1000th-power boundaries, and all 584 rank/residue inequalities. +It checks the full-volume cancellation and exact stock powers at three +integer Gamma calibrations. The giant historical root is checked by a single +maximum path and independent inverse thresholds, without constructing its +bank, row count or full tree. + +The source probe extracts the unchanged `Machine.node` and `prepare_child` +methods from authenticated bytes and runs them over exact integer descriptor +operations. It checks cutoff equality, no repeated post-remainder test, +child width/rows, unchanged global d and the complete spectator rectangle. +Its Tape/Count primitives are explicitly test interpreters: this is **not** +physical payload execution or an audit of primitive implementations. Executed +source mutations change equality, global-root forwarding, rows and spectator +tails; arithmetic discriminators cover a frozen cutoff, a repeated test and +an insufficient affine shift. One-short stock is rejected on every tested +nonterminal maximum path, and a row-count size bound is distinguished from +exact divisibility. Dropping rank 48 underestimates the tested tree depth. +Receipt controls reject duplicate keys and boolean/float substitutions for +integer fields. + +The finite checks corroborate the written universal proof. They do not +numerically certify a new moment root or rerun #4753's literal-word census. +The existing root bracket is cited only for orientation. No full supplier, +selected cold replay, Lean, Docker, native payload, hosted CI or independent +human review is claimed. + +Resource limits: fixed ten-cutoff arrays of 8193 entries, breadth width at most +65536, at most 4096 states/64 levels per census, and a 40000-step maximum-path +cap. The largest checked root has fewer than 21000 bits. No proof-relevant +subprocess or third-party package is used. Source pins cover every external +input; package-local files are the remaining execution closure. + +## Scope and coordination + +Base: `32890bc5de034ab8fc93ac88ead7279a6a416d04`, priority revision 7, +card `joint-query-controller`, refined scope in [TASK.json](TASK.json). +The [claim is in Discussion #4744](https://github.com/CrocSwap/integer-mult-bounds/discussions/4744#discussioncomment-19173694), +following [#4865's released result](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19133932). +[SOURCES.json](SOURCES.json) freezes current-base bytes and the historical +provenance. This is the original backend retained by #4166/#4753, not a new +analysis of the currently selected #5413 supplier. + +No family expansion is justified by this result. The exact current-bank +parking term is only one removed expense. Candidate-only work, other parked +roles, restores, all retained later calls and finite control remain charged +or explicitly unresolved. Root-dependent bounds alone cannot decide the +complete D* versus B* inequality. + +## Open next questions + +1. Can the exact depth replace the conservative RootPlan stock exponent? + First bind padding, root-prefix geometry and every consumer of the original + depth to one admitted root family. The arithmetic divisibility result does + not check those contracts, and no stock replacement is installed here. +2. What bounds every candidate-only positive interval in the nonterminal + D* versus B* comparison? Start from the actual unmatched Compact/native + interval and its full geometry in the #4744 handoff. The missing upper + invoice remains the decision blocker; another descendant census is not + sufficient. See the structured obligations in TASK.json. + +## Credit + +Prepared for commdata2338 (@commdata2338), with substantial OpenAI Codex assistance. + +Nick Petalas's #4865 (`8f8f518bd1a40baa30434ab18e86fd851d122b28`) supplies +the weighted-leaf identity, two potential functions, sharp affine shift and +fixed-cutoff exponent law. Brian/JoyboyBrian's #4753 +(`44e2c79344e0090d4e829e0dde4f533d8d0273ec`) supplies the complete histogram, +global cutoff, fresh-row/full-bank interpretation and physical parking floor. +Chris R/Clear1nsight's #4166/#4167/#4172/#4177 and recursive-binding work +supply the installed caller and comparison boundaries. Jose Manuel supplies +the original physical machinery; ywz65, Sagar Thakrar, Tekalign, Ali Romman, +Arham Tahir and the retained source notices keep their predecessor credit. + +The new contribution is the cutoff-uniform theorem, changing-root consequence, +exact selected-tree stock-depth characterization and source-bound checks. +No literature-priority claim is made for finite-tree potentials or monotone +path arguments. Apache-2.0. Substantial AI assistance covers derivation, +implementation, checking and writing; no independent human or formal-kernel +acceptance is asserted. diff --git a/research/minimum-root-row-prefix/vendor/ROOT-PROOF.md b/research/minimum-root-row-prefix/vendor/ROOT-PROOF.md new file mode 100644 index 0000000000..c505caecc7 --- /dev/null +++ b/research/minimum-root-row-prefix/vendor/ROOT-PROOF.md @@ -0,0 +1,288 @@ +# Physical refinement of the selected recursive complex layer + +Jose Manuel (`jmbarrancoml`), with substantial OpenAI Codex assistance, +including source-analysis agents. Apache-2.0. + +## Claim and retained hypotheses + +I implement the whole-call algorithm in PR2287, including the root return. +I retain that contribution's quantified domain: precision p>=2, +d=floor(p^(997/1000)), K=floor(d^(1/500)), D<=d selected axes at +rho+jK, 0<=rho1, I exclude c: after choosing c I would have a +nonzero alternating complement and could not complete an orthonormal basis. +For even t I exclude nothing; for t=1 I accept the final row. + +Thus I have 2^(t-1)-[t>1 and t odd] choices, followed by the same count in +dimension t-1. I count bit-prefix completions by exact binary elimination, +then rank/unrank one row at a time. This proves the indexing induction and +the familiar cardinality + + Gamma = 2^1296 product(i=1..36)(2^(2i)-1). + +I check the complete small groups through dimension 5 and bounded 73-dimensional +round trips. I do not enumerate Gamma. These matrices and ordinals belong +to fixed finite control, independent of numerical input precision. + +In `selected_binding.py` I bind all 482 chronological events, 144 local calls, +101,376 owner entries and 10,002 emitted helper charts. For a common cover d +and owner chart sigma, I select the physical owner g=d sigma^-1. The archive +stores columns of sigma; I use them as rows of its inverse. I gather the +whole owner packet, apply P_d^-1 and the pulled-back data entrance alignment, +execute the complete local program, then apply its exit alignment and P_d. +I apply no data-family Pauli to helper packets. + +For an idle child I use the exact unconsumed axis suffix and complete its +orthogonal chart. I perform its child call before X_(g theta). I retain 6,822 +nonzero translations after hosting consumed the positive-rank part. +I keep bridges at their physical family/cover positions, perform terminal +Y translations before (X,Y)->(Y,-X), and finally use the output-coordinate +mask delta(g)_i=(wt(row_i(g))-1)/2 mod2. I do not multiply that final mask +by g a second time. + +I retain the selected common-label, untouched-window and tensor identities +from PR2287 and the archived sources. Those identities establish that this +complete global dispatch returns C^(tensor 73f) on each live row. I check +the compiled child histogram against + + {1:349604,2:60192,3:62585,4:20448,5:11808,7:7,8:1152,48:4866}. + +I account for 70,032 fixed subgroups per cover. Empty identity corrections +need no payload scan; I preserve their place in the finite schedule. + +## One active node and physical returns + +I store a node rectangle in the order + + [P][R][front][H][H][before][e*K][after][H][back][r Gaussian fields]. + +In `bank_packets.py` I scan the complete current bank to gather the selected +family/cover packets. I keep the current bank until I have constructed the +complete replacement, then commit that replacement. I preserve the entire +unused-row and spectator rectangle. At smaller global groups I leave the +unused roles in the fixed 704-packet inventory empty. + +In `machine.py` I stop at e<73 or e^1000=qF+qB>=3H/K=3dG/K, the conditions D>Q0 and +D<=d give K>3G. Therefore + + K>=3G+1=12l+19>8l+16=G+4l+10. + +I meet the sufficient inequality in the credited PR3055 Compact proof +without adding an execution cutoff. I also have 3H=L^D0(d), I increase volume by less than +two. I keep outer rows and the left spectator field as complete prefixes. +I carve two front H-bit fields and one back H-bit field, then call Machine +on the remaining D-Q0 chunks. After its endpoint I verify that padded rows +are zero before removing them. At each child U retains the required stock, +by D0(rf)<=D0(e)-1. I restore the original address rectangle. + +I choose Delta=2^210000 d once and represent components with +h=p+2Delta+3 bits on the grid2^-(p+Delta). I append Delta low zeros and +Delta+1 sign-extension bits to each p+2-bit input component. In `root_layer.py` +I execute + + S_D, C^(tensor D), S_D, multiplication by b^D, + b=(1-i)/2, + +on that one grid. I reuse PR3127's Count-driven one-pass normalization. +The retained identity gives H0^(tensor D), where H0=[[1,1],[1,-1]]/2. +I truncate each component toward zero only after the whole root. For a +negative quotient with discarded nonzero bits, I add one before checking +output headroom; checking before that correction would reject valid boundary +values. I preserve the unit disk and incur error below sqrt(2)2^-p, since +H0 has row L1 norm one and componentwise truncation decreases absolute values. + +## Inventory, height, time and space + +I allocate 678 tapes outside Machine, 3,348 complex-controller tapes excluding +the shared native backend, and + + 6(C+1)+Wb+Sb+2q^2+417 + +native tapes, with C=2^24,Wb=28416,Sb=662. I include the two numerical-codec +tapes that use dictionary storage. In total I own 2q^2+100696823 physical +tapes; the caller supplies eight input ports. I allocate no extra tape +inventory per cover matrix, scalar literal or recursive depth. I count +fixed source tables separately from numerical work. I do not reuse PR2287's +720-slot estimate for this implementation. + +The two local words require 80,397 and 80,421 scalar microinstructions. +Across 80 forward and 64 backward calls, plus their standalone COPY/CLEAR, +I charge 11,581,648 passes per cover before bridges, within PR2287's +20,936,640 scalar allowance. Each Horner prefix has height at most +max(bit_length(|a|),k), within the credited source charge. Monomial movements +and unit phases add no coefficient height. + +I retain s=1041408 Gamma,E=2^100000,B=s+E. With the actual inventory, I +check the enlarged conservative literal allowance below E. Before the one +unfinished child, I charge previous children only by their completed widths. +The PR2287 induction therefore remains + + A(e)<=8e at a leaf; + A(e)<=A(48f)+sf+E internally; + A(e)<=2Be, and A_layer<2^210000 d. + +I check the strict integer guard inequalities. Hence each exact half discards +zeros on the common grid, and signed headroom covers each interpreted +coefficient prefix. I interpret native bit-work as coefficients only after +the completed bit operation returns. I round no child result. + +I charge complete bank scans, replacement copies and parking, in addition +to primitive work. Their finite multiplicities change constants. With the +retained ordinary exponent tau=.99830289, I obtain per-node nonrecursive +cost O(V((e log p)^tau+1)). I use the unchanged child histogram and the +retained strict sigma=.99833 moment. With cutoff beta=.001 I obtain internal +exponent .99832997289, leaf exponent .99833167 and reservation exponent .998. +Each lies below249583/250000<599/600, leaving room for the logarithmic factors. +I retain the long-record hypothesis to pay polynomial descriptor and per-row +preparation costs. I claim no new moment or multiplication exponent. + +At a child cut I park at most V+712(V/L) payload bits and19 metadata/header +roles. I use 732 role delimiters and one frame delimiter. Along a branch the +payload volumes are V/L^j, so parked payload occupies at most + + 4(1+712/L)V/(1-1/L). + +I also charge the root's retained input copy, replacement bank, child capsule +and protected output. With the inherited Compact/native space contract and +long records, I use O_q(V)+F_q space. I prove this for occupied/visited tape +regions, not garbage-collector behavior. The Tape emulator never shrinks its +backing list on clear; across repeated roots its allocation follows the largest +historical call. At blank return I establish erased work, not reclaimed host +memory. + +## Evidence limits and next obligations + +I execute complete reduced recursive C fixtures, including two nested levels, +and direct/reduced-fast normalized roots. I compare them with independently +written Gaussian and rational Walsh oracles. I check selected compilation, +small complete covers, signed truncation boundaries, retained borrows and +named cleanup failures with assertions disabled. + +I have not executed a production-guard root, the complete O73 payload or the +GL64 native factory. I have not emitted a literal universal transition table +or obtained independent human or proof-assistant validation of this refinement. +I retain the native, hosting, analytic-transfer and outer integer-packing +obligations at their credited scope. A reviewer should examine the refinement +induction and source-relative factory before using this implementation in a +complete multiplication theorem. diff --git a/research/minimum-root-row-prefix/vendor/machine.py b/research/minimum-root-row-prefix/vendor/machine.py new file mode 100644 index 0000000000..92f9467ffd --- /dev/null +++ b/research/minimum-root-row-prefix/vendor/machine.py @@ -0,0 +1,477 @@ +# SPDX-License-Identifier: Apache-2.0 +"""One active complex node and a physical stack of parent continuations. + +I adapt PR2809's finite-PC protocol to Count descriptors and Gaussian packets. +The selected binding supplies finite source groups; it never receives payloads. +""" +import cohort +api = cohort.activate() +from bank_packets import BankPackets, skip +from cardinal_counts import Count, positive +from compact_counts import power_two +from encoded import compare, divide, fixed_power, subtract +from monomial_packets import MonomialPackets +from parking import BODY, FiniteFields, Parking, transfer +from records import Tape +from scalar_packets import FullScalarEngine +from scalar_words import require_zero +from scratch_pool import ScratchPool +from session import (OuterScope, borrowed_count, borrowed_tape, erase_marker, + initialize_marker, sealed_constructors) +from stream import Counter +from words import BLANK, LEFT, need + +INPUTS = ("prefixes", "rows", "front", "compact_bits", "before", "width", "after", "back", + "spacing", "guard", "residue", "component_bits", "coefficients", "root_width") +DERIVED = ("columns", "unused", "row_bits", "gaussians") +LEAF_NAMES = ("front", "u", "t", "before", "active", "after", "b", "back") + + +def origin(tape): + """Rearm an owned marker at a known canonical head, preserving its body.""" + tape.step(-1) + try: + need(tape.read() in (LEFT, BLANK), "canonical owned origin") + if tape.read() == BLANK: + tape.write(LEFT) + finally: + tape.step(1) + + +def copy_symbols(source, target): + source = borrowed_tape(source) + need(source is not target, "distinct preserved-copy ports") + source.rewind() + target.clear() + while source.read() != BLANK: + symbol = source.read() + need(symbol in BODY, "dense copied role") + target.append(symbol) + source.step(1) + source.rewind() + target.rewind() + + +class Machine: + def __init__(self, binding, native, catalogue, observe=None): + self.binding = binding + self.bank = BankPackets(binding.families, binding.cover.size, binding.slots) + self.private = tuple(Tape() for _ in range(binding.private)) + self.roles = {name: Tape() for name in ("current", "header", *INPUTS, *DERIVED)} + self.capsule = {name: Tape() for name in ("current", *INPUTS)} + self.output = Tape() + self.pool = ScratchPool(256) + self.scope = OuterScope(self.pool) + self.scalar = FullScalarEngine(catalogue) + self.leaf = api["coefficient_engine"].CoefficientEngine(LEAF_NAMES, "active") + vectors = tuple("v" + str(i) for i in range(binding.dimension)) + names = ("front", "u0", "u", "t0", "t", "before", *vectors, "after", "b0", "b", "back") + self.monomial = MonomialPackets(names, vectors, native) + self.parked = (*self.roles.values(), *self.bank.packets, *self.private) + self.parking = Parking(self.parked) + groups = max(1, *(binding.group_count(i) for i in range(len(binding.events)))) + self.header = FiniteFields((2, len(binding.events), groups, binding.cover.size, + 65536, binding.slots + binding.private, binding.dimension)) + self.root = True + self.event = self.subgroup = self.cover_index = self.pc = 0 + self.group = None + self.mode = "closed" + self.closed = True + self.observe = observe # Checker-only. Its return value never affects execution. + + def c(self, name): + value = object.__new__(Count) + value.tape = self.roles[name] + return value + + def save(self, value, name): + try: + transfer(value.tape, self.roles[name]) + finally: + value.close() + + def packet(self, index): + need(type(index) is int and 0 <= index < self.binding.slots + self.binding.private, + "compiled packet role") + return self.bank.packets[index] if index < self.binding.slots else self.private[index - self.binding.slots] + + def primitive_boundary(self): + self.pool.empty() + need(self.scalar.closed and not self.scalar.pool.live and self.scalar.output.read() == BLANK, + "scalar closes before recursive cut") + need(self.leaf.closed and not self.leaf.pool.live and self.leaf.output.read() == BLANK, + "leaf closes before recursive cut") + need(self.monomial.closed and not self.monomial.pool.live and self.monomial.output.read() == BLANK + and self.monomial.compact.closed and self.monomial.compact.binary.native.closed, + "monomial closes before recursive cut") + + def shape(self): + active = Count.product(self.c("width"), self.c("spacing")) + bits = Count(self.c("compact_bits")) + records = row_bits = None + try: + bits.multiply_small(3) + for name in ("front", "before", "after", "back"): + bits.add(self.c(name)) + bits.add(active) + records = power_two(bits) + row_bits = Count.product(records, self.c("coefficients")) + expanded = Count.product(row_bits, self.c("component_bits")) + expanded.multiply_small(2) + self.save(expanded, "row_bits") + finally: + for value in (active, bits, records, row_bits): + if value is not None: + value.close() + + def complete_extent(self): + rows = Count.product(self.c("prefixes"), self.c("rows")) + try: + return Count.product(rows, self.c("row_bits")) + finally: + rows.close() + + def apply_leaf(self, width, before, after): + if width.zero(): + return + active = Count.product(width, self.c("spacing")) + rows = Count.product(self.c("prefixes"), self.c("rows")) + widths = tuple(Count(v) for v in (self.c("front"), self.c("compact_bits"), self.c("compact_bits"), + before, active, after, self.c("compact_bits"), self.c("back"))) + try: + with self.scope.suspended(): + returned = self.leaf.run_leaf(self.roles["current"], tuple(borrowed_count(v) for v in widths), + *(borrowed_count(v) for v in (width, self.c("spacing"), self.c("residue"), + self.c("component_bits"), self.c("coefficients"), rows))) + transfer(returned, self.roles["current"]) + erase_marker(returned) + finally: + for value in (*widths, active, rows): + value.close() + + def node(self): + dimension = Count.literal(self.binding.dimension) + test = extent = columns = removed = rest = suffix = shift = divisor = unused = remainder = None + try: + for name in ("prefixes", "rows", "spacing", "guard", "component_bits", "coefficients", "root_width"): + positive(self.c(name)) + need(compare(self.c("width"), self.c("root_width")) <= 0, "node within global width") + self.shape() + extent = self.complete_extent() + self.roles["current"].rewind() + skip(self.roles["current"], extent) + need(self.roles["current"].read() == BLANK, "complete node input") + self.roles["current"].rewind() + if self.c("width").zero() or compare(self.c("width"), dimension) < 0: + self.apply_leaf(self.c("width"), self.c("before"), self.c("after")) + self.mode = "return" + return + test = fixed_power(self.c("width"), 1000, self.c("root_width")) + if compare(test, self.c("root_width")) < 0: + self.apply_leaf(self.c("width"), self.c("before"), self.c("after")) + self.mode = "return" + return + columns = Count(self.c("width")) + delta = columns.divide_small(self.binding.dimension) + if delta: + removed = Count.literal(delta) + rest = subtract(self.c("width"), removed) + suffix = Count.product(rest, self.c("spacing")) + suffix.add(self.c("after")) + self.apply_leaf(removed, self.c("before"), suffix) + shift = Count.product(removed, self.c("spacing")) + shift.add(self.c("before")) + self.save(shift, "before") + shift = None + self.save(rest, "width") + rest = None + self.save(columns, "columns") + columns = None + divisor = Count.literal(self.binding.families * self.binding.cover.size) + unused, remainder = divide(self.c("rows"), divisor) + need(remainder.zero() and not unused.zero(), "complete fresh row divisor at node") + self.save(unused, "unused") + unused = None + local_bits = Count.product(self.c("prefixes"), self.c("unused")) + local_extent = Count.product(local_bits, self.c("row_bits")) + local_bits.close() + divisor2 = Count(self.c("component_bits")) + divisor2.multiply_small(2) + gaussian_count, rem2 = divide(local_extent, divisor2) + try: + need(rem2.zero(), "complete Gaussian local packet") + self.save(gaussian_count, "gaussians") + gaussian_count = None + finally: + if gaussian_count is not None: + gaussian_count.close() + local_extent.close() + divisor2.close() + rem2.close() + self.event = self.subgroup = self.cover_index = self.pc = 0 + self.group = None + self.mode = "group" + finally: + for value in (dimension, test, extent, columns, removed, rest, suffix, shift, divisor, unused, remainder): + if value is not None: + value.close() + + def scalar_step(self, target, source, key): + self.scalar.select(key) + with self.scope.suspended(): + returned = self.scalar.run(self.packet(target), None if source is None else self.packet(source), + borrowed_count(self.c("component_bits")), borrowed_count(self.c("gaussians"))) + transfer(returned, self.packet(target)) + erase_marker(returned) + + def packet_extent(self): + extent = Count.product(self.c("gaussians"), self.c("component_bits")) + extent.multiply_small(2) + return extent + + def zero_step(self, target): + need(target >= self.binding.slots, "only compiled private logical CLEAR") + extent = self.packet_extent() + remaining = Counter(extent) + tape = self.packet(target) + tape.clear() + try: + while not remaining.finished: + tape.append(0) + remaining.decrement() + finally: + tape.rewind() + remaining.close() + extent.close() + + def copy_step(self, target, source): + need(target >= self.binding.slots and target != source, "compiled private COPY") + extent = self.packet_extent() + try: + require_zero(self.packet(target), extent) + copy_symbols(self.packet(source), self.packet(target)) + finally: + extent.close() + + def exchange_step(self, x, y): + self.scalar.select(("scale", -1, 1)) + with self.scope.suspended(): + returned = self.scalar.run(self.packet(x), None, borrowed_count(self.c("component_bits")), + borrowed_count(self.c("gaussians"))) + transfer(self.packet(y), self.packet(x)) + transfer(returned, self.packet(y)) + erase_marker(returned) + + def monomial_step(self, target, key, inverse): + self.monomial.select(self.group.recipes[key]) + one = Count.literal(1) + columns = compact = extra = wide = rows = None + widths = () + try: + columns = subtract(self.c("columns"), one) + compact = Count.product(columns, self.c("guard")) + extra = subtract(self.c("compact_bits"), compact) + wide = Count.product(self.c("columns"), self.c("spacing")) + rows = Count.product(self.c("prefixes"), self.c("unused")) + template = (self.c("front"), extra, compact, extra, compact, self.c("before"), + *((wide,) * self.binding.dimension), self.c("after"), extra, compact, self.c("back")) + widths = tuple(Count(value) for value in template) + with self.scope.suspended(): + returned = self.monomial.run(self.packet(target), tuple(borrowed_count(v) for v in widths), + *(borrowed_count(v) for v in (self.c("columns"), self.c("spacing"), self.c("guard"), + self.c("residue"), self.c("component_bits"), self.c("coefficients"), rows)), inverse=inverse) + transfer(returned, self.packet(target)) + erase_marker(returned) + finally: + for value in (*widths, one, columns, compact, extra, wide, rows): + if value is not None: + value.close() + + def next_group(self): + while self.event < len(self.binding.events): + count = self.binding.group_count(self.event) + if self.subgroup >= count: + self.event += 1 + self.subgroup = self.cover_index = 0 + continue + if self.cover_index >= self.binding.cover.size: + self.cover_index = 0 + self.subgroup += 1 + continue + group = self.binding.group(self.event, self.subgroup, self.cover_index) + need(len(group.code) < 65536, "finite group program-counter bound") + if not group.code: + self.cover_index += 1 + continue + self.group = group + self.bank.select(group.keys) + with self.scope.suspended(): + self.bank.gather(self.roles["current"], *(borrowed_count(self.c(name)) + for name in ("prefixes", "unused", "row_bits"))) + for tape in self.private: + origin(tape) + tape.clear() + self.pc = 0 + return + self.mode = "return" + + def finish_group(self): + extent = self.packet_extent() + try: + for tape in self.private: + if tape.read() != BLANK: + require_zero(tape, extent) + tape.clear() + finally: + extent.close() + with self.scope.suspended(): + self.bank.scatter(self.roles["current"], *(borrowed_count(self.c(name)) + for name in ("prefixes", "unused", "row_bits"))) + self.bank.commit(self.roles["current"]) + self.group = None + self.cover_index += 1 + self.pc = 0 + + def prepare_child(self, target, rank): + need(self.group is not None and self.bank.state == "gathered", "child belongs to active group") + need(type(rank) is int and 0 < rank < self.binding.dimension, "source child rank contracts") + width = Count(self.c("columns")) + if rank > 1: + width.multiply_small(rank) + tail = Count(self.c("columns")) + if self.binding.dimension - rank > 1: + tail.multiply_small(self.binding.dimension - rank) + after = Count.product(tail, self.c("spacing")) + try: + need(not width.zero() and compare(width, self.c("width")) < 0, "strict complex child contraction") + after.add(self.c("after")) + copy_symbols(self.packet(target), self.capsule["current"]) + for name in INPUTS: + value = self.c("unused") if name == "rows" else width if name == "width" else after if name == "after" else self.c(name) + copy_symbols(value.tape, self.capsule[name]) + self.header.write(self.roles["header"], (int(self.root), self.event, self.subgroup, + self.cover_index, self.pc + 1, target, rank)) + finally: + width.close() + tail.close() + after.close() + + def enter_child(self): + self.primitive_boundary() + for tape in self.parked: + origin(tape) + self.parking.park() + for name, tape in self.capsule.items(): + transfer(tape, self.roles[name]) + self.bank.state = "closed" + self.bank.source = None + self.bank.selection = None + self.group = None + self.root = False + self.mode = "node" + self.event = self.subgroup = self.cover_index = self.pc = 0 + if self.observe: + self.observe(self, "enter") + + def return_node(self): + self.primitive_boundary() + need(self.output.read() == BLANK, "consume preceding complex output") + origin(self.output) + transfer(self.roles["current"], self.output) + for tape in self.parked: + origin(tape) + tape.clear() + self.bank.state = "closed" + self.bank.source = None + self.bank.selection = None + if self.root: + self.parking.empty() + self.closed = True + self.mode = "closed" + return True + self.parking.restore() + root, self.event, self.subgroup, self.cover_index, self.pc, target, rank = self.header.read(self.roles["header"]) + self.roles["header"].clear() + self.root = bool(root) + self.group = self.binding.group(self.event, self.subgroup, self.cover_index) + need(0 < self.pc <= len(self.group.code) and + self.group.code[self.pc - 1][0] == "child" and + self.group.code[self.pc - 1][2:] == (target, rank), "return matches exact parent child instruction") + transfer(self.output, self.packet(target)) + self.bank.selection = {key: slot for slot, key in enumerate(self.group.keys)} + self.bank.source = self.roles["current"] + self.bank.state = "gathered" + self.mode = "group" + if self.observe: + self.observe(self, "return") + return False + + def discard(self): + for tape in (*self.parked, *self.capsule.values(), self.output, self.bank.output): + origin(tape) + tape.clear() + self.parking.stack.clear() + self.parking.reverse.clear() + self.bank.state = "closed" + self.bank.source = self.bank.selection = None + self.group = None + self.mode = "closed" + self.closed = True + + def run(self, payload, descriptors): + need(self.closed and self.output.read() == BLANK and set(descriptors) == set(INPUTS), + "closed prepared complex entry and complete descriptors") + self.parking.empty() + source = borrowed_tape(payload) + need(source not in self.parked and source is not self.output, "borrowed complex input is separate") + need(all(isinstance(descriptors[name], Count) for name in INPUTS), "encoded prepared descriptor") + self.root, self.closed, self.mode = True, False, "node" + self.group = None + try: + copy_symbols(source, self.roles["current"]) + for name in INPUTS: + copy_symbols(descriptors[name].tape, self.roles[name]) + while True: + child = False + with sealed_constructors(), self.scope.installed(): + if self.mode == "node": + self.node() + elif self.mode == "group": + if self.group is None: + self.next_group() + elif self.pc == len(self.group.code): + self.finish_group() + else: + op = self.group.code[self.pc] + kind = op[0] + if kind == "scalar": + self.scalar_step(*op[2:]) + elif kind == "zero": + self.zero_step(op[2]) + elif kind == "copy": + self.copy_step(*op[2:]) + elif kind == "monomial": + self.monomial_step(*op[2:]) + elif kind == "exchange": + self.exchange_step(*op[2:]) + elif kind == "child": + self.prepare_child(*op[2:]) + child = True + else: + need(kind in ("identity", "marker"), "implemented physical instruction") + if not child: + self.pc += 1 + else: + need(self.mode == "return", "finite complex controller state") + self.pool.empty() + if child: + self.enter_child() + elif self.mode == "return" and self.return_node(): + source.rewind() + return self.output + except BaseException: + for tape in (*self.roles.values(), *self.capsule.values()): + tape.rewind() + self.discard() + source.rewind() + raise diff --git a/research/minimum-root-row-prefix/vendor/root_layer.py b/research/minimum-root-row-prefix/vendor/root_layer.py new file mode 100644 index 0000000000..389efd17af --- /dev/null +++ b/research/minimum-root-row-prefix/vendor/root_layer.py @@ -0,0 +1,160 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Physical root execution of b**D S_D C_D S_D with one final rounding.""" +import cohort +api = cohort.activate() +from cardinal_counts import Count +from encoded import subtract +from grid_boundary import GridBoundary +from machine import Machine, origin +from parking import transfer +from records import Tape +from root_plan import RootPlan +from root_streams import PhaseSweep, RowPadding +from scratch_pool import ScratchPool +from session import OuterScope, borrowed_count, borrowed_tape, erase_marker, sealed_constructors +from words import BLANK, need + + +class RootLayer: + def __init__(self, binding, native, catalogue, plan=None, observe=None): + self.plan = plan if plan is not None else RootPlan( + binding.dimension, binding.maximum_rank, binding.families * binding.cover.size) + self.machine = Machine(binding, native, catalogue, observe) + self.grid = GridBoundary() + self.phase = PhaseSweep() + self.padding = RowPadding() + self.normalizer = api["normalizer"].Normalizer() + self.leaf = api["coefficient_engine"].CoefficientEngine(("left", "active", "right"), "active") + self.pool = ScratchPool(32) + self.scope = OuterScope(self.pool) + self.current, self.output = Tape(), Tape() + self.closed = True + + def c(self, name): + return self.plan.count(name) + + def accept(self, returned): + transfer(returned, self.current) + erase_marker(returned) + + def apply_phase(self): + self.accept(self.phase.run(self.current, *(self.c(name) for name in + ("left", "selected", "right", "K", "residue", "work_bits", "coefficients", "outer_rows")))) + + def apply_leaf(self, left, width, right): + if width.zero(): + return + active = Count.product(width, self.c("K")) + try: + with self.scope.suspended(): + returned = self.leaf.run_leaf(self.current, + tuple(borrowed_count(v) for v in (left, active, right)), + *(borrowed_count(v) for v in (width, self.c("K"), self.c("residue"), + self.c("work_bits"), self.c("coefficients"), self.c("outer_rows")))) + self.accept(returned) + finally: + active.close() + + def reserved_leaves(self): + prefix = tail = suffix = left = None + try: + prefix = Count(self.c("q0")) + prefix.add(self.c("qF")) + tail = subtract(self.c("selected"), prefix) + suffix = Count.product(tail, self.c("K")) + suffix.add(self.c("right")) + self.apply_leaf(self.c("left"), prefix, suffix) + tail.close() + tail = subtract(self.c("selected"), self.c("qB")) + left = Count.product(tail, self.c("K")) + left.add(self.c("left")) + self.apply_leaf(left, self.c("qB"), self.c("right")) + finally: + for value in (prefix, tail, suffix, left): + if value is not None: + value.close() + + def fast_core(self): + # Root scratch has closed before the recursive machine owns execution. + self.pool.empty() + self.accept(self.padding.run(self.current, *(self.c(name) for name in + ("prefixes", "original_rows", "padded_rows", "row_bits")))) + names = dict(prefixes="prefixes", rows="padded_rows", front="core_front", compact_bits="H", + before="zero", width="core_width", after="zero", back="core_back", spacing="K", + guard="G", residue="residue", component_bits="work_bits", coefficients="coefficients", + root_width="d") + self.accept(self.machine.run(self.current, {name: self.c(source) for name, source in names.items()})) + self.accept(self.padding.run(self.current, *(self.c(name) for name in + ("prefixes", "original_rows", "padded_rows", "row_bits")), remove=True)) + + def run(self, payload, precision, selected, left, right, coefficients, outer_rows, residue): + """Borrow p-grid Gaussian records and encoded descriptors; return p-grid records. + + The selected production plan fixes the source constants. Checkers may + inject an explicitly labelled reduced plan to exercise the same branch. + The theorem assumes the input unit disk and the native source contracts. + """ + need(self.closed and self.output.read() == BLANK and self.current.read() == BLANK, + "consume previous complete root output") + source = borrowed_tape(payload) + need(source not in (self.current, self.output), "distinct borrowed root input") + origin(self.output) + self.closed = False + high = None + try: + self.plan.compute(precision, selected, left, right, coefficients, outer_rows, residue) + with sealed_constructors(), self.scope.installed(): + high = Count(self.c("delta")) + high.increment() + with self.scope.suspended(): + returned = self.grid.expand(source, self.c("input_bits"), self.c("delta"), + borrowed_count(high), self.c("gaussians")) + self.accept(returned) + high.close() + high = None + self.pool.empty() + self.apply_phase() + with sealed_constructors(), self.scope.installed(): + if self.plan.fast: + self.reserved_leaves() + else: + self.apply_leaf(self.c("left"), self.c("selected"), self.c("right")) + self.pool.empty() + if self.plan.fast: + self.fast_core() + self.apply_phase() + self.accept(self.normalizer.run(self.current, self.c("work_bits"), + self.c("gaussians"), self.c("selected"))) + returned = self.grid.truncate(self.current, self.c("work_bits"), self.c("delta"), + self.c("input_bits"), self.c("gaussians")) + transfer(returned, self.output) + erase_marker(returned) + self.current.clear() + return self.output + except BaseException: + self.current.clear() + self.output.clear() + raise + finally: + if high is not None: + high.close() + self.pool.empty() + self.plan.clear() + source.rewind() + self.closed = True + + +def selected_layer(q=None): + """Compile the selected source-relative construction for an admissible fixed q. + + Full selected finite compilation is intentionally not a local fixture. + Its q/GL64-scale objects are finite constants in the source construction. + """ + from production_native import PRIME, build_native + from scalar_program import compile_catalogue + from selected_binding import SelectedBinding + from selected_source import load + data = load() + binding = SelectedBinding(data) + catalogue, _ = compile_catalogue(data["programs"]) + return RootLayer(binding, build_native(PRIME if q is None else q), catalogue) diff --git a/research/minimum-root-row-prefix/vendor/root_plan.py b/research/minimum-root-row-prefix/vendor/root_plan.py new file mode 100644 index 0000000000..78390164c3 --- /dev/null +++ b/research/minimum-root-row-prefix/vendor/root_plan.py @@ -0,0 +1,222 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Encoded root reservations and precision for PR2287's layer construction.""" +import cohort +cohort.activate() +from cardinal_counts import Count, positive +from compact_counts import power_two +from encoded import atom_width, compare, divide, fixed_power, subtract +from machine import copy_symbols +from records import Tape +from scratch_pool import ScratchPool +from session import OuterScope, sealed_constructors +from stream import Counter +from words import RIGHT, need + + +def floor_power(value, numerator, denominator): + need(type(numerator) is int and type(denominator) is int and + 0 < numerator <= denominator, "fixed fractional exponent") + ceiling = atom_width(value, numerator, denominator) + target = fixed_power(value, numerator) + cap = Count(target) + cap.increment() + power = one = None + try: + # Saturating at target would confuse a strict overshoot with equality. + power = fixed_power(ceiling, denominator, cap) + need(compare(power, target) >= 0, "upper integral root") + if compare(power, target) > 0: + one = Count.literal(1) + return subtract(ceiling, one) + return Count(ceiling) + finally: + for item in (ceiling, target, cap, power, one): + if item is not None: + item.close() + + +def ceil_log2(value): + positive(value) + digits = Count.literal(0) + ones = 0 + value.rewind() + try: + while value.read() != RIGHT: + bit = value.read() + need(bit in (0, 1), "canonical logarithm digits") + ones = min(2, ones + bit) + digits.increment() + value.step(1) + if ones == 1: + one = Count.literal(1) + try: + return subtract(digits, one) + finally: + one.close() + return Count(digits) + finally: + value.rewind() + digits.close() + + +def ceil_divide(numerator, denominator): + quotient, remainder = divide(numerator, denominator) + try: + if not remainder.zero(): + quotient.increment() + return quotient + except BaseException: + quotient.close() + raise + finally: + remainder.close() + + +def coarse_depth(width, dimension, maximum_rank): + current = Count(width) + threshold = Count.literal(dimension) + result = Count.literal(0) + try: + while compare(current, threshold) >= 0: + current.divide_small(dimension) + if maximum_rank > 1: + current.multiply_small(maximum_rank) + result.increment() + return result + except BaseException: + result.close() + raise + finally: + current.close() + threshold.close() + + +FIELDS = ("precision", "selected", "left", "right", "coefficients", "outer_rows", "residue", "zero", + "d", "K", "G", "H", "depth", "q0", "qF", "qB", "Q0", "delta", + "input_bits", "work_bits", "gaussians", "prefixes", "original_rows", + "padded_rows", "stock", "row_bits", "core_width", "core_front", "core_back") + + +class RootPlan: + def __init__(self, dimension, maximum_rank, level_divisor, guard_exponent=210000): + need(type(dimension) is int and 2 <= dimension <= 73 and + type(maximum_rank) is int and 0 < maximum_rank < dimension and + type(level_divisor) is int and level_divisor > 1 and + type(guard_exponent) is int and guard_exponent >= 0, "fixed root construction constants") + self.dimension, self.maximum_rank, self.level_divisor = dimension, maximum_rank, level_divisor + self.guard_exponent = guard_exponent + self.roles = {name: Tape() for name in FIELDS} + self.pool = ScratchPool(256) + self.scope = OuterScope(self.pool) + self.fast = False + self.closed = True + + def count(self, name): + value = object.__new__(Count) + value.tape = self.roles[name] + return value + + def clear(self): + need(not self.pool.live, "closed root planning scratch") + for tape in self.roles.values(): + tape.clear() + self.closed = True + + def compute(self, precision, selected, left, right, coefficients, outer_rows, residue): + need(self.closed and not self.pool.live, "closed root planning entry") + self.clear() + self.closed = False + inputs = dict(precision=precision, selected=selected, left=left, right=right, + coefficients=coefficients, outer_rows=outer_rows, residue=residue) + need(all(isinstance(v, Count) for v in inputs.values()), "encoded root inputs") + for name, value in inputs.items(): + copy_symbols(value.tape, self.roles[name]) + owned = [] # A fixed number of compiled expression results, independent of input widths. + + def keep(value): + owned.append(value) + return value + + def literal(value): + return keep(Count.literal(value)) + + def plus(*values, constant=0): + result = literal(constant) + for value in values: + result.add(value) + return result + + def times(a, b): + return keep(Count.product(a, b)) + + def scaled(value, constant): + if constant == 0: + return literal(0) + result = keep(Count(value)) + if constant > 1: + result.multiply_small(constant) + return result + + def save(name, value): + copy_symbols(value.tape, self.roles[name]) + return value + + try: + with sealed_constructors(), self.scope.installed(): + save("zero", literal(0)) + two = literal(2) + need(compare(precision, two) >= 0, "root precision at least two") + positive(coefficients) + positive(outer_rows) + d = save("d", keep(floor_power(precision, 997, 1000))) + need(compare(selected, d) <= 0, "selected width within root domain") + K = save("K", keep(floor_power(d, 1, 500))) + need(compare(residue, K) < 0, "selected root residue") + logarithm = keep(ceil_log2(precision)) + G = save("G", plus(scaled(logarithm, 4), constant=6)) + H = save("H", times(d, G)) + depth = save("depth", keep(coarse_depth(d, self.dimension, self.maximum_rank))) + q0 = save("q0", scaled(depth, (self.level_divisor - 1).bit_length())) + qF = save("qF", keep(ceil_divide(scaled(H, 2), K))) + qB = save("qB", keep(ceil_divide(H, K))) + Q0 = save("Q0", plus(q0, qF, qB)) + delta = save("delta", scaled(d, 1 << self.guard_exponent)) + save("input_bits", plus(precision, constant=2)) + work_bits = save("work_bits", plus(precision, scaled(delta, 2), constant=3)) + active_bits = times(selected, K) + addresses = keep(power_two(plus(left, active_bits, right))) + save("gaussians", times(times(addresses, coefficients), outer_rows)) + self.fast = compare(selected, Q0) > 0 + if self.fast: + save("core_width", keep(subtract(selected, Q0))) + save("core_front", keep(subtract(times(qF, K), scaled(H, 2)))) + save("core_back", plus(keep(subtract(times(qB, K), H)), right)) + row_axes = times(q0, K) + original_rows = save("original_rows", keep(power_two(row_axes))) + prefix_count = save("prefixes", times(outer_rows, keep(power_two(left)))) + stock = literal(1) + repetitions = keep(Counter(depth)) + while not repetitions.finished: + stock.multiply_small(self.level_divisor) + repetitions.decrement() + save("stock", stock) + multiples = keep(ceil_divide(original_rows, stock)) + save("padded_rows", times(multiples, stock)) + rectangle = plus(keep(subtract(active_bits, row_axes)), right) + row_gaussians = times(keep(power_two(rectangle)), coefficients) + save("row_bits", scaled(times(row_gaussians, work_bits), 2)) + else: + for name in ("core_width", "core_front", "core_back", "row_bits"): + save(name, literal(0)) + for name in ("prefixes", "original_rows", "padded_rows", "stock"): + save(name, literal(1)) + except BaseException: + for tape in self.roles.values(): + tape.clear() + raise + finally: + for value in reversed(owned): + value.close() + self.pool.empty() + self.closed = True + return self diff --git a/research/minimum-root-row-prefix/vendor/root_streams.py b/research/minimum-root-row-prefix/vendor/root_streams.py new file mode 100644 index 0000000000..213144a6c9 --- /dev/null +++ b/research/minimum-root-row-prefix/vendor/root_streams.py @@ -0,0 +1,141 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Complete root phase sweeps and one-time row padding on encoded streams.""" +import cohort +cohort.monomial_api() +from cardinal_counts import Count, positive +from compact_counts import append_bits, copy_bits +from compact_layout import Layout +from encoded import compare, subtract +from grid_boundary import GridDomainError +from phase_recipe import Recipe +from records import Tape +from scratch_pool import ScratchPool +from session import (OuterScope, borrowed_tape, erase_marker, initialize_marker, + sealed_constructors) +from signed_phase import scan +from stream import Counter +from words import BLANK, LEFT, need + + +class OutputEngine: + def __init__(self, slots): + self.pool = ScratchPool(slots) + self.scope = OuterScope(self.pool) + self.output = Tape() + for tape in (*self.pool.tapes, self.output): + erase_marker(tape) + self.closed = True + + def rearm(self): + need(self.closed and self.output.read() == BLANK and not self.pool.live, "consumed root stream output") + self.output.step(-1) + try: + need(self.output.read() in (LEFT, BLANK), "root stream origin") + if self.output.read() == BLANK: + self.output.write(LEFT) + finally: + self.output.step(1) + for tape in self.pool.tapes: + initialize_marker(tape) + self.closed = False + + def finish(self, failure): + self.pool.empty() + for tape in self.pool.tapes: + erase_marker(tape) + self.output.rewind() + self.closed = True + if failure is not None: + self.output.clear() + erase_marker(self.output) + raise failure + return self.output + + +class PhaseSweep(OutputEngine): + def __init__(self): + super().__init__(96) + self.recipe = Recipe(dict(matrix_rows=[1], offset=0, phase=0, + linear_Z4=[1], quadratic_rows=[0]), ("active",)) + + def run(self, payload, left, selected, right, spacing, residue, width, coefficients, outer_rows): + source = borrowed_tape(payload) + need(source is not self.output, "distinct root phase input") + for value in (spacing, width, coefficients, outer_rows): + positive(value) + self.rearm() + active = record_bits = total = plan = current = result = None + failure = None + with sealed_constructors(), self.scope.installed(): + try: + need(compare(residue, spacing) < 0, "root phase selected residue") + active = Count.product(selected, spacing) + record_bits = Count.product(width, coefficients) + record_bits.multiply_small(2) + plan = Layout(("left", "active", "right"), (left, active, right), record_bits) + total = Count.product(plan.row_bits, outer_rows) + current = self.pool.acquire() + source.rewind() + copy_bits(source, current, total) + need(source.read() == BLANK, "complete root phase packet") + current.rewind() + result = scan(current, plan, self.recipe, selected, spacing, residue, + width, coefficients, outer_rows, self.pool.acquire) + current = None + append_bits(result, self.output) + except ValueError as error: + failure = error + finally: + source.rewind() + for value in (current, result, active, record_bits, total): + if value is not None: + value.close() if isinstance(value, Count) else value.clear() + if plan is not None: + plan.close() + return self.finish(failure) + + +class RowPadding(OutputEngine): + def __init__(self): + super().__init__(16) + + def run(self, payload, prefixes, original_rows, padded_rows, row_bits, remove=False): + need(type(remove) is bool, "compiled row-padding direction") + for value in (prefixes, original_rows, padded_rows, row_bits): + positive(value) + source = borrowed_tape(payload) + need(source is not self.output, "distinct row-padding input") + self.rearm() + extra = kept_bits = extra_bits = remaining = skipped = None + failure = None + with sealed_constructors(), self.scope.installed(): + try: + need(compare(original_rows, padded_rows) <= 0, "row padding does not shrink") + extra = subtract(padded_rows, original_rows) + kept_bits = Count.product(original_rows, row_bits) + extra_bits = Count.product(extra, row_bits) + remaining = Counter(prefixes) + source.rewind() + while not remaining.finished: + copy_bits(source, self.output, kept_bits) + skipped = Counter(extra_bits) + while not skipped.finished: + if remove: + if source.read() != 0: + raise GridDomainError("nonzero padded row returned") + source.step(1) + else: + self.output.append(0) + skipped.decrement() + skipped.close() + skipped = None + remaining.decrement() + need(source.read() == BLANK, "complete row padding input") + except ValueError as error: + failure = error + finally: + source.rewind() + for value in (extra, kept_bits, extra_bits, remaining, skipped): + if value is not None: + value.close() + return self.finish(failure) From d681ccd1ab1599481c84a3b3fcacb869612ca8c1 Mon Sep 17 00:00:00 2001 From: Ali Romman <226877337+aliromman@users.noreply.github.com> Date: Mon, 26 Oct 2026 00:31:55 -0500 Subject: [PATCH 2/3] Minimize the root row prefix with an exact padding budget --- research/minimum-root-row-prefix/PROOF.md | 229 +++++++++++++ research/minimum-root-row-prefix/README.md | 73 ++++ research/minimum-root-row-prefix/RESULT.json | 90 +++++ research/minimum-root-row-prefix/SOURCES.json | 316 ++++++++++++++++++ research/minimum-root-row-prefix/TASK.json | 96 ++++++ .../minimum-root-row-prefix/VALIDATION.md | 22 ++ research/minimum-root-row-prefix/VERIFY.json | 59 ++++ research/minimum-root-row-prefix/reserve.py | 75 +++++ research/minimum-root-row-prefix/verify.py | 199 +++++++++++ 9 files changed, 1159 insertions(+) create mode 100644 research/minimum-root-row-prefix/PROOF.md create mode 100644 research/minimum-root-row-prefix/README.md create mode 100644 research/minimum-root-row-prefix/RESULT.json create mode 100644 research/minimum-root-row-prefix/SOURCES.json create mode 100644 research/minimum-root-row-prefix/TASK.json create mode 100644 research/minimum-root-row-prefix/VALIDATION.md create mode 100644 research/minimum-root-row-prefix/VERIFY.json create mode 100644 research/minimum-root-row-prefix/reserve.py create mode 100644 research/minimum-root-row-prefix/verify.py 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