From fd3fe31e9e0bec881393322a7d6586e4bcead43d Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 21 Oct 2026 22:08:34 -0400 Subject: [PATCH 1/3] Retain exact compiler sources for expanded accounting audit --- .../SOURCE-EXPORT.json | 53 + .../vendor/PR4436-README.md | 496 +++++++++ .../vendor/PR4436-RESULT.json | 505 +++++++++ .../vendor/PR4436-flow.py | 198 ++++ .../vendor/PR4436-p7-RESULT.json | 296 ++++++ .../vendor/PR4476-README.md | 56 + .../vendor/SUSSMAN-LICENSE | 201 ++++ .../vendor/SUSSMAN-NOTICE | 994 ++++++++++++++++++ 8 files changed, 2799 insertions(+) create mode 100644 research/direct-flow-expanded-audit/SOURCE-EXPORT.json create mode 100644 research/direct-flow-expanded-audit/vendor/PR4436-README.md create mode 100644 research/direct-flow-expanded-audit/vendor/PR4436-RESULT.json create mode 100644 research/direct-flow-expanded-audit/vendor/PR4436-flow.py create mode 100644 research/direct-flow-expanded-audit/vendor/PR4436-p7-RESULT.json create mode 100644 research/direct-flow-expanded-audit/vendor/PR4476-README.md create mode 100644 research/direct-flow-expanded-audit/vendor/SUSSMAN-LICENSE create mode 100644 research/direct-flow-expanded-audit/vendor/SUSSMAN-NOTICE diff --git a/research/direct-flow-expanded-audit/SOURCE-EXPORT.json b/research/direct-flow-expanded-audit/SOURCE-EXPORT.json new file mode 100644 index 0000000000..d958f05e94 --- /dev/null +++ b/research/direct-flow-expanded-audit/SOURCE-EXPORT.json @@ -0,0 +1,53 @@ +{ + "files": [ + { + "commit": "56003680aee2871773de408e5f01cc5dd46b144c", + "source_path": "research/direct-mixed-flow/README.md", + "path": "vendor/PR4436-README.md", + "git_blob": "3be00f754b9ffa23e64b3eafe7706e3ac139993a", + "sha256": "78351e2419eb1ff1d645addd411158b91b381b23a962a91b6deeebeacd5192a8" + }, + { + "commit": "56003680aee2871773de408e5f01cc5dd46b144c", + "source_path": "research/direct-mixed-flow/flow.py", + "path": "vendor/PR4436-flow.py", + "git_blob": "07175cd6e1f2c2367c2e78eca7f163fef18d301d", + "sha256": "460f0b0262d7b6880973f46240b3fff1e9f04601fa1d658dda18688b1e26575a" + }, + { + "commit": "56003680aee2871773de408e5f01cc5dd46b144c", + "source_path": "research/direct-mixed-flow/RESULT.json", + "path": "vendor/PR4436-RESULT.json", + "git_blob": "e657f58b5a276b57b472a814a8559aede853f55a", + "sha256": "da04256f6f2ef61530f1d642ff1137a2274fd642782a72ef4bf3f1b65395c270" + }, + { + "commit": "4e7022aa9128c8673d3e2024052b2deaa18cb6e4", + "source_path": "research/direct-flow-width-check/README.md", + "path": "vendor/PR4476-README.md", + "git_blob": "c6db026010b7e2ec8a4063065c4d054401cfc9cd", + "sha256": "0563dd22edeba4ee82a5ac4a06d965ccb90edbb09bbe646c9f21497bd4789f76" + }, + { + "commit": "56003680aee2871773de408e5f01cc5dd46b144c", + "source_path": "research/direct-mixed-flow/vendor/p7-RESULT.json", + "path": "vendor/PR4436-p7-RESULT.json", + "git_blob": "ebb30a9b3b94fb159a316350f7da57bde4a30c25", + "sha256": "9b814be97e3b45fcc28eafa8a65694897a7387f71a14d44796c6aadf303d7fab" + }, + { + "commit": "56003680aee2871773de408e5f01cc5dd46b144c", + "source_path": "research/direct-mixed-flow/vendor/SUSSMAN-LICENSE", + "path": "vendor/SUSSMAN-LICENSE", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "commit": "56003680aee2871773de408e5f01cc5dd46b144c", + "source_path": "research/direct-mixed-flow/vendor/SUSSMAN-NOTICE", + "path": "vendor/SUSSMAN-NOTICE", + "git_blob": "0b06967886fab2628afc0b881c884161bbf5e430", + "sha256": "8289a4ba75efe5da7bd2e389b951155ff74b3bf49b38ace0906a1e5205c7cd6e" + } + ] +} diff --git a/research/direct-flow-expanded-audit/vendor/PR4436-README.md b/research/direct-flow-expanded-audit/vendor/PR4436-README.md new file mode 100644 index 0000000000..3be00f754b --- /dev/null +++ b/research/direct-flow-expanded-audit/vendor/PR4436-README.md @@ -0,0 +1,496 @@ +# Direct mixed flow and explicit compiler size: a partial research checkpoint + +**Publication authorized by the user on October 21, 2026.** This is a partial +compiler/resource checkpoint; the direct exponent gate remains open. + +The target is a structural successor to +[PR4433](https://github.com/CrocSwap/integer-mult-bounds/pull/4433): remove the +tensor/padding step needed by overlapping ranks and control the complete +finite compiler's size. The user requested a significance target twice the +previous contribution. That is an ambitious scope target, not a numerical +measurement or a claim that it has been achieved. + +Two results are established under the source native-word hypotheses: + +1. A **finite chronological integer flow** works when paid ranks overlap + target ranks, provided `max paid < ambient`. It retains and pays every + unmatched job as an exit. All recursive ranks decrease. This gives a + finite uniform compiler, **without a proved near-root saving**. +2. Choosing **nested divisible widths** gives `B_N <= exp(O(N log N))`. + Exact rank-one accounting also bounds raw instances, owned centers, + routing slots and the source finite-constant envelopes. This batching + choice preserves the normalized leaf cost and therefore applies to the + already supported PR4433 supplier. + +The main exponent target remains open. Exact compilation at rank 1,000 on +the raw p7 profile fails the desired saving. That finite failure is not an +asymptotic obstruction, and it does not invalidate PR4433's separated recipe. +No new κ, selected frontier, native admission or physical runtime is claimed. + +## 1. Source boundary and decision + +The starting point is Jacob Alan Sussman's multinomial lockstep construction, +retained by PR4359. Its separated proof requires `r_max < k_min` so every +parent output is consumed. PR4416 and PR4433 instead repair the raw p7 +overlap by chronological products, paid completion and splitting. + +Retain the four native hypotheses of +[FINITE-PRECOMPILATION.md](vendor/FINITE-PRECOMPILATION.md): a correct +all-column arbitrary-input word, disjoint splitting with complete spectators, +permitted and priced whole-job adapters, and finite-program closure with +owned initialization/erasure. Equal rank alone does not supply an adapter. +Changed finite combinatorics do not independently admit those hypotheses. + +**Continue, with two separate gates.** The finite-flow gate is now proved and +checked. The exponent gate requires a new uniform estimate on the complete +complement-plus-exit recurrence. Do not expand a search solely because a +moment root is favorable. The size theorem is useful independently, since +the predecessor leaves productive width and owned-instance counts implicit. + +| Obligation | Evidence / remaining work | +| --- | --- | +| Integer matching with overlapping ranks | Proved below; literal and merged replays agree | +| Chronological return and strictly smaller exits | Proved under `r_max < m`; no cross-round matching | +| Source complements and full uniform output | Source integer-batch induction, with nested divisible widths | +| Direct near-root saving | **Open**; rank 1,000 fails; no global conclusion | +| Productive width, rank-one leaves, raw instances, owned centers | Explicit bounds below, with exact finite controls | +| Routing slots, encoded records and source finite-constant envelopes | Counted below in the stated grammar; physical implementations retain their own tariffs | +| Native all-column, physical, analytic, precision and recovery premises | Inherited; no full replay or new admission | + +## 2. Partially matched integer lockstep flow + +Let positive integer target multiplicities be W_k, chronological paid rounds +have ranks r_j, and let + +``` +2 <= k_min <= m=max(k), 1 <= r_max < m. +``` + +The paid word may have `r_max >= k_min`. At a fixed integer top rank n>=m, +put + +``` +c(a) = product_k k^a_k, +u(a) = multinomial(|a|;a) product_k W_k^a_k, +R(rho) = {a : m*rho*c(a) <= n}, +G = floor(log_(k_min)(floor(n/m))). +``` + +For every paid-round path s of length d<=G with multiplier rho_s, instantiate +u(a) units at column rho_s*c(a), for every point a in R(rho_s) of degree +G−d. This is the source class construction. For a parent class with +multiplier rho, its rank-r round supplies u(b) jobs at point b when b is +present. The child demand at that point is + +``` +D(b) = sum over eligible (b−e_k) of W_k*u(b−e_k). +``` + +The complete Pascal sum is u(b). Therefore: + +- If the parent point b exists, `0 <= D(b) <= u(b)`. Route D(b) of the + **whole** issued jobs to the child. Complete the remaining u(b)−D(b) + jobs as paid exits, at their actual rank `e=r*rho*c(b)`. +- If the parent point is absent, supply the child demand with new distinct + top input arrays. These are source jobs, not copies of issued data. +- At depth G, every point has degree zero; all paid jobs are exits. + +No fractional jobs, cloned productive inputs or uncharged discarded requests +are introduced. Within each point, choose a fixed enumeration of parent +jobs and target slots and match their first D(b) elements. The rest have +explicit endpoints and remain on their actual owners. + +### Sources and exits + +At the root, every demanded point has degree G+1, so it is outside R(1). +Its rank s is in `(n/m,n]`. A non-root source has no parent point, hence +`m*rho_parent*c(b)>n`; its rank is `r*rho_parent*c(b)>r*n/m>=n/m`. +Its eligible child target ensures s<=n. Thus every source is a positive +job in `(n/m,n]`. + +Every exit belongs to an actual parent unit, so + +``` +e <= r_max*n/m < n. +``` + +This holds for the new premature exits as well as leaf exits. A premature +exit has at least one omitted Pascal term, with +`m*r*rho*c(b)/k > n`; consequently `e > k_min*n/m`. These are large exits +near the upper boundary. They cannot be assigned the old bound +`r_max*(n/m)^theta` with theta<1. That lost estimate is the exponent issue. + +### Chronology and arbitrary inputs + +Run all scalar steps of a class in their specified order. At paid position +j, issue that position for every unit, partition its whole issued jobs into +matched and unmatched slots, finish all unmatched exits and the entire child +class, restore adapters, and only then resume position j+1. The child takes +incoming jobs from this one parent round plus its new top sources. It never +waits for a later round of a suspended parent. The finite class depth is G; +all complement and exit calls have rank below n, so their uniform programs +are already available by strong induction. + +Distinct slots in one class have distinct physical fields. Routing fewer +parent slots than the original full-Pascal construction preserves this +property. Arbitrary-input native correctness permits correlated values, +including current owned-center contents; it does not permit field aliasing +or extra productive credit. Each unit has its own owned identities and +retains them until its word clears them. These requirements are unchanged. + +### Exact potential and count identities + +Let S_s and E_e be integer source and exit inventories, U the unit count, +and Qcol the sum of the units' positive integer column multiplicities. +Cancellation of matched jobs gives, exactly at rank one, + +``` +sum_s S_s*s − sum_e E_e*e = Delta * Qcol, +Delta = sum_k W_k*k − sum_j r_j. +``` + +At any real exponent t, the corresponding identity is + +``` +sum_s S_s*s^t − sum_e E_e*e^t + = (T_t−P_t) * sum_units column^t. +``` + +Thus a favorable raw t-moment survives as a superpotential. It does **not** +by itself pay the source complements. Writing W=sum W_k and P=number of +paid rounds, complete untruncated layer counts give + +``` +U <= sum_(d=0..G) P^d W^(G−d) <= (W+P+1)^(G+1), +S := sum_s S_s <= W*U, +sum_e E_e <= P*U. +``` + +The source package's separated case is unchanged: no premature exits occur. +The verifier compares it with the byte-identical predecessor literal replay. + +## 3. Nested divisible widths and complete count bounds + +Use the ordinary base B_n=1, P_n=n below m, with B_0=1 and P_0=0. For n>=m +choose the replication factor and productive width + +``` +a_n = B_(n−1), B_n = a_n*S_n. +``` + +Every earlier width B_e divides B_(n−1), by induction. Therefore every +source-complement batch and exit batch is an integer number of smaller +uniform programs. This is a concrete choice within the source compiler's +existing denominator-clearing freedom; no optimum is claimed. Its previous +option to use an LCM is retained as predecessor context. + +As in the source compiler, each of the a_n*S_n original arrays first gets +its disjoint complementary job, then its one source job through the flow. +All exits are completed by smaller uniform programs. The result is a full +rank-n transform on every original array. Owned storage is excluded from B_n. + +The normalized leaf count satisfies the **same exact recurrence** for any +valid replication choice: + +``` +L(n) = (1/S_n) * [sum_s S_s L(n−s) + sum_e E_e L(e)]. +``` + +Changing the replication factors changes width and total counts equally. +It does not spend supplier saving or alter any outer parameter. + +For a fixed final N and h=G(N), all n<=N satisfy + +``` +S_n <= C_N := W*(W+P+1)^(h+1), +B_N = product_(n=m..N) S_n <= C_N^N. +``` + +Since h=O(log N), **log B_N=O(N log N)** for a fixed mixed rule. Repeatedly +multiplying all previous widths is unnecessary. This bounds one explicit +realization; the original compiler did not require that inefficient choice. + +If Delta>0, telescope rank-one mass over the fully expanded uniform program: + +``` +B_N*N − P_N = Delta * Qcol_N, +U_N <= Qcol_N <= B_N*N/Delta. +``` + +All raw columns are positive integers, which gives the middle inequality. +Thus paid leaves and raw instances have the same `exp(O(N log N))` bound. +With one owned center per raw unit, the center count is at most U_N. A rule +with O_local distinct owned banks per invocation instead gets O_local*U_N. +Extra router scratch must be counted separately. + +### Routing and word description + +Count one routing slot for every source, every exit, every unit target slot +and every unit paid position. At one flow its count is at most +`2*(W+P)*U`. The same bound telescopes over all recursive calls, because +each call contributes its own local unit instances. Exact compilation checks +this identity alongside widths and leaves. + +In the macro grammar that records a whole-job adapter, inverse adapter or +whole-field move as one record, a slot can be handled with at most sixteen +records: up to two whole-job conjugations and their inverses, park/load/ +return/reorder moves, and explicit scratch initialization and erasure. +Allocate separate owned scratch for those moves when needed; no zero-cost +routing or free copying is assumed. Let A bound the fixed unit's complete +nonrecursive record count, owned operations and scalar coefficient heights. +The final weighted record allowance satisfies the conservative bound + +``` +R_bar <= A*U_N + 32*(W+P)*U_N + P_N + <= (A+32*(W+P)+1)*B_N*N, for Delta>=1. +``` + +R_bar bounds both the macro count and the sum of scalar-height and native +record allowances. Every owned bank has an explicit initialization record, +so total allocated owned banks can also be bounded by R_bar; the sharper +raw-center bound remains separate. This is a **description/record bound**, +not a new tariff for executing a +general matrix or permutation. A Gaussian monomial adapter's dense binary +address matrix and quadratic phase have O(N^2) descriptor bits. Explicit role indices add O(log B_N) +bits. Thus an encoding of this finite word still has +`exp(O(N log N))` bits for a fixed unit and its finite coefficient alphabet. +If physical expansion of one adapter needs F(N) native records, multiply +the routing term by its actual F(N). That physical implementation, coefficient +heights and tape costs remain separately priced native obligations. They +are not set to zero by the macro bound. + +## 4. Applying the size result to PR4433 + +The new nested widths may be used in the separated compiler of PR4433. +Its normalized L(n), ambient N, uniform saving and outer ledger remain +unchanged. Therefore this application does not need the still-open direct +exponent lemma. + +With `v=150`, `H=349300000000`, `N=2^H`, the completed mixed rule has + +``` +W = 7688^150 < 2^1950, +P <= 131115^150 + 7688^150*15^150 < 2^2701, +W+P+1 < 2^2702. +``` + +The bound on P counts every original and completion call by its positive +rank mass; splitting preserves that mass. Since k_min>=2, h<=H. Set + +``` +D = 1950 + 2702*(H+1) = 943808600004652. +``` + +There is consequently a realization of the same proposed conditional +κ=0.00268647 supplier satisfying + +``` +B_N < 2^(D * 2^H), +P_N < B_N * 2^H. +``` + +More finely, after expanding every product, padding, split and compiler call +back to the raw p7 word, that word has surplus 608. Product/completion/split +boundaries cancel, so + +``` +B_N*N − P_N = 608 * sum_raw_p7_instances column, +U_raw <= (B_N*N − P_N)/608. +``` + +This is also an explicit bound on raw p7 center banks under the safe +one-center-per-instance allocation. These are large upper bounds, not +emitted words, smallest widths or practical precision estimates. They replace +one implicit part of the source finite-constant prescription. The native +adapter bodies, analytic transfer and physical costs retain their original +conditions; a closed bound for the source's finite-constant prescription is +given next, without a new physical runtime or exact-recovery threshold. + +### A closed envelope for the source finite constants + +The exported THREE-base native word has exactly 22,633 records in each +orientation. Source-bound counting retains all 15 copies, the literal p7 +controller, scalar allowance 2,490,856, every productive/paid/contact/helper/ +idle slot, and all routing and owned operations. A raw macro allowance is + +``` +A_raw = 15*8*(decompressed native JSON bytes) + + 8*(literal controller JSON bytes) + + 32*(2490856 + all declared slots + 15*22633) < 2^40. +``` + +The payload-bit terms overcount the coefficient literals and full local +descriptors, including both orientations. The 32-per-slot term overcounts +whole-job normalizers and inverses, field movements, initialization and +erasure. It is a bound on the declared source word in this grammar, not +independent verification of its functional correctness or physical tariffs. + +For the chronological v-fold product, its number of raw p7 invocations is + +``` +U_v = sum_(i=0..v−1) 7688^(v−1−i)*55998^i < 2^2392. +``` + +At every product level retain the whole-job matching wrappers. A conservative +product allowance is + +``` +A_product <= (2^40 + 32*v*(7688+55998+1))*U_v + 32*v*55998^v. +``` + +Add 32 records for every final paid call, completion role and original paid +position. Counting paid calls by their rank mass gives + +``` +A_completed <= A_product + + 32*(131115^v + 7688^v*15^v + 7688^v + 55998^v). +``` + +A dense local binary map/quadratic phase and role index fit in +`64*(121^v)^2` bits per such record. The verifier checks the integer bound +`A_completed * 64*(121^v)^2 < 2^5000`. Thus **A=2^5000** is a valid weighted +record/description allowance for this fixed completed unit. It includes all +source coefficients and owned operations, with a large deliberate overcount. +No instruction list of the completed product is emitted. + +Since `A+32*(W+P)+1 < 2^5001`, use the envelope + +``` +R_bar < 2^(D*2^H + H + 5001). +``` + +Apply the existing source finite-constant prescription to the **newly expanded +word**. With Z=B_N+owned banks, G its scalar coefficient envelope, and P_N +its rank-one leaves, we have `Z<=2*R_bar`, `G<=8*R_bar`, `P_N<=R_bar` and +`N<=R_bar`. Therefore + +``` +E = 64*(Z+N+P_N+G+1)^3 + < 2^(3*D*2^H + 3*H + 15021), +B_constant = P_N+E, +C0 = 32*N*B_constant^2 + < 2^(6*D*2^H + 7*H + 30049) + < 2^(8*D*2^H). +``` + +The last comparison uses `2^H>=H+1` and an exact polynomial integer check +on D and H. These are explicit, very loose upper bounds for the inherited +semantic precision/stock constants, conditional on that source prescription +and its admitted native record implementations. The exact numerical outer +input threshold, prime exclusions and physical tape costs remain separate. + +## 5. Exact finite checks and the open exponent gate + +The verifier uses no floating-point acceptance tests. It checks: + +- Nine literal/merged flows at ranks 20, 40 and 80: a separated control, + strict overlap `{2:1,5:1} <- {1:2,4:1}`, and Sussman's open equality + example `{2:4,3:1} <- {1:6,2:2}`. Every whole input and exit agrees. +- The separated control agrees with the unchanged Sussman literal replay. +- Complete nested-width compilations through rank 100 on both overlap + examples, checking every recursive batch, routing count and rank identity. +- Raw p7 through rank 1,000: **880 exact nonbase compilations**. B_1000 has + 17,504 bits; the saved receipt binds all large computed integers by their + unsigned big-endian hashes, avoiding enormous decimal dumps. +- Removing premature exits violates mass conservation. Removing batch + replication fails integer divisibility. Allowing a paid rank equal to + the ambient rank is rejected because strict rank descent is unavailable. + +For raw p7 at rank 1,000, exact arithmetic gives + +``` +L(1000) > 990 > 1000^(1−0.00268647). +``` + +The second comparison is elementary and exact: `ln(2)>2/3` from its first +atanh term and `1000>2^9` give `ln(1000)>6`. Then +`1000^κ > 1+6κ > 100/99`. No log approximation is used in this rejection. +This checks one finite failure and keeps it distinct from the infinite-rank +question. + +The missing lemma is a uniform bound on the **whole** recurrence. For some +fixed p and sufficiently large n, one would need, for example, + +``` +sum_e E_e e^t (1+log2(e))^p + + sum_s S_s (n−s)^t (1+log2(n−s))^p + <= S_n n^t (1+log2(n))^p, +``` + +with zero-rank terms defined separately and a correctly funded base range. +The premature exits have rank proportional to n. Their logarithmic factors +cannot use the old fixed theta<1 power contraction. A raw moment advantage +alone does not prove this inequality. + +Exploratory `approximate_leaves` in flow.py evaluates the recurrence in +floating point and is deliberately excluded from verification. A bounded +run through 20,000 ranks found saving about 0.000827 for the default height; +varying the height did not approach 0.00268647 there. This is local search +evidence, not a lower bound or a reason to enlarge the same scan. A better +boundary estimate or a changed flow is the next research obligation. + +## 6. Reproduction and provenance + +Python 3.12, standard library only: + +```sh +python3.12 -B research/direct-mixed-flow/verify.py +python3.12 -B scripts/research_package.py --package research/direct-mixed-flow --check-only +python3.12 -B scripts/research_package.py --package research/direct-mixed-flow +``` + +Use `verify.py --out /absolute/new/result.json` for a fresh receipt. +[RESULT.json](RESULT.json) contains exact flows, integer compilation hashes, +symbolic size bounds and negative controls. `flow.py` is the new algorithm; +the verifier independently compares its merged and literal traversal outputs. +Those are two internal implementations, not an independent mathematical review. + +Canonical base is `12fa8c5c844be21bfefb38a19503fbd867a11244`, priority revision +7. SOURCES.json pins orientation metadata. VENDOR.json separately binds eleven +unchanged exports by commit, full path, Git blob and SHA256. Their bytes and +notices are preserved; direct replay needs no foreign Git objects. The source +theorem and earlier finite compiler remain attributed hypotheses, not new work. + +Local validation used Python 3.12.8 on macOS arm64. The registered replay, +metadata/pin check and committed-byte preflight passed. A separate Git-free +copy passed with `python3.12 -I -O -B verify.py`; changed-native-source and +changed-receipt controls both rejected. Replay uses exact integer arithmetic +and source hashes, with no network or foreign Git objects. The repository is +shallow, so a full source-history preflight was not attempted. No Lean, Docker, +full native/all-column admission, physical adapter expansion or historical +suite was run. Independent mathematical acceptance remains open. + +The overlap refresh at 18:48 UTC covered 538 open PR bodies and 3,280 +discussion/comment records, with complete reported pagination. Specific +searches for direct overlapping-rank compilers, Pascal matching and nested +widths found no matching public item in that scope; this is not a novelty +certificate. Existing PR4433 supplies the fixed-rank application, and the +source theorem explicitly leaves the unseparated exponent open. No Discussion +claim or PR has been posted for this partial checkpoint. + +## Open next questions + +1. **Close or refute the direct exponent gate for this capped flow.** Start + with a proved bound on premature-exit potential relative to the actual + complement capacity. This decides whether the flow can replace the + tensor/padding layer. A larger rank scan is not a uniform proof. +2. **Independently admit the physical expansions and precision prescription.** + Audit the conservative A allowance against the actual native caller and + bind every adapter's physical implementation, row movements and recovery + exclusions. The encoded constants above use the inherited semantics; + description size is not a physical execution tariff. +3. **Tighten the constructive width.** The nested product is an explicit + upper bound, not an optimized LCM. A useful next step would control prime + valuations of the actual source counts; another arbitrary batching choice + would not by itself establish a smaller physical supplier. + +Prepared by zxv with substantial OpenAI Codex assistance in research, code +and writing. No subagents or independent human mathematical review were +used. New material is Apache-2.0. The integer lockstep/Pascal construction +and original open unseparated question are Jacob Alan Sussman's work, retained +at upstream `wht-power-saving-lean` commit +`563b4e6e913625637f36ba7869bf5fcd0dd4975a`; its LICENSE and NOTICE are included. +PR4359 supplies the native finite-precompilation bridge and p7 predecessor +lineage. PR4416's p7 product/padding is @1337isnot1337's work. PR4433 supplies +the unchanged sufficient rank. Their original contributor credit remains +in the authenticated exports. diff --git a/research/direct-flow-expanded-audit/vendor/PR4436-RESULT.json b/research/direct-flow-expanded-audit/vendor/PR4436-RESULT.json new file mode 100644 index 0000000000..e657f58b5a --- /dev/null +++ b/research/direct-flow-expanded-audit/vendor/PR4436-RESULT.json @@ -0,0 +1,505 @@ +{ + "direct_exponent_theorem_established": false, + "exact_p7_direct_compilation": { + "column_mass": { + "bits": 17497, + "unsigned_big_endian_sha256": "0f2b521412ca3f565d734c244b1cf42b8c7d49ef1e61af197ec97b2605078a3c" + }, + "leaves_per_array": { + "lower": "24890741110487842821/25000000000000000", + "upper": "995629644419513712841/1000000000000000000" + }, + "n": 1000, + "nested_batch_checks": 880, + "paid_above_99_percent_linear": true, + "paid_rank_one_leaves": { + "bits": 17514, + "unsigned_big_endian_sha256": "1f28a559d21f0df473b67fef0c37eb57144955250234a44c998bd837d1e8f3d6" + }, + "productive_width": { + "bits": 17504, + "unsigned_big_endian_sha256": "49727d4435d62a4a84b79cf2451d374a5bb98234cbe460ec0b0ef3da77c8c9e6" + }, + "rank_one_surplus": 608, + "raw_instances": { + "bits": 17497, + "unsigned_big_endian_sha256": "0f5ce7310a89be0835b71681538c3e2e57134d2690ff663b8bc1cd10938b9c7f" + }, + "routing_slots": { + "bits": 17514, + "unsigned_big_endian_sha256": "98bde80b4a7bc886645e82f3b9e730545da94beddcbec4e98ce88e1c44a39242" + }, + "source_count_upper": 31182789153672, + "target_failure": { + "kappa": "268647/100000000", + "proved": "L(1000) > 990 > 1000^(1-kappa)", + "scope": "This particular finite rank fails; no asymptotic impossibility claim." + }, + "width_exponent_envelope": 45000 + }, + "exact_toy_compilations": [ + { + "column_mass": { + "bits": 438, + "unsigned_big_endian_sha256": "f469278cd8f6190ffe6a1ae190299a8d183d1675d4280087d107e5d7016aee25" + }, + "leaves_per_array": { + "lower": "63955485748643768733/1000000000000000000", + "upper": "31977742874321884367/500000000000000000" + }, + "n": 100, + "nested_batch_checks": 96, + "paid_above_99_percent_linear": false, + "paid_rank_one_leaves": { + "bits": 439, + "unsigned_big_endian_sha256": "7df4f5875466fa21b225c2b60317e60536fdededbe8473d18fe5fb3fb057bb6f" + }, + "productive_width": { + "bits": 433, + "unsigned_big_endian_sha256": "35f12bcc6000b703565e2f120e8077641f744909e8ec163921775b2b0c139254" + }, + "rank_one_surplus": 1, + "raw_instances": { + "bits": 436, + "unsigned_big_endian_sha256": "12b6d174870cd23fd40ad1f4ff56df629ed813fabbbfcf143a914bfdd875609d" + }, + "routing_slots": { + "bits": 439, + "unsigned_big_endian_sha256": "4034ff94efe1f1ab70575b300eebbd2469e9065861c4f2570a59256c47170f74" + }, + "source_count_upper": 15552, + "width_exponent_envelope": 1400 + }, + { + "column_mass": { + "bits": 1007, + "unsigned_big_endian_sha256": "f04dcf1684cd1a5f5708102f230375fb43cd08135626ac91b22478876e21c63e" + }, + "leaves_per_array": { + "lower": "65003740439870989333/1000000000000000000", + "upper": "32501870219935494667/500000000000000000" + }, + "n": 100, + "nested_batch_checks": 98, + "paid_above_99_percent_linear": false, + "paid_rank_one_leaves": { + "bits": 1008, + "unsigned_big_endian_sha256": "1302eac01cf514d2855c821612c64c9d38a6c9ff55f12115f72bf34a9906b9d5" + }, + "productive_width": { + "bits": 1002, + "unsigned_big_endian_sha256": "398043f007044ec4c1ba14eda89bf66b48733ce7a22bb855a3bc17a4665b5952" + }, + "rank_one_surplus": 1, + "raw_instances": { + "bits": 1006, + "unsigned_big_endian_sha256": "ebd327c71dde99fefa5afb70ef8ad5b207723935abb8bed0473a95d67e73fbe7" + }, + "routing_slots": { + "bits": 1010, + "unsigned_big_endian_sha256": "23f8f6398dbe8fe43a321ff79a6c52edfee5c4de97ff2852a6cdcc6c127e7cd7" + }, + "source_count_upper": 37647680, + "width_exponent_envelope": 2600 + } + ], + "existing_supplier_size_bounds": { + "D": 943808600004652, + "H": 349300000000, + "N": "2^349300000000", + "compiled_record_upper": "R < 2^(D*2^H + H + 5001)", + "completed_unit_description_upper": "2^5000", + "kappa": "268647/100000000", + "owned_p7_center_bound": "one per raw instance; <= B_N * 2^H / 608", + "paid_leaf_bound": "P_N < B_N * 2^H", + "physical_scope": "Encoded whole-job adapter/move records. Their permitted physical implementation and tariffs remain inherited, separately priced premises.", + "raw_macro_allowance_upper": "2^40", + "raw_macro_and_payload_allowance": 319592968, + "raw_native_record_counts": { + "backward": 22633, + "forward": 22633 + }, + "raw_p7_instance_bound": "U_raw <= (B_N * 2^H - P_N)/608", + "routing_macro_record_bound": "R <= (A + 32*(W+P) + 1) * B_N * N; A < 2^5000", + "routing_slot_bound": "slots <= 2*(W+P)*V, V completed-unit instances", + "source_C0_upper": "C0 < 2^(8*D*2^H)", + "source_precision_E_upper": "E < 2^(3*D*2^H + 3*H + 15021)", + "width_bound": "B_N < 2^(D * 2^H)", + "winning_uniform_word_materialized": false + }, + "finite_flows": [ + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": {}, + "column_mass": 18, + "exits": { + "1": 16, + "2": 16, + "4": 4 + }, + "height": 1, + "matched_jobs": 18, + "minimum_source": 9, + "n": 20, + "rank_one_surplus": 2, + "source_count": 9, + "sources": { + "12": 4, + "16": 1, + "9": 4 + }, + "unit_count_upper": 9, + "units": 9 + }, + "literal_classes": 7, + "paid": { + "1": 4, + "2": 2 + }, + "rule": "separated-control", + "targets": { + "3": 2, + "4": 1 + } + }, + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": {}, + "column_mass": 180, + "exits": { + "1": 64, + "2": 96, + "4": 48, + "8": 8 + }, + "height": 2, + "matched_jobs": 132, + "minimum_source": 12, + "n": 40, + "rank_one_surplus": 2, + "source_count": 42, + "sources": { + "12": 16, + "16": 4, + "24": 8, + "27": 8, + "32": 2, + "36": 4 + }, + "unit_count_upper": 63, + "units": 58 + }, + "literal_classes": 43, + "paid": { + "1": 4, + "2": 2 + }, + "rule": "separated-control", + "targets": { + "3": 2, + "4": 1 + } + }, + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": {}, + "column_mass": 244, + "exits": { + "1": 64, + "2": 96, + "4": 48, + "8": 8 + }, + "height": 2, + "matched_jobs": 162, + "minimum_source": 27, + "n": 80, + "rank_one_surplus": 2, + "source_count": 27, + "sources": { + "27": 8, + "36": 12, + "48": 6, + "64": 1 + }, + "unit_count_upper": 63, + "units": 63 + }, + "literal_classes": 43, + "paid": { + "1": 4, + "2": 2 + }, + "rule": "separated-control", + "targets": { + "3": 2, + "4": 1 + } + }, + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": { + "16": 1 + }, + "column_mass": 28, + "exits": { + "1": 8, + "16": 5, + "4": 12 + }, + "height": 2, + "matched_jobs": 8, + "minimum_source": 5, + "n": 20, + "rank_one_surplus": 1, + "source_count": 14, + "sources": { + "10": 2, + "20": 5, + "5": 4, + "8": 3 + }, + "unit_count_upper": 19, + "units": 11 + }, + "literal_classes": 13, + "paid": { + "1": 2, + "4": 1 + }, + "rule": "strict-overlap", + "targets": { + "2": 1, + "5": 1 + } + }, + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": { + "32": 5 + }, + "column_mass": 132, + "exits": { + "1": 16, + "16": 12, + "32": 5, + "4": 32 + }, + "height": 3, + "matched_jobs": 40, + "minimum_source": 10, + "n": 40, + "rank_one_surplus": 1, + "source_count": 30, + "sources": { + "10": 8, + "16": 3, + "20": 10, + "25": 4, + "40": 5 + }, + "unit_count_upper": 65, + "units": 35 + }, + "literal_classes": 40, + "paid": { + "1": 2, + "4": 1 + }, + "rule": "strict-overlap", + "targets": { + "2": 1, + "5": 1 + } + }, + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": { + "40": 4, + "64": 5 + }, + "column_mass": 872, + "exits": { + "1": 32, + "16": 80, + "4": 80, + "40": 4, + "64": 29 + }, + "height": 4, + "matched_jobs": 132, + "minimum_source": 20, + "n": 80, + "rank_one_surplus": 1, + "source_count": 106, + "sources": { + "20": 36, + "25": 8, + "32": 15, + "40": 10, + "50": 8, + "80": 29 + }, + "unit_count_upper": 211, + "units": 119 + }, + "literal_classes": 121, + "paid": { + "1": 2, + "4": 1 + }, + "rule": "strict-overlap", + "targets": { + "2": 1, + "5": 1 + } + }, + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": {}, + "column_mass": 322, + "exits": { + "1": 216, + "2": 216, + "4": 72, + "8": 8 + }, + "height": 2, + "matched_jobs": 512, + "minimum_source": 8, + "n": 20, + "rank_one_surplus": 1, + "source_count": 128, + "sources": { + "12": 48, + "18": 10, + "8": 64, + "9": 6 + }, + "unit_count_upper": 129, + "units": 128 + }, + "literal_classes": 73, + "paid": { + "1": 6, + "2": 2 + }, + "rule": "source-open-equality", + "targets": { + "2": 4, + "3": 1 + } + }, + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": {}, + "column_mass": 4362, + "exits": { + "1": 1296, + "16": 16, + "2": 1728, + "4": 864, + "8": 192 + }, + "height": 3, + "matched_jobs": 5040, + "minimum_source": 16, + "n": 40, + "rank_one_surplus": 1, + "source_count": 670, + "sources": { + "16": 256, + "18": 84, + "24": 256, + "27": 6, + "36": 68 + }, + "unit_count_upper": 1157, + "units": 1142 + }, + "literal_classes": 585, + "paid": { + "1": 6, + "2": 2 + }, + "rule": "source-open-equality", + "targets": { + "2": 4, + "3": 1 + } + }, + { + "flow": { + "all_sources_above_n_over_m": true, + "boundary_exits": {}, + "column_mass": 55372, + "exits": { + "1": 7776, + "16": 480, + "2": 12960, + "32": 32, + "4": 8640, + "8": 2880 + }, + "height": 4, + "matched_jobs": 45088, + "minimum_source": 27, + "n": 80, + "rank_one_surplus": 1, + "source_count": 3572, + "sources": { + "27": 36, + "32": 1024, + "36": 744, + "48": 1280, + "54": 96, + "72": 392 + }, + "unit_count_upper": 9881, + "units": 9732 + }, + "literal_classes": 4681, + "paid": { + "1": 6, + "2": 2 + }, + "rule": "source-open-equality", + "targets": { + "2": 4, + "3": 1 + } + } + ], + "new_code_sha256": { + "flow.py": "460f0b0262d7b6880973f46240b3fff1e9f04601fa1d658dda18688b1e26575a", + "verify.py": "9ae067eadf17ff9d97737805eb642a69375a5ff2ddb08988fef59aa0771f9b7c" + }, + "rejected_mutations": [ + "whole integer subprogram batches", + "finite direct-flow rank contract" + ], + "schema": "partial-direct-mixed-flow-and-finite-size/1", + "scope": "New finite matching/scheduling and batching/size bounds. The direct near-root exponent is open. Existing conditional endpoint and native/physical hypotheses remain inherited; no new kappa.", + "source_sha256": { + "research/direct-mixed-flow/vendor/FINITE-PRECOMPILATION.md": "4cb32f6b8e388ecf6ed41b5bbdeeb4539cb40c8424f194974afea58f7e0921e8", + "research/direct-mixed-flow/vendor/P7-FACTOR.json": "6f96f6be5d8441f71cbe6ebb1657c69b543eb085b848b92b591b7ac01d6e6598", + "research/direct-mixed-flow/vendor/SUSSMAN-LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "research/direct-mixed-flow/vendor/SUSSMAN-NOTICE": "8289a4ba75efe5da7bd2e389b951155ff74b3bf49b38ace0906a1e5205c7cd6e", + "research/direct-mixed-flow/vendor/THREE-base-FULL-IDENTITY-NATIVE.json.gz": "c54b0a3e129d28e6dbf74fa731fc3bb70fe3c6705f07256750fbecddcc842d39", + "research/direct-mixed-flow/vendor/higher-moment-README.md": "ebe80b68ff026ce90f71f274c31744f4c0b36132d15ebb7e39cf2d5df4df270d", + "research/direct-mixed-flow/vendor/higher-moment-RESULT.json": "ad79e3c0459e7b495a0ca34010553b12147779a007389e1695cc1336f123c156", + "research/direct-mixed-flow/vendor/p7-NATIVE.md": "26bf9312cdb496b1113c9ddd8aa0fa922ed9e480005703212942af358394183d", + "research/direct-mixed-flow/vendor/p7-RESULT.json": "9b814be97e3b45fcc28eafa8a65694897a7387f71a14d44796c6aadf303d7fab", + "research/direct-mixed-flow/vendor/theorem-1g.md": "c4a96c55c2509ff36e8bc6bddaaf6a8b1a34a5d794e4e09ac5214c82b51510e6", + "research/direct-mixed-flow/vendor/tree_flow.py": "750782f6d1cc0a9fff8a768899f3f4c62a7efdf0696d8b5a5d640b1836f5ab72" + }, + "status": "PASS_PARTIAL_DIRECT_FLOW_AND_SIZE_BOUNDS" +} diff --git a/research/direct-flow-expanded-audit/vendor/PR4436-flow.py b/research/direct-flow-expanded-audit/vendor/PR4436-flow.py new file mode 100644 index 0000000000..07175cd6e1 --- /dev/null +++ b/research/direct-flow-expanded-audit/vendor/PR4436-flow.py @@ -0,0 +1,198 @@ +#!/usr/bin/env python3 +"""Capped whole-integer lockstep flow, retaining unmatched jobs as paid exits. + +Generalizes Jacob Alan Sussman's separated multinomial construction. +zxv with substantial OpenAI Codex assistance. Apache-2.0. +This is a finite flow, not a theorem that it attains the mixed-root saving. +""" +from collections import Counter +from functools import lru_cache +from math import comb, prod + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +class Flow: + def __init__(self, targets, paid, n, extra_height=0, height_base=None): + self.T, self.P, self.n = dict(targets), dict(paid), n + self.K = tuple(sorted(targets)) + self.m, self.kmin, self.rmax = max(targets), min(targets), max(paid) + need(2 <= self.kmin <= self.m and self.rmax < self.m <= n, + 'finite direct-flow rank contract') + need(all(isinstance(v, int) and v > 0 for x in (targets, paid) + for v in x.values()), 'positive integer inventories') + self.cap = n//self.m + self.height_base = self.kmin if height_base is None else height_base + need(isinstance(self.height_base, int) and self.height_base >= 2, 'integer height base') + self.G, least = 0, 1 + while least*self.height_base <= self.cap: + self.G += 1 + least *= self.height_base + need(isinstance(extra_height, int) and extra_height >= 0, 'nonnegative extra height') + self.G += extra_height + self.zero = (0,)*len(self.K) + + @lru_cache(None) + def column(self, a): + return prod(k**v for k, v in zip(self.K, a)) + + @lru_cache(None) + def points(self, height, cap): + """(a, u(a)) at fixed degree; exact multinomial integer weights.""" + result = {} + + def visit(i, remaining, c, weight, a): + if i == len(self.K): + if remaining == 0 and c <= cap: + result[a] = weight + return + k, w = self.K[i], self.T[self.K[i]] + for count in range(remaining+1): + new_c = c*k**count + if new_c > cap: + break + visit(i+1, remaining-count, new_c, + weight*comb(remaining, count)*w**count, a+(count,)) + + if cap >= 1: + visit(0, height, 1, 1, ()) + return result + + @lru_cache(None) + def units(self, depth, rho): + return self.points(self.G-depth, self.cap//rho) + + @lru_cache(None) + def demand(self, depth, rho): + result = Counter() + for a, count in self.units(depth, rho).items(): + for i, k in enumerate(self.K): + b = list(a) + b[i] += 1 + result[tuple(b)] += count*self.T[k] + return result + + def merged(self): + sources, exits, boundary = Counter(), Counter(), Counter() + units = columns = 0 + matched = 0 + path_counts = Counter({1:1}) + for b, count in self.demand(0, 1).items(): + sources[self.column(b)] += count + for depth in range(self.G+1): + following = Counter() + for rho, paths in path_counts.items(): + batch = self.units(depth, rho) + units += paths*sum(batch.values()) + columns += paths*sum(count*rho*self.column(a) for a, count in batch.items()) + for rank, repetitions in self.P.items(): + new_rho = rho*rank + copies = paths*repetitions + if depth == self.G: + need(set(batch) <= {self.zero}, 'leaf degree zero') + exits[new_rho] += copies*batch.get(self.zero, 0) + continue + child = self.demand(depth+1, new_rho) + if new_rho <= self.cap: + following[new_rho] += copies + for b in set(batch) | set(child): + supply, demand = batch.get(b, 0), child.get(b, 0) + e = new_rho*self.column(b) + consumed = min(supply, demand) + matched += copies*consumed + if supply > demand: + exits[e] += copies*(supply-demand) + boundary[e] += copies*(supply-demand) + elif demand > supply: + need(supply == 0, 'Pascal demand cannot exceed present supply') + sources[e] += copies*(demand-supply) + path_counts = following + sources, exits, boundary = +sources, +exits, +boundary + need(sources and all(1 <= s <= self.n for s in sources), + 'all sources are positive and fit parent') + if self.height_base <= self.kmin: + need(all(self.n < self.m*s for s in sources), 'default top source bound') + need(all(1 <= e < self.n and self.m*e <= self.rmax*self.n for e in exits), + 'all paid exits strictly smaller than parent') + need(all(self.m*e > self.kmin*self.n for e in boundary), + 'premature exits have a failed boundary term') + mass = lambda h: sum(k*v for k, v in h.items()) + surplus = mass(self.T)-mass(self.P) + need(mass(sources)-mass(exits) == surplus*columns, + 'exact rank-one telescoping identity') + W, P = sum(self.T.values()), sum(self.P.values()) + bound = sum(P**d*W**(self.G-d) for d in range(self.G+1)) + need(units <= bound and sum(sources.values()) <= W*units, + 'full integer unit/source count bounds') + return {'n': self.n, 'height': self.G, 'sources': sources, 'exits': exits, + 'boundary_exits': boundary, 'units': units, 'column_mass': columns, + 'source_count': sum(sources.values()), 'matched_jobs': matched, + 'minimum_source': min(sources), 'all_sources_above_n_over_m': + all(self.n < self.m*s for s in sources), + 'rank_one_surplus': surplus, 'unit_count_upper': bound} + + def literal(self, paid_word, class_limit=200000): + """Every round returns before the next; no merging of round paths.""" + need(Counter(paid_word) == Counter(self.P), 'literal paid word matches invoice') + sources, exits = Counter(), Counter() + classes = 0 + + def process(depth, rho, incoming): + nonlocal classes + classes += 1 + need(classes <= class_limit, 'literal replay class limit') + wanted = self.demand(depth, rho) + need(all(v <= wanted.get(b, 0) for b, v in incoming.items()), + 'all incoming whole jobs fit child slots') + for b, count in wanted.items(): + missing = count-incoming.get(b, 0) + if missing: + sources[rho*self.column(b)] += missing + batch = self.units(depth, rho) + for rank in paid_word: + new_rho = rho*rank + if depth == self.G: + for a, count in batch.items(): + exits[new_rho*self.column(a)] += count + continue + child = self.demand(depth+1, new_rho) + passed = Counter() + for b, count in batch.items(): + consumed = min(count, child.get(b, 0)) + if consumed: + passed[b] = consumed + if count > consumed: + exits[new_rho*self.column(b)] += count-consumed + # All unconsumed exits and this entire child return at this + # paid position, before any later parent round is issued. + process(depth+1, new_rho, passed) + + process(0, 1, Counter()) + return {'sources': +sources, 'exits': +exits, 'classes': classes} + + +def approximate_leaves(targets, paid, maximum, checkpoints, extra_height=0, height_base=None): + """Exploratory floating point recurrence; never an acceptance certificate.""" + m = max(targets) + leaves = list(map(float, range(maximum+1))) + saved = {} + previous_cap = None + for n in range(m, maximum+1): + cap = n//m + if cap != previous_cap: + recipe = Flow(targets, paid, n, extra_height, height_base).merged() + source, exit = recipe['sources'], recipe['exits'] + count = recipe['source_count'] + exit_charge = sum(v*leaves[e] for e, v in exit.items()) + previous_cap = cap + leaves[n] = (sum(v*leaves[n-s] for s, v in source.items())+exit_charge)/count + if n in checkpoints: + from math import log + saved[n] = {'leaves_approx': leaves[n], + 'effective_saving_approx': 1-log(leaves[n])/log(n), + 'source_types': len(source), 'exit_types': len(exit), + 'boundary_exit_types': len(recipe['boundary_exits'])} + return saved diff --git a/research/direct-flow-expanded-audit/vendor/PR4436-p7-RESULT.json b/research/direct-flow-expanded-audit/vendor/PR4436-p7-RESULT.json new file mode 100644 index 0000000000..ebb30a9b3b --- /dev/null +++ b/research/direct-flow-expanded-audit/vendor/PR4436-p7-RESULT.json @@ -0,0 +1,296 @@ +{ + "endpoint": { + "compiler": { + "H0": 4307773805920, + "H1": 16201843136005340321, + "N_encoding": "2^16201843136005340321", + "delta": "1/1400000000", + "exit_coefficient_log2_upper": "26640", + "final_strict_power_gap": "1/1400000000", + "h": "1/26", + "materialized_tensor_rule_or_uniform_word": false, + "negative_log2_eta_upper": "147931769/1250000", + "paid_max_bound_encoding": "10^6240", + "rank_one_induction": "131723^n > 131115^n; target padding adds equal paid and target rank, and splitting preserves rank", + "t": "12466419/12500000", + "target_max_encoding": "121^6240", + "target_min_encoding": "11^6240", + "tensor_power": 6240, + "theta_upper": "25/26", + "z": "139623893/140000000", + "z0": "1396238929/1400000000" + }, + "gain_over_PR4359": "38647/100000000", + "gain_over_PR4405": "19069/50000000", + "gain_over_PR4414": "33/5000000", + "gain_over_allfresh_p3": "5223/25000000", + "kappa": "268647/100000000", + "ledger_source_sha256": "d097e55f06c3f244f2074ffd7c1a0a5f3c4b4b6a6accf9619d1dde5c0ae85e15", + "minimum_outer_margin": "524529867/122500000000000000", + "negative_controls": { + "closed_epsilon": { + "actual_logarithmic_gamma_guard": "0", + "epsilon_below_one": "0", + "gaussian_above_main": "-1410399/122500000000000000", + "global_gamma_power_slack": "-1/7000000000", + "new_semantic_guard_with_C1_one": "0", + "source_axis_superpolynomial": "0" + }, + "closed_uniform_gap": { + "new_complex_uniform_saving_above_b": "0" + }, + "insufficient_BIT": { + "actual_bit_above_effective": "-270533/700000000" + }, + "unfunded_outer_point": { + "boundary_algebraic_matrix_above_kappa": "-525470133/122500000000000000", + "fused_gaussian_above_kappa": "-526410399/122500000000000000", + "global_coordinate_router_above_kappa": "-3/700000000", + "group_bit_router_above_kappa": "-1405641599/490000000000000000", + "main_transform_above_kappa": "-700470133/122500000000000000" + } + }, + "outer": { + "functional_checks": { + "fixed_halo_explicit_metadata_branch": "13475000001/175000000", + "new_BIT_row_stock_sublinear_in_active_group": "697899997009/700000000000", + "new_semantic_group_guard": "3/700000000" + }, + "margins": { + "boundary_algebraic_matrix": "329093274529867/122500000000000000", + "fused_gaussian": "329093273589601/122500000000000000", + "global_coordinate_router": "1880533/700000000", + "group_bit_router": "1316373794358401/490000000000000000", + "group_scans": "349999999/350000000", + "main_transform": "329093099529867/122500000000000000", + "microbox_face_corrections": "13475000001/175000000", + "polynomial_products": "699999999/700000000", + "sparse_union_movement": "50094718274529867/122500000000000000" + }, + "parameters": { + "a": "1880533/700000000", + "b": "940267/350000000", + "beta": "699999997/700000000", + "bit_saving": "27/10000", + "cap_xi": "111344718099529867/122500000000000000", + "complex_uniform_saving": "376107/140000000", + "d": "1/700000000", + "epsilon": "699999999/700000000", + "kappa": "268647/100000000", + "lambda_": "39892541/40000000", + "lambda_prime": "174529867/175000000", + "layout": "1/700000000", + "q": "470133/175000000", + "r0": "1/7000000000", + "stop": "1/700000000", + "tested_saving": "33581/12500000" + }, + "strict_checks": { + "actual_bit_above_effective": "9467/700000000", + "actual_logarithmic_gamma_guard": "1/700000000", + "actual_logarithmic_group_guard": "11155282162970133/61250000000000000", + "alpha_logarithm_absorption": "1/7000000000", + "boundary_algebraic_matrix_above_kappa": "699529867/122500000000000000", + "cap_above_band": "50094718099529867/122500000000000000", + "cap_below_cell": "11155281725470133/122500000000000000", + "cap_below_phase_cell_power": "133655281900470133/122500000000000000", + "complex_above_effective": "1/700000000", + "complex_below_one_over_32": "9997233/350000000", + "complex_endpoint": "1/350000000", + "epsilon_below_one": "1/700000000", + "epsilon_positive": "699999999/700000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "698589601/122500000000000000", + "gaussian_above_main": "87029867/61250000000000000", + "global_coordinate_router_above_kappa": "1/175000000", + "global_gamma_power_slack": "9/7000000000", + "group_below_dimension": "1/350000000", + "group_bit_router_above_kappa": "3494358401/490000000000000000", + "group_gauge_power_slack": "11155282154220133/61250000000000000", + "group_key_fits_record": "1/350000000", + "group_positive": "699999997/700000000", + "group_scans_above_kappa": "698119469/700000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "477749790400418148631/500000000000000000000000", + "lambda_above_internal": "1/1400000000", + "lambda_above_sigma": "3/1400000000", + "lambda_above_tau": "1/1400000000", + "lambda_prime_above_lambda": "1/1400000000", + "lambda_prime_above_leaf": "699059733/245000000000000000", + "leaf_saving_above_effective": "349059733/245000000000000000", + "main_transform_above_kappa": "524529867/122500000000000000", + "membership_arithmetic_fits_record": "1/700000000", + "microbox_face_corrections_above_kappa": "2155924779/28000000", + "microbox_halo_volume": "55300000003/700000000", + "new_complex_uniform_saving_above_b": "1/700000000", + "new_semantic_guard_with_C1_one": "1/700000000", + "polynomial_products_above_kappa": "69811947/70000000", + "positive_layout_slack": "1/700000000", + "q_below_effective": "1/700000000", + "q_below_internal": "1/700000000", + "q_below_leaf": "699059733/245000000000000000", + "q_positive": "470133/175000000", + "short_record_fallback": "349059733/350000000", + "source_axis_superpolynomial": "1/700000000", + "sparse_union_movement_above_kappa": "49765625699529867/122500000000000000", + "stop_below_one": "699999999/700000000", + "stop_positive": "1/700000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/700000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/700000000", + "union_tag_work_per_visit_fits_record": "3/700000000" + } + }, + "schema": "native-p7-padding-strictification-outer-endpoint/1", + "scope": "Source-bound native p7 geometry, a finite tensor recipe with target padding, exact moment and outer inequalities, and a specified finite uniform rank. Native tensor closure and the PR4359 inherited precision, storage, analytic, fixed-tape and recovery hypotheses are written premises, not a full formal theorem certificate.", + "status": "PASS_CONDITIONAL_P7_OUTER_POINT", + "strictification_source_sha256": "1f3c2a38b34d9dad7266be212ca5d0225827d8e05bda4831e6c25c5713f624f0", + "tested_saving": "33581/12500000" + }, + "independent_interval_crosscheck": true, + "scope": "Conditional native construction and exact finite arithmetic. The finite word and inherited physical, precision, analytic and fixed-tape proofs are not formally verified or materialized by this checker.", + "source_files": 23, + "status": "PASS_SOURCE_BOUND_CONDITIONAL_P7_PAID_PADDING_IMPROVEMENT", + "strictification": { + "alpha_interval": { + "lower": "0.99999998440390797702869232902431332", + "upper": "0.99999998440390797702869232902431333" + }, + "alpha_upper": "99999999/100000000", + "completion_decay_block_length": 2, + "controls": { + "one_decay_block_rejected": true, + "undamped_completion_rejected": true, + "unpadded_rank_one_tail_rejected": true + }, + "cutoff_base": 10, + "cutoff_encoding": "10^6240", + "decay_block_count": 16, + "decay_block_length": 390, + "delta_interval": { + "lower": "0.64382470915163933966321257464784307", + "upper": "0.64382470915163933966321257464784308" + }, + "delta_upper": "2/3", + "exponent": 6240, + "gamma_interval": { + "lower": "0.99819171247300624373216957625759087", + "upper": "0.99819171247300624373216957625759088" + }, + "gamma_upper": "4991/5000", + "materialized_tensor_or_completed_word": false, + "native_inventory": { + "artifact_hash_encoding": "Uncompressed UTF-8 JSON, sort_keys=True, separators=(comma,colon)", + "artifact_sha256": "12784fff6a13e3752ea6e80018e0484c5766a8adf2e88a7e71c80cf2bb68f398", + "contacts": 6720, + "dimension": 121, + "factor_receipt_sha256": "6f96f6be5d8441f71cbe6ebb1657c69b543eb085b848b92b591b7ac01d6e6598", + "fresh_helper_fields": 6120, + "keep": 232127, + "limits": "Finite exact physical controller admission; inherited all-column local word, tensor strictification, new full-word precision/stock and outer transfer remain written proof obligations.", + "main_fields": 1568, + "native_scalar_allowance": 2490856, + "native_source_gate": "PASS_ACTUAL_ARBITRARY_HELPERS_AND_COMPLETE_PHASE_CORRECT_IDLE_JOBS", + "negative_controls": { + "omitted_endpoint_translation_rejected": 784, + "wrong_native_orientation_rejected": true + }, + "p": 7, + "paid": { + "1": 37305, + "16": 448, + "2": 10695, + "3": 3360, + "32": 448, + "4": 1530, + "48": 448, + "5": 300, + "8": 1464 + }, + "paid_calls": 55998, + "productive_fields": 7688, + "rank_margin": 608, + "scalar_allowance": 2490856, + "schema": "source-bound-p7-all-fresh-complete-native-controller/1", + "source_sha256": { + "research/kappa-0023-productive-jobs/dependencies/kappa-next-regime/bit-compression/carrier-reuse/reference/joint_pair_dag.py": "8a0de761642d21919e969475c3f13e5d01a4bae7343c1e1f37c586d94b676a85", + "research/kappa-0023-productive-jobs/dependencies/kappa-next-regime/direct-decoder/sources/DATA-PHASES.json": "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa", + "research/kappa-rebuild/bit/complex_controller_factor.py": "1de9aaf918e6a4f2f5448754c1f3c3da3b85e6257849ebd097af09859c4e5497", + "research/kappa-rebuild/bit/mixed_productive_bit.py": "b32291b0db7fc0d332ec444c70746ab0fb03351d2e50546f8bcb64060e3ff95e", + "research/kappa-rebuild/complex/fresh-certificates/THREE-base-HELPER-BOUNDARIES.json.gz": "f90517e395bde58c72cacd5d3481c4ea31d459fe4535384ac16547ac40460555", + "research/kappa-rebuild/complex/full-identity-certificates/RESULT.json": "943d5fad2fc529f470df05a35446e07ecaef7344abfce450d2c2eb2c9b3798f6", + "research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-CANONICAL.json.gz": "6418ec3da24d548a57f5c3fe5b9062c26c9478e638504a61c387f5cfb5f4ed61", + "research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-NATIVE.json.gz": "c54b0a3e129d28e6dbf74fa731fc3bb70fe3c6705f07256750fbecddcc842d39", + "research/kappa-rebuild/complex/full_identity_rebuild.py": "9af2ffbb0038c92e2a7d281081b0daaeadce75b11b566e5427845dc1af91e33d", + "research/kappa-rebuild/controller/P3-NATIVE-COVER.json.gz": "facfc6d6ecde151afb7e6a167776f3fdaac1c816e785a21a39f7f0bfd9140f3f", + "research/kappa-rebuild/controller/p3_native_cover.py": "fae71fcbbd20b9ee73b049cf6f43ea1d048217fb15feb6055a007e47da3363fe", + "research/kappa-rebuild/transfer-audit/p3_cover_audit.py": "a0fe9a26f77556e83b31b0c91fea909d6f3d8209d0f9f7ad4e5bc1375d33615e", + "research/kappa-rebuild/transfer-audit/p3_native_audit.py": "5504a55a50546418d10c522984438cdeedb44993f7c1dab7bd4aa1ae0515d902" + }, + "status": "PASS_EXACT_LAURENT_ALL_MAIN_CONTACTS_ENDPOINTS_AND_FULL_IDLE_PHASES", + "targets": { + "121": 224, + "25": 448, + "41": 448, + "5": 420, + "57": 448, + "6": 270, + "7": 840, + "8": 1395, + "9": 3195 + }, + "whole_idle_profile": { + "16": 448, + "32": 448, + "48": 448, + "8": 1344 + } + }, + "new_max_target_encoding": "121^6240", + "new_min_target_encoding": "11^6240", + "normalized_moment_upper_rational": "10240625039/10240638976", + "paid": { + "1": 37305, + "16": 448, + "2": 10695, + "3": 3360, + "32": 448, + "4": 1530, + "48": 448, + "5": 300, + "8": 1464 + }, + "paid_rank_one_moment": 131115, + "productive_fields": 7688, + "rank_one_surplus_encoding": "131723^6240-131115^6240", + "schema": "p7-paid-target-completion-tensor-certificate/1", + "scope": "Exact moment bounds for the documented chronological native product, paid target completion and disjoint splitting. Native all-column, precision, storage, analytic and fixed-tape premises remain separate; no full multiplication theorem is formally verified.", + "source_sha256": { + "research/kappa-rebuild/architecture/mixed_target_probe.py": "011c3c9d0cf81103dc84d709a0e36793eb7c5ae3f23c85eac27650ef13afa04a" + }, + "status": "PASS_EXACT_P7_TARGET_COMPLETION_STRICTIFICATION", + "strict_moment_verified": true, + "strictification_gap": { + "lower": "0.00000136095023295546357907266586564", + "upper": "0.00000136095023295546357907266586565" + }, + "strictification_gap_rational": "13937/10240638976", + "target_floor_base": 11, + "target_floor_encoding": "11^6240", + "target_rank_one_moment": 131723, + "targets": { + "121": 224, + "25": 448, + "41": 448, + "5": 420, + "57": 448, + "6": 270, + "7": 840, + "8": 1395, + "9": 3195 + }, + "tested_saving": "33581/12500000", + "theta_upper": "25/26" + } +} diff --git a/research/direct-flow-expanded-audit/vendor/PR4476-README.md b/research/direct-flow-expanded-audit/vendor/PR4476-README.md new file mode 100644 index 0000000000..c6db026010 --- /dev/null +++ b/research/direct-flow-expanded-audit/vendor/PR4476-README.md @@ -0,0 +1,56 @@ +# Independent check of #4436 §3 on raw p7: widths, routing slots and growth + +**Claim type:** an independent finite check plus an exact counting identity. **No new κ.** It covers §3 +("Nested divisible widths and complete count bounds") of zxv's +[#4436](https://github.com/CrocSwap/integer-mult-bounds/pull/4436), which my #4456 left uncovered. It uses +the same independent flow implementation as #4456. + +## What is checked, for every rank 121 ≤ n ≤ 2000 + +Let `W = Σ_k W_k = 7688` and `P = Σ_r P_r = 55998` be the unit's target and paid multiplicities, and +`h = G(n)`. + +1. **The width factor.** `S_n` (total source weight) is at most `C = W(W+P+1)^{h+1}`. The worst ratio + is `S_n/C = 1.6·10⁻⁵`, so the bound is very loose. +2. **An exact slot identity.** + + sources + exits + 2·matched = U·(W + P). + + Each unit's `W` target slots are either matched or sourced, and its `P` paid positions are either + matched or exits. So #4436's routing count (sources, exits, unit target slots and unit paid positions) + equals `2(W+P)U − 2·matched` **exactly**. That is at most `2(W+P)U`, with equality only when nothing + is matched. +3. **Growth.** `log B_N = Σ log S_n` grows like `N log N`. The ratio `log B_N/(N log N)` is 1.094, 1.756, + 1.965 and 2.033 at `N` = 500, 1,000, 1,500 and 2,000. A local run gives 2.066 at `N = 3,000`, so the + ratio is levelling off near 2. + +## Not covered + +- §3's telescoping `B_N·N − P_N = Δ·Qcol_N`, which needs the fully expanded program. The per-flow + identity is in #4456. +- The record and description bounds. +- Native premises. + +## Reproduce + +```sh +python3.12 -B scripts/research_package.py --package research/direct-flow-width-check --check-only +python3.12 -B scripts/research_package.py --package research/direct-flow-width-check +``` + +The verifier prints `PASS_DIRECT_FLOW_WIDTH_CHECK`, using only the standard library. + +## Open next questions + +1. **Tighten the constructive width (#4436 open question 3).** + - *Why it matters:* the observed `S_n` sits about 10⁵ times below `C`. + - *First step:* replace `C` by the exact `S_n` recurrence from the flow, and bound it by + `(W+P)·(units at the top layer)`. + +## Credit + +- The construction and the bounds are zxv's (#4436). +- The lockstep construction is Jacob Alan Sussman's Theorem 1G. + +Prepared by Ryanson Jonathan with substantial Claude Code (Claude Opus 5.5) assistance. +Apache-2.0. diff --git a/research/direct-flow-expanded-audit/vendor/SUSSMAN-LICENSE b/research/direct-flow-expanded-audit/vendor/SUSSMAN-LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/direct-flow-expanded-audit/vendor/SUSSMAN-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/direct-flow-expanded-audit/vendor/SUSSMAN-NOTICE b/research/direct-flow-expanded-audit/vendor/SUSSMAN-NOTICE new file mode 100644 index 0000000000..0b06967886 --- /dev/null +++ b/research/direct-flow-expanded-audit/vendor/SUSSMAN-NOTICE @@ -0,0 +1,994 @@ +Walsh-Hadamard power saving (wht-power-saving-lean) +Copyright 2026 Jacob Sussman + +Repository: https://github.com/jacobalansussman/wht-power-saving-lean + +This repository is not a project of OpenAI. OpenAI did not write, review or +endorse it. The package name "OAI" and the namespace "OAI.PowerSaving" are +those of openai/math and are kept only because the new files extend that +development. + +This repository is not a project of CrocSwap/integer-mult-bounds either. Its +authors did not write, review or endorse it. Sections 6, 9 and 10 say what +is taken from their repository. + +This repository contains files from, and files derived from, the repository +"openai/math" (https://github.com/openai/math), family 130, "Exact Fourier +transforms below n log n", at commit fd4aeeb2ee4fc729c18d98444fed42fd0529eeeb. +That repository is published under the Apache License, Version 2.0. A copy of +the licence is in the file LICENSE. The upstream repository has no NOTICE file +and its licence text names no copyright holder; the files are attributed here +to the authors of openai/math (OpenAI). + +1. Unmodified upstream files. + The 89 files under OAI/Computability/ are byte-for-byte copies of the files + with the same paths under lean/ in openai/math at the commit above. They + have not been changed. Modified copies of some of them are under + Work/Fourier/ and Work/FourierE8/ and are listed in section 7. + One more file of openai/math is here unchanged, outside the Lean build: + third-party/openai-math/lean/ComparatorChallenges/UniformFourier.lean is a + byte-for-byte copy of lean/ComparatorChallenges/UniformFourier.lean at the + commit above (the statement of OpenAI's Fourier challenge). It is included + so that the modified copy named in section 2 can be compared with it. + +2. Files that contain upstream text. + - Work/CarrierCheck/ChallengeB2Ke16x.lean, + Work/CarrierCheck/ChallengeB2Ke16xR.lean, + Work/GCert/Data/ChallengeB2Gp193x.lean, + Work/GCert/Data/ChallengeB2Ge8x.lean and the text template + tools/gen/templates/ChallengeB2L16x.lean.txt each contain, as their + lines 22-270, lines 9-257 of + lean/ComparatorChallenges/UniformFourier.lean of openai/math (the RAM cost + model), unchanged. Everything else in these files was written for this + repository. + - Work/Fourier/UniformFourierChallenge.lean is a modified copy of + lean/ComparatorChallenges/UniformFourier.lean of openai/math (the + statement of OpenAI's Fourier challenge, 336 lines). Changes: a comment + was added at the top; the exponent 1 - 1/(10^(13:ℕ)) was replaced by + 1 - 7474546/(10^(10:ℕ)); seven names received the suffix "Z" + (decimalExponent, decimalTime, TimeBounds, DFTGoal, ConvGoal, + transform_main, convolution_main). Everything else in the file is the + upstream text, unchanged. See section 7. + - Work/FourierE8/UniformFourierChallenge.lean is a second modified copy + of the same upstream file, for the fourth result, with the same three + kinds of change: a comment added at the top; the exponent replaced by + 1 - 8762478/(10^(10:ℕ)); the suffix "E8" on the same seven names. + Everything else in the file is the upstream text, unchanged. See + section 7. + - Work/Scratch/Engine.lean and Work/Block/Engine.lean contain copies of + proofs of openai/math, changed for this repository: sections 1, 2 and 5 + of Work/Scratch/Engine.lean are upstream proofs with the batch layout + renamed, and both files contain a copy of the private upstream theorem + "hills_project" (lean/OAI/Computability/FourierTransform/ + TensorProgram.lean) with its envelope generalised. The comments in the + two files mark these places. + - lakefile.lean is adapted from lean/lakefile.lean of openai/math: the same + package name, toolchain, package option and Mathlib pin; every other + dependency was removed and the libraries of this repository were added. + lean-toolchain is a byte-for-byte copy of lean/lean-toolchain. + lake-manifest.json lists Mathlib and its dependencies at the revisions of + lean/lake-manifest.json. + - RELATED-WORK.md reproduces the BibTeX entries of two manuscripts of + openai/math. + +3. New files that build on upstream proofs. + The other files under WHTCheck/ and Work/ were written for this + repository. They import the upstream files, and several of them generalise + or adapt proofs of upstream files (for example Work/Block/Recursion.lean, + which says so in its header). They are changes and additions made for this + repository and are not part of openai/math. + +4. How the new files were made. + Jacob Sussman made the new files on 2026-10-08, 2026-10-09 and 2026-10-10 + by directing a team of AI agents (Claude). The agents wrote the new Lean + files, the certificate data and the generator scripts. They made the + rebuild scripts under tools/rebuild/, in part by adapting programs of + CrocSwap/integer-mult-bounds (section 6): ten of the thirteen on + 2026-10-09, tidied for this repository on 2026-10-10, and three on + 2026-10-10. On 2026-10-10 they also wrote the search programs under + tools/e8/ and found with them the certificate of the fourth result + (section 8). See README.md, section 4. + +5. Ideas taken from other public work. + The network of the first result uses ideas published by others, among them + the helper circuit "NStar3" (Swapnil-jain/integer-mult-kappa, which credits + CrocSwap pull request #36 and Paureel for parts of it), its transfer to + family 130 (shea256/fourier-transform-below-nlogn), and "carrier links" and + "whole-residual batching" (pull requests to CrocSwap/integer-mult-bounds). + No file of Swapnil-jain/integer-mult-kappa or of + shea256/fourier-transform-below-nlogn is included here. One comment in + Work/Scratch/Engine.lean quotes three counts reported in + Swapnil-jain/integer-mult-kappa and names that source. The general frame + lemma that Work/GFrame proves is stated in + notes/general-clifford-frames.tex of CrocSwap/integer-mult-bounds; its Lean + proof was written for this repository. The credits, with links, are in + RELATED-WORK.md. + +6. Data derived from, and programs adapted from, + CrocSwap/integer-mult-bounds (second result). + The helper circuit of the second result is the paired-cube circuit of the + repository "CrocSwap/integer-mult-bounds" + (https://github.com/CrocSwap/integer-mult-bounds), in the state of its pull + request #193. It is the design of that community: icekylinx (pull requests + #144 and #184), eumemic (#168, and #117 behind its modules), ikeboy / + Avi Eisenberg (#191 and #193), with an664 (#128) credited there for the + workspace-sharing principle, and DaysSky (#162) and chafreaky (#163) + credited by #168 for its closure-compiled carrier arcs and for the + fusion of its single-target outputs. That repository is published under + the Apache + License, Version 2.0 (the same licence text as the file LICENSE). Its + NOTICE file begins "A sharper exponent for integer multiplication / + Copyright 2026 Douglas Colkitt" and says that the community release "is + not solely Douglas Colkitt's work". A complete copy of that NOTICE file, as + it is at the head of pull request #193, is in + third-party/CrocSwap-integer-mult-bounds/NOTICE. + + The data were taken from these files of that repository. They were loaded + as data by the programs under tools/rebuild/. No program of that + repository was run, and none is included here unchanged; six of the + programs under tools/rebuild/ are adapted from programs of that + repository ("Programs", below). + - at the head of pull request #168 (eumemic), + 4a3c769e5c5430e7114c4d3e099ff34664677f17: + references/paired-cube/sources/local_L1.json + references/paired-cube/sources/tmod_TE_TD_TB3_1_1_4_full_6.0617964e-4.json + references/paired-cube/sources/pmod_J0_full_6.0666810e-4.json + references/paired-cube/sources/qmod_climb3u_best.json + references/paired-cube/selected-module/matching-arcs.json + references/paired-cube/physical/frames.json + - at the head of pull request #193 (ikeboy), + 187e1010ac8b259af8e9b5166f68b64bc27b4b47: + research/source-assisted-v4/data/physical-pairs.json + + Two more files at the head of pull request #168 are read for comparison + only: the programs print whether their graph and their counts agree + with them. Nothing in the certificate is taken from them: + references/paired-cube/selected-module/SOURCE.json + certificates/paired-cube-complex-input.json + + One more file is fetched and read only on request. No certificate and + no Lean module of this repository is made from it; the documentation + gives its sha256 and the price that tools/gx/gxdry.py computes for + the certificate that the rebuild makes from it: + - at the head of pull request #233 (chafreaky), + 109a857a329d18ed5552d5573f17ddfa886ae57f: + research/source-assisted-v4-layer/witness/physical-pairs.json + + None of these ten files is included in this repository. + tools/rebuild/fetch_inputs.py fetches them and checks their sha256. + + Files of this repository that contain data derived from them: + tools/certificate/gcert1-p11-pr193.json.gz and the Lean data modules + generated from it, Work/GCert/Data/Gen/P193*.lean and the files they import + from Work/GCert/Data/Gen/P193/; its block counts are also in the generated + modules Work/GCert/Data/P193Price.lean, RateB2Gp193.lean, RateB2Gp193x.lean + and InstB2Gp193.lean. + Changes made: the circuit was rebuilt from those data as one explicit, + renumbered list of additions with a table of frames, in the certificate + format "gcert/1" of this repository; its 1,980 in-place steps were written + as pairs of additions with rescaled coefficients; the Lean data modules + were generated from that list. No file of that repository is included + unchanged, except the copy of its NOTICE file named above. + + Programs. The Python files under tools/rebuild/ were made by the agents + (section 4), who read programs of that repository as text and ran none + of them. Six of the thirteen files are adapted from those programs: + the parts named below follow the outside program statement by statement + or method by method, with the layout changed, some names changed and + the parts that this certificate does not use left out. Each of the six + says so in its first lines. + - tools/rebuild/compile.py: the function closure follows + compile_closure of scripts/paired_cube/closure.py; the function + select follows the first part of select of + scripts/paired_cube/gauges.py. + - tools/rebuild/graphgen.py: the class Gen follows the class Graph of + scripts/paired_cube/graph.py; its method fuse follows the branch + "f8:" of merge_outputs of scripts/paired_cube/modules.py, which + fuses the three single-target outputs of a port into one. That + branch came with pull request #168 (eumemic), which says of the + fusion that it "follows #163's same-singleton fusion" and credits + it so: "Same-singleton output fusion: @chafreaky (#163); the fold + orders here come from our own search." + - tools/rebuild/aligned.py: the functions op_tags, local_values and + build follow op_tags, local_values and main of + research/source-assisted-v4/source_aligned_local_v4.py, except its + search for pairs and the records it writes. + - tools/rebuild/stage.py: the order of the events, the backward pass + (responses) and many names are those of + research/terminal-sinks/sinks_gate.py and of + scripts/paired_cube_physical.py; the event records and the exact + arithmetic were written for this repository, and the frame scan + was rewritten so that it returns every block. + - tools/rebuild/build.py: the function target_hist and the field names + of profile follow the last part of select of + scripts/paired_cube/gauges.py; the calls that make the graph and its + hash follow regenerate of scripts/paired_cube_producer.py. + - tools/rebuild/f2.py: the function perp follows perp, and the second + half of the function rref follows the second half of basis, of + scripts/paired_cube/frames.py. + The outside programs are those at the two commits named above + (source_aligned_local_v4.py at the second, the others at the first). + Of the other seven files, rebuild.py, fetch_inputs.py, rbpaths.py, + rewrite.py, phys.py and emit.py were written for this repository. + modules.py was written for this repository too; for the three module + files it checks the contract that the outside + scripts/paired_cube/modules.py states for them in its functions + triple_module_from, pair_module_from and all_but_one_from, each of + which is marked there "eumemic, Claude assistance; Apache-2.0". + + Notices and attribution sentences in the first lines of those outside + programs, quoted with the line numbers of each file at its commit. + The other lines of each header say what the program does and name no + person: + + scripts/paired_cube/closure.py, lines 4-5 (pull request #168, + eumemic; from pull request #162, DaysSky): + Copyright 2026 DaysSky (PR162, + research/extended-links/cxlinks.py), Apache-2.0; moved here + unchanged apart from this header and the imports (eumemic, Claude + assistance). + + scripts/paired_cube/graph.py, modules.py, frames.py, gauges.py and + scripts/paired_cube_producer.py (pull request #144, icekylinx; + graph.py, modules.py and paired_cube_producer.py changed in #168, + eumemic), the two comment lines at the top of each: + Copyright 2026 icekylinx. Apache-2.0. + Developed with GPT-6 Astra assistance; integrated with Codex + assistance. + graph.py, lines 6-9: + The coarse positive query modules restrict the already adopted + PR117 DAG (eumemic; Apache-2.0; Claude assistance; + cbb05ce504d571546d9b7794c186a613c659c3bf). The paired-channel + decomposition and this assembly are new work for icekylinx with + OpenAI GPT-6 Astra assistance. + modules.py, lines 6-7: + The pair-disjoint module is a specialization of the already + adopted PR117 positive DAG (eumemic, Apache-2.0, pinned + cbb05ce504d571546d9b7794c186a613c659c3bf). + modules.py, line 272, above merge_outputs: + Output merging (pmerge.py variants; eumemic, Claude assistance; + Apache-2.0). + frames.py, line 7: + New work for icekylinx, OpenAI GPT-6 Astra assistance. + paired_cube_producer.py, line 8: + Copyright 2026 icekylinx, Apache-2.0; OpenAI GPT-6 Astra + assistance, inherited PR117 notices. + + scripts/paired_cube_physical.py, lines 4-7 (pull request #168, + eumemic): + Prepared by eumemic with Anthropic Claude assistance. Apache-2.0. + The signed word, frozen arcs, gauges, chronology and shared-core + accounting are icekylinx's PR144. Frame descent under PR130's + general Clifford frames and compensated birth-cut reuse follow + PR131 and jamesyc's PR124; deadline (late) compensation reads + follow PR143. + + research/terminal-sinks/sinks_gate.py, lines 4-6 (pull request + #168, eumemic): + The substitution is the terminal-sink lemma of PR #166 by jamesyc + (closed by its author), independently audited here: this gate's + own frame scans, replay and controls carry the soundness argument + and do not use #166's checker. Gate, audit and integration by + eumemic with Anthropic Claude assistance. Apache-2.0. + + research/source-assisted-v4/source_aligned_local_v4.py, lines 4-9 + (pull requests #191 and #193, ikeboy / Avi Eisenberg): + Derived from + research/source-assisted/decision/source_aligned_local.py + (icekylinx, GPT-6 Astra assistance, Apache-2.0). Only the three + frozen query modules change: this copy reads PR168 v4's selected + modules (eumemic, Claude assistance) from + references/paired-cube/sources instead of the PR168 fd25adb7 + modules. The local configuration, arc transport, frame + inheritance and physical layer code are unchanged. + + Notices of that NOTICE file that pertain to these data, quoted: + + Paired-cube and shared-core extension, 9 October 2026 + Copyright 2026 icekylinx + + Source-assisted common-frame extension (2026-10-09) + Copyright 2026 icekylinx. Apache-2.0. + Substantial dependency: eumemic PR168, + fd25adb7fbaa12ee761d02c733c54d1d2a7687ee + + The full text of both notices, and the notices of the work they build on, + are in the copy named above. The credits, with links and with the words of + pull request #193 about its own sources, are in README.md ("Whose circuit + this is") and in RELATED-WORK.md, section 1. + +7. Modified copies of upstream files (third and fourth results). + The files listed below are copies of files of openai/math at the commit + above, changed for this repository. Each begins with a comment that names + the upstream file it is derived from and states what was changed. The + upstream originals under lean/OAI/Computability/ are in this repository + as well, unchanged (section 1), and the copies import them. The upstream + challenge file lean/ComparatorChallenges/UniformFourier.lean is in this + repository in both forms: unchanged under third-party/openai-math/ + (section 1) and modified (section 2). + + - Work/Fourier/ArbitraryLength.lean: modified copy of + lean/OAI/Computability/FourierTransform/ArbitraryLength.lean (224 + lines; 159 of them unchanged in the copy). Changes: identifiers renamed + on 64 lines (18 names: 15 with the suffix Z, 3 with Z inserted); 1 + import line replaced by 1; 15 comment lines added; no other change to + the code. + - Work/Fourier/Asymptotics.lean: modified copy of + lean/OAI/Computability/FourierTransform/Asymptotics.lean (187 lines; + 112 of them unchanged in the copy). Changes: identifiers renamed on 74 + lines (32 names: 26 with the suffix Z, 6 with Z inserted); 1 import + line replaced by 1; 15 comment lines added; no other change to the + code. + - Work/Fourier/Axioms.lean: written for this repository (not a copy of an + upstream file). + - Work/Fourier/ConvolutionProgram.lean: modified copy of + lean/OAI/Computability/FourierTransform/ConvolutionProgram.lean (100 + lines; 77 of them unchanged in the copy). Changes: identifiers renamed + on 22 lines (10 names: 9 with the suffix Z, 1 with Z inserted); 1 + import line replaced by 1; 15 comment lines added; no other change to + the code. + - Work/Fourier/Goal.lean: written for this repository; contains lines of + upstream files: of its 7 code lines, 6 are lines of + lean/OAI/Computability/FourierTransform/Goal.lean (original lines 35, + 75-77, 79, 81): unchanged: its lines 25; with identifiers renamed: its + lines 21, 24, 26, 28, 30. + - Work/Fourier/Main.lean: modified copy of + lean/OAI/Computability/FourierTransform/Main.lean (151 lines; 90 of + them unchanged in the copy). Changes: identifiers renamed on 59 lines + (40 names: 35 with the suffix Z, 5 with Z inserted); 1 import line + replaced by 2; 24 comment lines added; other code lines changed: 1 of + the original, 1 of the copy (copy line 59). + - Work/Fourier/Seam.lean: written for this repository; contains lines of + upstream files: of its 122 code lines, 15 are lines of + lean/OAI/Computability/FourierTransform/TensorProgram.lean (original + lines 36-37, 95-96): unchanged: its lines 93-94, 113-114, 141-142, + 163-164, 185-187, 194-196; with identifiers renamed: its lines 184; 3 + are lines of lean/OAI/Computability/FourierTransform/TensorSaving.lean + (original lines 83-84, 114): with identifiers renamed: its lines 45-46, + 59; 1 is a line of lean/OAI/Computability/FourierTransform/Main.lean + (original line 60): with identifiers renamed: its lines 213. + - Work/Fourier/SectorAlgorithm.lean: modified copy of + lean/OAI/Computability/FourierTransform/SectorAlgorithm.lean (224 + lines; 162 of them unchanged in the copy). Changes: identifiers renamed + on 61 lines (17 names: 13 with the suffix Z, 4 with Z inserted); 1 + import line replaced by 1; 15 comment lines added; no other change to + the code. + - Work/Fourier/SynchronizedAlgorithm.lean: modified copy of + lean/OAI/Computability/FourierTransform/SynchronizedAlgorithm.lean (126 + lines; 94 of them unchanged in the copy). Changes: identifiers renamed + on 31 lines (12 names: 10 with the suffix Z, 1 with Z inserted, 1 + other), the other being "canopy" to "Grove.canopy" (5 lines); 1 import + line replaced by 1; 16 comment lines added; no other change to the + code. + - Work/Fourier/TransformProgram.lean: modified copy of + lean/OAI/Computability/FourierTransform/TransformProgram.lean (146 + lines; 94 of them unchanged in the copy). Changes: identifiers renamed + on 51 lines (21 names: 19 with the suffix Z, 2 with Z inserted); 1 + import line replaced by 1; 15 comment lines added; no other change to + the code. + - Work/Fourier/UniformBounds.lean: modified copy of + lean/OAI/Computability/FourierTransform/UniformBounds.lean (183 lines; + 115 of them unchanged in the copy). Changes: identifiers renamed on 67 + lines (29 names: 25 with the suffix Z, 4 with Z inserted); 1 import + line replaced by 1; 15 comment lines added; no other change to the + code. + - Work/Fourier/UniformFourierChallenge.lean: modified copy of + lean/ComparatorChallenges/UniformFourier.lean (336 lines; 328 of them + unchanged in the copy). Changes: identifiers renamed on 7 lines (7 + names: 7 with the suffix Z); 12 comment lines added; other code lines + changed: 1 of the original, 1 of the copy (copy line 281). + - Work/Fourier/WorkingCompiler.lean: modified copy of + lean/OAI/Computability/FourierTransform/WorkingCompiler.lean (153 + lines; 104 of them unchanged in the copy). Changes: identifiers renamed + on 48 lines (14 names: 14 with the suffix Z); 1 import line replaced by + 1; 15 comment lines added; no other change to the code. + - Work/Fourier/WorkingPreparation.lean: modified copy of + lean/OAI/Computability/FourierTransform/WorkingPreparation.lean (212 + lines; 156 of them unchanged in the copy). Changes: identifiers renamed + on 55 lines (30 names: 28 with the suffix Z, 2 with Z inserted); 1 + import line replaced by 1; 15 comment lines added; no other change to + the code. + - Work/Fourier/WorkingTransform.lean: modified copy of + lean/OAI/Computability/FourierTransform/WorkingTransform.lean (119 + lines; 91 of them unchanged in the copy). Changes: identifiers renamed + on 27 lines (9 names: 8 with the suffix Z, 1 with Z inserted); 1 import + line replaced by 1; 15 comment lines added; no other change to the + code. + + Changes made to the eleven copied proof files: every declaration received + the letter "Z" in its name (as a suffix of its own name, or of the name + of the declaration it belongs to), so that it does not collide with the + upstream declaration of the same name; the upstream exponent "alpha" + (1 - 2/10^11) and the bound "hills" defined from it were replaced by + "alphaZ" (1 - 7474547/10^10) and "hillsZ", which are defined in + Work/Fourier/Seam.lean, and the single use of the upstream theorem + "hills_program" by "hillsZ_program"; the five definitions of the upstream + statement that contain its exponent (decimalExponent, decimalTime, + TimeBounds, DFTGoal, ConvGoal) were replaced by the versions of + Work/Fourier/Goal.lean, whose exponent is 1 - 7474546/(10^(10:ℕ)); + the import lines point to the copies; a header comment was added. + Two further changes: in the copy of Main.lean the same constant stands + once as the literal 2/10^11 and was replaced there too, and the two + final theorems of that copy received a documentation comment; in the + copy of SynchronizedAlgorithm.lean the name "canopy" was written out as + "Grove.canopy" in 5 places, because the short name is shadowed in the + larger environment of the copy. The script also renamed three names + inside upstream comments; the comments are otherwise the upstream ones + and describe the upstream network. + The proofs are those of openai/math. The copies were made by the script + tools/fourier/mkchain.py of this repository. + + Work/Fourier/Goal.lean contains copies of those five definitions of + lean/OAI/Computability/FourierTransform/Goal.lean, with the exponent + replaced and the suffix "Z" on the five names. + + Work/Fourier/Seam.lean was written for this repository. It repeats the + statement of the upstream theorem "hills_program" (TensorProgram.lean) and + the definition of "hills" (TensorSaving.lean) with the two names replaced; + its header says so. + + Fourth result. The 15 files under Work/FourierE8/ repeat the 15 files + under Work/Fourier/ for the kernel program of the fourth result, file + for file and under the same file names: ArbitraryLength.lean, + Asymptotics.lean, ConvolutionProgram.lean, Goal.lean, Main.lean, + SectorAlgorithm.lean, SynchronizedAlgorithm.lean, TransformProgram.lean, + UniformBounds.lean, UniformFourierChallenge.lean, WorkingCompiler.lean, + WorkingPreparation.lean, WorkingTransform.lean, Seam.lean and + Axioms.lean. The eleven copied proof files, + Goal.lean and UniformFourierChallenge.lean are modified copies of the + same upstream files as their namesakes above, made by the script + tools/fourier/mkchain_e8.py (a copy of tools/fourier/mkchain.py with + its constants changed). The changes are those described above with + three differences: the suffix is "E8" where the copies of the third + result have "Z"; "alphaE8" is 1 - 8762479/10^10; and the exponent of + Work/FourierE8/Goal.lean is 1 - 8762478/(10^(10:ℕ)). Each of these + files begins with a comment that names the upstream file it is derived + from and states what was changed. Work/FourierE8/Seam.lean and + Work/FourierE8/Axioms.lean were written for this repository: they are + Work/Fourier/Seam.lean and Work/Fourier/Axioms.lean with names and + numbers replaced, and the seam repeats the same upstream statement and + definition as the seam of the third result. The proofs are those of + openai/math. + + The work of others that the third result follows (danadran01, shea256, + eumemic) is credited in README.md ("Whose reduction this is") and in + RELATED-WORK.md, section 1. No file of their repositories is included + here. + +8. The certificate of the fourth result and the search programs. + tools/certificate/gcert1-e8-r783.json.gz, the Lean data modules + generated from it (Work/GCert/Data/Gen/E8*.lean, Work/GCert/Data/Gen/E8/ + and the modules of Work/GCert/Data/ with E8 or B2Ge8 in their names) and + the Python programs under tools/e8/ were made by the agents for this + repository on 2026-10-10 (section 4). The circuit in that certificate + is not the circuit of section 6, and no data file of + CrocSwap/integer-mult-bounds was loaded to make it. It uses three + devices that were published by others in pull requests to that + repository: + - the in-place pair, a + b and a - b formed on the two arrays that held + a and b: icekylinx (#184), carried in #191 and #193 (ikeboy); + - the re-use of a finished helper with a compensating read: jamesyc + (#124) and eumemic (#143); + - the late pairing rule, the choice of which finished helper a new + value takes: Chafik Boukhalfa (the account chafreaky), #200 and #233, + and pull request #2 of this repository. The search programs apply the + idea with a greedy rule of their own; his program, his pairs and his + certificate were not used. + No program of that repository is included in tools/e8/, imported or + run by it. The programs of tools/e8/ have not been compared statement + by statement with the programs of that repository, as those of + tools/rebuild/ were (section 6). The integer programme of + tools/e8/ is solved with the open-source solver HiGHS, called through + SciPy (scipy.optimize.milp), with NumPy; none of the three is included + here. The credits, with links, are in README.md ("Whose ideas the new + unit uses") and in RELATED-WORK.md, section 8. + +9. Files under community/ (fifth revision). + The folders under community/ are packages of Lean files laid over a + clone of Ryan Shea's repository "shea256/fourier-transform-below-nlogn" + (https://github.com/shea256/fourier-transform-below-nlogn) at commit + 52394849c7ecf3412d39b925d75fc7fdb98994d8. That repository is published + under the Apache License, Version 2.0. Its NOTICE files are copied, + unchanged, into third-party/shea256-fourier-transform-below-nlogn/ + (NOTICE, lean/complex588/NOTICE and lean/complex588/NOTICE.complex588); + they apply to the material below that comes from his repository. Notices + of those files that pertain to it, quoted: + + Finite Network Improvements for the Exact Discrete Fourier Transform + Copyright 2026 Ryan Shea + + The source circuit is the atm3 provider reconstructed from Jeremy + Kothe's CrocSwap/integer-mult-bounds PR588, commit + 6d0e53b66c29abd17981881a09eaff41ac862d85. + + The dedicated entrance-gauged nine-stage layout is Dugongue's #401 on + Zhihao Chen/jacklightChen's #377, building on DaysSky's bridged layout + and lydakis's bank patterns. [...] These files are taken from Nil + Mamano's published Big O Speedrun submission, bigospeedrun/verifier + commit 025396033eede56e3af6e02ed2679ba828381bd5. + + The repository bigospeedrun/verifier (https://github.com/bigospeedrun/ + verifier) is published under the Apache License, Version 2.0. + + a. Modified copies of OpenAI's statement file. Each file named + UniformFourierChallenge.lean under community/*/overlay/Work/ and + community/c588m/variants/*/Work/ (18 files: the folders FourierC588 + and FourierC588Neg of c588-repack; FourierC588M and FourierC588MNeg of + c588m and of its two variants; FourierC588MH, FourierC588MHNeg, + FourierC588MHH and FourierC588MHHNeg of c588mhh; FourierU8X and + FourierU8XNeg of u8x; FourierU8XM and FourierU8XMNeg of u8xm; + FourierU8XMHH and FourierU8XMHHNeg of u8xmhh) is a + modified copy of lean/ComparatorChallenges/UniformFourier.lean of + openai/math at the commit above. Changes: the exponent + 1 - 1/(10^(13:ℕ)) is replaced by the package's exponent (in a file + whose folder ends in Neg, one unit stronger); the seven names of + section 2 receive the package's suffix; and a comment, beginning on + line 3, that says so was added after the build and the checks. The + comment gives the sha256 of the file without it, the file that was + compiled and checked. The copies in c588-repack are made from Shea's + copies at the same paths (suffix C588), with only the exponent + changed. Everything else in these files is the upstream text, + unchanged. tools/community/package_check.py checks each of them + against third-party/openai-math/. + Seven more files hold the same upstream text, changed, without such a + comment inside them, because they are kept as they were compiled or + fetched; a file NOTICE.txt in each of their folders says what was + changed: + - community/c588m/logs/skeptic-statement/fetched/Work/FourierC588M/ + and FourierC588MNeg/UniformFourierChallenge.lean (2 files): the + copies of c588m's two statement files that an independent agent + fetched from the build machine, as compiled (the files of + community/c588m/overlay/ at the same paths without their comment); + - community/base-logs/ref/mine-12331685.lean, mine-12331686.lean and + mine-Y-7547360.lean (3 files): the agents' own derivations of the + statement, with the exponent and the suffix (C588 or Y) changed; + - community/c588-repack/logs/colab/submission/VerifierChallenge.lean + and community/u8xmhh/logs/colab/bos-H-stage/VerifierChallenge.lean + (2 files): the challenge of the offline re-creation of the + leaderboard's verifier, which is challenges/dft/UniformFourier233.lean + of bigospeedrun/verifier (itself a modified copy of OpenAI's file + whose first lines say so) followed by the target theorem Race.bound. + community/base-logs/ref/ also holds three unmodified copies of + OpenAI's file (UniformFourier-.lean, byte-identical to + third-party/openai-math/). + + b. Modified copies of OpenAI's proof files. In each package, the folder + Work/Fourier/ (for example Work/FourierC588MHH/) holds copies + of eleven files of lean/OAI/Computability/FourierTransform/ of + openai/math and of five definitions of its Goal.lean, made the way + section 7 describes, by Shea's script mkchain_c401g5.py or by the + agents' generators that copy its output under a new suffix (for + example community/c588mhh/generators/lean-gen/mk_fourier_h.py). Each + begins with a + comment that names the upstream file and states what was changed. In + c588-repack these are Shea's own copies with the exponent changed. + + c. Files that contain upstream text. The files Challenge.lean under + community/wht-c588/overlay/Work/ and community/wht-c588mhh/overlay/ + Work/ contain the RAM cost model of + lean/ComparatorChallenges/UniformFourier.lean of openai/math, + unchanged, as Work/GCert/Data/ChallengeB2Ge8x.lean does (section 2); + their headers say what differs from that file. + + d. Files adapted from Shea's repository in community/c588mhh/overlay/ + Work/XHost/: + - HDef.lean is a copy of lean/complex588/Work/Bridge401/GNetDef.lean, + HStage.lean of Work/Bridge401/GNetStage.lean, HCert.lean of + Work/Bridge401/GNetCert.lean, HGeom.lean of the instance part of + Work/Bridge401/GGeom.lean, and HEnd.lean is adapted from + Work/Bridge401/End.lean, each with same-run hosting added (the idea + of DaysSky's pull request #442 to CrocSwap/integer-mult-bounds) and + the names changed. In Shea's tree these files are those of Nil + Mamano's submission named above (his SOURCE_MANIFEST.json records + each as taken from submissions/dft/nmamano-dft-record/ at the + verifier commit above), written by his generator gen401.py on the + layouts credited above, with the engine of this repository. + - Frames.lean adapts lemmas of Work/Bank401/Adapt.lean and + Work/Bank401/Frames.lean of the same tree, which come from the same + submission: host_adapt is bank_adapt, host_pad is bank_pad and + slot_frames is bank_frames, each with the new coordinates chosen + inside the pending set of an idle climb. + - HSchedK.lean copies the lemmas about lists of + Work/Bridge401/SchedK.lean of the same tree, and its checker + hostSchedK is modelled on the checker schedK there; HostK.lean is + modelled on the same checker. + The header of each file names its source and says what was changed. + One header is wrong in part: that of HEnd.lean says that Shea's + End.lean was written after a file Work/Bridge377/End.lean of Jacob + Sussman's. No such file of his exists; Shea's End.lean says only that + it follows a file of that name. The header is left as it was compiled + (community/c588mhh/README.txt says so). + The generators that wrote them are under + community/c588mhh/generators/lean-gen/. The same twelve network files + of Work/XHost/, byte-identical, are also in community/u8xmhh/overlay/ + Work/XHost/. + The log community/c588mhh/supporting/L2/skeptic/logs/ + Work_Bank401_Adapt.log is of his file, compiled unchanged; the file + itself is not included. + + e. Programs from Shea's repository. + - Byte-for-byte copies of his files at the commit above, unchanged and + without a notice inside them (the same files are also in + third-party/shea256-fourier-transform-below-nlogn/ at their own + paths): + research/complex-transfer-588-596/experiments/generate_global_lean.py + is copied as tools/community/route/generate_global_lean.py and + tools/community/repack/tools/generate_global_lean.py; + research/complex-transfer-588-596/experiments/bank_reprice.py is + copied as tools/community/repack/tools/shea_bank_reprice.py; + research/complex-transfer-588-596/verification/exact_moment.py is + copied as tools/community/route/exact_moment.py, + tools/community/repack/tools/exact_moment.py, + community/c588mhh/generators/design-tools/exact_moment.py and + community/u8xmhh/generators/design-tools/exact_moment.py. + - route_price.py, in four identical copies (tools/community/route/, + tools/community/repack/tools/, + community/c588mhh/generators/design-tools/ and + community/u8xmhh/generators/design-tools/), contains functions + copied from his bank_reprice.py and generate_global_lean.py (its + header says so), changed to price a local word through his route. + - The generators of tools/community/c588m-gen/ drive or adapt his + scripts in third-party/shea256-fourier-transform-below-nlogn/ + research/; each adapted file says what it changes. + - community/c588-repack/overlay/comparator/fourier.json is his + comparator configuration, unchanged. + + f. Data. The certificate of Kothe's #588 circuit, its bank schedule and + its price, as published in Shea's repository, are in + third-party/shea256-fourier-transform-below-nlogn/lean/complex588/ + artifacts/, unchanged. The packages' certificate and data modules + are derived from them (VERIFY.md, section 11, says how). + + g. Data derived from CrocSwap/integer-mult-bounds at a later state (the + U8 circuit). The certificates of community/u8x and community/u8xm (the + files under their Work/GCert/Data/ whose paths contain U8X), + and the host table and data modules of community/u8xmhh, which are + computed from the certificate of u8xm, are derived from the U8 word of + the repository CrocSwap/integer-mult-bounds + (https://github.com/CrocSwap/integer-mult-bounds), a circuit of that + community: Jeremy Kothe's pull request #869, on his #799 (which + carries Chafik Boukhalfa's frame changes of #741), on icekylinx's + gauge44 construction (#645) and on the earlier work that their + notices name. Only the word's additions and their frames are used: + not the owner maps of #870 (Kothe, with Hao Yan's #858), #890 + (Boukhalfa) and #942 (Jonathan Capalbo), nor DreamingOfClouds' bit + supplier #589. The agents rebuilt the word with that repository's + own program + research/complex-t21-owners/vendor/pr870/construction/barch/ + reproduce_barch.py (recipe U8; #869's builder, in the copy of #870's + package that #890 keeps), in a clone at commit + 407d52ff15b2217b6e22bce44728b4c3907b6515 of its main branch + (13 October 2026). The word they obtained has the canonical sha256 + 24db880b7dab31e6af4eec8a1aba1bbbae29cd50d9a7b77cf0e9b571b3e5ae7c, the + value pinned for it in that repository (the file + LOCAL-PINS-barch-U8.json next to the program). The logs of that run are in + community/base-logs/u8-word/. No program of that repository is + included here, and the word itself is not included: the packages hold + certificates computed from it. + That repository is published under the Apache License, Version 2.0 + (its LICENSE at that commit is the same text as the file LICENSE). + Its NOTICE file at that commit differs from the copy of section 6 (the + state of pull request #193) in one passage, which + third-party/CrocSwap-integer-mult-bounds/at-407d52ff/SOURCE.txt + describes. Complete copies of that NOTICE file and of the notice files + of the folders the program comes from + (research/complex-t21-owners/NOTICE.md and, under its vendor/pr870/, + NOTICE.md, UPSTREAM-NOTICE.md and t16/NOTICE.md), unchanged and at + their paths, are in + third-party/CrocSwap-integer-mult-bounds/at-407d52ff/; they apply to + these data. + + The new files of community/ were made on 2026-10-13 the way section 4 + describes. The credits, with links, are in README.md. + +10. Files added in the fifth revision outside community/ (package/, + scripts/, tools/lever/, tools/lever-hub/, tools/reproduce-search.sh, + tools/compare_results.py, data/, results/, research/, + notes/how-the-lever-was-found.md, notes/open-directions-4.md and the + additions to third-party/). + The packages under package/ (the sixth result, package/u8x0hq, and the + recursion lever, package/leverF, package/leverB, package/leverA, package/lever2979, package/lever) are laid over the same + clone of Ryan Shea's repository as the packages of section 9 (commit + 52394849c7ecf3412d39b925d75fc7fdb98994d8, folder lean/complex588, + Apache License, Version 2.0). His licence and notice files in + third-party/shea256-fourier-transform-below-nlogn/ apply to the material + of his repository that files of these packages copy or adapt; each such + file says so in its first lines, and the packages' README.txt list them. + Shea's tree carries Lean files of Nil Mamano's published Big O Speedrun + submission (bigospeedrun/verifier, Apache License, Version 2.0): the + gauged interface, the nine-stage network, its bank lemmas and checker, + its end theorem and the templates of the Fourier chain. The hosted + networks of these packages (Work/XHost in package/u8x0hq; Work/XHostD, + Work/XHostR and Work/XHostT in the lever packages) are adapted from those + network files, as their first lines say. + + a. Modified copies of OpenAI's statement file. Each file named + UniformFourierChallenge.lean under package/*/overlay/Work/ is a + modified copy of lean/ComparatorChallenges/UniformFourier.lean of + openai/math at the commit above: in package/u8x0hq the folders + FourierU8XM, FourierU8XMHH, FourierU8X0, FourierU8X0HH and + FourierU8X0HQ and their twins ending in Neg (10 files); + in package/leverF the folders FourierL3945F and FourierL3945FNeg (2 files); in package/leverB the folders FourierL3945H and FourierL3945HNeg (2 files); in package/leverA the folders FourierL2979H and FourierL2979HNeg (2 files); in package/lever2979 the folders FourierL2979 and FourierL2979Neg (2 files); in package/lever the folders FourierL3945 and FourierL3945Neg (2 files). Changes: the exponent + 1 - 1/(10^(13:ℕ)) is replaced by the package's exponent (in a folder + whose name ends in Neg, one unit stronger), and the seven names of + section 2 receive the package's suffix. Everything else in these files + is the upstream text, unchanged. Unlike the copies of section 9, these + files carry no comment inside them: they are kept byte for byte as they + were compiled, because scripts/build-and-check.sh derives them again + from third-party/openai-math/ (scripts/derive_challenges.sh) and + compares the two. This section is their notice. + b. Modified copies of OpenAI's proof files. In each package, the folders + Work/Fourier/ hold copies of eleven files of + lean/OAI/Computability/FourierTransform/ of openai/math and of five + definitions of its Goal.lean, made by Shea's script mkchain_c401g5.py + or by the agents' generators that copy its output under a new suffix. + Each begins with a comment that names the upstream file and states + what was changed. + c. The community's files. third-party/CrocSwap-integer-mult-bounds/ + staged544-terminal-gap-fill/ holds unmodified copies of 32 files of the + folder research/staged544-terminal-gap-fill/ of pull request #3945 of + CrocSwap/integer-mult-bounds at its head + 91f81d131252db704f945891da1ea54e29d46b8b (Dugongue's branch): the owner + data (FILL, PROFILE, ORDER, DISPATCH, PLAN, TEMPLATE, the two words and + the files of #3815 that #3945 carries as old-*), README.md, PROOF.md, + RESULT.json, SOURCES.json, LICENSE, NOTICE.md and the native lineage + notices. BLOBS.txt gives the git blob hash of each, as GitHub stores + it. That repository and its contributors' branches are published under + the Apache License, Version 2.0; the NOTICE.md and native notices of + that folder apply to these files and are quoted in substance in (g). + The files of #2979 (research/rank7-joint-endframes/ of the main branch + of CrocSwap/integer-mult-bounds at 20ecf289; Marius-Paul Dumitrean, + with the files of Mason Hale's #2917 and of #2942 that its NOTICE + names) are copied unmodified, 12 of them, into package/lever2979/ + and package/leverA/ under generators/tree/wht45/lever/p-alt/dl/ + main2979/: CLAIM.json, CREDITS.md, PINS.json, ALLOCATION-PINS.json, + the allocation files DISPATCH, FILL, ORDER, PROFILE and PROVIDERS, + and the data files PARENT-base, WORD-base and WORD-extra. + package/leverA/generators/tree/wht45/allheads/aA-data/in/alloc2979H/ + holds unmodified copies of its DISPATCH, ORDER, PROFILE and PROVIDERS + (beside the table with every head kept, FILL.json.gz, see (d)). Both + packages also hold #3945's owner/inputs/PLAN.json.gz and + TEMPLATE.json.gz under generators/tree/wht45/lever/g-heads/dl/pr3945/. + The generators check every one of these copies against its sha256 + (generators/tree.sha256) before they run; the same licence and the + notices of #2979 (for PLAN and TEMPLATE, of #3945) apply to them. + Both packages also hold generators/tree/wht43/bound-check/k-word/ + tools/build_tri_869.py, an unmodified copy of the community's word + builder construction/barch/build_tri.py (the same bytes as + research/complex-t21-owners/vendor/pr870/construction/barch/ + build_tri.py of its main branch, whose notices section 9, item g, + names); the generators do not run it. + More unmodified copies of the same folder of #3945 are in package/leverF/ + and package/leverB/, under generators/tree/wht45/lever/g-heads/dl/pr3945/ + owner/: 21 of the files above, and #3945's build_fill.py, check_gain.py + and verify.py (git blob hashes equal to GitHub's at 91f81d13); the same + licence and notices apply to them. + d. Data derived from the community's files. data/native/ holds the + canonical native words of #3945's two words (and of #3815's), the + output of #3945's own program native/run_native.py, run unchanged by + the agents. data/gcert/, data/residuals-*.json and data/t74ctl/ are + the agents' conversion of those words, and of the earlier T74 words, + into this project's certificate format (tools/lever/lower_b.py and + t74_control.py); data/t74ctl/inputs/ holds the community's T74 + inputs repackaged in the layout of #3945's package (TEMPLATE.json.gz + unmodified, and ORDER.json with the same content as the community's + T74 order). The Lean data of the lever packages (the words, the + dispatch, the tables of hosts) is generated from such conversions and + from the community's files by the generators in each package. The + tables with every head kept (the folders fill/ of the packages on + every head kept, where shipped) were made by the community's own + allocation programs (on #2979, its fill17.py and double.py; on #3945, + the hall_lp.py and build_fill.py of #3815 and #3945's offset step), + run with one added condition; each package's fill/ README says how, + and which of those programs it copies, with their notices. + e. Programs that re-implement or adapt the community's code: + - tools/lever/pricer.py re-implements (does not import) the community's + moment engine and kappa assembly (research/native-complex-moment552/ + engines/moment.py and outer.py, research/gauge44-frames-x/code/ + assemble.py). The package "native complex moment" is by Rohan Arun + with OpenAI Codex assistance, on Dugongue's #552, eumemic's #543 and + #558, and icekylinx's complex-cover notes; its outer assembly is + eumemic's, after icekylinx's #144 and Zhihao Chen's #23, with the + balanced prefix of the RaD project (hipotures). + - tools/lever/heads_fill.py and g0_staged.py re-implement the window + and family semantics of #3945's owner/verify.py (they do not import + it). + - tools/lever/lower_b.py extends this project's own lowering program + to the community's borrowed-helper words; the meaning of a warp + follows the community's native code (bw_transport.py, bw_emit.py of + #3945's native/vendor), which was read, not copied. + f. Scripts. scripts/apply-overlay.sh, build-and-check.sh and + run-comparator.sh are adapted from this project's community/scripts/; + scripts/base/, cc-jail/, bos/ and lever-run/ are the agents' scripts + as run. Those in bos/ and lever-run/ package a proof in the layout of + the entries of bigospeedrun/verifier and run that verifier's three + phases; the verifier's own code is not included, except its function + strip_comments (scripts/verifier.py of bigospeedrun/verifier, Apache + License, Version 2.0), whose logic scripts/bos/fspb_submission.py and + scripts/lever-run/isk_submission.py copy, as the line that defines it + says; the same function is in community/scripts/bos/mb_submission.py, + community/u8xmhh/scripts-as-run/build/fsb_submission.py and + package/leverF/logs/fc-engine/C3/scripts/isk_submission.py. + g. Credit for the circuits of the lever. + #3945, as its NOTICE.md and native lineage notices ask that the credit + be kept: + - #3945 (Dugongue, with substantial OpenAI Codex assistance, including + three parallel Codex agents): the terminal-width construction (26 + protected helper terminals from width 4 to width 5, with scalar and + native frames refitted), the idle-gap absorption proof, the + source-guarded recipe, the independent finite checks and the + integration. + - dataisfire, #3734: the staged544 supplier and its full source closure. + - zxv, #3682: the staged pair; #3638: the earlier T360 allocation. + - Ross Richardson, #3605: the staged entrance, cleanup and residual + checks (helpers 644 and 660 from width 8 to 7). + - Erwan Secousses / ChaloupeMusic, #3815, with the #3638 lineage: the + attained T360 owner clock and fill, and the allocation programs that + made the table with every head kept on #3945. + - hexapode (Pierre-Loic Doulcet), #3802 and #3875: the earlier complete + endpoint combination and its refinement. + - Dugongue, #3857 (general proof and evaluator work) and #3929 (the + transported-frame compiler). + - Sagar Thakrar, #3687: audit_core.py, which reimplements Arham Tahir's + coupled-carrier audit; roger-sato, #3693: the whole-word audit adapter; + roger-sato, #3642: the T530 release retimings. + - Jeremy Diviney, #3148: the coupled-carrier T740 packing cap; dcharb78, + #3133: helpers 586 and 588 lowered by coupled carrier folds. + - Marius-Paul Dumitrean (mdumitrean), #2979: joint rank-7 end frames and + five paired extractions, on Jeremy Kothe's #2957 gate rewrites; #2802 + (hostee moves and retired-lender aliases) and #2733. + - Jeremy Kothe: the frame and preload machinery, #2833 (dirt-entry + rewrite of helpers 530 and 542), #2957 (gate rewrites on Mason Hale's + #2917 words), and the source pipeline, label swap and order and fill + of #2462, #2588 and #2673; Mason Hale, #2917 (nine paired helper + extractions); Lyy-iiis, #2857 (shared kernels) and #2848; Dugongue, + #2863; philippeVV (Philippe Van Velzen), #2853, #2559 and #2679 + (evacuation, six pre-life hosts, the refit alias). + - Cinna Davis (@1337isnot1337), #2226, with OpenAI Codex assistance: + anticipatory dirty borrowing (the borrowed helpers and their warps) + and the native exact Clifford and operator machinery. + - Tekalign (@tekuuu), #2436: the four lifted targets, the joint + twelve-source construction, and the sparse native accelerator, with + the authors its SPARSE-NOTICE names. + - zxv, #2530: the eight source-partner aliases; Mason Hale, #2696: + concentrated source-partner assignment and an independent local + interpreter; themilkman216, #2621: the priority order; Vlado + Vojdanovski, #2322: generator utilities; Jeremy Kothe, #2312: the + helper width exchange; Dugongue, #2309, with Sagar Thakrar's audit + #2315. + - icekylinx, #433 and #514, and the retained native ancestry; + DreamingOfClouds (with Claude): the inherited wrapper and outer + machinery; chafreaky (Chafik Boukhalfa), #458, and its lineage. + - Josie Elliston, #1956 (bootstrap carried-cutoff repair); Sagar + Thakrar, #1964 (label and adapter checks, mutants). + - The T74 words and owner construction underneath: Rohan Arun (#1218, + #1297, #1319 and the T74 exact-fill owner construction, with OpenAI + Codex assistance), Marius-Paul Dumitrean (#1625: the pivot-566 + kernel, words, edits and rebuild scripts), Jeremy Kothe and LeverRank + (#1672), on Jeremy Kothe's k8 leaver word and seven-slot line (#1018, + #1042, #1274) with Thomas DiFiore (#1148), Jeremy Diviney (#1193) and + Chafik Boukhalfa (#1196); the outer and the assembly by Vlado + Vojdanovski (#1673), Chafik Boukhalfa (#1699, #1786) and Jeremy + Kothe (#1377, #1839). + - Rohan Arun's draft #3939 and his #3934 stack, and Chris R / + Clear1nsight's #3883, #3936 and #3941, are acknowledged by #3945 as + neighbouring work; they are not used here. + Checks of #3945 by others, which this project read and re-ran: Chris R / + Clear1nsight's audits #3969, #3988, #3994 and #4016; the exact + eight-stream operator replay of ChaloupeMusic's gist, on the operator + model of Nick Petalas (#3187) and Matarener (#3296). + #2979, from its pull request body, CREDITS.md and NOTICE ("All original + notices of the exported predecessor packages remain in force"): + - Marius-Paul Dumitrean (mdumitrean), #2979, prepared with substantial + AI assistance (Anthropic Claude, via Claude Code): the codimension-2 + census, the joint end-frame lowering of 22 restored helpers in five + groups, the five further extractions, the composition with #2957's + rewrites, producer and checks, the overlay stage, the six-class + adapters, the literal T74 allocation, the cap certificates and the + complete fresh replay; also #2930 (cap allocation, relaxation + tools), #2942 (four normal-45 extractions; its words are #2979's + parent) and #2843 (the flow model's starting point). + - Jeremy Kothe, #2957, #2948 and #2966: the fourteen declared gate + rewrites and their applier; #2894 and #2833: the preload re-synthesis + supplier, frame accounting and cleanup, source materializer. + - Mason Hale, #2917: the nine paired extractions, the T74 chronology + (ORDER and DISPATCH), the allocation checker, moment auditor, + extension stage and adapter derivation. + - Jeremy Diviney, #2908: the paired input/output extraction, its + compensation rule, the two-sided certificate and the closed-adapter + admission chain. + - Dugongue, #2969 (comparator composition and baseline), #2863 and + #2839 (packing lineage, owner engine). + - Yiyang Lu (Lyy-iiis), #2857 and #2848: shared-kernel words, staged + native and overlay tooling, the flow model and realization of the + allocation. + - Ross Richardson, #2918: the rank-seven obstruction for helper 408. + - Tekalign: the independent owner and chronology checker; icekylinx: the + exact free-operator auditor (#2833); themilkman216: the integrality + observation behind the allocation's face step. + - Gareth Davidson (bitplane), #1995 and #2013: the fixed-word + terminal-subspace bounds that frame stage 1. + - Underneath: Cinna Davis (#2226, dirty borrowing and warps), Jeremy + Kothe (#2312, width exchange), and the T74 line above. + The table with every head kept on #2979 was made by #2979's own + allocation programs, credited as above. + h. Credit for the Lean route. + - Ryan Shea: the conversion pipeline, the generators and the Lean + instantiation of Jeremy Kothe's #588 circuit (lean/complex588), which + these packages are laid over. + - Nil Mamano: the files named at the start of this section. + - Dugongue (#401): the entrance gauges and the banks of the nine-stage + network; Zhihao Chen / jacklightChen (#377, #425): its compressed + layout with banks and padding, and the written argument for mutable + sources; lydakis (#275): the bank patterns; DaysSky (#363): the + bridged layout, and the proposal, with a written proof in the + community's terms, to host helpers in idle arrays. + - Jeremy Kothe and DreamingOfClouds: the community's lemmas about where + a helper may end, on which the charge for exit frames rests. + - For package/u8x0hq: the community's U8 circuit, Jeremy Kothe's #869 on + his #799, with Chafik Boukhalfa's frame changes (#741) and + icekylinx's gauge44 construction (#645), as the community's notices + record it. + - The idea that Theorem 1G extends is Schönhage's τ-theorem for matrix + multiplication. + - OpenAI: the cost model, the statement and the step from the lengths + 2^k to every length. + i. research/. Written for this repository by the agents under my + direction. The sections cite papers by title or arXiv identifier and + the community's pull requests by number, commit and file hash; they + copy no paper text and no file of the community's repository, with + these exceptions: research/record-track/programs/a-fc/r2/tools/ + fallback_patch.py carries a modified copy (made tolerant, as its first + lines say) of the placement loop of construction/build_fill.py of + #3815 (Erwan Secousses / ChaloupeMusic; CrocSwap/integer-mult-bounds, + Apache License, Version 2.0); and research/record-track/programs/ + a-fc/r2/tools/fillmodel.py copies the window, family and width logic + of owner/verify.py of #3945 (Dugongue and the lineage its NOTICE.md + names, see (g); CrocSwap/integer-mult-bounds, Apache License, Version + 2.0), as its first lines say; research/why-the-savers-save/programs/ + helpers-narrower-ends-skeptic-rules/asm1042.json is an unmodified + copy of research/community-frontier1042-audit/ASSEMBLY.json of the + community's main branch (the community's #1042 audit, integrated by + its maintainer Douglas R. Colkitt on 13 October 2026); + research/record-track/data/a-fc/design/ + ORDER.json and DISPATCH.json hold #2979's allocation/ORDER.json and + DISPATCH.json (Mason Hale's #2917, as #2979's NOTICE says), with the + same content, re-serialised; and research/why-the-savers-save/ + programs/helpers-half-reads/bit/xcheck_base.json, the report of the + community's checker xcheck_p.py (DreamingOfClouds' line, on eumemic's + #555) on #589's word, has the same bytes as + research/community-frontier741-audit/bit/xcheck.json of the + community's main branch, integrated by Douglas R. Colkitt on 13 + October 2026 (these three: CrocSwap/integer-mult-bounds, + Apache License, Version 2.0). fallback_patch.py, and tools/ + place_patch.py, tools/hall_fc.py and tools/mkpatch_fill17.py of + programs/a-fc/, apply their changes to copies of community files that + they read by path (#3815's build_fill.py and hall_lp.py, #2979's + fill17.py); those files are not changed. The other programs of + programs/a-fc/ are mine. + j. What is mine: the mixed-target recursion (Theorem 1G and its Lean + proof in OpenAI's model); the lever (the head test, the half cut, the + full cut and its 24 + 24 split, the head lemma, the heads-first + certificate, and the tables with every head kept); the A-fc table on + #2979's words (its class solution and its tolerant placement); the Lean ports of + #3945 and #2979 (the conversion of their + words, the warp checker and its soundness, the networks of many copies + with hosting across copies, the dispatch, the generators); the Lean + engine of this project and its extensions for exit frames, mutable + sources, centre reading and hosting; the checks; the search and pricing + programs in tools/lever/ and tools/lever-hub/; and the research in + research/. tools/lever-hub/network/Gates.lean is an unmodified copy of + lean/complex588/Work/Bridge401/Gates.lean of Ryan Shea's repository + (commit 52394849c7ecf3412d39b925d75fc7fdb98994d8, Apache License, + Version 2.0; its header credits Dugongue, lydakis, jacklightChen and + DaysSky); the other files of tools/lever-hub/ are mine. + + The new files of package/, scripts/, tools/lever/, data/, results/ and + research/ were made between 2026-10-13 and 2026-10-20 the way section 4 + describes: by AI agents (Claude) under my direction. The credits, with + links, are in README.md. + +Not included in this repository and fetched by the build: Mathlib +(https://github.com/leanprover-community/mathlib4, Apache License 2.0) and its +dependencies. The comparator (https://github.com/leanprover/comparator) is a +separate tool and is not included. From a3f9734597f6a1edbad94944068efb39d92d739b Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 21 Oct 2026 22:16:29 -0400 Subject: [PATCH 2/3] Independently audit expanded direct-flow counts and rank mass --- research/direct-flow-expanded-audit/PROOF.md | 166 +++++++++++ research/direct-flow-expanded-audit/README.md | 134 +++++++++ .../direct-flow-expanded-audit/RESULT.json | 267 ++++++++++++++++++ .../direct-flow-expanded-audit/SOURCES.json | 74 +++++ research/direct-flow-expanded-audit/TASK.json | 138 +++++++++ .../VALIDATION.json | 58 ++++ .../direct-flow-expanded-audit/VERIFY.json | 28 ++ .../direct-flow-expanded-audit/accounting.py | 130 +++++++++ research/direct-flow-expanded-audit/forest.py | 138 +++++++++ .../direct-flow-expanded-audit/literal.py | 158 +++++++++++ research/direct-flow-expanded-audit/verify.py | 231 +++++++++++++++ 11 files changed, 1522 insertions(+) create mode 100644 research/direct-flow-expanded-audit/PROOF.md create mode 100644 research/direct-flow-expanded-audit/README.md create mode 100644 research/direct-flow-expanded-audit/RESULT.json create mode 100644 research/direct-flow-expanded-audit/SOURCES.json create mode 100644 research/direct-flow-expanded-audit/TASK.json create mode 100644 research/direct-flow-expanded-audit/VALIDATION.json create mode 100644 research/direct-flow-expanded-audit/VERIFY.json create mode 100644 research/direct-flow-expanded-audit/accounting.py create mode 100644 research/direct-flow-expanded-audit/forest.py create mode 100644 research/direct-flow-expanded-audit/literal.py create mode 100644 research/direct-flow-expanded-audit/verify.py diff --git a/research/direct-flow-expanded-audit/PROOF.md b/research/direct-flow-expanded-audit/PROOF.md new file mode 100644 index 0000000000..02181c95b6 --- /dev/null +++ b/research/direct-flow-expanded-audit/PROOF.md @@ -0,0 +1,166 @@ +# Expanded count identity, including source complements + +This is an independent check of the counting argument in §3 of zxv's +[PR4436](https://github.com/CrocSwap/integer-mult-bounds/pull/4436). +The construction and claimed bound belong to that predecessor. +[PR4476](https://github.com/CrocSwap/integer-mult-bounds/pull/4476) explicitly +excludes this expanded identity from its width and routing +audit. The result here concerns finite invocation counts under the declared +compiler interface, not native correctness or physical execution. + +## Assumptions and quantities + +Fix an integer base threshold `m >= 2` and one raw rule with rank surplus +`Delta`. At each rank `n >= m`, a finite local flow has: + +- integer source counts `S_s >= 0`, with `1 <= s <= n`, and + `S_n = sum_s S_s > 0`; +- integer exit counts `E_e >= 0`, with `1 <= e < n`; +- `u_n` raw invocations, each with a positive integer column multiplicity + `c`, and `q_n = sum_invocations c`, so `0 <= u_n <= q_n`; +- the local conservation identity + + ``` + sum_s S_s*s - sum_e E_e*e = Delta*q_n. (1) + ``` + +Source and exit counts include every actual boundary job. In particular, +unmatched paid jobs are exits. These assumptions are checked on the finite +fixtures; the general local-flow argument remains attributed to PR4436 and +its lockstep predecessors. + +The new flow counter labels a unit by an ordered word of target slots, with +`W_k` distinct letters of rank `k`. Words with occurrence vector `a` number +`multinomial(|a|;a) product_k W_k^a_k`, exactly the predecessor's `u(a)`. +Deleting the final letter `k` bijects the corresponding parent words with +the child words at `a-e_k` and their labelled `k` target slots. The two jobs +have the same rank. They match when both units exist; otherwise the existing +parent job is an exit or the existing child slot is a source. This is the +Pascal matching identity without implementing a multinomial point matcher. + +Unit existence depends only on depth and the products of target and paid +letters. Thus summing multiplicities of words with equal products preserves +these counts, even when different occurrence vectors have the same product. +Paid paths with equal products still count as separate paths. This quotient +is for counting; it does not identify their fields or construct a physical +chronological schedule. The literal ordered-word mode and compressed mode +use this same correspondence; their comparison is an internal control, not +a claim of two independent mathematical implementations. + +Let `B_n` be productive width, `P_n` the number of rank-one leaves, `U_n` +the number of raw invocation instances after expansion, and `Q_n` the sum +of those instances' column multiplicities. Owned storage is excluded from +`B_n`. Below the threshold, including rank zero, set + +``` +B_n = 1, P_n = n, U_n = Q_n = 0 (0 <= n < m). +``` + +Rank-zero calls are empty programs. Recording or omitting such calls has +the same counts. For `n >= m`, use the declared nested widths + +``` +a_n = B_(n-1), B_n = a_n*S_n. +``` + +The compiler replicates the complete local flow `a_n` times. Each of its +`a_n*S_s` source arrays also receives its complementary rank-`n-s` job. +Each of its `a_n*E_e` exits receives a rank-`e` job. A width-`B_r` uniform +program consumes `B_r` jobs of rank `r`, so the child invocation counts are + +``` +C_(n,n-s;source s) = a_n*S_s / B_(n-s), +C_(n,e;exit e) = a_n*E_e / B_e. (2) +``` + +Counts at the same child rank add; source and exit jobs are not identified +merely because their ranks coincide. + +## Integer batching and termination + +Every width is a positive integer. For `r >= m`, `B_(r-1)` divides `B_r` +because their quotient is the positive integer `S_r`; smaller widths are +one. Hence every `B_r`, `r < n`, divides `a_n = B_(n-1)`. Both quotients +in (2) are nonnegative integers. Since `s > 0`, a complement satisfies +`0 <= n-s < n`; exits satisfy `1 <= e < n` by assumption. Thus recursive +expansion terminates by strict rank descent. The count argument does not +require a favorable moment exponent. + +## Telescoping through every child + +Write `sum_child C_r X_r` for the sum over both classes in (2), preserving +their multiplicities. Complete expansion gives the recurrences + +``` +P_n = sum_child C_r P_r, +U_n = a_n*u_n + sum_child C_r U_r, +Q_n = a_n*q_n + sum_child C_r Q_r. (3) +``` + +These count actual repeated invocations, not distinct nodes in a memoized +dependency graph. In particular, `Q_n` is measured by summing raw columns; +it is not defined by the rank deficit we are about to prove. + +We prove simultaneously, by strong induction on `n`, + +``` +B_n*n - P_n = Delta*Q_n, 0 <= U_n <= Q_n. (4) +``` + +The base definitions make (4) immediate. At a nonbase rank the total +productive rank mass supplied to the smaller programs is exactly + +``` +sum_child C_r B_r*r + = a_n * [sum_s S_s*(n-s) + sum_e E_e*e] + = B_n*n - a_n*Delta*q_n, (5) +``` + +where the last step uses (1). Substitute the induction hypothesis +`P_r = B_r*r - Delta*Q_r` into the first recurrence in (3), then use +(5) and the third recurrence. This gives the first identity in (4). +For the second, each local column is a positive integer, so `u_n <= q_n`; +combine this with `U_r <= Q_r` in the last two recurrences in (3). + +This also justifies a flattened interpreter. Replacing each child reference +by its finite list of raw instances and rank-one leaves preserves (3). +Induction on rank therefore proves that a literal expansion and a recursive +aggregate calculation have identical counts, provided the aggregate keeps +all invocation multiplicities. Sharing the stored description of a child +does not authorize sharing its executed instances or productive arrays. + +If `Delta > 0`, nonnegative leaf counts now give + +``` +U_n <= Q_n = (B_n*n - P_n)/Delta <= B_n*n/Delta. (6) +``` + +The identity in (4) itself does not require positive surplus. Positivity is +essential for (6): at zero surplus it would divide by zero; at negative +surplus division reverses inequalities and gives no stated upper bound. + +## Why complements and ownership qualifications matter + +For the valid rule with one target of rank two and one paid rank-one job, +`Delta=1`. At rank three its local flow has `S_2=E_1=u_3=q_3=1` and +`B_3=1`. The complete program has one rank-one complement and one rank-one +exit, hence `P_3=2`, `Q_3=1`, and `3-2=1`. Omitting the complement would +give `P_3=1`, `Q_3=1`, and the false identity `3-1=1`. A per-flow mass check +alone would not expose that compiler omission. Wrong batching factors and +deduplicated child invocations similarly invalidate the expanded inventory. + +If every raw invocation uses at most `O_local` separately owned center +banks, allocating fresh banks to every expanded instance gives at most +`O_local*U_n` banks. The one-center case is `U_n`. This is a conditional +bank-count bound, not a bound on bank capacity, peak-optimal storage, router +scratch, physical movement or initialization/erasure cost. If an actual +implementation instead needs a bank per column, `Q_n` is the corresponding +count. Native ownership and tariffs require their own evidence. + +No claim here checks the record grammar, encoded constants, direct exponent +gate, analytic transfer or a complete multiplication theorem. No kappa is +changed. Credit zxv for PR4436's construction and count claims, Jacob Alan +Sussman for the lockstep/Pascal construction, and Ryanson Jonathan for the +PR4456/PR4476 independent flow, width and routing checks that delimit this +remaining scope. Prepared for Dillon with substantial OpenAI Codex assistance; +no independent human or proof-assistant review is claimed. Apache-2.0. diff --git a/research/direct-flow-expanded-audit/README.md b/research/direct-flow-expanded-audit/README.md new file mode 100644 index 0000000000..895e7ea96a --- /dev/null +++ b/research/direct-flow-expanded-audit/README.md @@ -0,0 +1,134 @@ +# Independent expanded accounting for the direct mixed compiler + +The complete recursive accounting in zxv's [PR4436](https://github.com/CrocSwap/integer-mult-bounds/pull/4436) +passes this independent check. Every source complement and exit receives an +integer number of smaller uniform batches. Counting their repeated instances +gives + +``` +B_n n − P_n = Δ Q_n, U_n ≤ Q_n ≤ B_n n / Δ (Δ > 0). +``` + +Here `B` is productive width, `P` counts rank-one paid leaves, `U` counts +expanded raw invocation instances, and `Q` sums their positive integer column +multiplicities. [PROOF.md](PROOF.md) gives the induction and its assumptions. +This corroborates the predecessor's theorem; it is not a new construction or +κ improvement. In particular, the large example below is not a winning supplier. + +## Coverage added + +Ryanson Jonathan's [PR4456](https://github.com/CrocSwap/integer-mult-bounds/pull/4456) +checks individual flow mass and normalized leaf costs. +[PR4476](https://github.com/CrocSwap/integer-mult-bounds/pull/4476) adds widths, +routing identities and finite growth measurements, while explicitly excluding +the fully expanded identity above. This package checks that remaining count +boundary, including raw instances and column multiplicities that cannot be +recovered from a normalized leaf count alone. + +The checker is separate from the producer. `forest.py` labels units by ordered +target words, matches the last target letter to a child slot, then counts equal +products by exact convolution. It does not import the producer's multinomial +matcher. Individually enumerated words check the compression, including +collisions such as `2·8 = 4·4`. + +`accounting.py` constructs a counted call graph and evaluates every edge with +its full multiplicity. A second evaluation propagates invocation weights from +the root toward the leaves. `literal.py` separately builds small programs and +visits every raw instance, routing slot, leaf and child invocation. These paths +share the new local forest generator; they are not mutually independent local +flow implementations. None computes `Q` by rearranging the identity under test. +The literal traversal is an accounting traversal, not a native execution schedule. + +## Exact evidence + +All five expanded totals match the immutable predecessor receipt: productive +width, paid leaves, raw instances, raw column mass and routing slots. + +| Domain | Checked scope | +| --- | --- | +| Two overlap examples | Every compiled rank through 100; complete final counts match PR4436 | +| Raw p7, surplus 608 | All 880 nonbase ranks 121–1000; all five rank-1000 totals match | +| Four small rule families | 44 complete literal expansions, including rank zero | +| Local source controls | All nine released flow fixtures; five equal-product collision fixtures | +| Failure controls | 14 named semantic rejections, after source authentication | + +The larger literal examples make the difference between `U` and `Q` visible: + +| Rule and final rank | Width `B` | Leaves `P` | Instances `U` | Column mass `Q` | Visited records | +| --- | ---: | ---: | ---: | ---: | ---: | +| Strict overlap, 13 | 8,192 | 91,904 | 12,544 | 14,592 | 265,025 | +| Source-open equality, 6 | 3,500 | 18,500 | 1,750 | 2,500 | 71,421 | +| Separated control, 13 | 6,400 | 51,200 | 10,880 | 16,000 | 202,501 | + +The p7 width at rank 1,000 has 17,504 bits. Its complete program is counted +through an exact finite call graph, not literally enumerated. Full integer +hashes, counts and rejected faults are in [RESULT.json](RESULT.json). +Faults include omitted complements/exits, missing replication, deduplicated +child instances, incorrect raw columns, a missing base leaf and a nonintegral +batch. Zero and negative surplus reject the division-bound guard. + +For a hand-checkable example, a rank-two target with one paid rank-one job has +`Δ=1`. At rank three the complete program needs a rank-one complement and a +rank-one exit: `3−2=1`. Omitting the complement gives `3−1≠1`, even though +the unchanged local flow still passes its own conservation check. + +## Reproduction and sources + +Python 3.12, standard library only, from the repository root: + +```sh +python3.12 -B scripts/research_package.py --package research/direct-flow-expanded-audit +python3.12 -I -O -B research/direct-flow-expanded-audit/verify.py +``` + +Expected marker: `PASS_DIRECT_FLOW_EXPANDED_ACCOUNTING`. The default recomputes +and compares the full saved receipt. `--emit` prints a newly computed receipt. +Direct replay also works from an exported package without Git or network. + +`SOURCE-EXPORT.json` records exact original commits, paths, Git blobs and +SHA256 hashes for the unchanged exports. Their bytes were compared directly +with the original Git objects before retention. PR4436 is pinned at +`56003680aee2871773de408e5f01cc5dd46b144c`; PR4476 at +`4e7022aa9128c8673d3e2024052b2deaa18cb6e4`. `SOURCES.json` additionally pins +the retained bytes to this contribution's source commit. No pending source +commit is represented as publication ancestry. The p7 tariff comes from the +original native receipt; native correctness is inherited, not rechecked. + +This work starts from canonical main +`2a13eb1827784206202db90e5dc8327cf8a250db`, priority revision 7. Live PR and +bounded Discussion overlap coverage is recorded in `TASK.json`. The later +[PR4483](https://github.com/CrocSwap/integer-mult-bounds/pull/4483) changes +the height and exponent argument; that theorem is outside this audit. + +## Limits + +The written induction applies to every finite local flow satisfying its stated +integer, rank-descent and conservation assumptions. Finite tests corroborate +the implementation; they are not a formal proof of those assumptions for every +native caller. An `O_local·U` center-bank bound further assumes at most +`O_local` separately owned banks per invocation. It does not measure bank +capacity, peak-optimal storage or extra router scratch. + +The record/description grammar, encoded precision constants, native correctness, +physical movement, ownership, exponent convergence, analytic transfer and full +multiplication theorem are not verified. No selected-frontier file changes. + +## Open next questions + +The next useful check is to bind one small expanded program to its actual +native executor: identify each bank allocation, adapter, movement and erasure, +and charge all router scratch. That would test whether this accounting model +matches physical use. The missing native and physical contracts are the blocker; +larger count scans would not discharge them. Structured details are in `TASK.json`. + +## Credit + +Prepared by Dillon (@dillona) with substantial OpenAI Codex assistance, including +separate implementation and mathematical review agents. No independent human +or formal-kernel review is claimed. Apache-2.0. + +Credit zxv for PR4436's construction and expanded-count theorem; Jacob Alan +Sussman for the lockstep/Pascal compiler; Ryanson Jonathan for PR4456 and PR4476 +and their explicit coverage boundary; Cinna Davis for the raw p7 construction; +and the native, controller, BIT, Clifford, geometry and outer predecessors +credited by those sources. Original Sussman LICENSE and NOTICE are retained. diff --git a/research/direct-flow-expanded-audit/RESULT.json b/research/direct-flow-expanded-audit/RESULT.json new file mode 100644 index 0000000000..85ee016696 --- /dev/null +++ b/research/direct-flow-expanded-audit/RESULT.json @@ -0,0 +1,267 @@ +{ + "literal_expansions": { + "equal_product_flow_ranks": [ + 8, + 16, + 32, + 64, + 128 + ], + "full_call_tree_cases": [ + { + "last_counts": { + "B": 1, + "P": 1, + "Q": 7, + "U": 3, + "routes": 8 + }, + "last_literal_events": 15, + "paid": { + "1": 1 + }, + "ranks": [ + 0, + 8 + ], + "targets": { + "2": 1 + } + }, + { + "last_counts": { + "B": 8192, + "P": 91904, + "Q": 14592, + "U": 12544, + "routes": 117248 + }, + "last_literal_events": 265025, + "paid": { + "1": 2, + "4": 1 + }, + "ranks": [ + 0, + 13 + ], + "targets": { + "2": 1, + "5": 1 + } + }, + { + "last_counts": { + "B": 3500, + "P": 18500, + "Q": 2500, + "U": 1750, + "routes": 37500 + }, + "last_literal_events": 71421, + "paid": { + "1": 6, + "2": 2 + }, + "ranks": [ + 0, + 6 + ], + "targets": { + "2": 4, + "3": 1 + } + }, + { + "last_counts": { + "B": 6400, + "P": 51200, + "Q": 16000, + "U": 10880, + "routes": 101120 + }, + "last_literal_events": 202501, + "paid": { + "1": 1, + "2": 2 + }, + "ranks": [ + 0, + 13 + ], + "targets": { + "3": 1, + "4": 1 + } + } + ] + }, + "new_kappa": false, + "p7_counted_expansion": { + "expanded_counts": { + "B": { + "bits": 17504, + "unsigned_big_endian_sha256": "49727d4435d62a4a84b79cf2451d374a5bb98234cbe460ec0b0ef3da77c8c9e6" + }, + "P": { + "bits": 17514, + "unsigned_big_endian_sha256": "1f28a559d21f0df473b67fef0c37eb57144955250234a44c998bd837d1e8f3d6" + }, + "Q": { + "bits": 17497, + "unsigned_big_endian_sha256": "0f2b521412ca3f565d734c244b1cf42b8c7d49ef1e61af197ec97b2605078a3c" + }, + "U": { + "bits": 17497, + "unsigned_big_endian_sha256": "0f5ce7310a89be0835b71681538c3e2e57134d2690ff663b8bc1cd10938b9c7f" + }, + "routes": { + "bits": 17514, + "unsigned_big_endian_sha256": "98bde80b4a7bc886645e82f3b9e730545da94beddcbec4e98ce88e1c44a39242" + } + }, + "n": 1000, + "nonbase_ranks": 880, + "positive_invocation_rank_classes": 970, + "scope": "Counted DAG, not literal enumeration of the enormous program.", + "surplus": 608 + }, + "schema_version": 1, + "scope": "Independent finite expanded accounting and a conditional induction proof; native, physical, all-size exponent and precision admission remain outside scope.", + "semantic_rejections": [ + "omitted_source_complement", + "omitted_exit", + "duplicated_child_batch", + "omitted_raw_instance", + "wrong_raw_column", + "division_bound_delta_0", + "division_bound_delta_-1", + "omitted_premature_exit", + "nonintegral_child_batch", + "deduplicated_child_instances", + "missing_replication", + "collapsed_raw_columns", + "missing_base_leaf", + "nondecreasing_paid_rank" + ], + "source_flow_fixtures": [ + { + "n": 20, + "rule": "separated-control" + }, + { + "n": 40, + "rule": "separated-control" + }, + { + "n": 80, + "rule": "separated-control" + }, + { + "n": 20, + "rule": "strict-overlap" + }, + { + "n": 40, + "rule": "strict-overlap" + }, + { + "n": 80, + "rule": "strict-overlap" + }, + { + "n": 20, + "rule": "source-open-equality" + }, + { + "n": 40, + "rule": "source-open-equality" + }, + { + "n": 80, + "rule": "source-open-equality" + } + ], + "source_sha256": { + "vendor/PR4436-README.md": "78351e2419eb1ff1d645addd411158b91b381b23a962a91b6deeebeacd5192a8", + "vendor/PR4436-RESULT.json": "da04256f6f2ef61530f1d642ff1137a2274fd642782a72ef4bf3f1b65395c270", + "vendor/PR4436-flow.py": "460f0b0262d7b6880973f46240b3fff1e9f04601fa1d658dda18688b1e26575a", + "vendor/PR4436-p7-RESULT.json": "9b814be97e3b45fcc28eafa8a65694897a7387f71a14d44796c6aadf303d7fab", + "vendor/PR4476-README.md": "0563dd22edeba4ee82a5ac4a06d965ccb90edbb09bbe646c9f21497bd4789f76", + "vendor/SUSSMAN-LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "vendor/SUSSMAN-NOTICE": "8289a4ba75efe5da7bd2e389b951155ff74b3bf49b38ace0906a1e5205c7cd6e" + }, + "status": "PASS_DIRECT_FLOW_EXPANDED_ACCOUNTING", + "toy_counted_expansions": [ + { + "expanded_counts": { + "B": { + "bits": 433, + "unsigned_big_endian_sha256": "35f12bcc6000b703565e2f120e8077641f744909e8ec163921775b2b0c139254" + }, + "P": { + "bits": 439, + "unsigned_big_endian_sha256": "7df4f5875466fa21b225c2b60317e60536fdededbe8473d18fe5fb3fb057bb6f" + }, + "Q": { + "bits": 438, + "unsigned_big_endian_sha256": "f469278cd8f6190ffe6a1ae190299a8d183d1675d4280087d107e5d7016aee25" + }, + "U": { + "bits": 436, + "unsigned_big_endian_sha256": "12b6d174870cd23fd40ad1f4ff56df629ed813fabbbfcf143a914bfdd875609d" + }, + "routes": { + "bits": 439, + "unsigned_big_endian_sha256": "4034ff94efe1f1ab70575b300eebbd2469e9065861c4f2570a59256c47170f74" + } + }, + "n": 100, + "nonbase_ranks": 96, + "paid": { + "1": 2, + "4": 1 + }, + "reverse_expansions": 101, + "targets": { + "2": 1, + "5": 1 + } + }, + { + "expanded_counts": { + "B": { + "bits": 1002, + "unsigned_big_endian_sha256": "398043f007044ec4c1ba14eda89bf66b48733ce7a22bb855a3bc17a4665b5952" + }, + "P": { + "bits": 1008, + "unsigned_big_endian_sha256": "1302eac01cf514d2855c821612c64c9d38a6c9ff55f12115f72bf34a9906b9d5" + }, + "Q": { + "bits": 1007, + "unsigned_big_endian_sha256": "f04dcf1684cd1a5f5708102f230375fb43cd08135626ac91b22478876e21c63e" + }, + "U": { + "bits": 1006, + "unsigned_big_endian_sha256": "ebd327c71dde99fefa5afb70ef8ad5b207723935abb8bed0473a95d67e73fbe7" + }, + "routes": { + "bits": 1010, + "unsigned_big_endian_sha256": "23f8f6398dbe8fe43a321ff79a6c52edfee5c4de97ff2852a6cdcc6c127e7cd7" + } + }, + "n": 100, + "nonbase_ranks": 98, + "paid": { + "1": 6, + "2": 2 + }, + "reverse_expansions": 101, + "targets": { + "2": 4, + "3": 1 + } + } + ] +} diff --git a/research/direct-flow-expanded-audit/SOURCES.json b/research/direct-flow-expanded-audit/SOURCES.json new file mode 100644 index 0000000000..9b53c5e66c --- /dev/null +++ b/research/direct-flow-expanded-audit/SOURCES.json @@ -0,0 +1,74 @@ +{ + "schema_version": 1, + "base_commit": "2a13eb1827784206202db90e5dc8327cf8a250db", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ed33caef5c5827693e9572d252a66f99cbb73d40", + "sha256": "5732707cc1e460b090b53f2463162749ad860de878a18f7408938671d295a9d9" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "64bfc5af6709ed9811171e0a2108f05e1219cb65", + "sha256": "352a6184713b8843d96fd2c2071eb7aeaa655906b7c51d45ad444912666c8a96" + }, + { + "path": "research/direct-flow-expanded-audit/SOURCE-EXPORT.json", + "usage": "input", + "pin": "head:fd3fe31e9e0bec881393322a7d6586e4bcead43d:research/direct-flow-expanded-audit/SOURCE-EXPORT.json", + "git_blob": "d958f05e946f765c0ed7d65b5f12f4131298d9a5", + "sha256": "ebc13b9da5673fc218a953c6ed7de0358c051ea6e5c4a79bd618d91c6831167b" + }, + { + "path": "research/direct-flow-expanded-audit/vendor/PR4436-README.md", + "usage": "input", + "pin": "head:fd3fe31e9e0bec881393322a7d6586e4bcead43d:research/direct-flow-expanded-audit/vendor/PR4436-README.md", + "git_blob": "3be00f754b9ffa23e64b3eafe7706e3ac139993a", + "sha256": "78351e2419eb1ff1d645addd411158b91b381b23a962a91b6deeebeacd5192a8" + }, + { + "path": "research/direct-flow-expanded-audit/vendor/PR4436-RESULT.json", + "usage": "input", + "pin": "head:fd3fe31e9e0bec881393322a7d6586e4bcead43d:research/direct-flow-expanded-audit/vendor/PR4436-RESULT.json", + "git_blob": "e657f58b5a276b57b472a814a8559aede853f55a", + "sha256": "da04256f6f2ef61530f1d642ff1137a2274fd642782a72ef4bf3f1b65395c270" + }, + { + "path": "research/direct-flow-expanded-audit/vendor/PR4436-flow.py", + "usage": "input", + "pin": "head:fd3fe31e9e0bec881393322a7d6586e4bcead43d:research/direct-flow-expanded-audit/vendor/PR4436-flow.py", + "git_blob": "07175cd6e1f2c2367c2e78eca7f163fef18d301d", + "sha256": "460f0b0262d7b6880973f46240b3fff1e9f04601fa1d658dda18688b1e26575a" + }, + { + "path": "research/direct-flow-expanded-audit/vendor/PR4436-p7-RESULT.json", + "usage": "input", + "pin": "head:fd3fe31e9e0bec881393322a7d6586e4bcead43d:research/direct-flow-expanded-audit/vendor/PR4436-p7-RESULT.json", + "git_blob": "ebb30a9b3b94fb159a316350f7da57bde4a30c25", + "sha256": "9b814be97e3b45fcc28eafa8a65694897a7387f71a14d44796c6aadf303d7fab" + }, + { + "path": "research/direct-flow-expanded-audit/vendor/PR4476-README.md", + "usage": "input", + "pin": "head:fd3fe31e9e0bec881393322a7d6586e4bcead43d:research/direct-flow-expanded-audit/vendor/PR4476-README.md", + "git_blob": "c6db026010b7e2ec8a4063065c4d054401cfc9cd", + "sha256": "0563dd22edeba4ee82a5ac4a06d965ccb90edbb09bbe646c9f21497bd4789f76" + }, + { + "path": "research/direct-flow-expanded-audit/vendor/SUSSMAN-LICENSE", + "usage": "input", + "pin": "head:fd3fe31e9e0bec881393322a7d6586e4bcead43d:research/direct-flow-expanded-audit/vendor/SUSSMAN-LICENSE", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "path": "research/direct-flow-expanded-audit/vendor/SUSSMAN-NOTICE", + "usage": "input", + "pin": "head:fd3fe31e9e0bec881393322a7d6586e4bcead43d:research/direct-flow-expanded-audit/vendor/SUSSMAN-NOTICE", + "git_blob": "0b06967886fab2628afc0b881c884161bbf5e430", + "sha256": "8289a4ba75efe5da7bd2e389b951155ff74b3bf49b38ace0906a1e5205c7cd6e" + } + ] +} diff --git a/research/direct-flow-expanded-audit/TASK.json b/research/direct-flow-expanded-audit/TASK.json new file mode 100644 index 0000000000..7031b370dc --- /dev/null +++ b/research/direct-flow-expanded-audit/TASK.json @@ -0,0 +1,138 @@ +{ + "schema_version": 1, + "task_id": "independent-moment", + "priority_revision": 7, + "base_commit": "2a13eb1827784206202db90e5dc8327cf8a250db", + "original_card": { + "id": "independent-moment", + "question": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/staged544-mixed-fourth-entry/README.md", + "research/staged-fourth-mixture-ceiling/README.md", + "research/r437-two-window-carrier/README.md" + ], + "methods": [ + "Independently reconstruct one changed paid ledger or pooled dual with exact source and model binding.", + "Check a genuinely uncovered moment implication with a different enclosure method and semantic controls." + ], + "acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Choose one uncovered implication in #4088 literal mixed fill, #4091 pooled dual/model binding or #4067 changed frame/host bill. #4091 pins an earlier #4088 head: validate word, capacity and stock equivalence before applying that ceiling to the later fill.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "Independently reconstruct one changed ledger or pooled certificate with a positive case and a semantic failure control. Compare exact sources and name what existing checks miss. Keep this separate from supplier-boundary-audit (ordinary/outer dispatch) and uniform-transfer-audit (all-size proof). Stop after the chosen implication; more digits of an unchanged root are not additional mechanism coverage.", + "bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.", + "allowed_variations": [ + "Reconstruct either a source ledger or a numeric enclosure with a different method." + ], + "scope_change_triggers": [ + "Importing the primary function and calling its output independent verification.", + "Calling an aggregate histogram or source archive an independently accepted physical supplier." + ], + "overlap_terms": [ + "independent moment", + "rank histogram", + "exact enclosure", + "2979", + "rank7 joint endframes", + "paired extraction", + "joint lowering", + "4088", + "4091", + "4067", + "staged544-mixed-fourth-entry", + "staged-fourth-mixture-ceiling", + "r437-two-window-carrier" + ], + "existing_checks": [ + { + "scope": "PR #4088: mixed local/owner/phase ledger and moment reported.", + "evidence": "research/staged544-mixed-fourth-entry/README.md", + "remaining": "Independent binding of changed construction to paid histogram, distinct from full admission.", + "status": "author-checked", + "source_commit": "72d7efc181edb21806a878f174847c96dd410ab0", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4091: sharp pooled ceiling proposed for fixed THREE/FOUR words and inventory.", + "evidence": "research/staged-fourth-mixture-ceiling/README.md", + "remaining": "Validate dual, exhaustive pattern scope and exact source equivalence before applying to newer fills.", + "status": "author-checked", + "source_commit": "a29bdd8f56cd18b805917775cdec09ff935eddc4", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4067: paid (2,2) to (1,3) exchange and fixed OQ4 host reported.", + "evidence": "research/r437-two-window-carrier/README.md", + "remaining": "Independent full cost delta; remaining caller/precision/stock obligations are separate.", + "status": "author-checked", + "source_commit": "a95f11c52e3ca1e4c5171b3c20d8f4b0815aee2e", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Independently check PR4436 section 3 fully expanded rank-mass identity and invocation/column/routing counts, including every source complement and integer batch.", + "scope_change_reason": "Current-main refresh shows the interrupted R2 task superseded by PR3202/3208. The same independent-moment card applies to the explicit expanded-accounting gap excluded by PR4476; PR4483 changes exponent convergence and does not supply this independent count audit.", + "bottleneck_link": "Complete expanded counts fund raw-instance and conditional center-bank envelopes; local flow or normalized leaf costs alone do not check recursive multiplicities.", + "budget_minutes": 60, + "stop_rule": "One source-bound independent expanded-count audit with literal small programs, exact p7 counts and rejection controls. No new construction, exponent optimization or full native replay.", + "outcome": "completed", + "evidence": "RESULT.json, PROOF.md and the source-bound verifier independently reproduce complete published accounting and bound instance/column counts; validation details in VALIDATION.json.", + "author": "Dillon (@dillona), with OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance for investigation, implementation, mathematical review, tests and writing, including separate agents. No independent human or formal-kernel review.", + "open_questions": [ + { + "question": "Do the actual native executor, owned banks and router scratch realize these invocation counts with their full physical costs?", + "why_it_matters": "A rank-mass and bank-count bound does not price storage capacity, movement, scalar heights or precision.", + "first_step": "Bind one literal expanded toy schedule to actual native caller allocations and job adapters, then charge all scratch and initialization/erasure.", + "blocked_by": "Native and physical interfaces are inherited and are not executed in this accounting audit." + } + ], + "selection": { + "mode": "handoff-first successor coverage check", + "predecessor_pr": 4436, + "predecessor_head": "56003680aee2871773de408e5f01cc5dd46b144c", + "gap_pr": 4476, + "gap_head": "4e7022aa9128c8673d3e2024052b2deaa18cb6e4", + "public_claim": "Pending public handoff; SSH works, browser sign-in requested. No exclusivity claimed." + }, + "freshness": { + "upstream_commit": "2a13eb1827784206202db90e5dc8327cf8a250db", + "priority_revision": 7, + "checked_at_utc": "2026-10-22T02:15:08Z", + "decision": "Narrow from superseded R2 scope to expanded accounting; preserve frozen R2 draft separately." + }, + "overlap": { + "open_prs": 352, + "open_pr_pagination": "Four complete REST pages refreshed 2026-10-22T02:15:08Z, including drafts through PR4499; exact relevant heads unchanged.", + "discussions": "Start-here 1163 and bounded rendered views of handoffs 1166 and investigation 2612; not complete discussion pagination.", + "helper": "find_overlap on refreshed main: 5733 local records; remote helper unavailable without gh; separate REST scan used.", + "nearest": [ + "PR4436 original proof and author-side expanded counts", + "PR4456 independent per-flow mass and normalized leaves", + "PR4476 independent widths and routing; explicitly excludes expanded telescoping", + "PR4483 changed-height exponent convergence; not independently rechecked here" + ], + "limitations": "No unpublished work, complete historical diffs or complete Discussion corpus coverage. No claim of exclusive novelty." + }, + "preserved_work": { + "branch": "research/r2-superseded-20261022", + "commit": "3bf47763b", + "status": "Incomplete local R2 draft, not part of this contribution; credit PR3202 and PR3208 for superseding coverage." + }, + "orientation_check": { + "command": "python3 -B scripts/research_baseline.py", + "status": "failed on unchanged main", + "error": "KeyError: 'bit_lower'", + "scope": "Orientation helper expects the old certificate schema; current selected PR4359 record was read directly. No selected scientific replay was attempted and no baseline success is claimed." + } +} diff --git a/research/direct-flow-expanded-audit/VALIDATION.json b/research/direct-flow-expanded-audit/VALIDATION.json new file mode 100644 index 0000000000..efd50b20e0 --- /dev/null +++ b/research/direct-flow-expanded-audit/VALIDATION.json @@ -0,0 +1,58 @@ +{ + "schema_version": 1, + "checked_at_utc": "2026-10-22T02:16:29.185595+00:00", + "environment": { + "python": "3.12.15 (main, Oct 21 2026, 17:38:27) [Clang 23.1.3 ]", + "platform": "macOS-27.0.1-arm64-arm-64bit", + "machine": "arm64" + }, + "dependencies": "Python standard library only", + "scientific_inputs": "SOURCE-EXPORT.json; all seven exports checked against actual original Git blobs and retained unchanged.", + "source_retention_commit": "fd3fe31e9e0bec881393322a7d6586e4bcead43d", + "checked_code_sha256": { + "forest.py": "9b3d578df37e539ad75ef917612ff494fcc93640bc25d6f3f77a48cbb488537c", + "literal.py": "ea49fe71623a208faafd13bd4c71aac3155e2e7b459e36df2de035566f1eb6c5", + "accounting.py": "80135a2da045ef6fdb83f74126cf880010347c501008bfbd09a00e4a4426b7ca", + "verify.py": "c8383b0391b6a2f80f07a099268d5e4691d3f182befbdd3ca1d5a7767cb50119", + "RESULT.json": "d7c90173a64629da0746015d2f03083204e4a0fdd0d43956341fea0a422062e3" + }, + "checks": [ + { + "command": "python3.12 -B scripts/research_package.py --package research/direct-flow-expanded-audit --check-only", + "result": "PASS_PACKAGE_METADATA_AND_PINS; byte bindings only" + }, + { + "command": "python3.12 -B scripts/research_package.py --package research/direct-flow-expanded-audit", + "result": "PASS_DIRECT_FLOW_EXPANDED_ACCOUNTING and PASS_REGISTERED_RESEARCH_PACKAGE" + }, + { + "command": "python3.12 -I -O -B verify.py in separate package directory with PATH=/nonexistent", + "result": "PASS_DIRECT_FLOW_EXPANDED_ACCOUNTING", + "seconds": 4.623 + }, + { + "command": "same isolated optimized replay after changing one frozen source byte", + "result": "Rejected before computation at source bytes: vendor/PR4436-p7-RESULT.json" + }, + { + "command": "same isolated optimized replay after changing saved p7 surplus to 609", + "result": "Rejected after recomputation at saved receipt equality" + } + ], + "semantic_rejections": 14, + "literal_expansions": 44, + "large_counts": "Exact counted DAGs, not literal materialization; both toys through 100 and p7 through 1000.", + "unrun": [ + "Native and physical executor replay", + "All-size exponent/admission/outer theorem audit", + "Record grammar and precision-constant admission", + "Lean, Docker and historical suites" + ], + "orientation_helper": { + "command": "python3 -B scripts/research_baseline.py", + "status": "failed on unchanged main", + "error": "KeyError: 'bit_lower'", + "scope": "Orientation helper expects the old certificate schema; current selected PR4359 record was read directly. No selected scientific replay was attempted and no baseline success is claimed." + }, + "review": "Separate AI agent reviewed the induction and matching/compression semantics; no independent human or formal-kernel review." +} diff --git a/research/direct-flow-expanded-audit/VERIFY.json b/research/direct-flow-expanded-audit/VERIFY.json new file mode 100644 index 0000000000..96ac9f5fa1 --- /dev/null +++ b/research/direct-flow-expanded-audit/VERIFY.json @@ -0,0 +1,28 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/direct-flow-expanded-audit/SOURCE-EXPORT.json", + "research/direct-flow-expanded-audit/vendor/PR4436-README.md", + "research/direct-flow-expanded-audit/vendor/PR4436-RESULT.json", + "research/direct-flow-expanded-audit/vendor/PR4436-flow.py", + "research/direct-flow-expanded-audit/vendor/PR4436-p7-RESULT.json", + "research/direct-flow-expanded-audit/vendor/PR4476-README.md", + "research/direct-flow-expanded-audit/vendor/SUSSMAN-LICENSE", + "research/direct-flow-expanded-audit/vendor/SUSSMAN-NOTICE" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Authenticate frozen exports; independently count complete recursive batches and compare five predecessor totals for two toys and p7; literal traversal, rank-mass induction and semantic rejection controls. No native or exponent admission." + } + ] +} diff --git a/research/direct-flow-expanded-audit/accounting.py b/research/direct-flow-expanded-audit/accounting.py new file mode 100644 index 0000000000..ad1d4eca1d --- /dev/null +++ b/research/direct-flow-expanded-audit/accounting.py @@ -0,0 +1,130 @@ +"""Exact counted call DAG for the nested-width compiler. + +Dillon with OpenAI Codex assistance. Apache-2.0. +No count is recovered from the rank-mass identity being audited. +""" +from collections import Counter + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def inventory_mass(items): + return sum(rank * count for rank, count in items.items()) + + +def validate_flow(flow, targets, paid, n): + """Check the local premises before recursively expanding an invoice.""" + s, e, units = flow["sources"], flow["exits"], flow["units_by_column"] + need(bool(s), "nonempty source inventory") + for hist in (s, e, units): + need(all(type(k) is int and type(v) is int and k > 0 and v > 0 + for k, v in hist.items()), "positive integer inventory") + need(all(k <= n for k in s), "source rank fits") + need(all(k < n for k in e), "strict exit descent") + need(flow["units"] == sum(units.values()), "local unit census") + need(flow["column_mass"] == inventory_mass(units), "local column census") + delta = inventory_mass(targets) - inventory_mass(paid) + need(inventory_mass(s) - inventory_mass(e) == delta * flow["column_mass"], + "local rank mass") + w, p = sum(targets.values()), sum(paid.values()) + need(type(flow["matched_jobs"]) is int and flow["matched_jobs"] >= 0, + "nonnegative integer matched jobs") + need(sum(s.values()) + flow["matched_jobs"] == w * flow["units"], + "all target slots accounted for") + need(sum(e.values()) + flow["matched_jobs"] == p * flow["units"], + "all paid slots accounted for") + need(sum(s.values()) + sum(e.values()) + 2 * flow["matched_jobs"] + == (w + p) * flow["units"], "local slot census") + need(flow["routing_slots"] == sum(s.values()) + sum(e.values()) + + (w + p) * flow["units"], "local routing convention") + + +def compile_dag(targets, paid, maximum, make_flow): + """Build each smaller supplier once, retaining every edge multiplicity. + + A call node denotes one whole batch of width B[rank]. Reusing its stored + description does not merge its physical invocation instances. + """ + m = max(targets) + delta = inventory_mass(targets) - inventory_mass(paid) + nodes, counts, flows = [], [], {} + for n in range(maximum + 1): + if n < m: + nodes.append({"rank": n, "width": 1, "replication": 0, + "raw": [], "calls": [], "base_leaves": n, + "local_routes": 0}) + counts.append({"B": 1, "P": n, "U": 0, "Q": 0, "routes": 0}) + continue + flow = make_flow(targets, paid, n) + validate_flow(flow, targets, paid, n) + flows[n] = flow + replication = counts[n-1]["B"] + width = replication * sum(flow["sources"].values()) + raw = [(column, replication * instances) + for column, instances in sorted(flow["units_by_column"].items())] + calls = [] + for kind, hist in (("complement", flow["sources"]), ("exit", flow["exits"])): + for rank, amount in sorted(hist.items()): + child = n - rank if kind == "complement" else rank + need(0 <= child < n, "strict recursive descent") + jobs = replication * amount + batches, remainder = divmod(jobs, counts[child]["B"]) + need(remainder == 0, "integer child batches") + calls.append({"kind": kind, "rank": child, "jobs": jobs, + "batches": batches}) + node = {"rank": n, "width": width, "replication": replication, + "raw": raw, "calls": calls, "base_leaves": 0, + "local_routes": replication * flow["routing_slots"]} + value = {"B": width, "P": 0, "U": sum(v for _, v in raw), + "Q": sum(c * v for c, v in raw), "routes": node["local_routes"]} + for call in calls: + for key in ("P", "U", "Q", "routes"): + value[key] += call["batches"] * counts[call["rank"]][key] + need(width % counts[n-1]["B"] == 0, "nested widths") + check_expanded(n, value, delta, sum(targets.values()) + sum(paid.values())) + nodes.append(node) + counts.append(value) + return nodes, counts, flows + + +def check_expanded(n, value, delta, slots_per_unit): + need(all(type(v) is int and v >= 0 for v in value.values()), + "nonnegative expanded counts") + need(value["B"] > 0, "positive expanded width") + need(value["B"] * n - value["P"] == delta * value["Q"], + "expanded rank mass") + need(value["U"] <= value["Q"], "positive raw columns") + need(value["routes"] <= 2 * slots_per_unit * value["U"], + "expanded routing bound") + if delta > 0: + need(delta * value["Q"] <= value["B"] * n, + "positive-surplus instance bound") + + +def require_positive_surplus_bound(delta): + need(delta > 0, "positive surplus required for division bound") + + +def reverse_expand(nodes, rank): + """Independent evaluation: push invocation weights from root to leaves. + + Unlike bottom-up memoization, this computes a census of all invocation + ranks first, then reads primitive records. It never uses the mass formula. + """ + invocations = Counter({rank: 1}) + result = {"B": nodes[rank]["width"], "P": 0, "U": 0, "Q": 0, "routes": 0} + for n in range(rank, -1, -1): + weight = invocations[n] + node = nodes[n] + result["P"] += weight * node["base_leaves"] + result["routes"] += weight * node["local_routes"] + for column, copies in node["raw"]: + result["U"] += weight * copies + result["Q"] += weight * copies * column + for call in node["calls"]: + need(call["rank"] < n, "reverse expansion descent") + invocations[call["rank"]] += weight * call["batches"] + return result, dict(sorted((k, v) for k, v in invocations.items() if v)) diff --git a/research/direct-flow-expanded-audit/forest.py b/research/direct-flow-expanded-audit/forest.py new file mode 100644 index 0000000000..e144d2ca50 --- /dev/null +++ b/research/direct-flow-expanded-audit/forest.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Independent ordered-word counting of the capped direct-flow forest. + +A unit is labelled by an ordered word of target slots. The target slot k +of a child labelled v corresponds to the one parent labelled v followed by +k. Thus matching uses a bijection of labelled slots, not a multinomial +formula or the producer's point matcher. The compressed mode sums words +with equal products only after this matching rule has been specified. +""" +from collections import Counter +from itertools import product +from math import prod + + +def need(condition, reason): + if not condition: + raise ValueError(reason) + + +def profile(value, label): + need(isinstance(value, dict) and value, label + ' nonempty inventory') + need(all(type(k) is int and k > 0 and type(v) is int and v > 0 + for k, v in value.items()), label + ' positive integer entries') + return dict(sorted(value.items())) + + +def _products(alphabet, degree, cap): + """Count ordered words by product, retaining multiplicity of every letter.""" + levels = [Counter({1: 1})] + for _ in range(degree): + following = Counter() + for old, count in levels[-1].items(): + for letter, copies in alphabet.items(): + if old * letter <= cap: + following[old * letter] += count * copies + levels.append(following) + return levels + + +def forest(targets, paid, n, height=None, *, literal=False, word_limit=1000000): + """Return whole-job inventories and explicit raw-unit column counts. + + ``literal=True`` enumerates individual ordered target and paid words; + it is intended for small fixtures. The default performs exact integer + convolution on their products. Both use the same append-one-letter + correspondence and preserve repeated target/paid positions. + """ + targets, paid = profile(targets, 'target'), profile(paid, 'paid') + m, smallest = max(targets), min(targets) + need(type(n) is int and n >= m, 'top rank at least ambient') + need(smallest >= 2 and max(paid) < m, 'strict recursive rank contract') + cap = n // m + if height is None: + height, least = 0, 1 + while least * smallest <= cap: + height += 1 + least *= smallest + need(type(height) is int and height >= 0, 'nonnegative integral height') + sources, exits, boundary, columns = Counter(), Counter(), Counter(), Counter() + matched = 0 + W, P = sum(targets.values()), sum(paid.values()) + + if literal: + target_letters = tuple(k for k, count in targets.items() for _ in range(count)) + paid_letters = tuple(k for k, count in paid.items() for _ in range(count)) + # Bound enumeration before allocating any lists, including duplicate + # rank letters: those duplicates represent distinct physical slots. + need(sum(W ** g for g in range(height + 1)) + + sum(P ** d for d in range(height + 1)) <= word_limit, + 'literal ordered-word limit') + target_words = [list(product(target_letters, repeat=g)) for g in range(height + 1)] + + def target_products(g): + return ((prod(word), 1) for word in target_words[g]) + + def path_products(d): + return ((prod(word), 1) for word in product(paid_letters, repeat=d) + if prod(word) <= cap) + else: + target_levels = _products(targets, height, cap) + path_levels = _products(paid, height, cap) + + def target_products(g): + return target_levels[g].items() + + def path_products(d): + return path_levels[d].items() + + # Root target slots have no parent and are all distinct source jobs. + for c, copies in target_products(height): + if c <= cap: + for k, count in targets.items(): + sources[c * k] += copies * count + + for depth in range(height + 1): + remaining = height - depth + for rho, paths in path_products(depth): + for c, copies in target_products(remaining): + if rho * c <= cap: + columns[rho * c] += paths * copies + for r, rounds in paid.items(): + if remaining == 0: + # The sole empty target word has one raw unit here. + if rho <= cap: + exits[rho * r] += paths * rounds + continue + # A parent word is v followed by its final target letter k. + # Its paid r-job and the child v's k-slot have the same rank. + for prefix, words in target_products(remaining - 1): + child_exists = rho * r * prefix <= cap + for k, slots in targets.items(): + parent_exists = rho * prefix * k <= cap + copies = paths * rounds * words * slots + rank = rho * r * prefix * k + if parent_exists and child_exists: + matched += copies + elif parent_exists: + exits[rank] += copies + boundary[rank] += copies + elif child_exists: + sources[rank] += copies + + sources, exits, boundary, columns = map(lambda c: dict(sorted(c.items())), + (sources, exits, boundary, columns)) + units = sum(columns.values()) + column_mass = sum(c * count for c, count in columns.items()) + S, E = sum(sources.values()), sum(exits.values()) + # These are slot-accounting checks, not the rank-mass identity that the + # independent expanded-program verifier is intended to establish. + need(S > 0 and S + matched == W * units, 'all target slots accounted for') + need(E + matched == P * units, 'all issued paid slots accounted for') + need(all(1 <= s <= n for s in sources), 'source rank range') + need(all(1 <= e < n for e in exits), 'strict exit rank descent') + return {'n': n, 'height': height, 'sources': sources, 'exits': exits, + 'boundary_exits': boundary, 'units_by_column': columns, + 'units': units, 'column_mass': column_mass, 'source_count': S, + 'matched_jobs': matched, 'routing_slots': S + E + (W + P) * units} diff --git a/research/direct-flow-expanded-audit/literal.py b/research/direct-flow-expanded-audit/literal.py new file mode 100644 index 0000000000..f5cf7d3384 --- /dev/null +++ b/research/direct-flow-expanded-audit/literal.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Expand the finite compiler's call tree and count its actual records. + +This is a counting traversal, not a claimed physical execution schedule. +Small tests visit every raw instance, routing slot, rank-one leaf and child +invocation. DAG mode evaluates the same repeated call tree by memoization; +it is explicitly distinct from a literal traversal. Neither mode derives +any returned count from a telescoping or moment identity. +""" +from collections import Counter +import forest + + +def need(condition, reason): + if not condition: + raise ValueError(reason) + + +def build_plan(targets, paid, maximum): + """Build independently batched local calls with nested divisible widths. + + The returned plain dictionaries can be copied and modified by semantic + rejection controls. No source compiler code is imported or executed. + """ + targets, paid = forest.profile(targets, 'target'), forest.profile(paid, 'paid') + m = max(targets) + need(type(maximum) is int and maximum >= 0, 'nonnegative maximum rank') + need(min(targets) >= 2 and max(paid) < m, 'strict recursive rank contract') + nodes = [] + for n in range(maximum + 1): + if n < m: + nodes.append({'rank': n, 'width': 1, 'base_leaves': n, + 'replication': 0, 'raw_columns': {}, + 'routing_slots_per_copy': 0, 'children': []}) + continue + f = forest.forest(targets, paid, n) + replication = nodes[n - 1]['width'] + width = replication * f['source_count'] + children = [] + for kind, inventory in (('complement', f['sources']), ('exit', f['exits'])): + for rank, count in inventory.items(): + child_rank = n - rank if kind == 'complement' else rank + need(0 <= child_rank < n, 'strict child rank descent') + child_width = nodes[child_rank]['width'] + jobs = replication * count + need(jobs % child_width == 0, 'whole child batch divisibility') + children.append({'kind': kind, 'rank': child_rank, 'jobs': jobs, + 'width': child_width, 'copies': jobs // child_width}) + nodes.append({'rank': n, 'width': width, 'replication': replication, + 'source_count': f['source_count'], 'sources': f['sources'], + 'exits': f['exits'], 'raw_columns': f['units_by_column'], + 'routing_slots_per_copy': f['routing_slots'], 'children': children}) + return {'ambient': m, 'maximum': maximum, 'nodes': nodes} + + +def _check_node(plan, n): + nodes = plan['nodes'] + need(type(n) is int and 0 <= n < len(nodes), 'call rank in plan') + node = nodes[n] + need(node['rank'] == n and type(node['width']) is int and node['width'] > 0, + 'uniform node identity and width') + if n < plan['ambient']: + need(type(node['base_leaves']) is int and node['base_leaves'] >= 0, + 'base leaves nonnegative integer') + return node + a = node['replication'] + need(type(a) is int and a > 0, 'positive batch replication') + need(all(type(c) is int and c > 0 and type(k) is int and k >= 0 + for c, k in node['raw_columns'].items()), 'raw instance inventory') + need(type(node['routing_slots_per_copy']) is int and node['routing_slots_per_copy'] >= 0, + 'routing slot inventory') + for child in node['children']: + r, copies, jobs = child['rank'], child['copies'], child['jobs'] + need(type(r) is int and 0 <= r < n, 'strict child rank descent') + need(type(copies) is int and copies >= 0 and type(jobs) is int and jobs >= 0, + 'whole child batch counts') + need(child['width'] == nodes[r]['width'] and jobs == copies * child['width'], + 'whole child batch divisibility') + return node + + +def walk_plan(plan, rank=None, *, mode='literal', max_events=300000): + """Count a plan either by visiting every record or by exact DAG reuse.""" + if rank is None: + rank = plan['maximum'] + need(mode in ('literal', 'dag'), 'known traversal mode') + need(type(max_events) is int and max_events > 0, 'positive traversal budget') + fields = ('leaves', 'raw_units', 'raw_columns', 'routing_slots', 'uniform_calls', 'zero_calls') + + if mode == 'literal': + total = Counter({key: 0 for key in fields}) + calls = Counter() + events = 0 + + def emit(kind, value=1): + nonlocal events + events += 1 + need(events <= max_events, 'literal expanded-event limit') + if kind == 'raw': + total['raw_units'] += 1 + total['raw_columns'] += value + else: + total[kind] += 1 + + def visit(n): + node = _check_node(plan, n) + emit('uniform_calls') + calls[n] += 1 + if n < plan['ambient']: + if n == 0: + total['zero_calls'] += 1 + for _ in range(node['base_leaves']): + emit('leaves') + return + for _ in range(node['replication']): + for column, count in node['raw_columns'].items(): + for _ in range(count): + emit('raw', column) + for _ in range(node['routing_slots_per_copy']): + emit('routing_slots') + for child in node['children']: + for _ in range(child['copies']): + visit(child['rank']) + + visit(rank) + total = dict(total) + else: + table, call_table = [], [] + for n in range(rank + 1): + node = _check_node(plan, n) + row = Counter({key: 0 for key in fields}) + row['uniform_calls'] = 1 + rank_calls = Counter({n: 1}) + if n < plan['ambient']: + row['leaves'] = node['base_leaves'] + row['zero_calls'] = int(n == 0) + else: + a = node['replication'] + row['raw_units'] = a * sum(node['raw_columns'].values()) + row['raw_columns'] = a * sum(c * count for c, count in node['raw_columns'].items()) + row['routing_slots'] = a * node['routing_slots_per_copy'] + for child in node['children']: + r, copies = child['rank'], child['copies'] + for key in fields: + row[key] += copies * table[r][key] + for child_rank, count in call_table[r].items(): + rank_calls[child_rank] += copies * count + table.append(row) + call_table.append(rank_calls) + total, calls = dict(table[rank]), call_table[rank] + events = sum(total[key] for key in ('leaves', 'raw_units', 'routing_slots', 'uniform_calls')) + return {'rank': rank, 'width': plan['nodes'][rank]['width'], **total, + 'events': events, 'rank_call_counts': dict(sorted(calls.items())), 'mode': mode} + + +def compile_counts(targets, paid, maximum, *, mode='literal', max_events=300000): + return walk_plan(build_plan(targets, paid, maximum), mode=mode, max_events=max_events) diff --git a/research/direct-flow-expanded-audit/verify.py b/research/direct-flow-expanded-audit/verify.py new file mode 100644 index 0000000000..91800b0e39 --- /dev/null +++ b/research/direct-flow-expanded-audit/verify.py @@ -0,0 +1,231 @@ +#!/usr/bin/env python3 +"""Independent expanded accounting, not native or exponent admission. + +Dillon with OpenAI Codex assistance. Apache-2.0. +""" +import argparse +import copy +import hashlib +import json +from pathlib import Path +import sys + +PACKAGE = Path(__file__).resolve().parent +# Compile package sources directly: -B alone would still read preexisting pyc. +def source_module(name): + import types + module = types.ModuleType(name) + module.__file__ = str(PACKAGE / (name + ".py")) + sys.modules[name] = module + exec(compile((PACKAGE / (name + ".py")).read_bytes(), module.__file__, "exec"), + module.__dict__) + return module + +forest_module = source_module("forest") +accounting = source_module("accounting") +literal = source_module("literal") +need = accounting.need + + +def read(name): + return json.loads((PACKAGE / name).read_text()) + + +def authenticate(): + manifest = read("SOURCE-EXPORT.json") + checked = {} + for row in manifest["files"]: + data = (PACKAGE / row["path"]).read_bytes() + digest = hashlib.sha256(data).hexdigest() + blob = hashlib.sha1(b"blob " + str(len(data)).encode() + b"\0" + data).hexdigest() + need(digest == row["sha256"] and blob == row["git_blob"], + "source bytes: " + row["path"]) + checked[row["path"]] = digest + return checked + + +def integer_receipt(value): + need(type(value) is int and value >= 0, "unsigned receipt integer") + data = value.to_bytes(max(1, (value.bit_length() + 7) // 8), "big") + return {"bits": value.bit_length(), "unsigned_big_endian_sha256": hashlib.sha256(data).hexdigest()} + + +def count_receipt(counts): + return {key: integer_receipt(value) for key, value in sorted(counts.items())} + + +def int_hist(hist): + return {int(k): v for k, v in hist.items()} + + +def source_comparisons(): + saved = read("vendor/PR4436-RESULT.json") + fixtures = [] + for entry in saved["finite_flows"]: + targets, paid = int_hist(entry["targets"]), int_hist(entry["paid"]) + original = entry["flow"] + actual = forest_module.forest(targets, paid, original["n"]) + need(actual == forest_module.forest(targets, paid, original["n"], literal=True), + "individual ordered-word forest") + for ours, theirs in (("sources", "sources"), ("exits", "exits"), + ("boundary_exits", "boundary_exits")): + need(actual[ours] == int_hist(original[theirs]), "source flow " + ours) + for ours, theirs in (("units", "units"), ("column_mass", "column_mass"), + ("matched_jobs", "matched_jobs"), ("height", "height")): + need(actual[ours] == original[theirs], "source flow " + ours) + fixtures.append({"rule": entry["rule"], "n": original["n"]}) + return saved, fixtures + + +def compare_recorded(counts, saved): + names = {"B": "productive_width", "P": "paid_rank_one_leaves", + "U": "raw_instances", "Q": "column_mass", "routes": "routing_slots"} + for ours, theirs in names.items(): + need(integer_receipt(counts[ours]) == saved[theirs], "expanded predecessor " + theirs) + + +def reject(label, thunk, substring): + try: + thunk() + except ValueError as exc: + need(substring in str(exc), "wrong rejection for " + label + ": " + str(exc)) + return label + raise ValueError("accepted mutant: " + label) + + +def controls(): + rejected = [] + # This tiny physical-rank invoice has a necessary positive complement. + targets, paid, n = {2: 1}, {1: 1}, 3 + nodes, values, _ = accounting.compile_dag(targets, paid, n, forest_module.forest) + need(values[n] == {"B": 1, "P": 2, "U": 1, "Q": 1, "routes": 4}, + "hand-calibrated complement example") + for label, alter in ( + ("omitted_source_complement", lambda node: node.update(calls=[c for c in node["calls"] if c["kind"] != "complement"])), + ("omitted_exit", lambda node: node.update(calls=[c for c in node["calls"] if c["kind"] != "exit"])), + ("duplicated_child_batch", lambda node: node["calls"][0].update(batches=2)), + ("omitted_raw_instance", lambda node: node.update(raw=[])), + ("wrong_raw_column", lambda node: node.update(raw=[(2, 1)])), + ): + mutant = copy.deepcopy(nodes) + alter(mutant[n]) + value, _ = accounting.reverse_expand(mutant, n) + rejected.append(reject(label, lambda v=value: accounting.check_expanded(n, v, 1, 2), + "expanded rank mass")) + for delta in (0, -1): + rejected.append(reject("division_bound_delta_" + str(delta), + lambda d=delta: accounting.require_positive_surplus_bound(d), + "positive surplus required")) + # A source-sensitive local mutation must reach the mass predicate. + bad = copy.deepcopy(forest_module.forest({2: 1, 5: 1}, {1: 2, 4: 1}, 20)) + boundary = next(iter(bad["boundary_exits"])) + bad["exits"][boundary] -= bad["boundary_exits"][boundary] + if not bad["exits"][boundary]: + del bad["exits"][boundary] + rejected.append(reject("omitted_premature_exit", lambda: accounting.validate_flow( + bad, {2: 1, 5: 1}, {1: 2, 4: 1}, 20), "local rank mass")) + # Mutate a separately constructed, literally visited batch plan. These + # faults enter after source authentication and leave input hashes intact. + plan = literal.build_plan({2: 4, 3: 1}, {1: 6, 2: 2}, 6) + bad = copy.deepcopy(plan) + child = next(c for c in bad["nodes"][6]["children"] if c["width"] > 1) + child["jobs"] += 1 + rejected.append(reject("nonintegral_child_batch", lambda: literal.walk_plan(bad), + "whole child batch divisibility")) + for label in ("deduplicated_child_instances", "missing_replication", "collapsed_raw_columns", + "missing_base_leaf"): + bad = copy.deepcopy(plan) + if label == "deduplicated_child_instances": + for child in bad["nodes"][6]["children"]: + if child["copies"]: + child["copies"] = 1 + child["jobs"] = child["width"] + elif label == "missing_replication": + bad["nodes"][6]["replication"] = 1 + elif label == "collapsed_raw_columns": + bad["nodes"][6]["raw_columns"] = {1: sum(bad["nodes"][6]["raw_columns"].values())} + else: + bad["nodes"][1]["base_leaves"] = 0 + walked = literal.walk_plan(bad) + value = {key: walked[field] for key, field in + (("B", "width"), ("P", "leaves"), ("U", "raw_units"), + ("Q", "raw_columns"), ("routes", "routing_slots"))} + rejected.append(reject(label, lambda v=value: accounting.check_expanded(6, v, 1, 13), + "expanded rank mass")) + rejected.append(reject("nondecreasing_paid_rank", lambda: forest_module.forest( + {2: 1}, {2: 1}, 3), "strict recursive rank contract")) + return rejected + + +def verify(): + sources = authenticate() + saved, fixtures = source_comparisons() + summary = [] + rules = [({2: 1, 5: 1}, {1: 2, 4: 1}), ({2: 4, 3: 1}, {1: 6, 2: 2})] + for (targets, paid), recorded in zip(rules, saved["exact_toy_compilations"]): + nodes, values, flows = accounting.compile_dag(targets, paid, 100, forest_module.forest) + compare_recorded(values[100], recorded) + for rank in range(101): + reversed_counts, _ = accounting.reverse_expand(nodes, rank) + need(reversed_counts == values[rank], "reverse counted expansion") + summary.append({"targets": targets, "paid": paid, "n": 100, + "expanded_counts": count_receipt(values[100]), + "nonbase_ranks": len(flows), "reverse_expansions": 101}) + raw = read("vendor/PR4436-p7-RESULT.json")["strictification"]["native_inventory"] + targets, paid = int_hist(raw["targets"]), int_hist(raw["paid"]) + need(accounting.inventory_mass(targets) - accounting.inventory_mass(paid) == 608, + "p7 source surplus") + nodes, values, flows = accounting.compile_dag(targets, paid, 1000, forest_module.forest) + compare_recorded(values[1000], saved["exact_p7_direct_compilation"]) + reverse, invocations = accounting.reverse_expand(nodes, 1000) + need(reverse == values[1000], "p7 reverse counted expansion") + p7 = {"n": 1000, "nonbase_ranks": len(flows), "surplus": 608, + "expanded_counts": count_receipt(values[1000]), + "positive_invocation_rank_classes": len(invocations), + "scope": "Counted DAG, not literal enumeration of the enormous program."} + return {"status": "PASS_DIRECT_FLOW_EXPANDED_ACCOUNTING", "schema_version": 1, + "source_sha256": sources, "source_flow_fixtures": fixtures, + "toy_counted_expansions": summary, "p7_counted_expansion": p7, + "literal_expansions": literal_checks(), "semantic_rejections": controls(), + "new_kappa": False, + "scope": "Independent finite expanded accounting and a conditional induction proof; native, physical, all-size exponent and precision admission remain outside scope."} + + +def literal_checks(): + receipts = [] + cases = [({2: 1}, {1: 1}, 8), ({2: 1, 5: 1}, {1: 2, 4: 1}, 13), + ({2: 4, 3: 1}, {1: 6, 2: 2}, 6), ({3: 1, 4: 1}, {1: 1, 2: 2}, 13)] + for targets, paid, maximum in cases: + _, values, _ = accounting.compile_dag(targets, paid, maximum, forest_module.forest) + for rank in range(maximum + 1): + walked = literal.compile_counts(targets, paid, rank, max_events=300000, mode="literal") + actual = {key: walked[field] for key, field in + (("B", "width"), ("P", "leaves"), ("U", "raw_units"), + ("Q", "raw_columns"), ("routes", "routing_slots"))} + need(actual == values[rank], "literal full expansion") + receipts.append({"targets": targets, "paid": paid, "ranks": [0, maximum], + "last_counts": values[maximum], "last_literal_events": walked["events"]}) + # Distinct target words can have the same product (2*8 == 4*4). + # The literal enumeration retains both before comparing with convolution. + collision_ranks = [8, 16, 32, 64, 128] + for rank in collision_ranks: + args = ({2: 1, 4: 1, 8: 1}, {1: 2, 3: 1}, rank) + need(forest_module.forest(*args) == forest_module.forest(*args, literal=True), + "equal-product word multiplicities") + return {"full_call_tree_cases": receipts, "equal_product_flow_ranks": collision_ranks} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--emit", action="store_true", help="recompute and print a candidate receipt") + args = parser.parse_args() + receipt = json.loads(json.dumps(verify(), sort_keys=True)) + if args.emit: + print(json.dumps(receipt, indent=2, sort_keys=True)) + else: + need(receipt == read("RESULT.json"), "saved receipt agrees with recomputation") + print(receipt["status"]) + + +if __name__ == "__main__": + main() From d72f228237525ad07e8b1bd9000143b464a10225 Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 21 Oct 2026 23:22:51 -0400 Subject: [PATCH 3/3] Record refreshed upstream and submission overlap --- research/direct-flow-expanded-audit/TASK.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/research/direct-flow-expanded-audit/TASK.json b/research/direct-flow-expanded-audit/TASK.json index 7031b370dc..41d8b6f567 100644 --- a/research/direct-flow-expanded-audit/TASK.json +++ b/research/direct-flow-expanded-audit/TASK.json @@ -134,5 +134,13 @@ "status": "failed on unchanged main", "error": "KeyError: 'bit_lower'", "scope": "Orientation helper expects the old certificate schema; current selected PR4359 record was read directly. No selected scientific replay was attempted and no baseline success is claimed." + }, + "publication_checkpoint": { + "upstream_commit": "f9f85c1e4fa1e955ff39f10fca447e3e2a4e4adc", + "checked_at_utc": "2026-10-22T03:22:51.239933+00:00", + "priority_revision": 7, + "guidance": "Required guides, priorities and selected record unchanged; canonical main merged into isolated contribution branch to preserve frozen source-retention commit ancestry.", + "overlap": "No existing PR for this fork branch. PR4436/4456/4476/4483 are now merged. New PR4507 optimizes chronological batch widths and checks local mass and normalized leaves, not expanded raw-instance/column counts; the scopes remain distinct.", + "authentication": "gh authenticated as dillona; explicit user authorization to submit." } }