diff --git a/research/gen5b-shared-kernels/NOTICE.md b/research/gen5b-shared-kernels/NOTICE.md new file mode 100644 index 0000000000..13193e0c0a --- /dev/null +++ b/research/gen5b-shared-kernels/NOTICE.md @@ -0,0 +1,39 @@ +# Attribution and scope + +New material is provided under the repository's Apache-2.0 license and was +prepared with substantial OpenAI assistance. Separate AI-assisted checks are +not human peer review, an OpenAI endorsement or proof-assistant verification. + +This proposal builds on Chafik Boukhalfa's PR #299 package, prepared with +substantial Anthropic Claude assistance, pinned at +`5f6bd3fbc0e6796dd31263cef1f06dc968186f64`. It retains that package's source +lineage, licensing and assistance disclosures. Its +[full immutable notice](https://github.com/CrocSwap/integer-mult-bounds/blob/5f6bd3fbc0e6796dd31263cef1f06dc968186f64/research/five-stage-gen5b-kernels-restorations-sinks/NOTICE.md) +remains applicable to the input data and inherited mechanisms. + +In particular, the construction inherits DreamingOfClouds' gen5/stagealt word, +Rohan Arun's descent and target stages, eumemic's scalar/five-stage/kernel +pipeline, utcorvusvolat-dotcom's early restoration mechanism, Dugongue's +endpoint-aware banking and terminal-sink work, Evan McKinney's completed-bank +method, and Chafik Boukhalfa's complex supplier. The full notice credits +Henry Grant, Jacob Sussman, ikeboy, icekylinx, James Chang, sennemmi and the +earlier contributors and dependencies. + +The new contribution is the shared-donor 70- and 72-pivot construction, its +composition with the coordinated 12-helper/root/partner schedule, explicit +role-to-bank allocation, independently authored changed-stage checks and +conditional repricing. The co-retiming component is the prior PR #301 +contribution, retained here for standalone reproduction. It makes no exclusive +priority claim for inherited mechanisms or a global optimum claim. PR #294's +separate assembly-domain proposal is not modified or required. + +Upstream input files are fetched as immutable data. Their original notices +and source-specific licensing remain unchanged. No upstream executable is +imported or run by this package. + +The PR #300 second constructed-frame descent is Rohan Arun's contribution, +pinned at `fd516176fd068e4fa7af14b40cd878ce8c305296`; its source and attribution +are retained by reference to the immutable +[full package](https://github.com/rohanarun/integer-mult-bounds/tree/fd516176fd068e4fa7af14b40cd878ce8c305296/research/five-stage-gen5b-full). +The new composition checks do not claim authorship of that descent or reprove +its unchanged physical/source-span admission. PR #301 itself is unchanged. diff --git a/research/gen5b-shared-kernels/PROOF-CORETIME12.md b/research/gen5b-shared-kernels/PROOF-CORETIME12.md new file mode 100644 index 0000000000..d5989fe726 --- /dev/null +++ b/research/gen5b-shared-kernels/PROOF-CORETIME12.md @@ -0,0 +1,151 @@ +# Co-retiming twelve helpers with their partner deliveries + +All claims below concern the pinned PR #299 input and retain its unchanged +stage and compiler interfaces. All ranks and containments are over Q unless +the field is explicitly stated. This is a differential construction proof, +not a new proof of the inherited all-size foundations. + +## 1. Selection and the obstruction to an unchanged-frame restoration + +The root-cut screen identifies 34 rank-21 entrance helpers `a`. Each has one +forward write `a += b`. Their common write frame `J` has dimension 22. Their +last root deliveries occur at different dimension-23 hyperplanes `A` and `B`, +whose intersection is `J` and whose join is full dimension 24. + +Thus merely moving `a -= b` earlier, while preserving both delivery frames, +does not improve its endpoint. The local candidate screen instead identifies +a preceding rank-22 root delivery by a blocker `c` to the relevant target `t`. +Two conflicting candidates are excluded. Among the remaining 32, keep exactly +the candidates whose old-restoration pair is hit twice. This gives 12 new +helpers and six old restorations to undo; all selected identities are derived +from pinned data and recorded in `certificates/coretime12/local.json`. + +## 2. The changed schedule + +At each selected blocker root: + +1. Move `b`'s later delivery to `t` earlier, at `J`. +2. Deliver `c` to its unaffected target at its old frame `K`. +3. Perform the partner setup and its unaffected delivery at the inherited + post-descent rank-22 frame. +4. Advance the affected target, blocker and partner carrier as required to + `B`, and perform their remaining deliveries there. +5. After `a`'s original final delivery at `A`, perform `a -= b` at `A`, + omitting its original cleanup write. + +The selected preceding prefix and gauge frames lie in `J`. For each moved +donor, the union of all uncancelled source dependencies has 180 leaves and +lies in `J`; this check is stronger than a mod-2 cancellation test. The local +checker verifies the integer root map on independent helper/target values. + +The complete suffix checker includes all unchanged side roots, partner +deliveries, inverse cleanup, uninject operations and kernel restorations. +It constructs both 55,985-event streams and compares all 18,954 columns over +F2 and Z in both directions. Its entry states are arbitrary, so the equality +composes with the same unchanged prefix. Missing restoration is a negative +control. The inherited prefix's own correctness is not re-proved. + +The two overlapping kernel donors are never pivots; their pinned setup bases +lie in `J`. Kernel setup precedes first ordinary use and inverse kernel writes +follow cleanup under the retained stage contract. Seven inherited sinks and +all other suffix operations remain in the comparison. + +## 3. Correct chronological geometry + +The earlier root-only proposal missed a partner delivery at the old `K` frame. +Promoting the target to `B` and then delivering again at `K` is non-monotone. +The schedule above explicitly co-retimes that partner read and charges its +carrier's split climb. + +The frame checker starts affected helpers at their actual base-forward final +frames. No affected helper participates in a descent change. Each of the 12 +selected partner setups does participate: its pinned descent record replaces +a dimension-2 setup by a dimension-22 setup. The checker verifies the exact +new basis and uses it in both schedules. It checks every affected helper, +carrier and target path, including the six reverted endpoints, and rejects +omitting the partner promotion or old-restoration undo. + +Targets use a difference census from ZERO. Their unchanged earlier prefixes +end within the verified first precursor frame under the retained source +admission; the local source/gauge/target-prefix checks explicitly establish +the required new cut containments. No full untouched-prefix frame replay is +claimed. + +## 4. Paid profile and endpoint demands + +For the new helper/blocker operations alone, one surgery changes the local +histogram by `{1:+1, 2:-1}`. Undoing one inherited early restoration reverses +its delta `{1:+3, 2:-2}`. Co-retiming each partner carrier splits one rank-2 +climb into two rank-1 climbs, adding `{1:+2, 2:-1}`. Therefore + +``` +12*{1:+1, 2:-1} - 6*{1:+3, 2:-2} + 12*{1:+2, 2:-1} + = {1:+18, 2:-12}. +``` + +The actual chronological path census independently obtains this delta; it is +not used as an unchecked input to pricing. It adds six calls and removes six +units of rank mass locally. Five stages therefore add 30 calls and remove 30 +units of rank mass. The reflected paid ledger has the same rank increments +because annihilator inclusion reverses each nested frame pair. + +Each new helper changes residual rank 3 to 2. Each of the six reverted old +helpers changes residual rank 3 to 4. Thus the family-count delta is +`{2:+12, 3:-18, 4:+6}`, of total rank mass -6. + +For each stage's 60 replicas, replace 27 full rank-3 banks by 12 full rank-2 +banks and 12 full rank-4 banks. Each bank has width 120. Demand is exact and +the number of banks drops by three per stage, or 15 in the five-stage literal +stock. The bank checker reconstructs every role's entrance and endpoint, removes the +seven sinks, and assigns all 925,620 role/replica occurrences in a stage to +explicit bank and block addresses without collisions or omissions. Five +disjoint stage namespaces give 4,628,100 assignments. Every bank is full, +attaining the exact volume lower bound. The +unreplicated stock drops by `15/60 = 1/4`; this convention differs from +normalizing the literal stock by five. + +With `W = 1229735/60`, the independently repriced histogram has 482,665 calls, +rank mass 2,455,070 and unchanged deficit `120 W - 2455070 = 4400`. + +## 5. Changed chart and scalar bounds + +Using the retained weighted form `G = I - J/9`, construct each new rank-2 +residual projector as the endpoint projector minus its rank-21 entrance +projector. Its complementary completion has rank 22. An exact orthogonal +block basis uses residual, entrance and exterior columns. The six reverted +rank-4 charts are reconstructed from their original rank-20 entrances. + +Every changed 24-by-24 chart is invertible. A separately replayed exact +factor program recovers it from the identity. The largest uses 142 factors; +factor numerators are at most 11 and denominators at most 9. These fit the +retained chart-factor bound 576 and normalizer bound 815. New pure rank-2 +banks require at most 60 block scalars, within width 120; all are units under +the retained characteristic `q > 2^80` hypothesis. + +The before/after nonnegative coefficient majorant maps agree exactly in both +directions. A second certificate transports the old scalar norms through +172,944 commuting adjacent swaps. Only twelve destination update orders +change; each differs by moving one unit update. At intermediate cuts the new +row is an old row plus or minus one old source row, yielding a conservative +factor-two bound in each direction. Its resulting 103-bit payload remains +below the inherited 104-bit cap. + +The changed displayed finite coefficient is 90,386,288,803,484,701, or 57 bits, +below the retained 80-bit coefficient cap. All three bootstrap gaps and the +displayed cutoffs remain positive. These are checks at the displayed fixed +bill, not a numerical assignment to the unknown inherited full constant. + +## 6. Exact conditional rate + +The independently authored rational enclosure engine certifies the coarse +root between adjacent points `750469712644613/10^18` and +`750469712644614/10^18`, accepting the lower point and rejecting the higher. +Three retained ordinary bootstrap steps and the unchanged complex saving +produce `kappa = 749906929903449/10^18`. All 47 displayed outer constraints +are strict; increasing kappa by `10^-18` fails `g3_above_kappa`. + +This establishes the stated conditional arithmetic consequence of the changed +profile. It supplies no unconditional bound, replacement of the inherited +finite admission, or full proof-assistant verification of multiplication. + +Prepared with substantial OpenAI assistance. See [NOTICE.md](NOTICE.md). diff --git a/research/gen5b-shared-kernels/PROOF-KERNEL72.md b/research/gen5b-shared-kernels/PROOF-KERNEL72.md new file mode 100644 index 0000000000..1d432abf6f --- /dev/null +++ b/research/gen5b-shared-kernels/PROOF-KERNEL72.md @@ -0,0 +1,159 @@ +# Shared-donor kernel validation (separate from frozen final12) + +## Verified candidate + +Pinned source: PR299 commit `5f6bd3fbc0e6796dd31263cef1f06dc968186f64`. +The larger candidate uses the line groups `(6,7)`, `(16,17)`, `(2,3)`, dropping +only pivot relations 10859 and 10861 from the first group. It has 72 pivots, +93 distinct donors,165 helper roles and 473 setup/restore shear pairs. +All three individual groups and both proposed disjoint unions were checked. +No source program was imported or executed. + +Every role is plain, not reused, not removed by the sink stage, not a member +of the frozen kernel stage, not an endpoint in the 904 descent changes, and +not touched by final12 and not an old restored endpoint. Any restoration-donor +uses are included in the chronological audit (none occur for these witnesses). All new helper endpoints +remain FULL. Each group uses the common entrance line E=span(e_i-e_j). +Its Gram entry for 9 I-J is 18, so it is nondegenerate over Q and every retained +prime q > 2^80. Exact rational containment checks place E inside every member's +first required frame and check each subsequent old chronological frame step. +The 72-pivot union uses 663 distinct old frame containments. + +## Scalar identity on arbitrary independent dirty inputs + +This is a compositional proof at the bit F2 interface, not a claim that the +entire parity-filtered decoder is an integer identity. Let Q be the actual +prefix through all initial plain dirty compensation reads, but before source +injections or any new member's other use. Let S be the old remaining word. +The inherited complete decoder is U=SQ: target += source, all source/dirty +coordinates fixed. + +Let K=sum e_d e_p^T over every new donor/pivot incidence and A=I+K. +Pivot and donor sets are disjoint, hence K²=0, A^-1=A in F2, and all individual +setup shears commute, even with a donor shared by several pivots. +All new members remain unchanged in Q except for their target compensation +columns. Write R for that response matrix. The independently reconstructed +integer adjoint, reduced modulo 2, verifies R_p=sum_d R_d for each pivot. +If Q' is Q with precisely the pivot compensation reads omitted, this gives +A Q'=Q A. Therefore the proposed complete word is + + A^-1 S A Q' = A^-1 S Q A = A^-1 U A = U. + +The final equality holds because U touches only source-to-target entries, +whereas A touches only dirty helper entries. This proves every source, +target and dirty column, in both directions, on arbitrary entry values. +The executable checker compares the corresponding full 18,954-column formal +matrices. Its old remainder is the inherited decoder composed with Q^-1; +it does not pretend to be a new replay of every old physical record. +Omitting a setup or a restoration, or corrupting one response relation, +is rejected by regression controls. + +## Literal common prefix + +The independent signed-adjoint reconstruction agrees with all 1,720 existing +kernel cut-read triples. The plain odd-read block has 648,088 ADDs; its last +read is `[3503,16719,-1]` at base record 648087. The target-prefix setup cut is +696719, later than this block. Existing kernel setups occur inside this block +and use disjoint helper support. New setups can therefore be inserted at the +structural boundary immediately before the first source injection. Removing +new pivot reads does not require shifting any inherited indexed transform: +apply the new stage after the inherited transforms, using that structural +boundary. All target operations already before this boundary merely read +unmodified helper columns or use disjoint frozen kernel helpers. + +The source witness is `kernel-witness.json` in this package; `check_shared_kernel.py` independently derives the +same response and physical-role map. The common cut is semantic (before first +source injection), rather than reusing an invalid post-transformation record +number. + +## Paid moves, including donor sharing + +Each new pivot starts at E instead of ZERO, so its first old rank-d MOVE is +replaced by rank d-1. Each distinct donor first moves ZERO→E once, performs all +its same-E setup shears, then moves E→its old first frame, rank d-1. A donor +used 21 times still pays that rank 1 entrance exactly once; its 21 scalar ADDs +are all retained and counted. At the end every member is at FULL, so all 473 +inverse shears are legal at FULL and require no additional MOVE. +The new setup matrices commute, so either exact reverse ordering or the +source's family ordering is valid; the emitted specification uses reversal. + +Measured local delta: + + rank 1:+93, rank 2:+144, rank 3:-144, rank 4:+19, rank 5:-17, rank 6:-2. + +Its paid rank mass drops by 72. Residual family demand changes by +`rank 24:-72, rank 23:+72`. Bank assignment and exact pricing are separate +certificates; the path checker does not infer them from volume alone. + +## Conservative scalar prefix bound + +`check_scalar_bounds.py` independently replays all source/helper updates in +both directions, including the final12 suffix and all frozen kernel shears. +All 14 terminal-sink writes are redirected to their actual target pivots; +removed sink reads, deliveries and cleanup updates are absent. At each extra +shear it uses the actual previously propagated +nonnegative row weight, not a unit-cost scalar approximation. + +For an upper bound, it restores every omitted target-compression read and +every newly removed pivot compensation read. It includes the two target-prefix +batches AND the seven sink setup/restore batches. Their combined directed +source-to-destination target graph has 681 edges and 908 vertices and is checked +acyclic. Each edge has weight equal to its total number of ADD occurrences, +two per setup/restore pair. Applying those weighted edges in topological order +to all accumulated nonnegative target increments dominates any chronological +placement of those ADDs: it counts every directed path with the product of +its edge multiplicities, including mixed prefix-to-sink paths. This proof works +in both execution directions. Target values never feed sources or helpers. +The monotonicity of every cancellation-free ADD majorant also bounds all +intermediate values, not only the final vectors. + +Old and new uncompressed majorants are compared, with only the new setup and +restoration shears inserted. Their difference is nonnegative. The maximum +added forward majorant is 80662; the inverse one is 1334317. Adding these to +the inherited bounds 77985 and 2475558 yields + + F_new <=158647, B_new <=3809875. + 64 F_new^3 B_new^2 =3709343221562739318443143000000 <2^104. + +This closes the retained payload-size cap conditional on the inherited old +majorant bounds. The checker is conservative about compressed target paths; +it does not claim to reproduce a new full physical record hash. + +## Role-resolved integration with final12 + +The unified bank checker reconstructs the original 15,427 helper roles, applies +all old kernel entrances, 434 retained early restorations, twelve new final12 +endpoints, and the 72 additional rank-one kernel entrances. The seven sinks +remain removed. New kernel membership is checked disjoint from the affected +final12 helpers and the inherited kernel and descent selections. + +The residual rank changes relative to final12 are rank 24:-72 and rank 23:+72. +The combined inventory has 1,646 rank-23 residuals and 11,401 rank-24 residuals; +its total residual rank is 322,862 per replica. The explicit width-120 pattern +`(23,23,23,23,24,4)` absorbs each group of four new rank-23 residuals. The +remaining pure patterns are adjusted with exact integer counts. + +All 925,620 role/replica occurrences in a stage are assigned without collision +or omission to explicit bank and block addresses. Five stages use disjoint +bank namespaces. All 161,431 banks per stage are full, attaining the volume +lower bound. Total bank stock is 807,155; with 422,400 data families, literal +stock is 1,229,555. The compact address table is reproducibly generated rather +than duplicated in the repository. + +The independently reproduced moment/assembly certificate uses the measured +kernel histogram and final12 chronological delta, while the unified finite +bill charges all 473 setup and 473 restoration shears. Removed pivot reads +are not subtracted from that conservative scalar bill. The corrected +sink-aware payload bound is supplied separately by `check_scalar_bounds.py`. +The line charts, first-frame splits, changed final12 charts and retained +normalizer allowance are checked by the chart modules. + +## Evidence boundary + +The changed prefix is proved compositionally over F2 using the inherited +complete decoder as a hypothesis. The checker is not a newly executed +complete upstream physical program. All unchanged PR299 and final12 compiler, +routing, prime, reconstruction, complex-supplier and analytic contracts remain +inherited. No unconditional multiplication theorem, exhaustive priority claim, +or optimality claim is asserted. The separate PR300 case, when selected, uses +its explicit additional data pin and verified non-overlap certificate. diff --git a/research/gen5b-shared-kernels/PROOF.md b/research/gen5b-shared-kernels/PROOF.md new file mode 100644 index 0000000000..9653433c98 --- /dev/null +++ b/research/gen5b-shared-kernels/PROOF.md @@ -0,0 +1,148 @@ +# Conditional composition proof and dependency map + +## 1. Scope and pinned baseline + +Work in the dimension-24 bit interface over F2, with weighted form G=9I-J for +geometric admission and the inherited fixed odd-characteristic selector +contracts. The original complete decoder, literal read prefix, source-span +admission and finite compiler are hypotheses from pinned PR299. Pinned PR300 +adds its second constructed-frame descent under its retained admission +hypotheses. The exact data pins are in `inputs.json`. + +The changed construction composes three components: final12 co-retiming, +shared-donor rank-one kernels, and PR300's already proposed descent. The +component arguments below identify where exact replay ends and an inherited +contract begins. They do not claim a full machine-checked multiplication proof. + +## 2. Retained final12 component + +[PROOF-CORETIME12.md](PROOF-CORETIME12.md) gives the twelve new early endpoints, +six undone old endpoints, and the required root/partner co-retiming. The local +paid delta is {1:+18,2:-12}; residual families change by {2:+12,3:-18,4:+6}. +Both 55,985-event suffixes agree on all 18,954 columns forward and inverse over +F2 and Z; their absolute-coefficient majorant operators agree as well. The +chronological frame check uses the post-descent setup for each of twelve +partner carriers and verifies 212 containments on all 60 changed frame paths. +An independent commuting-swap proof verifies the integer/norm identity. All +18 changed endpoint chart programs are factored over exact rationals. + +## 3. Shared-donor algebra + +Let P be the new pivots, D the distinct donors and K the incidence map from +pivot dirty registers into donor registers. The selected supports satisfy +P intersection D = empty, hence K^2=0. Setup S=I+K and its inverse I-K commute +factorwise even when a donor belongs to several pivot relations. Each pinned +response relation has R(p)=sum R(d) over F2. The new word omits each selected +pivot's old compensation reads, performs S at the common read cut, retains the +old middle word and performs the inverse at the final restore cut. These +relations give the required equality of compensated dirty columns. + +The common cut is reproduced independently: 648,088 plain reads, last scalar +(3503,16719,-1), before any source injection and before target-prefix setup at +record 696719. All 1,720 old kernel cut triples are checked. Support exclusions +prevent a selected helper from being an existing kernel member, gauge, source, +sink, reused pair, first-descent participant or final12 participant. Old +restoration donor uses are included in the chronological frame audit. + +The all-column checker factors the inherited suffix as U Q^-1, where U is the +assumed complete old decoder and Q the checked compensation prefix. It compares +old/new matrices and inverses on all 18,954 basis columns. This is a complete +compositional identity under U, not execution of the upstream physical word. +The bit-response cancellation is over F2; the stronger integer result for the +final12 suffix alone does not upgrade the full parity-filtered supplier to an +integer decoder. + +## 4. Lines and paid frames + +The new witnesses assign line L=span(e_i-e_j) to every pivot/donor role. The +checker proves every required frame contains L and is nondegenerate where +needed. For a first required frame F of dimension d, a pivot contributes the +changed transition cost d-1 instead of d, and a donor receives a paid line +entrance followed by d-1. After all obligations, a pivot has rank-23 bank +residual and a donor retains its original endpoint/residual. Each first-frame, +old-kernel/restoration use and terminal restoration is checked chronologically. + +The 70 case has 70 pivots, 87 donors and 157 members, with 601 setup and 601 +restore additions. Its local delta is +{1:+87,2:+137,3:-137,4:+18,5:-16,6:-2}; its weighted rank decrease is 70. +The 72 fallback has 72 pivots, 93 donors and 165 members, with 473 setup and +restore additions. Its local delta is +{1:+93,2:+144,3:-144,4:+19,5:-17,6:-2}; weighted rank decrease 72. +Each case replaces that many rank-24 residuals with rank-23 residuals. +[PROOF-KERNEL72.md](PROOF-KERNEL72.md) records the common construction in more +detail; the 70 witness uses the same argument with its independently checked +support, line and frame inventory. + +## 5. Composition with PR300 + +All 89 selected PR300 scalar events are matched to unchanged original +incidences: 87 helper forward gates and two old kernel setup gates. Their +154 helper operands are disjoint from the broader 84-stream final12 scalar +closure and from all 157 (or 165) new-kernel members. All 440 old restoration +entries and seven sinks match PR299 semantically. Inert loader text confirms +kernel, second descent, restoration and sink order. + +Thus the changes act on disjoint helper frame paths, their paid deltas add, +and their scalar order/coefficients remain unchanged. New setup precedes all +source injections, so the old operand source columns are unchanged. This +preserves PR300's source-span argument conditional on its admission. Exact +Bareiss determinants additionally show all 65 distinct selected new Gram +matrices are nondegenerate over Q and every characteristic greater than five. +This extra basis check does not replace PR300's full chronological/source-span +admission, which remains an explicit input hypothesis. + +## 6. Banks and exact charts + +Start from every non-sink helper role, apply pinned gauge entrances and old +kernel entrances, insert each new pivot line entrance, apply 434 retained old +restorations, undo the six selected old endpoints, and insert twelve new +endpoints. This reconstructs residual widths from individual role IDs. +Sorted roles and their 60 replicas map bijectively into explicit full-width +patterns. The address table records the deterministic quotient/remainder rule, +role frames, bank/block/offset and a digest over every assignment. The five +stages use separate bank namespaces; no slot is shared across stages. + +The 70 residual rank per replica is 322,864, yielding 161,432 width-120 banks +per stage and stock 422,400+5*161,432=1,229,560. The 72 values are 322,862, +161,431 and 1,229,555. Every role occurrence is assigned exactly once and every +bank is full. Numeric inventory alone is not used as an admission certificate. + +For F=ker(A), a first quotient basis is ker([A; e_i-e_j]); its complement is +the line plus the weighted orthogonal complement of F. Every resulting +24-by-24 chart is exactly factored and inversely replayed. Identical programs +may be reused, but each role use has an explicit program binding. The donor +line entrance and pivot rank-23 residual are included separately. These new +charts and all final12 endpoint charts fit the retained 576-factor allowance; +the bank normalizer remains within 815. The address/cover compiler itself is +an inherited contract. + +## 7. Scalar bounds, costs and pricing + +The nonnegative row transport explicitly includes actual sink redirects and +all mixed target-prefix/sink paths in an acyclic majorant graph, rather than +assuming that prefix and sink batches can be bounded independently. It ignores +savings from removed reads. The 70-case bounds F=191659 and B=5356455 give a +payload strictly below 2^104. The 72-case bounds F=158647 and B=3809875 give +102 bits. The finite bill charges both halves of every added shear pair and +retains conservative unchanged costs. Missing sink edges, changed bounds or +wrong chart/bank bindings are rejected by focused tests. + +The exact profile derives from the measured local ledgers and the pinned +baseline profile. Moment brackets, three bootstrap steps and all 47 strict +outer inequalities are certified with rational enclosures; adjacent coarse +and kappa grid points fail. The 70+PR300+final12 case gives +kappa=749940157923873/10^18, bit coarse saving=750502990558158/10^18, +483425 calls and rank mass2454720. Its displayed finite coefficient is +90466979917115701 < 2^80. The independent 72 fallback and PR299-only checkpoint +remain distinct receipts, never silently substituted for the 70 obligations. + +## 8. Conditional conclusion + +Under the inherited decoder/source/compiler/chart/normalizer/routing/prime, +complex-supplier and analytic/all-size interfaces, the measured changed stages +have valid scalar identities, admissible local paths, complete bank allocation, +checked changed charts, bounded payload/cost and the stated exact arithmetic. +No additional open changed-stage obligation is identified by these checks. +This does not establish those inherited hypotheses, compute unknown C_full, +prove an unconditional multiplication theorem, or establish global optimality +or priority. No upstream program is executed by this package. diff --git a/research/gen5b-shared-kernels/README-CORETIME12.md b/research/gen5b-shared-kernels/README-CORETIME12.md new file mode 100644 index 0000000000..ad3d0f8be5 --- /dev/null +++ b/research/gen5b-shared-kernels/README-CORETIME12.md @@ -0,0 +1,112 @@ +> Historical final12-only checkpoint. For the combined 70/72 construction and +> the current 16-file acquisition manifest, use [README.md](README.md). + +# A 12-helper co-retiming proposal on pinned PR #299 + +This is a standalone changed-stage verifier and conditional research proposal. +It adds no changes from PR #299 to `main`, and does not depend on PR #294. +PR #299 is an unmerged dependency, not an already available `main` package. + +The proposal introduces 12 early helper restorations while undoing six old +restorations, with coordinated root and partner deliveries. Its measured local +paid histogram delta is `{1: +18, 2: -12}` and its residual-family delta is +`{2: +12, 3: -18, 4: +6}`. Under the retained PR #299 admission and all-size +interfaces, the resulting exact arithmetic gives: + +- Bit coarse saving: `750469712644613 / 10^18` +- Conditional kappa: `749906929903449 / 10^18 = 0.000749906929903449` +- PR #299 comparison: `0.000749899215319498` +- Literal stock: `1,229,735`, down by 15 +- Unreplicated paid calls: `482,665`; rank mass: `2,455,070`; deficit: `4,400` + +The gain is `7714583951 / 10^18`, about 0.001029% of PR #299's kappa. +All identified changed-stage obligations pass the checks in this packet, +conditional on the retained source/compiler interfaces. This is not an +unconditional multiplication bound or a full replay of the inherited finite +admission. The earlier optimistic 32-helper price omitted +partner-carrier work and is superseded; it is not a result of this package. + +## Dependency and data acquisition + +The final12 component uses eleven inputs pinned to PR #299 head +`5f6bd3fbc0e6796dd31263cef1f06dc968186f64`, under +`research/five-stage-gen5b-kernels-restorations-sinks`. +[Immutable source package](https://github.com/CrocSwap/integer-mult-bounds/tree/5f6bd3fbc0e6796dd31263cef1f06dc968186f64/research/five-stage-gen5b-kernels-restorations-sinks). + +`inputs.json` records each exact byte count, SHA-256 and Git blob SHA-1. Large +word, frame and selection files are deliberately not duplicated here. The +loader rejects missing, altered or unpinned data before parsing it. + +From this directory, use Python 3.11 or newer, without optimization (`-O`): + +```sh +python3 -B fetch_inputs.py --destination /tmp/coretime12-inputs +export CORETIME_SOURCE_DIR=/tmp/coretime12-inputs +python3 -B -m unittest discover -s . -p 'test_*.py' -v +python3 -B run_coretime12.py --check +``` + +The fetcher retrieves only the immutable public files listed in `inputs.json` +from GitHub and verifies their bytes. It never runs a downloaded producer, +installs a dependency or imports upstream Python. It needs network access only +for missing data. An existing directory is verified rather than overwritten. + +In this combined package, `verify_all()` additionally requires the five pinned +PR300 files. The current `inputs.json` and main [README.md](README.md) acquisition +step cover all sixteen files. A PR299 package directory alone, or a normal main +checkout, is therefore insufficient. The source root can be anywhere; all +checks work independently of the current working directory. + +To regenerate the compact receipts, explicit bank-address table and full chart +factor programs elsewhere: + +```sh +python3 -B run_coretime12.py --output-dir /tmp/coretime12-results --check +``` + +Add `--write-streams` to save both complete scalar suffixes as compressed JSON. +The generated streams, full bank-address table and full matrix/factor listings +are not committed; their deterministic reproducer and digest receipts are. + +## Verification coverage + +- Exact local integer-map and source-span checks select 12 compatible helpers + from the independently reproduced candidate census. +- The complete 55,985-addition changed suffix preserves all 18,954 independent + entry columns forward and backward over F2 and over the integers. Sources, + targets and dirty entries are arbitrary, rather than initialized to zero. +- Exact nonnegative coefficient majorant operators also agree in both + directions. A separate 172,944-swap commutation certificate proves signed + equivalence and a conservative factor-two scalar-norm bound. +- All 60 affected chronological frame paths are checked over the rationals, + including 212 containments and the 12 inherited post-descent partner setups. +- All 18 changed endpoint charts are constructed and exactly factored. They + use at most 142 factors, within the retained 576-chart/815-normalizer bounds. +- Explicit role-to-bank assignment covers all 15,427 helpers and 925,620 + role/replica occurrences per stage, with five disjoint stage namespaces. + A full-width bank packing witness, exact moments, all 47 outer inequalities, + and rejection of both adjacent coarse and kappa grid points are recomputed. +- The changed displayed finite bill is `90386288803484701`, below `2^80`; + the conservative payload bound has 103 bits, below the retained `2^104` cap. +- Mutation controls reject missing restoration, missing partner promotion, + missing bank capacity, incompatible frames, invalid arithmetic inputs and + altered source data. + +See [PROOF-CORETIME12.md](PROOF-CORETIME12.md) for the surgery and accounting argument, +`certificates/coretime12/` for exact reproducible receipts, and [NOTICE.md](NOTICE.md) +for contributor attribution and AI-assistance disclosure. + +## What remains conditional + +The pinned unchanged prefix and its original admission are inherited. The +unchanged finite compiler, weighted compilation, routing, prime, setup and +all-size interfaces are not rerun here. The displayed finite-bill check does +not assign a value to the source theorem's unknown full constant `C_full`. +Its positive bridge inputs remain conditional on the retained finite bridge. +The bit payload contract remains F2; the stronger integer suffix identity does +not assert that the whole parity-filtered supplier is an integer decoder. + +Neither repository-wide `make verify` nor the inherited full admission suites +were run: only newly authored verifier programs execute. Passing these checks +does not establish a full machine-checked multiplication theorem. No production +guard, selected main certificate or inherited manuscript patch is modified. diff --git a/research/gen5b-shared-kernels/README.md b/research/gen5b-shared-kernels/README.md new file mode 100644 index 0000000000..8d2b017cef --- /dev/null +++ b/research/gen5b-shared-kernels/README.md @@ -0,0 +1,114 @@ +# Shared-donor kernels composed with co-retiming and PR300 + +This standalone research verifier adds a 70-pivot shared-donor construction to +pinned PR300 plus the 12-helper co-retiming from PR301. A separately checked +72-pivot construction is retained as a fallback. The package is a small diff +against main; it fetches immutable pending-PR data explicitly and does not +assume those inputs are already on main. + +## Conditional results + +| Case | Conditional kappa | Literal stock | Calls | Rank mass | +|---|---:|---:|---:|---:| +| PR300 + final12 + 70 pivots | 0.000749940157923873 | 1,229,560 | 483,425 | 2,454,720 | +| PR300 + final12 + 72 pivots | 0.000749936120273400 | 1,229,555 | 483,455 | 2,454,710 | +| PR299 + final12 + 72 pivots | 0.000749917402998347 | 1,229,555 | 483,130 | 2,454,710 | + +All values use the retained compiler and analytic/all-size hypotheses. They are +exact rational grid choices with denominator 10^18, rather than floating-point +optimizations or claims of global priority/optimality. + +The 70-pivot construction has 87 distinct donors, 157 affected helpers and 601 +setup/restore shear pairs. It shares donor lines across different pivots while +preserving the helper response relations. Complete per-role bank allocation +uses 161,432 full width-120 banks per stage and five disjoint stage namespaces. +Every one of the 15,427 helper roles is assigned in all 60 replicas: 925,620 +assignments per stage, 4,628,100 in total. + +The 70-case finite coefficient is 90,466,979,917,115,701 (<2^80). Its corrected +sink-aware row bounds are F=191,659 and B=5,356,455; the 104-bit payload is +strictly below 2^104. The 72-case has 473 shear pairs and a smaller 102-bit +payload. The arithmetic selects the 70-case despite its five extra stock rows. + +## Immutable dependencies + +- PR299: `5f6bd3fbc0e6796dd31263cef1f06dc968186f64`, package + `research/five-stage-gen5b-kernels-restorations-sinks`. +- PR300: `fd516176fd068e4fa7af14b40cd878ce8c305296`, package + `research/five-stage-gen5b-full`, from `rohanarun/integer-mult-bounds`. +- The included final12 construction is the independently authored contribution + in PR301, head `ebd6a08ed7d517387794c066490aa02aadcc78d4`. Its code is included + here for standalone reproduction; PR301 itself is unchanged and need not be + merged first. + +`inputs.json` pins all 16 external files by immutable commit, byte count, +SHA-256 and Git blob hash. The fetched `portable_bit.py` is read only as inert +text to check loader order; it is never imported or executed. No upstream +producer or verifier runs. New witness JSON, proof notes and compact receipts +are included; large source bundles and generated full tables are omitted. + +## Reproduce + +Python 3.11 or later and its standard library suffice. Do not use `python -O`: +assertions are part of these research checks. From this directory: + +```sh +python3 -B fetch_inputs.py --destination /tmp/shared-kernel-inputs +export CORETIME_SOURCE_DIR=/tmp/shared-kernel-inputs +python3 -B -m unittest discover -s . -p 'test_*.py' -v +python3 -B run_checks.py --check +``` + +An already downloaded directory is accepted only after every pin is verified. +All paths are relative to the verifier or the explicit input directory, so +absolute invocation from another working directory also works. A main checkout +alone is insufficient until the data-acquisition step above has succeeded. + +For optional complete chart factor programs and deterministic role-bank address +tables, generate them outside the checkout: + +```sh +python3 -B run_checks.py --check --output-dir /tmp/shared-kernel-results +``` + +Add `--write-streams` to emit both complete final12 scalar suffixes. Generated +full outputs are not needed in the committed diff. `run_coretime12.py --check` +reproduces the final12-only checkpoint independently. + +## What is checked + +- Original response relations, common dirty-read cut, selected helper support, + and exact rational chronological frames for both shared-donor candidates. +- Compositional forward/inverse F2 identities on all 18,954 columns, assuming + the inherited complete-word decoder; this is not a literal full-word replay. +- Final12's full 55,985-event scalar suffix in both directions over F2, the + integers and absolute-coefficient majorants; 212 frame containments. +- PR300's 89 selected scalar incidences, 154-helper support disjointness from + each new kernel and the broader 84-stream final12 closure, unchanged 440 + restoration and seven sink entries, and 65 exact Gram determinant checks. +- Every changed first-frame quotient, donor entrance and pivot residual chart, + plus 18 final12 charts, using exact factorizations and role-to-program bindings. +- Full-width bank inventory and explicit role/replica allocation for each case. +- Sink-aware scalar majorants, all added scalar costs, selector/finite budgets, + exact root brackets, three bootstrap steps, 47 strict outer inequalities and + adjacent-grid rejection checks. +- Negative controls for wrong relations, missing setup/restoration, frame + overlap, omitted sinks, chart or bank drift, duplicate roles and changed pins. + +## Verification boundary + +The original PR299 decoder/prefix and source-span admission remain hypotheses. +PR300's complete chronological/source-span admission is inherited as well; +matching its selected events and checking support/nondegeneracy do not reprove +that admission. Unchanged weighted-chart, address-normalizer, cover, routing, +prime, recovery, setup, finite-compiler, complex-supplier and analytic/all-size +interfaces are retained. The original row bounds are inherited before the +new sink-aware transport is applied. + +No full upstream `make verify`, `make entrance-bank-verify`, physical producer, +or complete all-size proof has been executed. Main's selected certificate, +production guards, `upstream/` and manuscript patch are unchanged. The displayed +finite coefficient does not set the inherited unknown `C_full` to zero. +These are conditional changed-stage certificates, not formal verification of +the multiplication theorem. See [PROOF.md](PROOF.md), the retained component +proofs, and [NOTICE.md](NOTICE.md) for scope and attribution. diff --git a/research/gen5b-shared-kernels/assembly_arithmetic.py b/research/gen5b-shared-kernels/assembly_arithmetic.py new file mode 100644 index 0000000000..4845766309 --- /dev/null +++ b/research/gen5b-shared-kernels/assembly_arithmetic.py @@ -0,0 +1,108 @@ +"""Independent transcription of the inherited 47 rational assembly slacks. + +The positive bridge gaps remain explicit inputs. No finite bridge or all-size +claim follows from these formulas. See NOTICE.md for the inherited lineage. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as F +import re +CAP_NAME='b_below_one_over32' +def rational(value): + if type(value) is int or type(value) is F: + return F(value) + if type(value) is str and re.fullmatch(r'-?[0-9]+(?:/[1-9][0-9]*)?', value): + return F(value) + raise ValueError('Expected an exact integer or rational fraction; floats/bools rejected') + + +def require(condition, reason): + if not condition: + raise ValueError(reason) + + +def direct_slacks(a, b, beta, h, kappa, scalar_gap=1, row_gap=1): + """Independent transcription of the displayed equations, using exact fractions. + + Return violations rather than suppressing the production cap. The caller + explicitly chooses a diagnostic evaluation mode in verdict(). + """ + a,b,beta,h,kappa,scalar_gap,row_gap = map(rational, + (a,b,beta,h,kappa,scalar_gap,row_gap)) + q = a*(1-2*h) + require(1+q != 0, 'Undefined epsilon') + eps = (1-h)/(1+q) + G = eps*q + tau, sigma = 1-a, 1-b + lp, c = 1-q, q+h/4 + lam = (tau+lp)/2 + r, delta = (G+1-eps)/2, h/8 + internal = tau+(1-beta)*max(sigma-tau, F(0)) + leaf = sigma+beta*(1-sigma) + margins = {'g1':1-eps, 'g2':a, 'g3':G, 'g4':a, + 'g5':min(1-eps-delta,r-delta), 'g6':1-eps-delta,'g7':eps} + slacks = { + 'a_positive':a, 'a_below_b':b-a, CAP_NAME:F(1,32)-b, + 'beta_positive':beta, 'beta_below_one':1-beta, + 'phase_leaf_above_bit':(1-beta)*b-a, + 'q_positive':q, 'q_below_internal':1-internal-q, + 'q_below_leaf':1-leaf-q, 'c_positive':c,'c_below_one':1-c, + 'q_below_reservations':c-q, 'lambda_above_tau':lam-tau, + 'lambda_above_sigma':lam-sigma, 'lambda_above_internal':lam-internal, + 'lambda_prime_above_lambda':lp-lam, 'compact_leaf':lp-leaf, + 'compact_reservations':lp-(1-c),'lambda_prime_below_one':q, + 'epsilon_positive':eps,'epsilon_below_one':1-eps,'guard_width':1-eps, + 'K_geometry':1-eps*(1+c),'K_dominates_log':eps*c, + 'record_suffix':1-eps, 'phase_local':1-eps-delta, + 'phase_boundary':r-delta, 'gamma_sublinear':1-eps-r, + 'cell_above_band':eps-(1-r)/2,'prime_interval_packing':1-eps, + 'alpha_positive':r,'alpha_below_one':1-r, + 'alpha_below_one_fourth':F(1,4)-r,'delta_positive':delta, + 'delta_below_one_eighth':F(1,8)-delta,'short_record_fallback':eps-a, + 'small_field_exposure':1-eps-G, + 'artificial_boundary':8-eps+r-delta-G, + 'literal_scalar_guard':scalar_gap,'row_product_gap':row_gap} + slacks.update({name+'_above_kappa':value-kappa for name,value in margins.items()}) + preconditions = {'positive_backoff':h>0, 'backoff_below_half':h0} + return dict(slacks=slacks, margins=margins, preconditions=preconditions, + parameters=dict(a=a,b=b,beta=beta,h=h,kappa=kappa,q=q, + epsilon=eps,G=G,r=r,delta=delta,c=c)) + + +def factored_slacks(a,b,beta,h,kappa,scalar_gap=1,row_gap=1): + """Second evaluation, from the proof's factorizations for a < b.""" + a,b,beta,h,kappa,scalar_gap,row_gap = map(rational, + (a,b,beta,h,kappa,scalar_gap,row_gap)) + require(a=0, 'Minimum-margin factorization assumes h >= 0') + q=a*(1-2*h); eps=(1-h)/(1+q); G=eps*q; L=(1-beta)*b-a + r=G+h/2; c=q+h/4 + result={ + 'a_positive':a,'a_below_b':b-a,CAP_NAME:F(1,32)-b, + 'beta_positive':beta,'beta_below_one':1-beta,'phase_leaf_above_bit':L, + 'q_positive':q,'q_below_internal':2*a*h,'q_below_leaf':L+2*a*h, + 'c_positive':c,'c_below_one':1-c,'q_below_reservations':h/4, + 'lambda_above_tau':a*h,'lambda_above_sigma':b-a+a*h, + 'lambda_above_internal':a*h,'lambda_prime_above_lambda':a*h, + 'compact_leaf':L+2*a*h,'compact_reservations':h/4, + 'lambda_prime_below_one':q,'epsilon_positive':eps, + 'epsilon_below_one':G+h,'guard_width':G+h, + 'K_geometry':h*(1-eps/4),'K_dominates_log':eps*c, + 'record_suffix':G+h,'phase_local':G+7*h/8,'phase_boundary':G+3*h/8, + 'gamma_sublinear':h/2,'cell_above_band':eps-(1-r)/2, + 'prime_interval_packing':G+h,'alpha_positive':r,'alpha_below_one':1-r, + 'alpha_below_one_fourth':F(1,4)-r,'delta_positive':h/8, + 'delta_below_one_eighth':(1-h)/8,'short_record_fallback':eps-a, + 'small_field_exposure':h,'artificial_boundary':8-eps+3*h/8, + 'literal_scalar_guard':scalar_gap,'row_product_gap':row_gap} + margins={'g1':G+h,'g2':a,'g3':G,'g4':a,'g5':G+3*h/8,'g6':G+7*h/8,'g7':eps} + result.update({name+'_above_kappa':value-kappa for name,value in margins.items()}) + return result + + +def serial(value): + if type(value) is F: return str(value) + if isinstance(value,dict): return {k:serial(v) for k,v in value.items()} + if isinstance(value,(list,tuple)): return [serial(v) for v in value] + return value + diff --git a/research/gen5b-shared-kernels/bank_binding.py b/research/gen5b-shared-kernels/bank_binding.py new file mode 100644 index 0000000000..6e40158f5f --- /dev/null +++ b/research/gen5b-shared-kernels/bank_binding.py @@ -0,0 +1,23 @@ +"""Exact shared-stock binding between role-level allocation and priced inventory.""" +from fractions import Fraction as F + + +def check(banks, pricing, replicas=60, stages=5, width=120): + assert replicas == 60 and stages == 5 and width == 120 + counts = {int(r): n for r, n in banks['family_counts'].items()} + demand = {int(r): n for r, n in pricing['packing']['demand'].items()} + assert demand == {r: replicas*n for r, n in counts.items()} + assert sum(counts.values()) == banks['helper_roles'] == 15427 + rank = sum(r*n for r, n in counts.items()) + assert rank == banks['residual_rank_per_replica'] + assert width*banks['banks_per_stage'] == replicas*rank + assert banks['banks_per_stage'] == pricing['packing']['feasible_bins'] + assert banks['total_banks'] == stages*banks['banks_per_stage'] + assert banks['literal_data_stock'] == 422400 + assert banks['literal_stock'] == banks['literal_data_stock'] + banks['total_banks'] + assert banks['literal_stock'] == pricing['literal_stock'] + assert F(banks['unreplicated_stock']) == F(pricing['unreplicated_stock']) == F(banks['literal_stock'], replicas) + assert banks['checked_role_replica_assignments_per_stage'] == replicas*banks['helper_roles'] + assert banks['total_stage_assignments'] == stages*banks['checked_role_replica_assignments_per_stage'] + assert width*banks['literal_stock'] - replicas*pricing['rank_mass'] == replicas*F(pricing['deficit']) + assert banks['all_banks_full'] and banks['stages_have_disjoint_bank_namespaces'] diff --git a/research/gen5b-shared-kernels/baseline_arithmetic.py b/research/gen5b-shared-kernels/baseline_arithmetic.py new file mode 100644 index 0000000000..fc589e8a8e --- /dev/null +++ b/research/gen5b-shared-kernels/baseline_arithmetic.py @@ -0,0 +1,126 @@ +"""Independently authored replay of pinned PR299 declared profile data. + +This recovers a declared cost profile; it is not a physical admission replay. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from collections import Counter,defaultdict +from fractions import Fraction as F +import source_data as sd +import exact_intervals as ex +import assembly_arithmetic as ae +HEAD=sd.HEAD + +def read(name): + aliases={'target-selection-full.json':'target-selection.json', + 'target-selection-metadata.json':'target-selection.json', + 'descent-selection-metadata.json':'descent-selection.json'} + return sd.read_json(aliases.get(name,name.replace('__','/').removesuffix('.base64'))) + +def source_integrity(): + return sd.verify_all() +def hist(x):return Counter({int(k):int(v)for k,v in x.items()if int(k)>0 and int(v)}) + + +def rank(H):return sum(r*n for r,n in H.items()) + + +def base_histogram(): + w=read('gen5bit__selected__bit__word_p12.json.gz.base64') + fr=read('gen5bit__selected__bit__frames_p12.json.gz.base64') + p=read('gen5bit__selected__bit__profile_p12.json') + assert p['h']==fr['h']==24 and p['v']==1760 and p['R']==17160 + d={int(k):v['dim']for k,v in fr['frames'].items()} + assert all(type(z)is int and 0<=z<=24 for z in d.values()) + gauge={z['role']:z for z in w['gauges']} + assert all(d[z['frame']]==z['dim']for z in gauge.values()) + source={s:int(n)for n,s in w['sources'].items()} + recipient={donor:borrower for donor,borrower in w['pairs']} + removed=set(recipient.values()) + assert len(recipient)==len(removed)==1726 + assert not set(recipient)&removed + assert all(s not in gauge and b in gauge for s,b in recipient.items()) + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase] + assert len(order)==len(set(order))==len(w['ops']) + seq=defaultdict(list) + for i in order: + for s in w['ops'][i][:2]:seq[s].append(w['op_frame'][i]) + for s,f in zip(w['rootroles'],w['root_frame']):seq[s].append(f) + H=Counter() + for s in range(p['R']): + if s in removed:continue + start=gauge[s]['frame']if s in gauge else w['source_frame'][source[s]]if s in source else None + previous=0 if start is None else d[start] + path=seq[s][:] + if s in recipient: + b=recipient[s];path+=[gauge[b]['frame']]+seq[b] + path+=[w['full_frame']] + for f in path: + delta=d[f]-previous + assert delta>=0,(s,previous,d[f]) + if delta:H[delta]+=1 + previous=d[f] + if s in source:H[1]+=1 + # Center copies and the source/target path census are declared source data. + H[22]+=24 + for key in ('source_data_histogram','target_data_histogram'):H.update(hist(p[key])) + assert sum(H.values())==92937 and rank(H)==407228 + return H + + +def final_histogram(): + target=read('target-selection-full.json');total=Counter() + for group in target['groups']:total.update(hist(group['local_histogram_delta'])) + assert len(target['groups'])==220 and {r:n for r,n in total.items()if n}==dict(hist(target['expected_total_delta'])) + p=read('expected__kernel-pins.json');H=base_histogram();stages={} + deltas=[('descent',read('descent-selection-metadata.json')['expected_local_histogram_delta']), + ('target',read('target-selection-metadata.json')['expected_total_delta']), + ('kernel',p['kernel_local_delta']),('restore',p['restore_local_delta']),('sink',p['sink_local_delta'])] + for label,D in deltas: + D=hist(D);H.update(D);assert min(H.values())>=0 + stages[label]=dict(calls=sum(H.values()),rank_mass=rank(H),delta=dict(D)) + assert stages['descent']['rank_mass']==407228 + assert stages['kernel']['rank_mass']==p['kernel_helper_rank_mass']==405036 + assert stages['restore']['rank_mass']==404596 + assert stages['sink']['rank_mass']==404428 + idle={4:3520,23:3520,46:3520,50:3520} + final=Counter({r:5*n for r,n in H.items()if n});final.update(idle) + assert sum(final.values())==p['priced_five_stage_calls']==482635 + assert rank(final)==p['priced_five_stage_rank_mass']==2455100 + completion={5*r:n for r,n in hist(p['completion_rank_histogram']).items()} + before=final.copy();before.update(completion) + assert sum(before.values())==p['sink_five_stage_calls']==486589 + assert rank(before)==p['final_five_stage_rank_mass']==2691640 + return final,stages + + +def moment(H,m,W,a,bad=True): + lo,hi=ex.moment_interval(m,W,H,a) + if bad: + L,U=ex.log_interval(F(m));E,G=ex.exp_interval(a*L,a*U) + factor=F(32*m*sum(H.values()),10**16*W) + lo+=factor*E;hi+=factor*G + return lo,hi + + +def assembly(c,b,k): + chain=[F(384599,10**10)] + for i in range(3): + z=(1-c)*c+c*chain[-1] + assert chain[-1]0 + assert len(z['margins'])==7 + znext=ae.direct_slacks(a,b,beta,eta,k+F(1,10**18),1,row_gap) + failed=[n for n,v in znext['slacks'].items()if v<=0] + assert failed==['g3_above_kappa'] + q=a*(1-2*eta);G=(1-eta)*q/(1+q) + assert k2^80.", + "normalizer_factor_bound": 815, + "bank_selector_calls": 905994200400, + "displayed_finite_coefficient": 90386288803484701, + "coefficient_bits": 57, + "retained_coefficient_cap_bits": 80, + "conservative_payload_upper": 5952636918929489086220792832000, + "payload_bits": 103, + "retained_payload_cap_bits": 104, + "bad_fallback_per_child": 460800, + "internal_row_coefficient": 14401, + "external_row_coefficient": 20161, + "ordinary_degree_gap": "23971789/25", + "delta_tau_lower": "162010638578148661476934065453601092098381297973/75057067871093750000000000000000000000000000000000000000000000000", + "delta_linear": "171874999131203/96073046875000000", + "bootstrap_chain": [ + "384599/10000000000", + "749935370845117452542180262080231/1000000000000000000000000000000000000", + "750469311637276278571083649465802007924743795945603/1000000000000000000000000000000000000000000000000000000", + "750469712343669139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "bootstrap_gaps": [ + { + "stage": 1, + "slacks": { + "atom": "534341799495547457819737919769/1000000000000000000000000000000000000", + "borrowing": "998499594916510269547457819737919769/1000000000000000000000000000000000000", + "remainder": "998499623779500370888009338437919769/1000000000000000000000000000000000000", + "stock": "999249530287355387/1000000000000000000" + }, + "minimum": "534341799495547457819737919769/1000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 126085226627008 + }, + { + "stage": 2, + "slacks": { + "atom": "401007336721428916350534197992075256204054397/1000000000000000000000000000000000000000000000000000000", + "borrowing": "998499060975718110721428916350534197992075256204054397/1000000000000000000000000000000000000000000000000000000", + "remainder": "998499623779500370888009338437919769/1000000000000000000000000000000000000", + "stock": "999249530287355387/1000000000000000000" + }, + "minimum": "401007336721428916350534197992075256204054397/1000000000000000000000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 223871012739882766625 + }, + { + "stage": 3, + "slacks": { + "atom": "300943860757712325428067948668730596776048523676387781013361/1000000000000000000000000000000000000000000000000000000000000000000000000", + "borrowing": "998499060575011717860757712325428067948668730596776048523676387781013361/1000000000000000000000000000000000000000000000000000000000000000000000000", + "remainder": "998499623779500370888009338437919769/1000000000000000000000000000000000000", + "stock": "999249530287355387/1000000000000000000" + }, + "minimum": "300943860757712325428067948668730596776048523676387781013361/1000000000000000000000000000000000000000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 397494866654308308705346463 + } + ], + "cutoff_scope": "Displayed fixed bill only. The retained theorem rule uses C_full including inherited primitive, wrapper and earlier ordinary-level constants; this check does not assign those unknown constants a value.", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "source_pins_sha256": "bdc0cb4aebaa9c1209c0598f14f69df4e0489e65b2208d0c51f7a3aaee1f1a77" +} diff --git a/research/gen5b-shared-kernels/certificates/coretime12/frames.json b/research/gen5b-shared-kernels/certificates/coretime12/frames.json new file mode 100644 index 0000000000..ee79673d29 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/coretime12/frames.json @@ -0,0 +1,1489 @@ +{ + "status": "PASS_MEASURED_AFFECTED_SUFFIX_FRAME_LEDGER", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "affected_streams": 60, + "changed_paths": 60, + "exact_rational_containment_checks": 212, + "affected_helper_descent_overlaps": 0, + "partner_setup_descent_replacements_applied": 12, + "old_histogram": { + "21": 23, + "1": 101, + "22": 1, + "2": 12 + }, + "new_histogram": { + "21": 23, + "1": 119, + "22": 1 + }, + "local_histogram_delta": { + "1": 18, + "2": -12 + }, + "both_reflected_ledgers": true, + "reflected_justification": "For each nested frame pair A\u2282B, the annihilator inclusion reverses and the codimension drop equals the dimension gain.", + "paths": [ + { + "stream": 408, + "before_frames": [ + 101628, + 24867, + "FULL" + ], + "after_frames": [ + 101628, + 24867, + 2174, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 412, + "before_frames": [ + 101620, + 24863, + "FULL" + ], + "after_frames": [ + 101620, + 24863, + 2170, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 416, + "before_frames": [ + 101612, + 24889, + "FULL" + ], + "after_frames": [ + 101612, + 24889, + 2182, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 420, + "before_frames": [ + 101604, + 24885, + "FULL" + ], + "after_frames": [ + 101604, + 24885, + 2178, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 424, + "before_frames": [ + 101596, + 24911, + "FULL" + ], + "after_frames": [ + 101596, + 24911, + 2190, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 425, + "before_frames": [ + 101594, + 24909, + "FULL" + ], + "after_frames": [ + 101594, + 24909, + 2189, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 428, + "before_frames": [ + 101588, + 24907, + "FULL" + ], + "after_frames": [ + 101588, + 24907, + 2186, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 429, + "before_frames": [ + 101586, + 24905, + "FULL" + ], + "after_frames": [ + 101586, + 24905, + 2185, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 432, + "before_frames": [ + 101580, + 24933, + "FULL" + ], + "after_frames": [ + 101580, + 24933, + 2198, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 433, + "before_frames": [ + 101578, + 24931, + "FULL" + ], + "after_frames": [ + 101578, + 24931, + 2197, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 436, + "before_frames": [ + 101572, + 24929, + "FULL" + ], + "after_frames": [ + 101572, + 24929, + 2194, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 437, + "before_frames": [ + 101570, + 24927, + "FULL" + ], + "after_frames": [ + 101570, + 24927, + 2193, + "FULL" + ], + "before_dimensions": [ + 1, + 22, + 24 + ], + "after_dimensions": [ + 1, + 22, + 23, + 24 + ] + }, + { + "stream": 2169, + "before_frames": [ + "ZERO", + 24856, + 24863, + 2170 + ], + "after_frames": [ + "ZERO", + 24856, + 30953, + 2170 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2173, + "before_frames": [ + "ZERO", + 24859, + 24867, + 2174 + ], + "after_frames": [ + "ZERO", + 24859, + 30949, + 2174 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2177, + "before_frames": [ + "ZERO", + 24885, + 2178 + ], + "after_frames": [ + "ZERO", + 30939, + 2178 + ], + "before_dimensions": [ + 0, + 22, + 23 + ], + "after_dimensions": [ + 0, + 22, + 23 + ] + }, + { + "stream": 2181, + "before_frames": [ + "ZERO", + 24881, + 24889, + 2182 + ], + "after_frames": [ + "ZERO", + 24881, + 30935, + 2182 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2184, + "before_frames": [ + "ZERO", + 24900, + 24905, + 2185 + ], + "after_frames": [ + "ZERO", + 24900, + 30927, + 2185 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2185, + "before_frames": [ + "ZERO", + 24900, + 24907, + 2186 + ], + "after_frames": [ + "ZERO", + 24900, + 30925, + 2186 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2188, + "before_frames": [ + "ZERO", + 24903, + 24909, + 2189 + ], + "after_frames": [ + "ZERO", + 24903, + 30923, + 2189 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2189, + "before_frames": [ + "ZERO", + 24903, + 24911, + 2190 + ], + "after_frames": [ + "ZERO", + 24903, + 30921, + 2190 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2192, + "before_frames": [ + "ZERO", + 24922, + 24927, + 2193 + ], + "after_frames": [ + "ZERO", + 24922, + 30913, + 2193 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2193, + "before_frames": [ + "ZERO", + 24922, + 24929, + 2194 + ], + "after_frames": [ + "ZERO", + 24922, + 30911, + 2194 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2196, + "before_frames": [ + "ZERO", + 24925, + 24931, + 2197 + ], + "after_frames": [ + "ZERO", + 24925, + 30909, + 2197 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 2197, + "before_frames": [ + "ZERO", + 24925, + 24933, + 2198 + ], + "after_frames": [ + "ZERO", + 24925, + 30907, + 2198 + ], + "before_dimensions": [ + 0, + 21, + 22, + 23 + ], + "after_dimensions": [ + 0, + 21, + 22, + 23 + ] + }, + { + "stream": 6221, + "before_frames": [ + 32783, + 24863, + "REST:18849", + "FULL" + ], + "after_frames": [ + 32783, + 24863, + 2170, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23, + 24 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 6249, + "before_frames": [ + 32467, + 24885, + "REST:18869", + "FULL" + ], + "after_frames": [ + 32467, + 24885, + 2178, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23, + 24 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 6270, + "before_frames": [ + 31993, + 24905, + "REST:18899", + "FULL" + ], + "after_frames": [ + 31993, + 24905, + 2185, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23, + 24 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 6277, + "before_frames": [ + 32151, + 24907, + "REST:18889", + "FULL" + ], + "after_frames": [ + 32151, + 24907, + 2186, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23, + 24 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 6298, + "before_frames": [ + 31677, + 24927, + "REST:18919", + "FULL" + ], + "after_frames": [ + 31677, + 24927, + 2193, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23, + 24 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 6305, + "before_frames": [ + 31835, + 24929, + "REST:18909", + "FULL" + ], + "after_frames": [ + 31835, + 24929, + 2194, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23, + 24 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 9373, + "before_frames": [ + 30927, + 2185, + "FULL" + ], + "after_frames": [ + 30927, + 2187, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 9377, + "before_frames": [ + 30925, + 2186, + "FULL" + ], + "after_frames": [ + 30925, + 2188, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 9397, + "before_frames": [ + 30939, + 2178, + "FULL" + ], + "after_frames": [ + 30939, + 2180, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 14958, + "before_frames": [ + 30953, + 2170, + "FULL" + ], + "after_frames": [ + 30953, + 2172, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 16169, + "before_frames": [ + 30913, + 2193, + "FULL" + ], + "after_frames": [ + 30913, + 2195, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 16198, + "before_frames": [ + 30911, + 2194, + "FULL" + ], + "after_frames": [ + 30911, + 2196, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 17463, + "before_frames": [ + 30935, + 2182, + "FULL" + ], + "after_frames": [ + 30935, + 2184, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 17518, + "before_frames": [ + 30923, + 2189, + "FULL" + ], + "after_frames": [ + 30923, + 2191, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 17530, + "before_frames": [ + 30909, + 2197, + "FULL" + ], + "after_frames": [ + 30909, + 2199, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 17568, + "before_frames": [ + 30949, + 2174, + "FULL" + ], + "after_frames": [ + 30949, + 2176, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 17573, + "before_frames": [ + 30921, + 2190, + "FULL" + ], + "after_frames": [ + 30921, + 2192, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 17585, + "before_frames": [ + 30907, + 2198, + "FULL" + ], + "after_frames": [ + 30907, + 2200, + "FULL" + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23, + 24 + ] + }, + { + "stream": 18849, + "before_frames": [ + 32783, + 24867, + "REST:18849" + ], + "after_frames": [ + 32783, + 24867, + 2174, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 18869, + "before_frames": [ + 32467, + 24889, + "REST:18869" + ], + "after_frames": [ + 32467, + 24889, + 2182, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 18889, + "before_frames": [ + 32151, + 24911, + "REST:18889" + ], + "after_frames": [ + 32151, + 24911, + 2190, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 18899, + "before_frames": [ + 31993, + 24909, + "REST:18899" + ], + "after_frames": [ + 31993, + 24909, + 2189, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 18909, + "before_frames": [ + 31835, + 24933, + "REST:18909" + ], + "after_frames": [ + 31835, + 24933, + 2198, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 18919, + "before_frames": [ + 31677, + 24931, + "REST:18919" + ], + "after_frames": [ + 31677, + 24931, + 2197, + "FULL" + ], + "before_dimensions": [ + 21, + 22, + 23 + ], + "after_dimensions": [ + 21, + 22, + 23, + 24 + ] + }, + { + "stream": 18920, + "before_frames": [ + 30953, + 2172, + "FULL" + ], + "after_frames": [ + 30953, + 2172 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18921, + "before_frames": [ + 30949, + 2176, + "FULL" + ], + "after_frames": [ + 30949, + 2176 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18922, + "before_frames": [ + 30939, + 2180, + "FULL" + ], + "after_frames": [ + 30939, + 2180 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18923, + "before_frames": [ + 30935, + 2184, + "FULL" + ], + "after_frames": [ + 30935, + 2184 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18924, + "before_frames": [ + 30927, + 2187, + "FULL" + ], + "after_frames": [ + 30927, + 2187 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18925, + "before_frames": [ + 30925, + 2188, + "FULL" + ], + "after_frames": [ + 30925, + 2188 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18926, + "before_frames": [ + 30923, + 2191, + "FULL" + ], + "after_frames": [ + 30923, + 2191 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18927, + "before_frames": [ + 30921, + 2192, + "FULL" + ], + "after_frames": [ + 30921, + 2192 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18928, + "before_frames": [ + 30913, + 2195, + "FULL" + ], + "after_frames": [ + 30913, + 2195 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18929, + "before_frames": [ + 30911, + 2196, + "FULL" + ], + "after_frames": [ + 30911, + 2196 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18930, + "before_frames": [ + 30909, + 2199, + "FULL" + ], + "after_frames": [ + 30909, + 2199 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + }, + { + "stream": 18931, + "before_frames": [ + 30907, + 2200, + "FULL" + ], + "after_frames": [ + 30907, + 2200 + ], + "before_dimensions": [ + 22, + 23, + 24 + ], + "after_dimensions": [ + 22, + 23 + ] + } + ], + "scope": "Chronological required-frame census of all affected helper, source-carrier and target streams. Targets start at ZERO for this difference census; their unchanged prior prefixes terminate within the checked first unchanged precursor frame, under retained source admission. Helper prefix frames are read from the actual base forward word and no affected helper overlaps descent changes; all 12 selected partner setups use their verified post-descent rank-22 frames. No global finite/compiler replay is claimed." +} diff --git a/research/gen5b-shared-kernels/certificates/coretime12/local.json b/research/gen5b-shared-kernels/certificates/coretime12/local.json new file mode 100644 index 0000000000..cddad6555b --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/coretime12/local.json @@ -0,0 +1,285 @@ +{ + "status": "PASS_LOCAL_INTEGER_ROOT_SCHEDULE_CERTIFICATE", + "head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selected": 12, + "undone_old_restorations": 6, + "local_histogram_delta": { + "1": -6, + "2": 0 + }, + "residual_rank_count_delta": { + "2": 12, + "3": -18, + "4": 6 + }, + "literal_stock_delta": -15, + "unreplicated_stock_delta": "-1/4", + "exact_integer_root_schedule_identity": true, + "missing_restoration_control_rejected": true, + "unchanged_root_read_coefficients": true, + "candidates": [ + { + "helper": 15813, + "donor": 11438, + "blocker": 2701, + "target": 409, + "helper_root": 1546, + "donor_root": 1540, + "blocker_root": 1533, + "old_restored_helper": 15329, + "old_restored_helper_stream": 18849, + "common_frame": 30953, + "new_endpoint": 2172, + "promoted_blocker_frame": 2170, + "target_precursor_roots": [ + 1530 + ], + "prefix_group_present": false, + "source_union_size": 180 + }, + { + "helper": 15815, + "donor": 14048, + "blocker": 15329, + "target": 413, + "helper_root": 1558, + "donor_root": 1552, + "blocker_root": 1535, + "old_restored_helper": 15329, + "old_restored_helper_stream": 18849, + "common_frame": 30949, + "new_endpoint": 2176, + "promoted_blocker_frame": 2174, + "target_precursor_roots": [ + 1531 + ], + "prefix_group_present": true, + "source_union_size": 180 + }, + { + "helper": 15821, + "donor": 5877, + "blocker": 2729, + "target": 417, + "helper_root": 1576, + "donor_root": 1570, + "blocker_root": 1563, + "old_restored_helper": 15349, + "old_restored_helper_stream": 18869, + "common_frame": 30939, + "new_endpoint": 2180, + "promoted_blocker_frame": 2178, + "target_precursor_roots": [ + 1560 + ], + "prefix_group_present": false, + "source_union_size": 180 + }, + { + "helper": 15823, + "donor": 13943, + "blocker": 15349, + "target": 421, + "helper_root": 1588, + "donor_root": 1582, + "blocker_root": 1565, + "old_restored_helper": 15349, + "old_restored_helper_stream": 18869, + "common_frame": 30935, + "new_endpoint": 2184, + "promoted_blocker_frame": 2182, + "target_precursor_roots": [ + 1561 + ], + "prefix_group_present": true, + "source_union_size": 180 + }, + { + "helper": 15828, + "donor": 5853, + "blocker": 2750, + "target": 424, + "helper_root": 1603, + "donor_root": 1597, + "blocker_root": 1592, + "old_restored_helper": 15379, + "old_restored_helper_stream": 18899, + "common_frame": 30927, + "new_endpoint": 2187, + "promoted_blocker_frame": 2185, + "target_precursor_roots": [ + 1590 + ], + "prefix_group_present": false, + "source_union_size": 180 + }, + { + "helper": 15829, + "donor": 5857, + "blocker": 2757, + "target": 425, + "helper_root": 1606, + "donor_root": 1600, + "blocker_root": 1593, + "old_restored_helper": 15369, + "old_restored_helper_stream": 18889, + "common_frame": 30925, + "new_endpoint": 2188, + "promoted_blocker_frame": 2186, + "target_precursor_roots": [ + 1590 + ], + "prefix_group_present": false, + "source_union_size": 180 + }, + { + "helper": 15830, + "donor": 13998, + "blocker": 15379, + "target": 428, + "helper_root": 1615, + "donor_root": 1609, + "blocker_root": 1594, + "old_restored_helper": 15379, + "old_restored_helper_stream": 18899, + "common_frame": 30923, + "new_endpoint": 2191, + "promoted_blocker_frame": 2189, + "target_precursor_roots": [ + 1591 + ], + "prefix_group_present": true, + "source_union_size": 180 + }, + { + "helper": 15831, + "donor": 14053, + "blocker": 15369, + "target": 429, + "helper_root": 1618, + "donor_root": 1612, + "blocker_root": 1595, + "old_restored_helper": 15369, + "old_restored_helper_stream": 18889, + "common_frame": 30921, + "new_endpoint": 2192, + "promoted_blocker_frame": 2190, + "target_precursor_roots": [ + 1591 + ], + "prefix_group_present": true, + "source_union_size": 180 + }, + { + "helper": 15836, + "donor": 12649, + "blocker": 2778, + "target": 432, + "helper_root": 1633, + "donor_root": 1627, + "blocker_root": 1622, + "old_restored_helper": 15399, + "old_restored_helper_stream": 18919, + "common_frame": 30913, + "new_endpoint": 2195, + "promoted_blocker_frame": 2193, + "target_precursor_roots": [ + 1620 + ], + "prefix_group_present": false, + "source_union_size": 180 + }, + { + "helper": 15837, + "donor": 12678, + "blocker": 2785, + "target": 433, + "helper_root": 1636, + "donor_root": 1630, + "blocker_root": 1623, + "old_restored_helper": 15389, + "old_restored_helper_stream": 18909, + "common_frame": 30911, + "new_endpoint": 2196, + "promoted_blocker_frame": 2194, + "target_precursor_roots": [ + 1620 + ], + "prefix_group_present": false, + "source_union_size": 180 + }, + { + "helper": 15838, + "donor": 14010, + "blocker": 15399, + "target": 436, + "helper_root": 1645, + "donor_root": 1639, + "blocker_root": 1624, + "old_restored_helper": 15399, + "old_restored_helper_stream": 18919, + "common_frame": 30909, + "new_endpoint": 2199, + "promoted_blocker_frame": 2197, + "target_precursor_roots": [ + 1621 + ], + "prefix_group_present": true, + "source_union_size": 180 + }, + { + "helper": 15839, + "donor": 14065, + "blocker": 15389, + "target": 437, + "helper_root": 1648, + "donor_root": 1642, + "blocker_root": 1625, + "old_restored_helper": 15389, + "old_restored_helper_stream": 18909, + "common_frame": 30907, + "new_endpoint": 2200, + "promoted_blocker_frame": 2198, + "target_precursor_roots": [ + 1621 + ], + "prefix_group_present": true, + "source_union_size": 180 + } + ], + "rejected": [ + { + "helper": 16485, + "reason": "Shared K-source would need two distinct promoted target hyperplanes" + }, + { + "helper": 16709, + "reason": "Shared K-source would need two distinct promoted target hyperplanes" + } + ], + "kernel_donor_contracts": [ + { + "donor": 12649, + "stream": 16169, + "entries": 1, + "pivot_entries": 0, + "setup_entry_ranks": [ + 4 + ], + "all_entry_frames_inside_J": true, + "interval_contract": "Imported: setup before first ordinary use, restoration after complete original cleanup" + }, + { + "donor": 12678, + "stream": 16198, + "entries": 1, + "pivot_entries": 0, + "setup_entry_ranks": [ + 4 + ], + "all_entry_frames_inside_J": true, + "interval_contract": "Imported: setup before first ordinary use, restoration after complete original cleanup" + } + ], + "scope": "Local source-data surgery certificate with exact integer root map, geometry/source-span conditions and net ledger. Full emitted postkernel word and global all-column replay have NOT been reconstructed. Existing valid monotone source-stage/target-prefix/sink contracts are retained assumptions; no certified new multiplication exponent is claimed." +} diff --git a/research/gen5b-shared-kernels/certificates/coretime12/pricing.json b/research/gen5b-shared-kernels/certificates/coretime12/pricing.json new file mode 100644 index 0000000000..b37d91556d --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/coretime12/pricing.json @@ -0,0 +1,710 @@ +{ + "status": "CONDITIONAL_ARITHMETIC_ONLY", + "physical_admission": false, + "local_histogram_delta": { + "1": 18, + "2": -12 + }, + "role_rank_count_delta": { + "2": 12, + "3": -18, + "4": 6 + }, + "histogram": { + "1": 220930, + "2": 82670, + "3": 45045, + "4": 25805, + "5": 12040, + "6": 10115, + "7": 4435, + "8": 1700, + "9": 3365, + "10": 2015, + "11": 3335, + "12": 3145, + "13": 1470, + "14": 2425, + "15": 300, + "16": 8345, + "17": 385, + "18": 3805, + "19": 180, + "20": 3180, + "21": 35095, + "22": 2320, + "23": 3520, + "46": 3520, + "50": 3520 + }, + "calls": 482665, + "rank_mass": 2455070, + "literal_stock": 1229735, + "unreplicated_stock": "245947/12", + "deficit": "4400", + "packing": { + "capacity": 120, + "demand": { + "10": 60, + "12": 60, + "13": 240, + "14": 60, + "15": 60, + "17": 120, + "18": 180, + "19": 120, + "20": 1260, + "21": 960, + "22": 4920, + "23": 94440, + "24": 688380, + "3": 27360, + "4": 104880, + "6": 1020, + "7": 180, + "8": 360, + "9": 240, + "2": 720 + }, + "patterns": [ + { + "widths": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 10 + }, + { + "widths": [ + 6, + 6, + 6, + 6, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 7, + 7, + 7, + 7, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 8, + 8, + 8, + 8, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 90 + }, + { + "widths": [ + 9, + 9, + 9, + 9, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 60 + }, + { + "widths": [ + 10, + 10, + 10, + 10, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 12, + 12, + 12, + 12, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 13, + 13, + 13, + 13, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 60 + }, + { + "widths": [ + 14, + 14, + 14, + 14, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 15, + 15, + 15, + 15, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 17, + 17, + 17, + 17, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 30 + }, + { + "widths": [ + 18, + 18, + 18, + 18, + 24, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 45 + }, + { + "widths": [ + 19, + 19, + 19, + 19, + 24, + 4, + 4, + 4, + 4, + 4 + ], + "count": 30 + }, + { + "widths": [ + 20, + 20, + 20, + 20, + 24, + 4, + 4, + 4, + 4 + ], + "count": 315 + }, + { + "widths": [ + 21, + 21, + 21, + 21, + 24, + 4, + 4, + 4 + ], + "count": 240 + }, + { + "widths": [ + 22, + 22, + 22, + 22, + 24, + 4, + 4 + ], + "count": 1230 + }, + { + "widths": [ + 23, + 23, + 23, + 23, + 24, + 4 + ], + "count": 23610 + }, + { + "widths": [ + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 2397 + }, + { + "widths": [ + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3 + ], + "count": 684 + }, + { + "widths": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6 + ], + "count": 48 + }, + { + "widths": [ + 24, + 24, + 24, + 24, + 24 + ], + "count": 132516 + }, + { + "widths": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "count": 12 + } + ], + "total_rank_demand": 19376040, + "feasible_bins": 161467, + "unused_coordinate_capacity": 0, + "dual_prices": { + "10": "1/12", + "12": "1/10", + "13": "13/120", + "14": "7/60", + "15": "1/8", + "17": "17/120", + "18": "3/20", + "19": "19/120", + "20": "1/6", + "21": "7/40", + "22": "11/60", + "23": "23/120", + "24": "1/5", + "3": "1/40", + "4": "1/30", + "6": "1/20", + "7": "7/120", + "8": "1/15", + "9": "3/40", + "2": "1/60" + }, + "dual_objective": "161467", + "integer_lower_bound": 161467, + "optimal": true + }, + "root_bracket": [ + "750469712644613/1000000000000000000", + "375234856322307/500000000000000000" + ], + "moment_interval": [ + "739023437499999998404818327845920871611726124764535716171947537743/739023437500000000000000000000000000000000000000000000000000000000", + "75057067871093749837989361421851338523065934546398907901618702027/75057067871093750000000000000000000000000000000000000000000000000" + ], + "adjacent_moment_interval": [ + "9607304687500000002190362034337412745338689578098215529763051037867/9607304687500000000000000000000000000000000000000000000000000000000", + "1200913085937500000273795254292176593167336197262288928866865863333/1200913085937500000000000000000000000000000000000000000000000000000" + ], + "kappa": "749906929903449/1000000000000000000", + "kappa_decimal": "0.000749906929903449", + "assembly": { + "coarse": "750469712644613/1000000000000000000", + "complex_coarse": "754736418878859/1000000000000000000", + "bootstrap_chain": [ + "384599/10000000000", + "749935370845117452542180262080231/1000000000000000000000000000000000000", + "750469311637276278571083649465802007924743795945603/1000000000000000000000000000000000000000000000000000000", + "750469712343669139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "strict_constraints": { + "a_positive": "750469712343669139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000", + "a_below_b": "4266706535189860757712325428067948668730596776048523676387781013361/1000000000000000000000000000000000000000000000000000000000000000000000000", + "b_below_one_over32": "30495263581121141/1000000000000000000", + "beta_positive": "1/1000000000", + "beta_below_one": "999999999/1000000000", + "phase_leaf_above_bit": "4266705780453441878853325428067948668730596776048523676387781013361/1000000000000000000000000000000000000000000000000000000000000000000000000", + "q_positive": "375234856171084099908800168146723737991062769560644468758582158016995887781013361/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_internal": "750469712343669139242287674571932051331269403223951476323612218986639/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_leaf": "2133352890977190651770331853276262008937230439355531241417841983004112218986639/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "c_positive": "375234856296084099908800168146723737991062769560644468758582158016995887781013361/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "c_below_one": "499624765143703915900091199831853276262008937230439355531241417841983004112218986639/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_reservations": "1/4000000000000", + "lambda_above_tau": "750469712343669139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_above_sigma": "4266706535940330470055994567310236343302528827379793079611732489684612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_above_internal": "750469712343669139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_prime_above_lambda": "750469712343669139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "compact_leaf": "2133352890977190651770331853276262008937230439355531241417841983004112218986639/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "compact_reservations": "1/4000000000000", + "lambda_prime_below_one": "375234856171084099908800168146723737991062769560644468758582158016995887781013361/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "epsilon_positive": "499999999999500000000000000000000000000000000000000000000000000000000000000000000000/500375234856171084099908800168146723737991062769560644468758582158016995887781013361", + "epsilon_below_one": "375234856671084099908800168146723737991062769560644468758582158016995887781013361/500375234856171084099908800168146723737991062769560644468758582158016995887781013361", + "guard_width": "375234856671084099908800168146723737991062769560644468758582158016995887781013361/500375234856171084099908800168146723737991062769560644468758582158016995887781013361", + "K_geometry": "375375234856296084099908800168146723737991062769560644468758582158016995887781013361/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000", + "K_dominates_log": "375234856295708865052504084046814937822916045822653405989021513548237305622996365112218986639/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000", + "record_suffix": "375234856671084099908800168146723737991062769560644468758582158016995887781013361/500375234856171084099908800168146723737991062769560644468758582158016995887781013361", + "phase_local": "3001878852868297564414230261073881103760355432747164687299096619667208520090089892112218986639/4003001878849368672799270401345173789903928502156485155750068657264135967102248106888000000000000", + "phase_boundary": "600375770173359324997909184934849180617553707559040087244170808358434838291604381712218986639/800600375769873734559854080269034757980785700431297031150013731452827193420449621377600000000000", + "gamma_sublinear": "1/2000000000000", + "cell_above_band": "999999999998499624765143828915900091199831853276262008937230439355531241417841983004112218986639/2001500939424684336399635200672586894951964251078242577875034328632067983551124053444000000000000", + "prime_interval_packing": "375234856671084099908800168146723737991062769560644468758582158016995887781013361/500375234856171084099908800168146723737991062769560644468758582158016995887781013361", + "alpha_positive": "750469712841792964961429252193538675813978815383297874747603671565233193404009726112218986639/1000750469712342168199817600336293447475982125539121288937517164316033991775562026722000000000000", + "alpha_below_one": "999999999999500375234856171084099908800168146723737991062769560644468758582158016995887781013361/1000750469712342168199817600336293447475982125539121288937517164316033991775562026722000000000000", + "alpha_below_one_fourth": "249437147715243749084992970831879823193181552569397024359631687407443264750486496954387781013361/1000750469712342168199817600336293447475982125539121288937517164316033991775562026722000000000000", + "delta_positive": "1/8000000000000", + "delta_below_one_eighth": "999999999999/8000000000000", + "short_record_fallback": "499624483540933593398831635806135547078311015333512173884611517468493247681667714755947201326827175624609378257400090082659309412947282905526234784060516321/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000000000000000000000000000000000000000000000000000000000000000", + "small_field_exposure": "1/1000000000000", + "artificial_boundary": "28024015030800450508098731724013690045631932457423095219188857940046494012564458906091663343040083/4003001878849368672799270401345173789903928502156485155750068657264135967102248106888000000000000", + "literal_scalar_guard": "1", + "row_product_gap": "23971789/25", + "g1_above_kappa": "500375579977263920873575639168182501635312723517657778543827697372923575728124652891017911/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000000000", + "g2_above_kappa": "562782440220139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g3_above_kappa": "345121092836773666839000035777897321660748097134075069115214906579840343639530017911/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000000000", + "g4_above_kappa": "562782440220139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g5_above_kappa": "187641058192156993311132639063090799299068309286682375750853583524162953298261519540392911/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000000000", + "g6_above_kappa": "437828675620242535361087039147164161168063840671462697985232874603171451242152026220892911/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000000000", + "g7_above_kappa": "499624765143329291480068463752726851901177119732074668254759075620526831809591910214728124652891017911/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000000000" + }, + "margins": { + "g1": "375234856671084099908800168146723737991062769560644468758582158016995887781013361/500375234856171084099908800168146723737991062769560644468758582158016995887781013361", + "g2": "750469712343669139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g3": "375234856170708865052629084046814937822916045822653405989021513548237305622996365112218986639/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000", + "g4": "750469712343669139242287674571932051331269403223951476323612218986639/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g5": "600375770173359324997909184934849180617553707559040087244170808358434838291604381712218986639/800600375769873734559854080269034757980785700431297031150013731452827193420449621377600000000000", + "g6": "3001878852868297564414230261073881103760355432747164687299096619667208520090089892112218986639/4003001878849368672799270401345173789903928502156485155750068657264135967102248106888000000000000", + "g7": "499999999999500000000000000000000000000000000000000000000000000000000000000000000000/500375234856171084099908800168146723737991062769560644468758582158016995887781013361" + }, + "kappa": "749906929903449/1000000000000000000", + "kappa_decimal": "0.000749906929903449", + "minimum_margin": "375234856170708865052629084046814937822916045822653405989021513548237305622996365112218986639/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000", + "absorption_gap": "345121092836773666839000035777897321660748097134075069115214906579840343639530017911/500375234856171084099908800168146723737991062769560644468758582158016995887781013361000000000000000000", + "adjacent_grid_rejected": [ + "g3_above_kappa" + ], + "bridge_scope": "The positive literal gap and supplied row gap are assumptions in this arithmetic check." + }, + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "binding": "Measured chronological frame delta and exact selected endpoint residual changes.", + "prior_kappa": "374949607659749/500000000000000000", + "kappa_gain": "7714583951/1000000000000000000" +} diff --git a/research/gen5b-shared-kernels/certificates/coretime12/scalar-transport.json b/research/gen5b-shared-kernels/certificates/coretime12/scalar-transport.json new file mode 100644 index 0000000000..db37041de6 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/coretime12/scalar-transport.json @@ -0,0 +1,321 @@ +{ + "status": "PASS_EXACT_SCALAR_NORM_TRANSPORT", + "suffix_additions": 55985, + "commuting_adjacent_swaps": 172944, + "destinations_with_changed_update_order": [ + { + "destination": 2169, + "moved_old_event": 2684, + "moved_gate": [ + 2169, + 14958, + 1 + ], + "old_order": [ + 2653, + 2665, + 2668, + 2683, + 2684, + 2685 + ], + "new_order": [ + 2653, + 2684, + 2665, + 2668, + 2683, + 2685 + ] + }, + { + "destination": 2173, + "moved_old_event": 2696, + "moved_gate": [ + 2173, + 17568, + 1 + ], + "old_order": [ + 2657, + 2675, + 2678, + 2695, + 2696, + 2697 + ], + "new_order": [ + 2657, + 2696, + 2675, + 2678, + 2695, + 2697 + ] + }, + { + "destination": 2181, + "moved_old_event": 2744, + "moved_gate": [ + 2181, + 17463, + 1 + ], + "old_order": [ + 2705, + 2723, + 2726, + 2743, + 2744, + 2745 + ], + "new_order": [ + 2705, + 2744, + 2723, + 2726, + 2743, + 2745 + ] + }, + { + "destination": 2177, + "moved_old_event": 2732, + "moved_gate": [ + 2177, + 9397, + 1 + ], + "old_order": [ + 2713, + 2716, + 2731, + 2732, + 2733 + ], + "new_order": [ + 2732, + 2713, + 2716, + 2731, + 2733 + ] + }, + { + "destination": 2184, + "moved_old_event": 2781, + "moved_gate": [ + 2184, + 9373, + 1 + ], + "old_order": [ + 2752, + 2760, + 2763, + 2780, + 2781, + 2782 + ], + "new_order": [ + 2752, + 2781, + 2760, + 2763, + 2780, + 2782 + ] + }, + { + "destination": 2185, + "moved_old_event": 2784, + "moved_gate": [ + 2185, + 9377, + 1 + ], + "old_order": [ + 2753, + 2765, + 2768, + 2783, + 2784, + 2785 + ], + "new_order": [ + 2753, + 2784, + 2765, + 2768, + 2783, + 2785 + ] + }, + { + "destination": 2188, + "moved_old_event": 2793, + "moved_gate": [ + 2188, + 17518, + 1 + ], + "old_order": [ + 2756, + 2770, + 2773, + 2792, + 2793, + 2794 + ], + "new_order": [ + 2756, + 2793, + 2770, + 2773, + 2792, + 2794 + ] + }, + { + "destination": 2189, + "moved_old_event": 2796, + "moved_gate": [ + 2189, + 17573, + 1 + ], + "old_order": [ + 2757, + 2775, + 2778, + 2795, + 2796, + 2797 + ], + "new_order": [ + 2757, + 2796, + 2775, + 2778, + 2795, + 2797 + ] + }, + { + "destination": 2192, + "moved_old_event": 2833, + "moved_gate": [ + 2192, + 16169, + 1 + ], + "old_order": [ + 2804, + 2812, + 2815, + 2832, + 2833, + 2834 + ], + "new_order": [ + 2804, + 2833, + 2812, + 2815, + 2832, + 2834 + ] + }, + { + "destination": 2193, + "moved_old_event": 2836, + "moved_gate": [ + 2193, + 16198, + 1 + ], + "old_order": [ + 2805, + 2817, + 2820, + 2835, + 2836, + 2837 + ], + "new_order": [ + 2805, + 2836, + 2817, + 2820, + 2835, + 2837 + ] + }, + { + "destination": 2196, + "moved_old_event": 2845, + "moved_gate": [ + 2196, + 17530, + 1 + ], + "old_order": [ + 2808, + 2822, + 2825, + 2844, + 2845, + 2846 + ], + "new_order": [ + 2808, + 2845, + 2822, + 2825, + 2844, + 2846 + ] + }, + { + "destination": 2197, + "moved_old_event": 2848, + "moved_gate": [ + 2197, + 17585, + 1 + ], + "old_order": [ + 2809, + 2827, + 2830, + 2847, + 2848, + 2849 + ], + "new_order": [ + 2809, + 2848, + 2827, + 2830, + 2847, + 2849 + ] + } + ], + "forward_norm_factor": 2, + "inverse_norm_factor": 2, + "original_forward_bound": 77985, + "original_inverse_bound": 2475558, + "new_forward_bound": 155970, + "new_inverse_bound": 4951116, + "payload_upper": 5952636918929489086220792832000, + "payload_bits": 103, + "retained_payload_cap_bits": 104, + "unchanged_literal_scalar_multiset": true, + "source_hashes": { + "original_suffix": "46abcfd74d8a06328b4a37c3bb5e353f8d1cfeea8ac03093f4f70a88949a11a3", + "modified_suffix": "a3ce5ed25c101d9a6c529222ab63fa91f2a1fd1c2333f15add5f88176eff34ae" + }, + "theorem": "Commuting swaps preserve each source value sampled by a gate. Every unchanged destination update sequence has the old row-value trajectory. Each changed destination order moves one unit update; at intermediate cuts its row is an old row plus or minus that same old source row. Reversing both schedules gives the identical property. The unchanged prefix is composed using the retained old global row-norm bounds.", + "scope": "Changed scalar suffix and retained old prefix bounds only. Address geometry and inherited finite compiler hypotheses are separate." +} diff --git a/research/gen5b-shared-kernels/certificates/coretime12/suffix.json b/research/gen5b-shared-kernels/certificates/coretime12/suffix.json new file mode 100644 index 0000000000..2daa23f5f0 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/coretime12/suffix.json @@ -0,0 +1,47 @@ +{ + "all_independent_entry_roles": 18954, + "active_roles_after_sinks": 18947, + "selected": 12, + "old_restorations_undone": 6, + "sink_roles_removed": 7, + "kernel_member_donors": [ + { + "role": 12649, + "stream": 16169 + }, + { + "role": 12678, + "stream": 16198 + } + ], + "sink_target_overlaps_contained_in_new_frame": [ + 2177 + ], + "target_prefix_closed_before_suffix": { + "prefix_odd_adds": 700340, + "mandatory_positive_move_lower_bound": 11392, + "last_close_record": 702034 + }, + "co_retimed_partner_deliveries": 12, + "original_suffix_adds": 55985, + "modified_suffix_adds": 55985, + "status": "PASS_COMPLETE_SUFFIX_ALL_COLUMN_EQUALITY", + "field": "F2", + "forward_all_column_equal": true, + "inverse_all_column_equal": true, + "arbitrary_source_target_dirty_entry_values": true, + "exact_integer_signed_operators_equal_forward_inverse": true, + "exact_integer_absolute_coefficient_operators_equal": true, + "forward_inverse_absolute_operator_nonzeros": [ + 194718, + 6007476 + ], + "unchanged_forward_inverse_row_l1_bounds": true, + "norm_justification": "Pinned scalar_check.py replay_projection uses norms[a] += abs(c)*norms[b]. For arbitrary nonnegative entry weights, these before/after suffix majorant maps agree exactly over integers, in both directions. Every majorant row grows monotonically during the ADD-only suffix, so its maximal intermediate value is its final value. The unchanged prefix and suffix therefore retain the inherited forward/inverse maximum row-L1 bounds.", + "omitted_new_restoration_rejected": true, + "unchanged_scalar_multiset": true, + "original_suffix_sha256": "46abcfd74d8a06328b4a37c3bb5e353f8d1cfeea8ac03093f4f70a88949a11a3", + "modified_suffix_sha256": "a3ce5ed25c101d9a6c529222ab63fa91f2a1fd1c2333f15add5f88176eff34ae", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "scope": "Complete changed scalar suffix with all untouched suffix operations, seven sinks, inverse cleanup and kernel restores. Equality on arbitrary independent entry states composes with the inherited unchanged prefix. Rational address-frame legality and cost are separate checks; this does not rerun inherited all-size or finite-bridge hypotheses." +} diff --git a/research/gen5b-shared-kernels/certificates/coretime12/summary.json b/research/gen5b-shared-kernels/certificates/coretime12/summary.json new file mode 100644 index 0000000000..bc07e64cb0 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/coretime12/summary.json @@ -0,0 +1,21 @@ +{ + "status": "PASS_CHANGED_STAGE_CHECKS_CONDITIONAL_ON_PINNED_BASE", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "new_restorations": 12, + "old_restorations_undone": 6, + "kappa": "749906929903449/1000000000000000000", + "kappa_decimal": "0.000749906929903449", + "literal_stock": 1229735, + "paid_calls": 482665, + "rank_mass": 2455070, + "deficit": "4400", + "full_inherited_admission_replayed": false, + "all_size_theorem_verified": false, + "verification_limits": [ + "The pinned PR299 unchanged prefix and its original admission remain hypotheses.", + "Unchanged finite compiler, weighted chart, routing, prime and setup contracts are inherited.", + "Changed charts, selector bound and scalar payload bound are checked here; the complete inherited finite compiler is not rerun.", + "Outer positive literal and row-gap inputs remain conditional on the inherited finite bridge.", + "No full all-size or machine-verification claim is made." + ] +} diff --git a/research/gen5b-shared-kernels/certificates/kernel70/banks.json b/research/gen5b-shared-kernels/certificates/kernel70/banks.json new file mode 100644 index 0000000000..bf6245facf --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel70/banks.json @@ -0,0 +1,43 @@ +{ + "status": "PASS_UNIFIED_KERNEL70_CORETIME12_BANK_ASSIGNMENT", + "helper_roles": 15427, + "retained_old_restorations": 434, + "new_restorations": 12, + "reverted_old_restorations": 6, + "family_counts": { + "24": 11403, + "23": 1644, + "22": 82, + "21": 16, + "20": 21, + "19": 2, + "17": 2, + "18": 3, + "15": 1, + "14": 1, + "12": 1, + "13": 4, + "10": 1, + "9": 4, + "8": 6, + "7": 3, + "6": 17, + "4": 1748, + "3": 456, + "2": 12 + }, + "new_shared_kernel_pivots": 70, + "residual_rank_per_replica": 322864, + "banks_per_stage": 161432, + "total_banks": 807160, + "literal_data_stock": 422400, + "literal_stock": 1229560, + "unreplicated_stock": "61478/3", + "checked_role_replica_assignments_per_stage": 925620, + "total_stage_assignments": 4628100, + "stages_have_disjoint_bank_namespaces": true, + "all_banks_full": true, + "maximum_block_scalar": 60, + "assignment_sha256": "69841a26beddd5a1d4cea70c745d831fe36e6543270b515a8beb4ffb2c61bee5", + "scope": "Role-resolved bijection into explicit full 120-wide banks, all 60 replicas. Five stages use disjoint bank namespaces. Existing address-normalizer and cover compiler contracts remain inherited; new/reverted chart factors are separately checked." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel70/bridge.json b/research/gen5b-shared-kernels/certificates/kernel70/bridge.json new file mode 100644 index 0000000000..bb4017d208 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel70/bridge.json @@ -0,0 +1,4580 @@ +{ + "status": "PASS_SHARED_DONOR_CHANGED_STAGE_COMPOSITION", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selection": "candidate70", + "chosen_lines": [ + [ + 2, + 3 + ], + [ + 6, + 7 + ], + [ + 16, + 17 + ] + ], + "pivots": 70, + "distinct_donors": 87, + "members": 157, + "setup_adds": 601, + "restore_adds": 601, + "donor_multiplicity_histogram": { + "3": 14, + "5": 5, + "4": 6, + "1": 24, + "8": 1, + "2": 10, + "7": 1, + "6": 2, + "21": 4, + "24": 2, + "19": 3, + "18": 4, + "22": 1, + "17": 2, + "20": 3, + "12": 3, + "13": 2 + }, + "max_donor_multiplicity": 24, + "frozen_response_relations_reproduced": 1720, + "frozen_literal_cut_read_triples_reproduced": 1720, + "common_prefix_plain_reads": 648088, + "last_plain_read": [ + 3503, + 16719, + -1 + ], + "target_prefix_setup_record": 696719, + "common_cut": "Immediately before first source injection, after all plain compensation reads and all old kernel setups", + "all_column_dimension": 18954, + "field": "F2", + "arbitrary_source_target_dirty_inputs": true, + "formal_forward_and_inverse_equal": true, + "prefix_compensation_reads_removed": 860, + "source_compensation_integer_coefficient_max": 1, + "common_line_gram": 18, + "exact_containments": 629, + "old_restoration_donor_overlaps": [], + "local_paid_histogram_delta": { + "1": 87, + "2": 137, + "3": -137, + "4": 18, + "5": -16, + "6": -2 + }, + "residual_family_delta": { + "24": -70, + "23": 70 + }, + "paths": [ + { + "role": 8339, + "stream": 11859, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119570, + 111567, + 70436, + 27517, + 3137, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8341, + "stream": 11861, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119569, + 111523, + 68819, + 29266, + 3139, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8359, + "stream": 11879, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119558, + 111479, + 67201, + 27605, + 3169, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8361, + "stream": 11881, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119557, + 111435, + 65583, + 29210, + 3171, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8394, + "stream": 11914, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119534, + 115737, + 113062, + 61147, + 61145, + 60730, + 30101, + 2657, + 0 + ], + "old_dimensions": [ + 3, + 5, + 7, + 12, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8412, + "stream": 11932, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119522, + 115589, + 112958, + 57889, + 57887, + 57472, + 30087, + 2665, + 0 + ], + "old_dimensions": [ + 3, + 5, + 7, + 12, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8413, + "stream": 11933, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119522, + 111215, + 57452, + 29149, + 3201, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8415, + "stream": 11935, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119521, + 111171, + 55815, + 29147, + 3202, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8787, + "stream": 12307, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119284, + 68449, + 68444, + 68002, + 25735, + 2489, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8789, + "stream": 12309, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119283, + 66831, + 66826, + 66384, + 30400, + 2491, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 8862, + "stream": 12382, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119234, + 115739, + 138594, + 61294, + 60837, + 28441, + 3473, + 0 + ], + "old_dimensions": [ + 3, + 5, + 9, + 15, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 8864, + "stream": 12384, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119233, + 115665, + 138645, + 59673, + 59216, + 28678, + 3475, + 0 + ], + "old_dimensions": [ + 3, + 5, + 9, + 15, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8891, + "stream": 12411, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119214, + 117092, + 24746, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8894, + "stream": 12414, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119213, + 117018, + 24749, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 8901, + "stream": 12421, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119210, + 107697, + 54464, + 28673, + 3473, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 8903, + "stream": 12423, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119209, + 107671, + 52831, + 28671, + 3474, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9175, + "stream": 12695, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119024, + 116202, + 70673, + 27539, + 3145, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9177, + "stream": 12697, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119023, + 116128, + 69056, + 29252, + 3147, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9193, + "stream": 12713, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119012, + 116054, + 67439, + 27627, + 3177, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9195, + "stream": 12715, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119011, + 115980, + 65821, + 29196, + 3179, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9211, + "stream": 12731, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119000, + 115906, + 64198, + 27693, + 3201, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9213, + "stream": 12733, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118999, + 115832, + 62572, + 29154, + 3203, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9228, + "stream": 12748, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118988, + 115780, + 61174, + 61125, + 0 + ], + "old_dimensions": [ + 3, + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9229, + "stream": 12749, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118988, + 115758, + 60954, + 27737, + 3217, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9230, + "stream": 12750, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118987, + 115706, + 59553, + 59504, + 0 + ], + "old_dimensions": [ + 3, + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9247, + "stream": 12767, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118976, + 115610, + 57697, + 29121, + 3217, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9267, + "stream": 12787, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118962, + 115462, + 54427, + 29107, + 3225, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9269, + "stream": 12789, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118961, + 115388, + 52794, + 29105, + 3226, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9346, + "stream": 12866, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118908, + 39449, + 39423, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9347, + "stream": 12867, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118907, + 39291, + 39265, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9353, + "stream": 12873, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118904, + 138092, + 76938, + 0 + ], + "old_dimensions": [ + 3, + 9, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9355, + "stream": 12875, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118903, + 138143, + 75347, + 0 + ], + "old_dimensions": [ + 3, + 9, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9402, + "stream": 12922, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118870, + 38501, + 38475, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9403, + "stream": 12923, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118869, + 38343, + 38317, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9691, + "stream": 13211, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118678, + 138602, + 60814, + 0 + ], + "old_dimensions": [ + 3, + 9, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9693, + "stream": 13213, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118677, + 138653, + 59193, + 0 + ], + "old_dimensions": [ + 3, + 9, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9719, + "stream": 13239, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118658, + 116944, + 25736, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9722, + "stream": 13242, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118657, + 116870, + 25739, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9726, + "stream": 13246, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118656, + 64039, + 63976, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9729, + "stream": 13249, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118654, + 62413, + 62350, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9790, + "stream": 13310, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118610, + 54266, + 54202, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9793, + "stream": 13313, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118608, + 52633, + 52569, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9845, + "stream": 13365, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118572, + 70854, + 70673, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9847, + "stream": 13367, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118571, + 69237, + 69056, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9863, + "stream": 13383, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118560, + 67621, + 67439, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9865, + "stream": 13385, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118559, + 66003, + 65821, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9881, + "stream": 13401, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118548, + 64381, + 64198, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9883, + "stream": 13403, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118547, + 62755, + 62572, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9898, + "stream": 13418, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118536, + 115744, + 61808, + 61032, + 0 + ], + "old_dimensions": [ + 3, + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9916, + "stream": 13436, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118524, + 115596, + 58562, + 57774, + 0 + ], + "old_dimensions": [ + 3, + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9935, + "stream": 13455, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118512, + 54612, + 54427, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9937, + "stream": 13457, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118511, + 52979, + 52794, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10275, + "stream": 13795, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118286, + 113287, + 111495, + 68002, + 0 + ], + "old_dimensions": [ + 3, + 6, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10277, + "stream": 13797, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118285, + 113235, + 111451, + 66384, + 0 + ], + "old_dimensions": [ + 3, + 6, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10350, + "stream": 13870, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118236, + 115741, + 138594, + 60886, + 0 + ], + "old_dimensions": [ + 3, + 5, + 9, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10352, + "stream": 13872, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118235, + 115667, + 138645, + 59265, + 0 + ], + "old_dimensions": [ + 3, + 5, + 9, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10379, + "stream": 13899, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118216, + 116796, + 26528, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10382, + "stream": 13902, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118215, + 116722, + 26531, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10532, + "stream": 14052, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118114, + 62126, + 62123, + 0 + ], + "old_dimensions": [ + 3, + 6, + 8, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10534, + "stream": 14054, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118113, + 60505, + 60502, + 0 + ], + "old_dimensions": [ + 3, + 6, + 8, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10733, + "stream": 14253, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117982, + 136819, + 60936, + 29331, + 3097, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10740, + "stream": 14260, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117976, + 35661, + 35635, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10741, + "stream": 14261, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117975, + 35503, + 35477, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10751, + "stream": 14271, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117970, + 136881, + 57679, + 29317, + 3105, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10758, + "stream": 14278, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117964, + 35345, + 35319, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10759, + "stream": 14279, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117963, + 35187, + 35161, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10764, + "stream": 14284, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117960, + 116202, + 70518, + 70734, + 70656, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10766, + "stream": 14286, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117959, + 116128, + 68901, + 69117, + 69039, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10782, + "stream": 14302, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117948, + 116086, + 67365, + 67247, + 26527, + 2777, + 0 + ], + "old_dimensions": [ + 3, + 5, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10783, + "stream": 14303, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117948, + 113299, + 111479, + 110673, + 28420, + 0 + ], + "old_dimensions": [ + 3, + 7, + 12, + 14, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10784, + "stream": 14304, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117947, + 116012, + 65747, + 65629, + 29896, + 2779, + 0 + ], + "old_dimensions": [ + 3, + 5, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10785, + "stream": 14305, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117947, + 113247, + 111435, + 110645, + 28423, + 0 + ], + "old_dimensions": [ + 3, + 7, + 12, + 14, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10812, + "stream": 14332, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117928, + 34397, + 34371, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10813, + "stream": 14333, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117927, + 34239, + 34213, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10830, + "stream": 14350, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117916, + 34081, + 34055, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10831, + "stream": 14351, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117915, + 33923, + 33897, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10836, + "stream": 14356, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117912, + 116054, + 67283, + 67501, + 67422, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10838, + "stream": 14358, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117911, + 115980, + 65665, + 65883, + 65804, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10859, + "stream": 14379, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117898, + 115737, + 60978, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10861, + "stream": 14381, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117897, + 115663, + 59357, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10877, + "stream": 14397, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117886, + 115589, + 57721, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10879, + "stream": 14399, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117885, + 115515, + 56084, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10884, + "stream": 14404, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117880, + 33133, + 33107, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10885, + "stream": 14405, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117879, + 32975, + 32949, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10887, + "stream": 14407, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117878, + 116648, + 27144, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10890, + "stream": 14410, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117877, + 116574, + 27147, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10892, + "stream": 14412, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117876, + 115906, + 64039, + 64260, + 64181, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10894, + "stream": 14414, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117875, + 115832, + 62413, + 62634, + 62555, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10910, + "stream": 14430, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117864, + 115744, + 61603, + 61106, + 30605, + 2369, + 0 + ], + "old_dimensions": [ + 3, + 5, + 15, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10911, + "stream": 14431, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117864, + 60793, + 61808, + 0 + ], + "old_dimensions": [ + 3, + 8, + 17, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10915, + "stream": 14435, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117862, + 57536, + 58562, + 0 + ], + "old_dimensions": [ + 3, + 8, + 17, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10922, + "stream": 14442, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117856, + 32501, + 32475, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10928, + "stream": 14448, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117852, + 115758, + 60793, + 61017, + 60936, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10929, + "stream": 14449, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117852, + 61145, + 61139, + 61106, + 0 + ], + "old_dimensions": [ + 3, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10940, + "stream": 14460, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117844, + 32185, + 32159, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10941, + "stream": 14461, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117843, + 32027, + 32001, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10946, + "stream": 14466, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117838, + 115610, + 57536, + 57759, + 57679, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10950, + "stream": 14470, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117836, + 115462, + 54266, + 54490, + 54409, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10952, + "stream": 14472, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117835, + 115388, + 52633, + 52857, + 52776, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11168, + "stream": 14688, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117694, + 116086, + 113309, + 68337, + 67243, + 0 + ], + "old_dimensions": [ + 3, + 5, + 7, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11169, + "stream": 14689, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117694, + 111477, + 68444, + 68441, + 67247, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11170, + "stream": 14690, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117694, + 110673, + 108582, + 107893, + 67307, + 0 + ], + "old_dimensions": [ + 3, + 14, + 16, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11171, + "stream": 14691, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117693, + 116012, + 113257, + 66719, + 65625, + 0 + ], + "old_dimensions": [ + 3, + 5, + 7, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11172, + "stream": 14692, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117693, + 111433, + 66826, + 66823, + 65629, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11173, + "stream": 14693, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117693, + 110645, + 108548, + 107867, + 65689, + 0 + ], + "old_dimensions": [ + 3, + 14, + 16, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11255, + "stream": 14775, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117644, + 113092, + 61266, + 0 + ], + "old_dimensions": [ + 3, + 7, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11257, + "stream": 14777, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117643, + 113040, + 59645, + 0 + ], + "old_dimensions": [ + 3, + 7, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11283, + "stream": 14803, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117624, + 116500, + 27606, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11286, + "stream": 14806, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117623, + 116426, + 27609, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11527, + "stream": 15047, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117462, + 113059, + 61334, + 60886, + 0 + ], + "old_dimensions": [ + 3, + 6, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11529, + "stream": 15049, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117461, + 113007, + 59713, + 59265, + 0 + ], + "old_dimensions": [ + 3, + 6, + 17, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11555, + "stream": 15075, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117442, + 116352, + 27936, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11558, + "stream": 15078, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117441, + 116278, + 27939, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11632, + "stream": 15152, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117390, + 116062, + 68020, + 138367, + 68449, + 67738, + 67201, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 10, + 15, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11634, + "stream": 15154, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117389, + 115988, + 66402, + 138418, + 66831, + 66120, + 65583, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 10, + 15, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11709, + "stream": 15229, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117340, + 61294, + 61291, + 61282, + 60978, + 29205, + 3169, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11711, + "stream": 15231, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117339, + 59673, + 59670, + 59661, + 59357, + 29203, + 3170, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11824, + "stream": 15344, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117262, + 34408, + 34379, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11825, + "stream": 15345, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117261, + 34250, + 34221, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11828, + "stream": 15348, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117258, + 116061, + 138367, + 67459, + 0 + ], + "old_dimensions": [ + 3, + 5, + 10, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11830, + "stream": 15350, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117257, + 115987, + 138418, + 65841, + 0 + ], + "old_dimensions": [ + 3, + 5, + 10, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11842, + "stream": 15362, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117250, + 34092, + 34063, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11843, + "stream": 15363, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117249, + 33934, + 33905, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11846, + "stream": 15366, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117246, + 116061, + 107893, + 67580, + 0 + ], + "old_dimensions": [ + 3, + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11849, + "stream": 15369, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117245, + 115987, + 107867, + 65962, + 0 + ], + "old_dimensions": [ + 3, + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11864, + "stream": 15384, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117238, + 33776, + 33747, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11865, + "stream": 15385, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117237, + 33618, + 33589, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11933, + "stream": 15453, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117194, + 60734, + 31025, + 2129, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11935, + "stream": 15455, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117193, + 59113, + 31023, + 2130, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11937, + "stream": 15457, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117192, + 57476, + 31011, + 2137, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11939, + "stream": 15459, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117191, + 55839, + 31009, + 2138, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11950, + "stream": 15470, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117182, + 136814, + 60940, + 28995, + 3289, + 0 + ], + "old_dimensions": [ + 3, + 14, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11952, + "stream": 15472, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117181, + 136845, + 59319, + 28993, + 3290, + 0 + ], + "old_dimensions": [ + 3, + 14, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11955, + "stream": 15475, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117180, + 54206, + 30997, + 2145, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11957, + "stream": 15477, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117179, + 52573, + 30995, + 2146, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11962, + "stream": 15482, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117174, + 112152, + 109121, + 106363, + 32189, + 32165, + 0 + ], + "old_dimensions": [ + 3, + 7, + 13, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11963, + "stream": 15483, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117173, + 112147, + 109111, + 106353, + 32031, + 32007, + 0 + ], + "old_dimensions": [ + 3, + 7, + 13, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 12233, + "stream": 15753, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 6, + "old_frames": [ + 146888, + 136503, + 77226, + 0 + ], + "old_dimensions": [ + 6, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 5 + ] + }, + { + "role": 12262, + "stream": 15782, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 6, + "old_frames": [ + 146889, + 136534, + 75635, + 0 + ], + "old_dimensions": [ + 6, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 5 + ] + }, + { + "role": 12410, + "stream": 15930, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116097, + 107907, + 67685, + 0 + ], + "old_dimensions": [ + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12418, + "stream": 15938, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116086, + 111495, + 67459, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12428, + "stream": 15948, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116062, + 108587, + 28442, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12439, + "stream": 15959, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116023, + 107881, + 66067, + 0 + ], + "old_dimensions": [ + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12447, + "stream": 15967, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116012, + 111451, + 65841, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12457, + "stream": 15977, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115988, + 108553, + 28445, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12546, + "stream": 16066, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115756, + 138600, + 61040, + 60837, + 0 + ], + "old_dimensions": [ + 5, + 10, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12547, + "stream": 16067, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115755, + 61453, + 61351, + 0 + ], + "old_dimensions": [ + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12549, + "stream": 16069, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115741, + 61040, + 60997, + 60734, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12550, + "stream": 16070, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115739, + 136814, + 61334, + 61333, + 0 + ], + "old_dimensions": [ + 5, + 14, + 17, + 19, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12575, + "stream": 16095, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115682, + 138651, + 59419, + 59216, + 0 + ], + "old_dimensions": [ + 5, + 10, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12576, + "stream": 16096, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115681, + 59832, + 59730, + 0 + ], + "old_dimensions": [ + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12578, + "stream": 16098, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115667, + 59419, + 59376, + 59113, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12579, + "stream": 16099, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115665, + 136845, + 59713, + 59712, + 0 + ], + "old_dimensions": [ + 5, + 14, + 17, + 19, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12607, + "stream": 16127, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115593, + 57782, + 57740, + 57476, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12636, + "stream": 16156, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115519, + 56145, + 56103, + 55839, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12665, + "stream": 16185, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115445, + 54513, + 54470, + 54206, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + }, + { + "role": 12694, + "stream": 16214, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115371, + 52880, + 52837, + 52573, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 4 + ] + } + ], + "candidate_sha256": "8b99bb2f0e9f352c303d251009058cc30e7ad4c20b8e32e863afb0ebcc3388b7", + "scope": "Compositional changed-stage proof assuming the inherited complete bit decoder and a literal common prefix before any selected helper non-compensation use. The independently checked response matrix, disjoint supports and rational helper paths certify the algebra and paid demand changes. The literal common-cut witness is independently reproduced. Bank allocation and global inherited compiler hypotheses are separate obligations; the scalar payload bound is checked by the companion checker. No upstream code executed." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel70/charts.json b/research/gen5b-shared-kernels/certificates/kernel70/charts.json new file mode 100644 index 0000000000..974eaf7ff2 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel70/charts.json @@ -0,0 +1,5166 @@ +{ + "status": "PASS_KERNEL70_PR300_FINAL12_CHANGED_CHARTS", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selection": "candidate70", + "with_final12": true, + "charts": 171, + "kernel_programs": 153, + "final12_charts": 18, + "first_frame_quotient_demands": 157, + "donor_line_entrance_demands": 87, + "pivot_residual_demands": 70, + "role_chart_uses": [ + { + "kind": "first_frame_quotient", + "role": 8339, + "stream": 11859, + "frame": 119570, + "rank": 2, + "program_id": 0 + }, + { + "kind": "donor_line_entrance", + "role": 8339, + "stream": 11859, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8341, + "stream": 11861, + "frame": 119569, + "rank": 2, + "program_id": 2 + }, + { + "kind": "donor_line_entrance", + "role": 8341, + "stream": 11861, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8359, + "stream": 11879, + "frame": 119558, + "rank": 2, + "program_id": 3 + }, + { + "kind": "donor_line_entrance", + "role": 8359, + "stream": 11879, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8361, + "stream": 11881, + "frame": 119557, + "rank": 2, + "program_id": 4 + }, + { + "kind": "donor_line_entrance", + "role": 8361, + "stream": 11881, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8394, + "stream": 11914, + "frame": 119534, + "rank": 2, + "program_id": 5 + }, + { + "kind": "donor_line_entrance", + "role": 8394, + "stream": 11914, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8412, + "stream": 11932, + "frame": 119522, + "rank": 2, + "program_id": 6 + }, + { + "kind": "donor_line_entrance", + "role": 8412, + "stream": 11932, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8413, + "stream": 11933, + "frame": 119522, + "rank": 2, + "program_id": 6 + }, + { + "kind": "donor_line_entrance", + "role": 8413, + "stream": 11933, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8415, + "stream": 11935, + "frame": 119521, + "rank": 2, + "program_id": 7 + }, + { + "kind": "donor_line_entrance", + "role": 8415, + "stream": 11935, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8787, + "stream": 12307, + "frame": 119284, + "rank": 2, + "program_id": 8 + }, + { + "kind": "donor_line_entrance", + "role": 8787, + "stream": 12307, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8789, + "stream": 12309, + "frame": 119283, + "rank": 2, + "program_id": 10 + }, + { + "kind": "pivot_residual", + "role": 8789, + "stream": 12309, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 8862, + "stream": 12382, + "frame": 119234, + "rank": 2, + "program_id": 12 + }, + { + "kind": "pivot_residual", + "role": 8862, + "stream": 12382, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 8864, + "stream": 12384, + "frame": 119233, + "rank": 2, + "program_id": 13 + }, + { + "kind": "donor_line_entrance", + "role": 8864, + "stream": 12384, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8891, + "stream": 12411, + "frame": 119214, + "rank": 2, + "program_id": 14 + }, + { + "kind": "donor_line_entrance", + "role": 8891, + "stream": 12411, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8894, + "stream": 12414, + "frame": 119213, + "rank": 2, + "program_id": 15 + }, + { + "kind": "pivot_residual", + "role": 8894, + "stream": 12414, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 8901, + "stream": 12421, + "frame": 119210, + "rank": 2, + "program_id": 16 + }, + { + "kind": "pivot_residual", + "role": 8901, + "stream": 12421, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 8903, + "stream": 12423, + "frame": 119209, + "rank": 2, + "program_id": 17 + }, + { + "kind": "donor_line_entrance", + "role": 8903, + "stream": 12423, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 9175, + "stream": 12695, + "frame": 119024, + "rank": 2, + "program_id": 18 + }, + { + "kind": "donor_line_entrance", + "role": 9175, + "stream": 12695, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9177, + "stream": 12697, + "frame": 119023, + "rank": 2, + "program_id": 19 + }, + { + "kind": "donor_line_entrance", + "role": 9177, + "stream": 12697, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9193, + "stream": 12713, + "frame": 119012, + "rank": 2, + "program_id": 20 + }, + { + "kind": "donor_line_entrance", + "role": 9193, + "stream": 12713, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9195, + "stream": 12715, + "frame": 119011, + "rank": 2, + "program_id": 21 + }, + { + "kind": "donor_line_entrance", + "role": 9195, + "stream": 12715, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9211, + "stream": 12731, + "frame": 119000, + "rank": 2, + "program_id": 22 + }, + { + "kind": "donor_line_entrance", + "role": 9211, + "stream": 12731, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9213, + "stream": 12733, + "frame": 118999, + "rank": 2, + "program_id": 23 + }, + { + "kind": "donor_line_entrance", + "role": 9213, + "stream": 12733, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9228, + "stream": 12748, + "frame": 118988, + "rank": 2, + "program_id": 24 + }, + { + "kind": "donor_line_entrance", + "role": 9228, + "stream": 12748, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9229, + "stream": 12749, + "frame": 118988, + "rank": 2, + "program_id": 24 + }, + { + "kind": "donor_line_entrance", + "role": 9229, + "stream": 12749, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9230, + "stream": 12750, + "frame": 118987, + "rank": 2, + "program_id": 25 + }, + { + "kind": "donor_line_entrance", + "role": 9230, + "stream": 12750, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9247, + "stream": 12767, + "frame": 118976, + "rank": 2, + "program_id": 26 + }, + { + "kind": "donor_line_entrance", + "role": 9247, + "stream": 12767, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9267, + "stream": 12787, + "frame": 118962, + "rank": 2, + "program_id": 27 + }, + { + "kind": "donor_line_entrance", + "role": 9267, + "stream": 12787, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9269, + "stream": 12789, + "frame": 118961, + "rank": 2, + "program_id": 28 + }, + { + "kind": "donor_line_entrance", + "role": 9269, + "stream": 12789, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9346, + "stream": 12866, + "frame": 118908, + "rank": 2, + "program_id": 29 + }, + { + "kind": "donor_line_entrance", + "role": 9346, + "stream": 12866, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9347, + "stream": 12867, + "frame": 118907, + "rank": 2, + "program_id": 31 + }, + { + "kind": "donor_line_entrance", + "role": 9347, + "stream": 12867, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9353, + "stream": 12873, + "frame": 118904, + "rank": 2, + "program_id": 32 + }, + { + "kind": "donor_line_entrance", + "role": 9353, + "stream": 12873, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9355, + "stream": 12875, + "frame": 118903, + "rank": 2, + "program_id": 33 + }, + { + "kind": "pivot_residual", + "role": 9355, + "stream": 12875, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 9402, + "stream": 12922, + "frame": 118870, + "rank": 2, + "program_id": 35 + }, + { + "kind": "donor_line_entrance", + "role": 9402, + "stream": 12922, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9403, + "stream": 12923, + "frame": 118869, + "rank": 2, + "program_id": 36 + }, + { + "kind": "donor_line_entrance", + "role": 9403, + "stream": 12923, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9691, + "stream": 13211, + "frame": 118678, + "rank": 2, + "program_id": 37 + }, + { + "kind": "donor_line_entrance", + "role": 9691, + "stream": 13211, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 9693, + "stream": 13213, + "frame": 118677, + "rank": 2, + "program_id": 38 + }, + { + "kind": "pivot_residual", + "role": 9693, + "stream": 13213, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 9719, + "stream": 13239, + "frame": 118658, + "rank": 2, + "program_id": 39 + }, + { + "kind": "pivot_residual", + "role": 9719, + "stream": 13239, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 9722, + "stream": 13242, + "frame": 118657, + "rank": 2, + "program_id": 40 + }, + { + "kind": "donor_line_entrance", + "role": 9722, + "stream": 13242, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 9726, + "stream": 13246, + "frame": 118656, + "rank": 2, + "program_id": 41 + }, + { + "kind": "pivot_residual", + "role": 9726, + "stream": 13246, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 9729, + "stream": 13249, + "frame": 118654, + "rank": 2, + "program_id": 42 + }, + { + "kind": "pivot_residual", + "role": 9729, + "stream": 13249, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 9790, + "stream": 13310, + "frame": 118610, + "rank": 2, + "program_id": 43 + }, + { + "kind": "donor_line_entrance", + "role": 9790, + "stream": 13310, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9793, + "stream": 13313, + "frame": 118608, + "rank": 2, + "program_id": 44 + }, + { + "kind": "pivot_residual", + "role": 9793, + "stream": 13313, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 9845, + "stream": 13365, + "frame": 118572, + "rank": 2, + "program_id": 45 + }, + { + "kind": "donor_line_entrance", + "role": 9845, + "stream": 13365, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9847, + "stream": 13367, + "frame": 118571, + "rank": 2, + "program_id": 46 + }, + { + "kind": "donor_line_entrance", + "role": 9847, + "stream": 13367, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9863, + "stream": 13383, + "frame": 118560, + "rank": 2, + "program_id": 47 + }, + { + "kind": "donor_line_entrance", + "role": 9863, + "stream": 13383, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9865, + "stream": 13385, + "frame": 118559, + "rank": 2, + "program_id": 48 + }, + { + "kind": "donor_line_entrance", + "role": 9865, + "stream": 13385, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9881, + "stream": 13401, + "frame": 118548, + "rank": 2, + "program_id": 49 + }, + { + "kind": "donor_line_entrance", + "role": 9881, + "stream": 13401, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9883, + "stream": 13403, + "frame": 118547, + "rank": 2, + "program_id": 50 + }, + { + "kind": "pivot_residual", + "role": 9883, + "stream": 13403, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 9898, + "stream": 13418, + "frame": 118536, + "rank": 2, + "program_id": 52 + }, + { + "kind": "donor_line_entrance", + "role": 9898, + "stream": 13418, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9916, + "stream": 13436, + "frame": 118524, + "rank": 2, + "program_id": 53 + }, + { + "kind": "donor_line_entrance", + "role": 9916, + "stream": 13436, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9935, + "stream": 13455, + "frame": 118512, + "rank": 2, + "program_id": 54 + }, + { + "kind": "donor_line_entrance", + "role": 9935, + "stream": 13455, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9937, + "stream": 13457, + "frame": 118511, + "rank": 2, + "program_id": 55 + }, + { + "kind": "donor_line_entrance", + "role": 9937, + "stream": 13457, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10275, + "stream": 13795, + "frame": 118286, + "rank": 2, + "program_id": 56 + }, + { + "kind": "donor_line_entrance", + "role": 10275, + "stream": 13795, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10277, + "stream": 13797, + "frame": 118285, + "rank": 2, + "program_id": 57 + }, + { + "kind": "pivot_residual", + "role": 10277, + "stream": 13797, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 10350, + "stream": 13870, + "frame": 118236, + "rank": 2, + "program_id": 58 + }, + { + "kind": "donor_line_entrance", + "role": 10350, + "stream": 13870, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10352, + "stream": 13872, + "frame": 118235, + "rank": 2, + "program_id": 59 + }, + { + "kind": "pivot_residual", + "role": 10352, + "stream": 13872, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 10379, + "stream": 13899, + "frame": 118216, + "rank": 2, + "program_id": 60 + }, + { + "kind": "donor_line_entrance", + "role": 10379, + "stream": 13899, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10382, + "stream": 13902, + "frame": 118215, + "rank": 2, + "program_id": 61 + }, + { + "kind": "pivot_residual", + "role": 10382, + "stream": 13902, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 10532, + "stream": 14052, + "frame": 118114, + "rank": 2, + "program_id": 62 + }, + { + "kind": "donor_line_entrance", + "role": 10532, + "stream": 14052, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10534, + "stream": 14054, + "frame": 118113, + "rank": 2, + "program_id": 63 + }, + { + "kind": "pivot_residual", + "role": 10534, + "stream": 14054, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10733, + "stream": 14253, + "frame": 117982, + "rank": 2, + "program_id": 64 + }, + { + "kind": "donor_line_entrance", + "role": 10733, + "stream": 14253, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10740, + "stream": 14260, + "frame": 117976, + "rank": 2, + "program_id": 65 + }, + { + "kind": "donor_line_entrance", + "role": 10740, + "stream": 14260, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10741, + "stream": 14261, + "frame": 117975, + "rank": 2, + "program_id": 66 + }, + { + "kind": "pivot_residual", + "role": 10741, + "stream": 14261, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10751, + "stream": 14271, + "frame": 117970, + "rank": 2, + "program_id": 67 + }, + { + "kind": "donor_line_entrance", + "role": 10751, + "stream": 14271, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10758, + "stream": 14278, + "frame": 117964, + "rank": 2, + "program_id": 68 + }, + { + "kind": "donor_line_entrance", + "role": 10758, + "stream": 14278, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10759, + "stream": 14279, + "frame": 117963, + "rank": 2, + "program_id": 69 + }, + { + "kind": "pivot_residual", + "role": 10759, + "stream": 14279, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10764, + "stream": 14284, + "frame": 117960, + "rank": 2, + "program_id": 70 + }, + { + "kind": "pivot_residual", + "role": 10764, + "stream": 14284, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10766, + "stream": 14286, + "frame": 117959, + "rank": 2, + "program_id": 71 + }, + { + "kind": "pivot_residual", + "role": 10766, + "stream": 14286, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10782, + "stream": 14302, + "frame": 117948, + "rank": 2, + "program_id": 72 + }, + { + "kind": "pivot_residual", + "role": 10782, + "stream": 14302, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 10783, + "stream": 14303, + "frame": 117948, + "rank": 2, + "program_id": 72 + }, + { + "kind": "donor_line_entrance", + "role": 10783, + "stream": 14303, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10784, + "stream": 14304, + "frame": 117947, + "rank": 2, + "program_id": 73 + }, + { + "kind": "donor_line_entrance", + "role": 10784, + "stream": 14304, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10785, + "stream": 14305, + "frame": 117947, + "rank": 2, + "program_id": 73 + }, + { + "kind": "pivot_residual", + "role": 10785, + "stream": 14305, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 10812, + "stream": 14332, + "frame": 117928, + "rank": 2, + "program_id": 74 + }, + { + "kind": "pivot_residual", + "role": 10812, + "stream": 14332, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10813, + "stream": 14333, + "frame": 117927, + "rank": 2, + "program_id": 75 + }, + { + "kind": "pivot_residual", + "role": 10813, + "stream": 14333, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10830, + "stream": 14350, + "frame": 117916, + "rank": 2, + "program_id": 76 + }, + { + "kind": "pivot_residual", + "role": 10830, + "stream": 14350, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10831, + "stream": 14351, + "frame": 117915, + "rank": 2, + "program_id": 77 + }, + { + "kind": "pivot_residual", + "role": 10831, + "stream": 14351, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10836, + "stream": 14356, + "frame": 117912, + "rank": 2, + "program_id": 78 + }, + { + "kind": "pivot_residual", + "role": 10836, + "stream": 14356, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10838, + "stream": 14358, + "frame": 117911, + "rank": 2, + "program_id": 79 + }, + { + "kind": "pivot_residual", + "role": 10838, + "stream": 14358, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10859, + "stream": 14379, + "frame": 117898, + "rank": 2, + "program_id": 80 + }, + { + "kind": "donor_line_entrance", + "role": 10859, + "stream": 14379, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10861, + "stream": 14381, + "frame": 117897, + "rank": 2, + "program_id": 81 + }, + { + "kind": "donor_line_entrance", + "role": 10861, + "stream": 14381, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10877, + "stream": 14397, + "frame": 117886, + "rank": 2, + "program_id": 82 + }, + { + "kind": "pivot_residual", + "role": 10877, + "stream": 14397, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10879, + "stream": 14399, + "frame": 117885, + "rank": 2, + "program_id": 83 + }, + { + "kind": "pivot_residual", + "role": 10879, + "stream": 14399, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10884, + "stream": 14404, + "frame": 117880, + "rank": 2, + "program_id": 84 + }, + { + "kind": "pivot_residual", + "role": 10884, + "stream": 14404, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10885, + "stream": 14405, + "frame": 117879, + "rank": 2, + "program_id": 85 + }, + { + "kind": "pivot_residual", + "role": 10885, + "stream": 14405, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10887, + "stream": 14407, + "frame": 117878, + "rank": 2, + "program_id": 86 + }, + { + "kind": "pivot_residual", + "role": 10887, + "stream": 14407, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 10890, + "stream": 14410, + "frame": 117877, + "rank": 2, + "program_id": 87 + }, + { + "kind": "donor_line_entrance", + "role": 10890, + "stream": 14410, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10892, + "stream": 14412, + "frame": 117876, + "rank": 2, + "program_id": 88 + }, + { + "kind": "pivot_residual", + "role": 10892, + "stream": 14412, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10894, + "stream": 14414, + "frame": 117875, + "rank": 2, + "program_id": 89 + }, + { + "kind": "pivot_residual", + "role": 10894, + "stream": 14414, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10910, + "stream": 14430, + "frame": 117864, + "rank": 2, + "program_id": 90 + }, + { + "kind": "donor_line_entrance", + "role": 10910, + "stream": 14430, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10911, + "stream": 14431, + "frame": 117864, + "rank": 2, + "program_id": 90 + }, + { + "kind": "donor_line_entrance", + "role": 10911, + "stream": 14431, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10915, + "stream": 14435, + "frame": 117862, + "rank": 2, + "program_id": 91 + }, + { + "kind": "donor_line_entrance", + "role": 10915, + "stream": 14435, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10922, + "stream": 14442, + "frame": 117856, + "rank": 2, + "program_id": 92 + }, + { + "kind": "pivot_residual", + "role": 10922, + "stream": 14442, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10928, + "stream": 14448, + "frame": 117852, + "rank": 2, + "program_id": 93 + }, + { + "kind": "pivot_residual", + "role": 10928, + "stream": 14448, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10929, + "stream": 14449, + "frame": 117852, + "rank": 2, + "program_id": 93 + }, + { + "kind": "pivot_residual", + "role": 10929, + "stream": 14449, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10940, + "stream": 14460, + "frame": 117844, + "rank": 2, + "program_id": 94 + }, + { + "kind": "pivot_residual", + "role": 10940, + "stream": 14460, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10941, + "stream": 14461, + "frame": 117843, + "rank": 2, + "program_id": 95 + }, + { + "kind": "pivot_residual", + "role": 10941, + "stream": 14461, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10946, + "stream": 14466, + "frame": 117838, + "rank": 2, + "program_id": 96 + }, + { + "kind": "pivot_residual", + "role": 10946, + "stream": 14466, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10950, + "stream": 14470, + "frame": 117836, + "rank": 2, + "program_id": 97 + }, + { + "kind": "pivot_residual", + "role": 10950, + "stream": 14470, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10952, + "stream": 14472, + "frame": 117835, + "rank": 2, + "program_id": 98 + }, + { + "kind": "pivot_residual", + "role": 10952, + "stream": 14472, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 11168, + "stream": 14688, + "frame": 117694, + "rank": 2, + "program_id": 99 + }, + { + "kind": "donor_line_entrance", + "role": 11168, + "stream": 14688, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11169, + "stream": 14689, + "frame": 117694, + "rank": 2, + "program_id": 99 + }, + { + "kind": "pivot_residual", + "role": 11169, + "stream": 14689, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11170, + "stream": 14690, + "frame": 117694, + "rank": 2, + "program_id": 99 + }, + { + "kind": "donor_line_entrance", + "role": 11170, + "stream": 14690, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11171, + "stream": 14691, + "frame": 117693, + "rank": 2, + "program_id": 100 + }, + { + "kind": "donor_line_entrance", + "role": 11171, + "stream": 14691, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11172, + "stream": 14692, + "frame": 117693, + "rank": 2, + "program_id": 100 + }, + { + "kind": "donor_line_entrance", + "role": 11172, + "stream": 14692, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11173, + "stream": 14693, + "frame": 117693, + "rank": 2, + "program_id": 100 + }, + { + "kind": "donor_line_entrance", + "role": 11173, + "stream": 14693, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11255, + "stream": 14775, + "frame": 117644, + "rank": 2, + "program_id": 101 + }, + { + "kind": "pivot_residual", + "role": 11255, + "stream": 14775, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11257, + "stream": 14777, + "frame": 117643, + "rank": 2, + "program_id": 102 + }, + { + "kind": "donor_line_entrance", + "role": 11257, + "stream": 14777, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11283, + "stream": 14803, + "frame": 117624, + "rank": 2, + "program_id": 103 + }, + { + "kind": "pivot_residual", + "role": 11283, + "stream": 14803, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11286, + "stream": 14806, + "frame": 117623, + "rank": 2, + "program_id": 104 + }, + { + "kind": "donor_line_entrance", + "role": 11286, + "stream": 14806, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11527, + "stream": 15047, + "frame": 117462, + "rank": 2, + "program_id": 105 + }, + { + "kind": "donor_line_entrance", + "role": 11527, + "stream": 15047, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11529, + "stream": 15049, + "frame": 117461, + "rank": 2, + "program_id": 106 + }, + { + "kind": "pivot_residual", + "role": 11529, + "stream": 15049, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11555, + "stream": 15075, + "frame": 117442, + "rank": 2, + "program_id": 107 + }, + { + "kind": "donor_line_entrance", + "role": 11555, + "stream": 15075, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11558, + "stream": 15078, + "frame": 117441, + "rank": 2, + "program_id": 108 + }, + { + "kind": "donor_line_entrance", + "role": 11558, + "stream": 15078, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11632, + "stream": 15152, + "frame": 117390, + "rank": 2, + "program_id": 109 + }, + { + "kind": "pivot_residual", + "role": 11632, + "stream": 15152, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11634, + "stream": 15154, + "frame": 117389, + "rank": 2, + "program_id": 110 + }, + { + "kind": "pivot_residual", + "role": 11634, + "stream": 15154, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11709, + "stream": 15229, + "frame": 117340, + "rank": 2, + "program_id": 111 + }, + { + "kind": "pivot_residual", + "role": 11709, + "stream": 15229, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11711, + "stream": 15231, + "frame": 117339, + "rank": 2, + "program_id": 112 + }, + { + "kind": "pivot_residual", + "role": 11711, + "stream": 15231, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11824, + "stream": 15344, + "frame": 117262, + "rank": 2, + "program_id": 113 + }, + { + "kind": "pivot_residual", + "role": 11824, + "stream": 15344, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11825, + "stream": 15345, + "frame": 117261, + "rank": 2, + "program_id": 114 + }, + { + "kind": "donor_line_entrance", + "role": 11825, + "stream": 15345, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11828, + "stream": 15348, + "frame": 117258, + "rank": 2, + "program_id": 115 + }, + { + "kind": "donor_line_entrance", + "role": 11828, + "stream": 15348, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11830, + "stream": 15350, + "frame": 117257, + "rank": 2, + "program_id": 116 + }, + { + "kind": "pivot_residual", + "role": 11830, + "stream": 15350, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11842, + "stream": 15362, + "frame": 117250, + "rank": 2, + "program_id": 117 + }, + { + "kind": "pivot_residual", + "role": 11842, + "stream": 15362, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11843, + "stream": 15363, + "frame": 117249, + "rank": 2, + "program_id": 118 + }, + { + "kind": "pivot_residual", + "role": 11843, + "stream": 15363, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11846, + "stream": 15366, + "frame": 117246, + "rank": 2, + "program_id": 119 + }, + { + "kind": "donor_line_entrance", + "role": 11846, + "stream": 15366, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11849, + "stream": 15369, + "frame": 117245, + "rank": 2, + "program_id": 120 + }, + { + "kind": "pivot_residual", + "role": 11849, + "stream": 15369, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11864, + "stream": 15384, + "frame": 117238, + "rank": 2, + "program_id": 121 + }, + { + "kind": "donor_line_entrance", + "role": 11864, + "stream": 15384, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11865, + "stream": 15385, + "frame": 117237, + "rank": 2, + "program_id": 122 + }, + { + "kind": "pivot_residual", + "role": 11865, + "stream": 15385, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11933, + "stream": 15453, + "frame": 117194, + "rank": 2, + "program_id": 123 + }, + { + "kind": "donor_line_entrance", + "role": 11933, + "stream": 15453, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11935, + "stream": 15455, + "frame": 117193, + "rank": 2, + "program_id": 124 + }, + { + "kind": "donor_line_entrance", + "role": 11935, + "stream": 15455, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11937, + "stream": 15457, + "frame": 117192, + "rank": 2, + "program_id": 125 + }, + { + "kind": "donor_line_entrance", + "role": 11937, + "stream": 15457, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11939, + "stream": 15459, + "frame": 117191, + "rank": 2, + "program_id": 126 + }, + { + "kind": "pivot_residual", + "role": 11939, + "stream": 15459, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11950, + "stream": 15470, + "frame": 117182, + "rank": 2, + "program_id": 127 + }, + { + "kind": "pivot_residual", + "role": 11950, + "stream": 15470, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11952, + "stream": 15472, + "frame": 117181, + "rank": 2, + "program_id": 128 + }, + { + "kind": "pivot_residual", + "role": 11952, + "stream": 15472, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11955, + "stream": 15475, + "frame": 117180, + "rank": 2, + "program_id": 129 + }, + { + "kind": "pivot_residual", + "role": 11955, + "stream": 15475, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11957, + "stream": 15477, + "frame": 117179, + "rank": 2, + "program_id": 130 + }, + { + "kind": "pivot_residual", + "role": 11957, + "stream": 15477, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11962, + "stream": 15482, + "frame": 117174, + "rank": 2, + "program_id": 131 + }, + { + "kind": "pivot_residual", + "role": 11962, + "stream": 15482, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 11963, + "stream": 15483, + "frame": 117173, + "rank": 2, + "program_id": 132 + }, + { + "kind": "pivot_residual", + "role": 11963, + "stream": 15483, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 12233, + "stream": 15753, + "frame": 146888, + "rank": 5, + "program_id": 133 + }, + { + "kind": "pivot_residual", + "role": 12233, + "stream": 15753, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 12262, + "stream": 15782, + "frame": 146889, + "rank": 5, + "program_id": 134 + }, + { + "kind": "pivot_residual", + "role": 12262, + "stream": 15782, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 12410, + "stream": 15930, + "frame": 116097, + "rank": 4, + "program_id": 135 + }, + { + "kind": "donor_line_entrance", + "role": 12410, + "stream": 15930, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12418, + "stream": 15938, + "frame": 116086, + "rank": 4, + "program_id": 136 + }, + { + "kind": "pivot_residual", + "role": 12418, + "stream": 15938, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 12428, + "stream": 15948, + "frame": 116062, + "rank": 4, + "program_id": 137 + }, + { + "kind": "donor_line_entrance", + "role": 12428, + "stream": 15948, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12439, + "stream": 15959, + "frame": 116023, + "rank": 4, + "program_id": 138 + }, + { + "kind": "pivot_residual", + "role": 12439, + "stream": 15959, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 12447, + "stream": 15967, + "frame": 116012, + "rank": 4, + "program_id": 139 + }, + { + "kind": "donor_line_entrance", + "role": 12447, + "stream": 15967, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12457, + "stream": 15977, + "frame": 115988, + "rank": 4, + "program_id": 140 + }, + { + "kind": "pivot_residual", + "role": 12457, + "stream": 15977, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 12546, + "stream": 16066, + "frame": 115756, + "rank": 4, + "program_id": 141 + }, + { + "kind": "donor_line_entrance", + "role": 12546, + "stream": 16066, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12547, + "stream": 16067, + "frame": 115755, + "rank": 4, + "program_id": 142 + }, + { + "kind": "donor_line_entrance", + "role": 12547, + "stream": 16067, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12549, + "stream": 16069, + "frame": 115741, + "rank": 4, + "program_id": 143 + }, + { + "kind": "pivot_residual", + "role": 12549, + "stream": 16069, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 12550, + "stream": 16070, + "frame": 115739, + "rank": 4, + "program_id": 144 + }, + { + "kind": "donor_line_entrance", + "role": 12550, + "stream": 16070, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12575, + "stream": 16095, + "frame": 115682, + "rank": 4, + "program_id": 145 + }, + { + "kind": "donor_line_entrance", + "role": 12575, + "stream": 16095, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12576, + "stream": 16096, + "frame": 115681, + "rank": 4, + "program_id": 146 + }, + { + "kind": "donor_line_entrance", + "role": 12576, + "stream": 16096, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12578, + "stream": 16098, + "frame": 115667, + "rank": 4, + "program_id": 147 + }, + { + "kind": "pivot_residual", + "role": 12578, + "stream": 16098, + "rank": 23, + "program_id": 11 + }, + { + "kind": "first_frame_quotient", + "role": 12579, + "stream": 16099, + "frame": 115665, + "rank": 4, + "program_id": 148 + }, + { + "kind": "donor_line_entrance", + "role": 12579, + "stream": 16099, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12607, + "stream": 16127, + "frame": 115593, + "rank": 4, + "program_id": 149 + }, + { + "kind": "donor_line_entrance", + "role": 12607, + "stream": 16127, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12636, + "stream": 16156, + "frame": 115519, + "rank": 4, + "program_id": 150 + }, + { + "kind": "donor_line_entrance", + "role": 12636, + "stream": 16156, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12665, + "stream": 16185, + "frame": 115445, + "rank": 4, + "program_id": 151 + }, + { + "kind": "donor_line_entrance", + "role": 12665, + "stream": 16185, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 12694, + "stream": 16214, + "frame": 115371, + "rank": 4, + "program_id": 152 + }, + { + "kind": "donor_line_entrance", + "role": 12694, + "stream": 16214, + "rank": 1, + "program_id": 9 + } + ], + "max_changed_chart_factors": 489, + "max_factor_numerator": 390, + "max_factor_denominator": 540, + "retained_chart_factor_bound": 576, + "combined_normalizer_factor_bound": 815, + "literal_stock": 1229560, + "selector_calls_bound": 905994095400, + "scope": "Every changed candidate70 first-frame quotient, donor line entrance and rank23 pivot residual is bound to an exactly factored weighted chart; final12 charts are included. Unchanged chart admission and finite-compiler interfaces remain inherited.", + "chart_summaries": [ + { + "program_id": 0, + "kind": "first_frame_quotient", + "frame": 119570, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 466, + "max_numerator": 195, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "9dc4af1bdc8673ff6fedfe8e84b7f10d62bdd5554bd201ea9eb087d13fd1be5d" + }, + { + "program_id": 1, + "kind": "donor_line_entrance", + "line": [ + 6, + 7 + ], + "residual_rank": 1, + "completion_rank": 23, + "determinant": "2", + "count": 25, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "4197b7e963a1a5fe18abcec8d178d6a38e13a0404f9f7bbe4bef93b3e39c1017" + }, + { + "program_id": 2, + "kind": "first_frame_quotient", + "frame": 119569, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 465, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "9060388a578d65ef331de566286090d14438e47c0f967b63dcbd66bb33c1148e" + }, + { + "program_id": 3, + "kind": "first_frame_quotient", + "frame": 119558, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 464, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "bf9858858d62c0d2671f5ebc9309da2f1f68432efbd16efcd604aea7c7a5d18d" + }, + { + "program_id": 4, + "kind": "first_frame_quotient", + "frame": 119557, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 463, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "7e95644c9426088dfedbc3e75c373d38b6e78f1dfca66ea82aad7a289587cec0" + }, + { + "program_id": 5, + "kind": "first_frame_quotient", + "frame": 119534, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 460, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "cc8d0f1aa4ce46ed361617be467a88100a140cbbceb8e3fa8fab6b3e9289856f" + }, + { + "program_id": 6, + "kind": "first_frame_quotient", + "frame": 119522, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 457, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "9cd0e62061aa794d5df1e1bfa25fe5fc4a69b31334bee29c7739fd6f4482a864" + }, + { + "program_id": 7, + "kind": "first_frame_quotient", + "frame": 119521, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 456, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "463663376efdabeea4cbe56729ca7bb2a2995a87af17098d023d1ee1acf802e6" + }, + { + "program_id": 8, + "kind": "first_frame_quotient", + "frame": 119284, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 483, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "96bee882267f1023b21245da208d086dcc18387d72390dae04c677094ac1645c" + }, + { + "program_id": 9, + "kind": "donor_line_entrance", + "line": [ + 16, + 17 + ], + "residual_rank": 1, + "completion_rank": 23, + "determinant": "2", + "count": 25, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "4a3d8e5e61c45cd9b302285de8bd00cf60b20e005a46c78533598c9960218347" + }, + { + "program_id": 10, + "kind": "first_frame_quotient", + "frame": 119283, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 481, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "4a15feca81e5266800fda48a3441912b0cb7523d7806621b114144639a4e769c" + }, + { + "program_id": 11, + "kind": "pivot_residual", + "line": [ + 16, + 17 + ], + "residual_rank": 23, + "completion_rank": 1, + "determinant": "-2", + "count": 9, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "96d1cef4470dee72def0edf4a3993d47d0d9985e74de17419b4159bb1def6a61" + }, + { + "program_id": 12, + "kind": "first_frame_quotient", + "frame": 119234, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 460, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "a985c0d1408caa62db3e747ad2a073ff0185dc4b9b76d824f456a29fe184912f" + }, + { + "program_id": 13, + "kind": "first_frame_quotient", + "frame": 119233, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 459, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b34470adbf20c855c794b64ac60c790931649f2b029531f094cc7255d7a93e2f" + }, + { + "program_id": 14, + "kind": "first_frame_quotient", + "frame": 119214, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 358, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "4ad732da73d4dae71c7bdc82cfc0df442452c4197d0a887718b69d0f6d7ca651" + }, + { + "program_id": 15, + "kind": "first_frame_quotient", + "frame": 119213, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 359, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "fae717d5625421e7ea369ab02d02d1d607da9d8aa240bd9935845221250e118f" + }, + { + "program_id": 16, + "kind": "first_frame_quotient", + "frame": 119210, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 455, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "35d1bd9e4583ccfc7967ca7fc12f3f124c49a4d5057cbfd20dc71405845cc420" + }, + { + "program_id": 17, + "kind": "first_frame_quotient", + "frame": 119209, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 454, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "5c006b189d371c68400f9ab533bce70fc1ebda357fd4c5e6dd385b213e4e5f2a" + }, + { + "program_id": 18, + "kind": "first_frame_quotient", + "frame": 119024, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 468, + "max_numerator": 195, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "4c19943cab3beb5aab153ebcf98547c046497f3b356b69b21c9289173a54fc81" + }, + { + "program_id": 19, + "kind": "first_frame_quotient", + "frame": 119023, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 467, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "206eca104a131cc93bc2505d3af5fec0390c413c4a7c4ef2a8fb8abe1ca2a719" + }, + { + "program_id": 20, + "kind": "first_frame_quotient", + "frame": 119012, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 466, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "726804da3feb733ef0cdcd617010e365a272f29d50e39fd24aa2d777de33ae93" + }, + { + "program_id": 21, + "kind": "first_frame_quotient", + "frame": 119011, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 465, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "33a4c223adede19f3e5b4885cd265bedcba0b1f8b69099233b22f9d4cbc411ee" + }, + { + "program_id": 22, + "kind": "first_frame_quotient", + "frame": 119000, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 464, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "738ea73a9fcf561a545b56b13e3a5842ee5a251091365eaf929aa2f66508f6be" + }, + { + "program_id": 23, + "kind": "first_frame_quotient", + "frame": 118999, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 461, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "a62351460bb421c14a50852130f6d3d7d0753c38ee34dc4f24cdbac01bcfbeb2" + }, + { + "program_id": 24, + "kind": "first_frame_quotient", + "frame": 118988, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 462, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "a7bf762a42386a952aa441726c43d2a2191ca37d9ac8e2bee43601b774eb10f1" + }, + { + "program_id": 25, + "kind": "first_frame_quotient", + "frame": 118987, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 461, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "265def1e019f3b3dc7835955ef574ca58331a9c095d052b5a1d4f8e173e3d8b8" + }, + { + "program_id": 26, + "kind": "first_frame_quotient", + "frame": 118976, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 459, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "88fed89d6151221dc405c5a7f7534d24f748b86e751fb92fdff310d6b68b2c46" + }, + { + "program_id": 27, + "kind": "first_frame_quotient", + "frame": 118962, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 457, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "6bffb33c0fd7f97eecd852f7b0aa9bc5d4e50adfb48c776ce4041b5fb4b08873" + }, + { + "program_id": 28, + "kind": "first_frame_quotient", + "frame": 118961, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 456, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "19223051048bb8a8cb1a2c9229c5508eed385cad1fb150f09b12952b6e652cbe" + }, + { + "program_id": 29, + "kind": "first_frame_quotient", + "frame": 118908, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 389, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "d84c77ef254faa62a7ec78b6672b597f48076ee3c9003fde2c0363ab8480f1d0" + }, + { + "program_id": 30, + "kind": "donor_line_entrance", + "line": [ + 2, + 3 + ], + "residual_rank": 1, + "completion_rank": 23, + "determinant": "2", + "count": 25, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "d1fa99795a2df038de598bb5398dc0192c34420f897028b7b677b3486d0ae3ae" + }, + { + "program_id": 31, + "kind": "first_frame_quotient", + "frame": 118907, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 389, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "090e8eeae7630b4a2aff79b223212252622e868fbd5fd5da3c12960814be834a" + }, + { + "program_id": 32, + "kind": "first_frame_quotient", + "frame": 118904, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 489, + "max_numerator": 390, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "4eeb8b38efd515280eb3f19bf546f4a68d4d20f4cb4ba5d5300171396bf73620" + }, + { + "program_id": 33, + "kind": "first_frame_quotient", + "frame": 118903, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 488, + "max_numerator": 345, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "bd2fdc549eed036c880cefab7c44eb1ab1142574341ab5e387caa390d9fe2ce0" + }, + { + "program_id": 34, + "kind": "pivot_residual", + "line": [ + 2, + 3 + ], + "residual_rank": 23, + "completion_rank": 1, + "determinant": "-2", + "count": 23, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "1df8fc59ef423a041f42b7eed68ddab27d9fe871308fa2903bb16e68910f54e6" + }, + { + "program_id": 35, + "kind": "first_frame_quotient", + "frame": 118870, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 389, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "274e98a5010f976d42cea5da2ae024ca5c87e2ffdb6453bef2e5b23a0f1b2ad1" + }, + { + "program_id": 36, + "kind": "first_frame_quotient", + "frame": 118869, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 389, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "98f6733fd100b0812a2b30a6f0fcd5e99b06ab1ab82f4dfb8faea00e3542c497" + }, + { + "program_id": 37, + "kind": "first_frame_quotient", + "frame": 118678, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 462, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f33134f33a385c19235f6d38e7e2c4f197905e4922307a05081b9c0278d3c9fd" + }, + { + "program_id": 38, + "kind": "first_frame_quotient", + "frame": 118677, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 461, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8f9121d0914f7eb63d18db6b06eb7a0d80c70d0569a57502b1c4ea1f1557d107" + }, + { + "program_id": 39, + "kind": "first_frame_quotient", + "frame": 118658, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 359, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "613793d2ddd723eb893a58a00d5a4220ac81980b7ce26a7b514ff6461f0b49d3" + }, + { + "program_id": 40, + "kind": "first_frame_quotient", + "frame": 118657, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 379, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "da000ceced6c46f49e1e31d4152b32ddaf1dc9d939bbaf42902120a20d67f915" + }, + { + "program_id": 41, + "kind": "first_frame_quotient", + "frame": 118656, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 482, + "max_numerator": 195, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "b4bda6ab50859da112ba813dbdcd8e013a589b97095e18f32f6cee28863e0d1d" + }, + { + "program_id": 42, + "kind": "first_frame_quotient", + "frame": 118654, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 480, + "max_numerator": 195, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "d9c5766087aa50fc8e50f6044d00941db2388415fe38c1817c745d15d7c8c5b1" + }, + { + "program_id": 43, + "kind": "first_frame_quotient", + "frame": 118610, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 458, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "8756375be64c5b7f09163bdc4d69a128e82e80dbced0e72df892d00e944d7d68" + }, + { + "program_id": 44, + "kind": "first_frame_quotient", + "frame": 118608, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 457, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "d7be9abd78f66b0f701e6aeccb1d86618e0c6f146473fca1cf3df26275e60ae6" + }, + { + "program_id": 45, + "kind": "first_frame_quotient", + "frame": 118572, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 430, + "max_numerator": 75, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "e8dc478548f773ee79998e52b9cacc953447238baaeee7100d7049f60aeefa2e" + }, + { + "program_id": 46, + "kind": "first_frame_quotient", + "frame": 118571, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 429, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "1100117fea5ebca8ae6509afa7756aa491c3779f5c1f0b9b8edd08afe9661968" + }, + { + "program_id": 47, + "kind": "first_frame_quotient", + "frame": 118560, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 428, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "e2fa4ab3e17f77d8c0e25d94ea0eb25a9a8be76402e8035f5d72939b8170174a" + }, + { + "program_id": 48, + "kind": "first_frame_quotient", + "frame": 118559, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 427, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "99f89de271ad80b82cbdf82b8498c4ccec20c519bdd999b584ff0870397d4bf8" + }, + { + "program_id": 49, + "kind": "first_frame_quotient", + "frame": 118548, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 426, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "58daad0b8fc76050d2703d8fffe4d455fbaac8228c758e18ddeabe6f1a82147d" + }, + { + "program_id": 50, + "kind": "first_frame_quotient", + "frame": 118547, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 423, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "4673d354a7e123b34311e6991c15aed37f7ba8af3fe71f1740c43c488749d7da" + }, + { + "program_id": 51, + "kind": "pivot_residual", + "line": [ + 6, + 7 + ], + "residual_rank": 23, + "completion_rank": 1, + "determinant": "-2", + "count": 19, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "c212b1bf7e788665ca4ff8d3a78227490877e70cf63714987dc3f40ac4b9020b" + }, + { + "program_id": 52, + "kind": "first_frame_quotient", + "frame": 118536, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 424, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "96a4107ff16dd5b474019e81ad5ef9d84faf0d341f1447f6cdb7cba1a2e4dc12" + }, + { + "program_id": 53, + "kind": "first_frame_quotient", + "frame": 118524, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 421, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "53c46a18344cf806a0ad011a47fafd62f589154c7b6ea87905a01316a92cdf8d" + }, + { + "program_id": 54, + "kind": "first_frame_quotient", + "frame": 118512, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 419, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "af9cd831cc217e85aef9d5bbbcdc0c77891c8c7e7fa2590e94589f9f4743e02e" + }, + { + "program_id": 55, + "kind": "first_frame_quotient", + "frame": 118511, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 418, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "5ea396dd43b94d8353f1a374037f4d2f0068a84548937ce47403f51cba32d8ac" + }, + { + "program_id": 56, + "kind": "first_frame_quotient", + "frame": 118286, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 447, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "d6158a21f1537417cfe8ef7ea4a677ce856c184a5512f715a4ddccc2bdc15dd4" + }, + { + "program_id": 57, + "kind": "first_frame_quotient", + "frame": 118285, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 445, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b9248058f4b2f09f7a632769aa824d3def4abb6929c3f2107d1fffe35c71de79" + }, + { + "program_id": 58, + "kind": "first_frame_quotient", + "frame": 118236, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 424, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "750e19807c9ff10a65c383871effe62265cdd1448e84486653e756002a5e2dec" + }, + { + "program_id": 59, + "kind": "first_frame_quotient", + "frame": 118235, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 423, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "6a6f21cab4487ae270237c6b75584ea4d6b1f92f2852e656410886a00731267b" + }, + { + "program_id": 60, + "kind": "first_frame_quotient", + "frame": 118216, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 359, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f65d6600a1a92eb741539c110c12f835a8b9861913564eb7c867dead489bfb9b" + }, + { + "program_id": 61, + "kind": "first_frame_quotient", + "frame": 118215, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 360, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "0fb03ce23fa0f09a972042fd23fdc93bc3b970c81d0b037297847ed77a77e926" + }, + { + "program_id": 62, + "kind": "first_frame_quotient", + "frame": 118114, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 428, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "4d152413e8d549646831ab88d93c31076faee2106dae46ad437954ce3fc4f289" + }, + { + "program_id": 63, + "kind": "first_frame_quotient", + "frame": 118113, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 427, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "4b35cf76904ebdce9e90773b42894a8b9db226cb264e0d0476a54d561365600c" + }, + { + "program_id": 64, + "kind": "first_frame_quotient", + "frame": 117982, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 428, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "843737edf4a44555ce536c3b604a909c39bd752d81b6c5dd054acbd9cede1cd6" + }, + { + "program_id": 65, + "kind": "first_frame_quotient", + "frame": 117976, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 75, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "9fb1d00f376024162336a3a37d67ec04497639741f4e6c862c41952740e9288c" + }, + { + "program_id": 66, + "kind": "first_frame_quotient", + "frame": 117975, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 75, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "66e4423d0972100fd4b54f6c991a23850d0767d7e6266a86841ca45681d56215" + }, + { + "program_id": 67, + "kind": "first_frame_quotient", + "frame": 117970, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 425, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "95e51c542bd93c9b88d9402ebbc101f71b30cf81f5b8bc300a8b3f01363ed135" + }, + { + "program_id": 68, + "kind": "first_frame_quotient", + "frame": 117964, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 75, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "8602ec05fa67434e07e7a6982fafe35d4bfa59e4df89137e9e8da931aff0b067" + }, + { + "program_id": 69, + "kind": "first_frame_quotient", + "frame": 117963, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 75, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "700330bf72e2738af1c43ef9fb00b5f92560777e8f232725fbb713f489b57d4f" + }, + { + "program_id": 70, + "kind": "first_frame_quotient", + "frame": 117960, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 450, + "max_numerator": 210, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "ddb169cb059409df9e12fed4ca5e6ebac3c95db7b5443adc4494d06d7f7cfa50" + }, + { + "program_id": 71, + "kind": "first_frame_quotient", + "frame": 117959, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 449, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "4ea1d7d91d8cf0a45856adc66cb0ed9bef730aff3a47b5762fdd4c8e9d293cc4" + }, + { + "program_id": 72, + "kind": "first_frame_quotient", + "frame": 117948, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 449, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "1a642ff5065c6c795c2f77911df4859268a009679a4c1d44d871e99235ce46e0" + }, + { + "program_id": 73, + "kind": "first_frame_quotient", + "frame": 117947, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 447, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "79602261759eae6d9d7f6e6c2f06d0f94e6e13a196421d3c42334e834008ae28" + }, + { + "program_id": 74, + "kind": "first_frame_quotient", + "frame": 117928, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "c254902a9eec4c064201db8afe722ff89bf807d2bbe5ef110b6fe2275cde01e4" + }, + { + "program_id": 75, + "kind": "first_frame_quotient", + "frame": 117927, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "efa25244dec005304afd0944e6b5b762d2c5f4464ba9fbcde19f1f5ae6c38f60" + }, + { + "program_id": 76, + "kind": "first_frame_quotient", + "frame": 117916, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "3437ba7db8b5f5be83056e314a18d750e23a6d848a0aafad330923f579f31955" + }, + { + "program_id": 77, + "kind": "first_frame_quotient", + "frame": 117915, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "338a46a9f2d9baacfe7da09360ac52c2d7810b4452cd2b6bec69c3145a61a2c5" + }, + { + "program_id": 78, + "kind": "first_frame_quotient", + "frame": 117912, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 448, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "e8f99561f979eae661e0a5eb3359fcf25ad33bd11affb2d43916e1dfbda5d035" + }, + { + "program_id": 79, + "kind": "first_frame_quotient", + "frame": 117911, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 447, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "2f49c1b0758d224932f336270bd10428ea37ca0be36303a0b244fb279d8368c5" + }, + { + "program_id": 80, + "kind": "first_frame_quotient", + "frame": 117898, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 426, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "9bc2161b922e0cb35c0893cb7e43ffdf882a6dffb38a6870e7da85b023f2cc0c" + }, + { + "program_id": 81, + "kind": "first_frame_quotient", + "frame": 117897, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 425, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b2068553a915744e618941365b7b67002bb8dbbfaf184d9cdbe5baaa4295fdbd" + }, + { + "program_id": 82, + "kind": "first_frame_quotient", + "frame": 117886, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 425, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "4c639c54378260788f9e1e863502dd453905eac302304919a8e56cf8b5f87cb5" + }, + { + "program_id": 83, + "kind": "first_frame_quotient", + "frame": 117885, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 424, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "37264fe114835320fae24b50ef4d91f20fe5b54692b3bd8f56169427aaab0e03" + }, + { + "program_id": 84, + "kind": "first_frame_quotient", + "frame": 117880, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "5d798e47f7d8c4b654dd04987d4b8e67f69b2558efb27931e1da1809876cf481" + }, + { + "program_id": 85, + "kind": "first_frame_quotient", + "frame": 117879, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "fb7fbc6543e11353b19cbc7c04fb0aa8d3200f254f0e6671595b6d985de1fa4a" + }, + { + "program_id": 86, + "kind": "first_frame_quotient", + "frame": 117878, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 359, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "d9116f5c4b2469791657f7eee057af05542af5d22c368a3181ed34b0e0488ab6" + }, + { + "program_id": 87, + "kind": "first_frame_quotient", + "frame": 117877, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 339, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8cc738f1681ffdc0e1507c004432d74c4062f981fb7f3d3058d91d253f9d3598" + }, + { + "program_id": 88, + "kind": "first_frame_quotient", + "frame": 117876, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 446, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "669f4e81d1d79bb49e162a6280f65661990a5e5a7628b12f2a8a9d2ad97a407f" + }, + { + "program_id": 89, + "kind": "first_frame_quotient", + "frame": 117875, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 444, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "d76919f7f9ca008b1e4c5f036109d26e9be613b7ac3ad25149acc722d6316658" + }, + { + "program_id": 90, + "kind": "first_frame_quotient", + "frame": 117864, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 442, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "233ebcb8f886dd37881022090fcc2663ab99328e0431782c20e2d9f5b47ce5b3" + }, + { + "program_id": 91, + "kind": "first_frame_quotient", + "frame": 117862, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 424, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "35e43766b82c246de0d5cb9fec640bd31c95c4dc059554c874ab7a9a5d4f8c86" + }, + { + "program_id": 92, + "kind": "first_frame_quotient", + "frame": 117856, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 356, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "aa9c3ce269b9913bd344fb3eca9b1c4d8cb1f3e44a9e3a9e76d9dea7f0f1a41b" + }, + { + "program_id": 93, + "kind": "first_frame_quotient", + "frame": 117852, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 442, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "e22535d0c0ef574ff0b4156488b773badf7da6153e72fd00f5314596c54d64e2" + }, + { + "program_id": 94, + "kind": "first_frame_quotient", + "frame": 117844, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 356, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "488ab680e6255b50b06eebab79b24eda29e5295c8b77c2d4a002f0c2d2c4b487" + }, + { + "program_id": 95, + "kind": "first_frame_quotient", + "frame": 117843, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 356, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "2c865489aebfe7a851828943c0502efa6c01aba96fb2c4b56fea136601d12e6b" + }, + { + "program_id": 96, + "kind": "first_frame_quotient", + "frame": 117838, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 440, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "90857036b8fa9efb5df5eef81b5906e3fbbf7a6663cf8875318b2cab3ef74dd7" + }, + { + "program_id": 97, + "kind": "first_frame_quotient", + "frame": 117836, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 422, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "af8e66a2c146fe358df0ca8a830a2e28c3239cd02e7ed72eebfc2f29c1c0197f" + }, + { + "program_id": 98, + "kind": "first_frame_quotient", + "frame": 117835, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 421, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "c8e10881d4d6e906c4a0e4485249dcb64f4accef08f3a395ee3684388477ee30" + }, + { + "program_id": 99, + "kind": "first_frame_quotient", + "frame": 117694, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 413, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "83ec01765c298d115624244c54139ef0b51ffa0efbaa484bd78d7dfe2df8ca70" + }, + { + "program_id": 100, + "kind": "first_frame_quotient", + "frame": 117693, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 411, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "79ed3c3597accc3bf6c1ca19ccda1488cd8c2230f3790a53512ea7b69317c1b2" + }, + { + "program_id": 101, + "kind": "first_frame_quotient", + "frame": 117644, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 390, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "d6fdc5143922cea8fa5d1f6ba56c5aa64dec516ce1d557f502f25bf37f45ccb8" + }, + { + "program_id": 102, + "kind": "first_frame_quotient", + "frame": 117643, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 389, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f24d5525b81937df472d45ca68308edc196f920d51dba7b4597f2396ecbd6951" + }, + { + "program_id": 103, + "kind": "first_frame_quotient", + "frame": 117624, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 340, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "22706a0955f2f8f47e7b4b7129b93843cc596097c66d637f6f22c50abe497422" + }, + { + "program_id": 104, + "kind": "first_frame_quotient", + "frame": 117623, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 360, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f3eebd257bf0f9c1f027759d97c572d66d9f52c2120be1de7dfbd478c2af529a" + }, + { + "program_id": 105, + "kind": "first_frame_quotient", + "frame": 117462, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 352, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "cf2103f2c1a16bbf3862c1b232af16c524100d668b0d4ebb0e97d104f9f1d2b8" + }, + { + "program_id": 106, + "kind": "first_frame_quotient", + "frame": 117461, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 351, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "2288e893faa852ed2a658495543b0b4b9c54b924e015d03147a6ac938039ad02" + }, + { + "program_id": 107, + "kind": "first_frame_quotient", + "frame": 117442, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 340, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "db4c3c21460cbb1618ede8b87215d7a73cc9f4009a00c345bae86787a4f13d90" + }, + { + "program_id": 108, + "kind": "first_frame_quotient", + "frame": 117441, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 341, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "dabb61fc57c4ad99738f7a6bca5fbc8a78e34d431c9d66142c1a0c0afab206f0" + }, + { + "program_id": 109, + "kind": "first_frame_quotient", + "frame": 117390, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 377, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8ecbcf9f1ef974f992c6deb557e715ea8e4a6ce4db267e4d5cf6f4cb6cab6c25" + }, + { + "program_id": 110, + "kind": "first_frame_quotient", + "frame": 117389, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 375, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b32649d6506737bc6dbb2af2f24f842c6664e05d677ec6a1c9ec2a7c30d61371" + }, + { + "program_id": 111, + "kind": "first_frame_quotient", + "frame": 117340, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 354, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "ba8da4ccbf24a61c20c452a31f246fe5d10c63ea1593f0c9c440b4ac0083cc52" + }, + { + "program_id": 112, + "kind": "first_frame_quotient", + "frame": 117339, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 353, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "296132fd9d62f954c2ae9a255c58a8af654c6c86c3db4aed22708869ee6ed5c1" + }, + { + "program_id": 113, + "kind": "first_frame_quotient", + "frame": 117262, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "659e9b2407e6559a15339b8ecf1bd2129482f830251b3029aab8c9c36f2e1fd7" + }, + { + "program_id": 114, + "kind": "first_frame_quotient", + "frame": 117261, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "9aaf07aac13f6a580a70bff94bfa3092020f298604bed305d6dd48c58907151e" + }, + { + "program_id": 115, + "kind": "first_frame_quotient", + "frame": 117258, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 321, + "max_numerator": 165, + "max_denominator": 300, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f010c918b5e66956c2a9012275265a818c6a38f27d08807a3736fa3bd75c94db" + }, + { + "program_id": 116, + "kind": "first_frame_quotient", + "frame": 117257, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 341, + "max_numerator": 165, + "max_denominator": 300, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "75334417a52074df79aaabd297e561aca3644f15f2674befab2a3f4bd65c9ec8" + }, + { + "program_id": 117, + "kind": "first_frame_quotient", + "frame": 117250, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "de6018f5367de179d4cde23cf14eadd84e950cc89bdce41db281057ab30338ab" + }, + { + "program_id": 118, + "kind": "first_frame_quotient", + "frame": 117249, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "a2f14780f647ede846a15126338023a85de9357ae13b525017178e46af2eaf5c" + }, + { + "program_id": 119, + "kind": "first_frame_quotient", + "frame": 117246, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 321, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "a25c7efc5980ed1dd9ad02ead946ed8132dc1d10eefb5cb48d26bc3ee5f8faa0" + }, + { + "program_id": 120, + "kind": "first_frame_quotient", + "frame": 117245, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 341, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "e545df29e1821cc1c506e3154640cf10e34adba4b6e61e076ffca3cbeacb5ae2" + }, + { + "program_id": 121, + "kind": "first_frame_quotient", + "frame": 117238, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "674dee9e9ce795b477f8652bf462fb8daf56cd03ef1b44259e33c392c7189994" + }, + { + "program_id": 122, + "kind": "first_frame_quotient", + "frame": 117237, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "84435b53acdf49e8c8ee8d43bbbefb188b412df3269fadab31952da43e7070f9" + }, + { + "program_id": 123, + "kind": "first_frame_quotient", + "frame": 117194, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 297, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "626a6ccdee8441c10cb80ab0226fcf487a7a9e7c7b8c562dcba5abd267015f03" + }, + { + "program_id": 124, + "kind": "first_frame_quotient", + "frame": 117193, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 296, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "5cfcfb90a92f3f145ec2d2b682373a7241255e7a60a332964a1e38373ae6550b" + }, + { + "program_id": 125, + "kind": "first_frame_quotient", + "frame": 117192, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 279, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8b5b41e57c331c6f36c3bfa32e0f42c2dfe42f287b69c4980f60af117179c293" + }, + { + "program_id": 126, + "kind": "first_frame_quotient", + "frame": 117191, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 278, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "311684e8e31c09e462ff5187b1073f6d0d0e5e080ae3e58a39bc88dfc4e548c8" + }, + { + "program_id": 127, + "kind": "first_frame_quotient", + "frame": 117182, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 297, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "70115a2f3e64e573a192636c003016123ad7d2aef310aeb8499fa9b2888eedc9" + }, + { + "program_id": 128, + "kind": "first_frame_quotient", + "frame": 117181, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 296, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "682b2cb7b5803704a3d8871086833f523adb21077abf98cc3064199ee82e6e89" + }, + { + "program_id": 129, + "kind": "first_frame_quotient", + "frame": 117180, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 277, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "ce0de67aa45e1033ca661135ca7b98fa2ab5fd0f3845985d2b1d8b1d6dcaa0bd" + }, + { + "program_id": 130, + "kind": "first_frame_quotient", + "frame": 117179, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 276, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "0b7abf6d8ceabbf52aa00ef251b505a86bccb7c8c34ff1154cde95de19ed126f" + }, + { + "program_id": 131, + "kind": "first_frame_quotient", + "frame": 117174, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 227, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "25d5fc699711e7241a9ca325836731f7581d1c338b827eaa4a09bd3b76416be6" + }, + { + "program_id": 132, + "kind": "first_frame_quotient", + "frame": 117173, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 227, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "026463dd226ad0276703d4d2abf4d6d5aa6c291341e9574305d258a9337bc412" + }, + { + "program_id": 133, + "kind": "first_frame_quotient", + "frame": 146888, + "residual_rank": 5, + "completion_rank": 19, + "determinant": "56751048193359375000000", + "count": 437, + "max_numerator": 180, + "max_denominator": 480, + "first_dimension": 6, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "af27e8822258be21ed8e3e401bcd231f42347d86eaf3b0d7da2756d2324f7858" + }, + { + "program_id": 134, + "kind": "first_frame_quotient", + "frame": 146889, + "residual_rank": 5, + "completion_rank": 19, + "determinant": "-56751048193359375000000", + "count": 417, + "max_numerator": 180, + "max_denominator": 480, + "first_dimension": 6, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "9c85747a9f36734e12abde1c18b814db4340964ddca266da68c298afac3c17fe" + }, + { + "program_id": 135, + "kind": "first_frame_quotient", + "frame": 116097, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "98f332b4367faeb58a52b565707d69e8f75b101c75c31568946da55d4015431b" + }, + { + "program_id": 136, + "kind": "first_frame_quotient", + "frame": 116086, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "1972673e0794f88cd6c7f9df48b2cc21988cf877a2dc2014840a19148290ea40" + }, + { + "program_id": 137, + "kind": "first_frame_quotient", + "frame": 116062, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 389, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "ef5b96c3c4461cb581c7d5ee11dfe7c0130ce95de9e39b3ad4758a855f8c1b87" + }, + { + "program_id": 138, + "kind": "first_frame_quotient", + "frame": 116023, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "1a2e1585b7ffcc24bb8937c4767662e3a59ce53f6f43648dd29501fdd8b5629f" + }, + { + "program_id": 139, + "kind": "first_frame_quotient", + "frame": 116012, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "0b70edd1fdaf571c313492bfa45fce93d3dc14a219043a5786a1a80f53e499f6" + }, + { + "program_id": 140, + "kind": "first_frame_quotient", + "frame": 115988, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 389, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "25f65d9338827436bc881c86c5c6d46a7398678b224f82e0d7b1f01139ff4619" + }, + { + "program_id": 141, + "kind": "first_frame_quotient", + "frame": 115756, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 135, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "483a3adc8bec29042eed2e5f8920080ad8b3645af18727bbb7b97fbabf1f3dcf" + }, + { + "program_id": 142, + "kind": "first_frame_quotient", + "frame": 115755, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "159612323043823242187500", + "count": 323, + "max_numerator": 180, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b3c6df1d451719b08f8a3fd73f3fb59ae61e8867c4413618627f7288642e455d" + }, + { + "program_id": 143, + "kind": "first_frame_quotient", + "frame": 115741, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "2786c9bfaa277d67d9b012786bb35030551e2b060f54ae1e12fe336f7fbc2cf3" + }, + { + "program_id": 144, + "kind": "first_frame_quotient", + "frame": 115739, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "-159612323043823242187500", + "count": 308, + "max_numerator": 255, + "max_denominator": 390, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "a0acd037652d9c8cec769845241e46567ed6d8dde18dac380937a4715c3367f8" + }, + { + "program_id": 145, + "kind": "first_frame_quotient", + "frame": 115682, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 135, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "1807cfd54b46d739a76fe4fe8998daea4dc626199ce71ee6eb127d1fc2b98777" + }, + { + "program_id": 146, + "kind": "first_frame_quotient", + "frame": 115681, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "159612323043823242187500", + "count": 323, + "max_numerator": 180, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "a1173cc4fad31b750be1d69a88b7cdf9ef364baceb7ebf5d4e94c6485b6b8c44" + }, + { + "program_id": 147, + "kind": "first_frame_quotient", + "frame": 115667, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "10c8a4751ec540f15f5a7170d56d9e768216cabd4443cfae18cf3c0992a8db13" + }, + { + "program_id": 148, + "kind": "first_frame_quotient", + "frame": 115665, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "-159612323043823242187500", + "count": 307, + "max_numerator": 255, + "max_denominator": 390, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "56c7686076591bf12e894ac5a46375f158a4e2fd2a17c2cfa0a52f9cd7d52b43" + }, + { + "program_id": 149, + "kind": "first_frame_quotient", + "frame": 115593, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "450f3f7d92031dd87c9da9a6ebfbd6be0ac1cdf82bba9a3b947e05d6250be6b7" + }, + { + "program_id": 150, + "kind": "first_frame_quotient", + "frame": 115519, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "44e3e6a07fbe748726b07cc33363d8c41d9e7d2bd2de75947226e295b49c4f36" + }, + { + "program_id": 151, + "kind": "first_frame_quotient", + "frame": 115445, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 81, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8c360fe2d03d681751944e4c7199162d9a07e6967ad81c1d2f935401f66aabc0" + }, + { + "program_id": 152, + "kind": "first_frame_quotient", + "frame": 115371, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "ce9b99f9a6644a6f7963b3d5a2f8049c5015a1ce71e73ea828eaa8b5c03051ba" + }, + { + "kind": "new_rank2", + "role": 15813, + "determinant": "131621703842267136", + "count": 141, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 153, + "scope": "final12", + "factor_program_sha256": "ee0f4465373ed6b314c1b13b5791d859883f61ecf56d8204536a7590e680eaee" + }, + { + "kind": "new_rank2", + "role": 15815, + "determinant": "131621703842267136", + "count": 142, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 154, + "scope": "final12", + "factor_program_sha256": "4dea2af631987a3f61627d29463b427d396f7a4753cadeb78a9f0be49e7c270a" + }, + { + "kind": "new_rank2", + "role": 15821, + "determinant": "131621703842267136", + "count": 132, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 155, + "scope": "final12", + "factor_program_sha256": "2e51effec59bfc9c66a6732f677284a6ef47597ba997f20082edb4c695a4e3b7" + }, + { + "kind": "new_rank2", + "role": 15823, + "determinant": "131621703842267136", + "count": 133, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 156, + "scope": "final12", + "factor_program_sha256": "2ee047ca9e922d9d6e83d1c85b127995246e26ec82328e14d1aca5b6732b72e2" + }, + { + "kind": "new_rank2", + "role": 15828, + "determinant": "-131621703842267136", + "count": 139, + "max_numerator": 11, + "max_denominator": 6, + "program_id": 157, + "scope": "final12", + "factor_program_sha256": "b096afe0ffa6894e9c07f9b0d992f671fb41939e576f7d1d79bfb158ddf137a7" + }, + { + "kind": "new_rank2", + "role": 15829, + "determinant": "131621703842267136", + "count": 139, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 158, + "scope": "final12", + "factor_program_sha256": "6d90de721f8d03e7fc6ac56f7b3a10d752a18d0aea8b325448829594ec6309f6" + }, + { + "kind": "new_rank2", + "role": 15830, + "determinant": "-131621703842267136", + "count": 140, + "max_numerator": 11, + "max_denominator": 6, + "program_id": 159, + "scope": "final12", + "factor_program_sha256": "761a22ba78f1bff34744529cd9644841f4f3fe9be0aadb3712a9818a1ce48de1" + }, + { + "kind": "new_rank2", + "role": 15831, + "determinant": "131621703842267136", + "count": 140, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 160, + "scope": "final12", + "factor_program_sha256": "21de4e2fd0fe49649eb39d08b9b8c0891f61547aa4adc343881c4ed466f6f412" + }, + { + "kind": "new_rank2", + "role": 15836, + "determinant": "-131621703842267136", + "count": 137, + "max_numerator": 11, + "max_denominator": 6, + "program_id": 161, + "scope": "final12", + "factor_program_sha256": "7075d85e79c3ce4700259a78ebd48945ce45dbdcd7dbebe1dff92664c51cb81f" + }, + { + "kind": "new_rank2", + "role": 15837, + "determinant": "131621703842267136", + "count": 137, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 162, + "scope": "final12", + "factor_program_sha256": "0046c8e61d974b386f36497b131c7d1c6cde9a8142e1b732d62cfc3248f80f73" + }, + { + "kind": "new_rank2", + "role": 15838, + "determinant": "-131621703842267136", + "count": 138, + "max_numerator": 11, + "max_denominator": 6, + "program_id": 163, + "scope": "final12", + "factor_program_sha256": "ee01d83a1fc871c274b0c2345ef9feb5c6c082e6a930f7cfb5798388bd356c86" + }, + { + "kind": "new_rank2", + "role": 15839, + "determinant": "131621703842267136", + "count": 138, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 164, + "scope": "final12", + "factor_program_sha256": "855bb49768d8b3c0805dd8a4c0bc99617fa130f147ecb251571660a1ebe405c7" + }, + { + "kind": "reverted_rank4", + "role": 15329, + "determinant": "-36", + "count": 106, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 165, + "scope": "final12", + "factor_program_sha256": "ee8cbc9f121334290a843667920037fb507e3a9acb633128272c27d05285ca73" + }, + { + "kind": "reverted_rank4", + "role": 15349, + "determinant": "-36", + "count": 96, + "max_numerator": 4, + "max_denominator": 9, + "program_id": 166, + "scope": "final12", + "factor_program_sha256": "5c9829536b709881f4735130f7273f7f29705da6a936e116b4467cb2339279ed" + }, + { + "kind": "reverted_rank4", + "role": 15369, + "determinant": "-36", + "count": 98, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 167, + "scope": "final12", + "factor_program_sha256": "7cb11086bf315a8b897c278f1b4fa8a83c915179ea90457f4d7405606fb5c2d5" + }, + { + "kind": "reverted_rank4", + "role": 15379, + "determinant": "-36", + "count": 98, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 168, + "scope": "final12", + "factor_program_sha256": "430e4a01f69d726235ae8c90a7ca0572e6a18338b5999c0323f8556d70898713" + }, + { + "kind": "reverted_rank4", + "role": 15389, + "determinant": "-36", + "count": 90, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 169, + "scope": "final12", + "factor_program_sha256": "a8a96d8c4203ec6d53fd430e118ab731cfefa3c533c8f80f75dccce324877f62" + }, + { + "kind": "reverted_rank4", + "role": 15399, + "determinant": "-36", + "count": 90, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 170, + "scope": "final12", + "factor_program_sha256": "804719e761dfd328cd73056c37b661415250b62727c4155a35497ac19861e194" + } + ] +} diff --git a/research/gen5b-shared-kernels/certificates/kernel70/composition.json b/research/gen5b-shared-kernels/certificates/kernel70/composition.json new file mode 100644 index 0000000000..b232e981b6 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel70/composition.json @@ -0,0 +1,859 @@ +{ + "status": "PASS_ROLE_DISJOINT_PR300_COMPOSITION", + "source_head": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "baseline_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "id_space": "pre-sink18954 streams", + "new_descent_gate_count": 89, + "distinct_new_descent_helper_streams": 154, + "all_new_descent_operands_helpers": true, + "category_counts": { + "30": 2, + "12": 87 + }, + "rational_new_frame_ranks_and_nondegeneracy_checked": 89, + "unchanged_restore_entries": 440, + "unchanged_sink_entries": 7, + "final12_changed_frame_streams": 60, + "final12_broader_scalar_closure": 84, + "kernel70_streams": 157, + "descent2_overlap_final12": [], + "descent2_overlap_kernel70": [], + "paid_ledgers_additive": true, + "combined_local_histogram_delta_over299": { + "1": 149, + "2": 273, + "3": -215, + "4": -30, + "5": 8, + "6": -2, + "7": -47, + "8": -2, + "9": 24, + "11": -1, + "12": -24, + "14": 24, + "16": -1, + "17": 1, + "18": -38, + "19": 39 + }, + "combined_local_rank_drop": 76, + "final12_and_kernel70_source_response_unchanged": true, + "common_kernel_cut_and_final_restore_order_unchanged": true, + "scalar_majorants_unchanged_by_descent2": true, + "source_operand_columns_unchanged_by_new_kernel": true, + "proofs": { + "frame": "Every descent2 event and every affected per-role MOVE partition belongs to a helper disjoint from the full local-surgery role closure and new kernel members. Thus both modifications preserve each other's chronological frame path and their paid histogram differences add exactly.", + "scalar": "Descent2 preserves the scalar/COPY order and coefficients. Consequently final12's complete suffix identity and the new kernel's response relations/cut/restore identity remain unchanged. Inserting new kernel setup before every source injection changes only dirty columns, so each inherited old operand's source-column span remains identical over the integers.", + "prefix": "Descent2 changes only87 helper forward-gate frames and2 old kernel-setup frames. It neither changes initial dirty-read/source-injection ordering nor touches new kernel helpers. Its changed old kernel setups use disjoint helper support.", + "endpoints": "All440 restoration entries and all7 sink entries are semantically identical to299; changed input hashes and shifted raw record indices do not change their selected operators or endpoint bases." + }, + "matched_scalar_events": [ + { + "record": 614073, + "kind": "old_kernel_setup", + "streams": [ + 16639, + 16635 + ] + }, + { + "record": 614371, + "kind": "old_kernel_setup", + "streams": [ + 16711, + 16707 + ] + }, + { + "record": 686889, + "kind": "forward_gate", + "op": 22572, + "streams": [ + 12222, + 4901 + ] + }, + { + "record": 686891, + "kind": "forward_gate", + "op": 22573, + "streams": [ + 16432, + 12222 + ] + }, + { + "record": 686975, + "kind": "forward_gate", + "op": 22621, + "streams": [ + 12224, + 4911 + ] + }, + { + "record": 686977, + "kind": "forward_gate", + "op": 22622, + "streams": [ + 16436, + 12224 + ] + }, + { + "record": 687063, + "kind": "forward_gate", + "op": 22670, + "streams": [ + 13054, + 6161 + ] + }, + { + "record": 687065, + "kind": "forward_gate", + "op": 22671, + "streams": [ + 16440, + 13054 + ] + }, + { + "record": 687150, + "kind": "forward_gate", + "op": 22719, + "streams": [ + 13056, + 6171 + ] + }, + { + "record": 687152, + "kind": "forward_gate", + "op": 22720, + "streams": [ + 16444, + 13056 + ] + }, + { + "record": 687237, + "kind": "forward_gate", + "op": 22768, + "streams": [ + 13718, + 7169 + ] + }, + { + "record": 687239, + "kind": "forward_gate", + "op": 22769, + "streams": [ + 16448, + 13718 + ] + }, + { + "record": 687324, + "kind": "forward_gate", + "op": 22817, + "streams": [ + 13720, + 7179 + ] + }, + { + "record": 687326, + "kind": "forward_gate", + "op": 22818, + "streams": [ + 16452, + 13720 + ] + }, + { + "record": 687411, + "kind": "forward_gate", + "op": 22866, + "streams": [ + 14226, + 7953 + ] + }, + { + "record": 687413, + "kind": "forward_gate", + "op": 22867, + "streams": [ + 16456, + 14226 + ] + }, + { + "record": 687497, + "kind": "forward_gate", + "op": 22915, + "streams": [ + 14228, + 7963 + ] + }, + { + "record": 687499, + "kind": "forward_gate", + "op": 22916, + "streams": [ + 16460, + 14228 + ] + }, + { + "record": 687584, + "kind": "forward_gate", + "op": 22964, + "streams": [ + 14610, + 8541 + ] + }, + { + "record": 687586, + "kind": "forward_gate", + "op": 22965, + "streams": [ + 16464, + 14610 + ] + }, + { + "record": 687670, + "kind": "forward_gate", + "op": 23013, + "streams": [ + 14612, + 8551 + ] + }, + { + "record": 687672, + "kind": "forward_gate", + "op": 23014, + "streams": [ + 16468, + 14612 + ] + }, + { + "record": 687758, + "kind": "forward_gate", + "op": 23062, + "streams": [ + 14894, + 8961 + ] + }, + { + "record": 687760, + "kind": "forward_gate", + "op": 23063, + "streams": [ + 16472, + 14894 + ] + }, + { + "record": 687845, + "kind": "forward_gate", + "op": 23111, + "streams": [ + 14896, + 8971 + ] + }, + { + "record": 687847, + "kind": "forward_gate", + "op": 23112, + "streams": [ + 16476, + 14896 + ] + }, + { + "record": 687933, + "kind": "forward_gate", + "op": 23160, + "streams": [ + 14898, + 9241 + ] + }, + { + "record": 687935, + "kind": "forward_gate", + "op": 23161, + "streams": [ + 16480, + 14898 + ] + }, + { + "record": 688020, + "kind": "forward_gate", + "op": 23209, + "streams": [ + 14900, + 9251 + ] + }, + { + "record": 688022, + "kind": "forward_gate", + "op": 23210, + "streams": [ + 16484, + 14900 + ] + }, + { + "record": 688107, + "kind": "forward_gate", + "op": 23258, + "streams": [ + 14970, + 9409 + ] + }, + { + "record": 688109, + "kind": "forward_gate", + "op": 23259, + "streams": [ + 16488, + 14970 + ] + }, + { + "record": 688193, + "kind": "forward_gate", + "op": 23307, + "streams": [ + 14972, + 9419 + ] + }, + { + "record": 688195, + "kind": "forward_gate", + "op": 23308, + "streams": [ + 16492, + 14972 + ] + }, + { + "record": 688280, + "kind": "forward_gate", + "op": 23356, + "streams": [ + 14974, + 9417 + ] + }, + { + "record": 688282, + "kind": "forward_gate", + "op": 23357, + "streams": [ + 16496, + 14974 + ] + }, + { + "record": 688366, + "kind": "forward_gate", + "op": 23405, + "streams": [ + 14976, + 9425 + ] + }, + { + "record": 688368, + "kind": "forward_gate", + "op": 23406, + "streams": [ + 16500, + 14976 + ] + }, + { + "record": 688454, + "kind": "forward_gate", + "op": 23454, + "streams": [ + 14992, + 9401 + ] + }, + { + "record": 688456, + "kind": "forward_gate", + "op": 23455, + "streams": [ + 16504, + 14992 + ] + }, + { + "record": 688541, + "kind": "forward_gate", + "op": 23503, + "streams": [ + 14994, + 9405 + ] + }, + { + "record": 688543, + "kind": "forward_gate", + "op": 23504, + "streams": [ + 16508, + 14994 + ] + }, + { + "record": 688628, + "kind": "forward_gate", + "op": 23552, + "streams": [ + 15010, + 9429 + ] + }, + { + "record": 688630, + "kind": "forward_gate", + "op": 23553, + "streams": [ + 16512, + 15010 + ] + }, + { + "record": 688715, + "kind": "forward_gate", + "op": 23601, + "streams": [ + 15012, + 9433 + ] + }, + { + "record": 688717, + "kind": "forward_gate", + "op": 23602, + "streams": [ + 16516, + 15012 + ] + }, + { + "record": 688803, + "kind": "forward_gate", + "op": 23650, + "streams": [ + 15028, + 9457 + ] + }, + { + "record": 688805, + "kind": "forward_gate", + "op": 23651, + "streams": [ + 16520, + 15028 + ] + }, + { + "record": 688889, + "kind": "forward_gate", + "op": 23699, + "streams": [ + 15030, + 9461 + ] + }, + { + "record": 688891, + "kind": "forward_gate", + "op": 23700, + "streams": [ + 16524, + 15030 + ] + }, + { + "record": 695015, + "kind": "forward_gate", + "op": 26229, + "streams": [ + 16642, + 5077 + ] + }, + { + "record": 695215, + "kind": "forward_gate", + "op": 26312, + "streams": [ + 16646, + 5085 + ] + }, + { + "record": 695415, + "kind": "forward_gate", + "op": 26395, + "streams": [ + 16650, + 5061 + ] + }, + { + "record": 695613, + "kind": "forward_gate", + "op": 26478, + "streams": [ + 16654, + 5065 + ] + }, + { + "record": 695758, + "kind": "forward_gate", + "op": 26536, + "streams": [ + 16656, + 13977 + ] + }, + { + "record": 695815, + "kind": "forward_gate", + "op": 26561, + "streams": [ + 16658, + 5089 + ] + }, + { + "record": 695959, + "kind": "forward_gate", + "op": 26619, + "streams": [ + 16660, + 13979 + ] + }, + { + "record": 696016, + "kind": "forward_gate", + "op": 26644, + "streams": [ + 16662, + 5093 + ] + }, + { + "record": 696160, + "kind": "forward_gate", + "op": 26702, + "streams": [ + 16664, + 13981 + ] + }, + { + "record": 696360, + "kind": "forward_gate", + "op": 26785, + "streams": [ + 16668, + 13983 + ] + }, + { + "record": 696435, + "kind": "forward_gate", + "op": 26818, + "streams": [ + 16671, + 4085 + ] + }, + { + "record": 696559, + "kind": "forward_gate", + "op": 26868, + "streams": [ + 16672, + 13999 + ] + }, + { + "record": 696635, + "kind": "forward_gate", + "op": 26901, + "streams": [ + 16675, + 4109 + ] + }, + { + "record": 696759, + "kind": "forward_gate", + "op": 26951, + "streams": [ + 16676, + 14001 + ] + }, + { + "record": 696835, + "kind": "forward_gate", + "op": 26984, + "streams": [ + 16679, + 4113 + ] + }, + { + "record": 696958, + "kind": "forward_gate", + "op": 27034, + "streams": [ + 16680, + 14017 + ] + }, + { + "record": 697016, + "kind": "forward_gate", + "op": 27059, + "streams": [ + 16682, + 5173 + ] + }, + { + "record": 697035, + "kind": "forward_gate", + "op": 27067, + "streams": [ + 16683, + 4137 + ] + }, + { + "record": 697157, + "kind": "forward_gate", + "op": 27117, + "streams": [ + 16684, + 14019 + ] + }, + { + "record": 697214, + "kind": "forward_gate", + "op": 27142, + "streams": [ + 16686, + 5177 + ] + }, + { + "record": 697233, + "kind": "forward_gate", + "op": 27150, + "streams": [ + 16687, + 4141 + ] + }, + { + "record": 697358, + "kind": "forward_gate", + "op": 27200, + "streams": [ + 16688, + 14035 + ] + }, + { + "record": 697415, + "kind": "forward_gate", + "op": 27225, + "streams": [ + 16690, + 5201 + ] + }, + { + "record": 697558, + "kind": "forward_gate", + "op": 27283, + "streams": [ + 16692, + 14037 + ] + }, + { + "record": 697615, + "kind": "forward_gate", + "op": 27308, + "streams": [ + 16694, + 5205 + ] + }, + { + "record": 697758, + "kind": "forward_gate", + "op": 27366, + "streams": [ + 16696, + 14053 + ] + }, + { + "record": 697816, + "kind": "forward_gate", + "op": 27391, + "streams": [ + 16698, + 5229 + ] + }, + { + "record": 697956, + "kind": "forward_gate", + "op": 27449, + "streams": [ + 16700, + 14055 + ] + }, + { + "record": 698013, + "kind": "forward_gate", + "op": 27474, + "streams": [ + 16702, + 5233 + ] + }, + { + "record": 698157, + "kind": "forward_gate", + "op": 27532, + "streams": [ + 16704, + 14071 + ] + }, + { + "record": 698214, + "kind": "forward_gate", + "op": 27557, + "streams": [ + 16706, + 5257 + ] + }, + { + "record": 698357, + "kind": "forward_gate", + "op": 27615, + "streams": [ + 16708, + 14073 + ] + }, + { + "record": 698414, + "kind": "forward_gate", + "op": 27640, + "streams": [ + 16710, + 5261 + ] + }, + { + "record": 698557, + "kind": "forward_gate", + "op": 27698, + "streams": [ + 16712, + 14089 + ] + }, + { + "record": 698615, + "kind": "forward_gate", + "op": 27723, + "streams": [ + 16714, + 5285 + ] + }, + { + "record": 698634, + "kind": "forward_gate", + "op": 27731, + "streams": [ + 16715, + 4249 + ] + }, + { + "record": 698757, + "kind": "forward_gate", + "op": 27781, + "streams": [ + 16716, + 14091 + ] + }, + { + "record": 698814, + "kind": "forward_gate", + "op": 27806, + "streams": [ + 16718, + 5289 + ] + }, + { + "record": 698832, + "kind": "forward_gate", + "op": 27814, + "streams": [ + 16719, + 4253 + ] + } + ], + "input_sha256": { + "pr300/descent2-selection.json": "5f947e418285a776d5c7170c07f1befcc44e626e53e6825f06c80a8c81b7a755", + "pr300/portable_bit.py": "93b2c72a63cf24b991a7cc0f35de4da016a245c58f45c1551fe888d5412a73a4", + "pr300/restore-selection.json": "aa85e17b5ff9e849f0decce611a9cc61f697e23aaeea87a7580084535e7f3e07", + "pr300/sink-selection.json": "cadc2c1e3975a3103bbd55992428b686950b4f13987f59146b527f86cebf639f" + }, + "scope": "A changed-stage composition certificate, conditional on the admitted PR300 descent2/source contracts. It independently matches all89 scalar events, checks rational frame rank/nondegeneracy and proves support disjointness; it does not rerun PR300's complete physical producer, source-span admission, all-size compiler or unified finite/bank assembly. No upstream program was executed." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel70/finite-bill.json b/research/gen5b-shared-kernels/certificates/kernel70/finite-bill.json new file mode 100644 index 0000000000..8822269014 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel70/finite-bill.json @@ -0,0 +1,101 @@ +{ + "status": "PASS_UNIFIED_PR300_KERNEL70_FINAL12_FINITE_OBLIGATIONS_UNDER_RETAINED_INTERFACES", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selection": "candidate70", + "with_final12": true, + "gross_added_scalar_events_per_stage": 1202, + "omitted_reads_not_credited": 860, + "scalar_weighted_additions_upper": 217419600, + "scalar_unit_additions_upper": 218475600, + "literal_children": 29005500, + "literal_rank_mass": 147283200, + "literal_stock": 1229560, + "route_families": 11790600, + "changed_chart_programs": 171, + "changed_role_chart_uses": 314, + "pivot_residual_demands": 70, + "max_changed_chart_factors": 489, + "max_changed_chart_numerator": 390, + "max_changed_chart_denominator": 540, + "normalizer_factor_bound": 815, + "bank_selector_calls": 905994095400, + "displayed_finite_coefficient": 90466979917115701, + "coefficient_bits": 57, + "retained_coefficient_cap_bits": 80, + "sink_aware_forward_norm": 191659, + "sink_aware_inverse_norm": 5356455, + "conservative_payload_upper": 12927738210344389271740351838400, + "payload_bits": 104, + "retained_payload_cap_bits": 104, + "payload_strict_gap": 7354671393307281152206899447616, + "actual_sink_redirects": 14, + "target_majorant_edges": 681, + "target_majorant_acyclic_vertices": 908, + "new_bank_block_scalars_up_to": 60, + "scalar_unit_reason": "All chart factor numerators and denominators, and every block+1 scalar, are nonzero and smaller than the retained prime characteristic q>2^80.", + "bad_fallback_per_child": 460800, + "internal_row_coefficient": 14401, + "external_row_coefficient": 20161, + "ordinary_degree_gap": "23971789/25", + "delta_tau_lower": "106798703474680870713165321749296941278625668197/384237500000000000000000000000000000000000000000000000000000000000", + "delta_linear": "34374999825967/19211875000000000", + "bootstrap_chain": [ + "384599/10000000000", + "187492150022321957276191954911759/250000000000000000000000000000000000", + "93812823687064123395063249204381792532414523789961/125000000000000000000000000000000000000000000000000000", + "46906436891072502251230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000" + ], + "bootstrap_gaps": [ + { + "stage": 1, + "slacks": { + "atom": "133597617217542723808045088241/250000000000000000000000000000000000", + "borrowing": "249624882102338138542723808045088241/250000000000000000000000000000000000", + "remainder": "249624889318405630184649024095088241/250000000000000000000000000000000000", + "stock": "499624748504720921/500000000000000000" + }, + "minimum": "133597617217542723808045088241/250000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 126062261360793 + }, + { + "stage": 2, + "slacks": { + "atom": "50132705626604936750795618207467585476210039/125000000000000000000000000000000000000000000000000000", + "borrowing": "124812374302493166126604936750795618207467585476210039/125000000000000000000000000000000000000000000000000000", + "remainder": "249624889318405630184649024095088241/250000000000000000000000000000000000", + "stock": "499624748504720921/500000000000000000" + }, + "minimum": "50132705626604936750795618207467585476210039/125000000000000000000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 223810387500942999663 + }, + { + "stage": 3, + "slacks": { + "atom": "18812372748769399643683777315276721947709950355873526474081/62500000000000000000000000000000000000000000000000000000000000000000000", + "borrowing": "62406187126199042622748769399643683777315276721947709950355873526474081/62500000000000000000000000000000000000000000000000000000000000000000000", + "remainder": "249624889318405630184649024095088241/250000000000000000000000000000000000", + "stock": "499624748504720921/500000000000000000" + }, + "minimum": "18812372748769399643683777315276721947709950355873526474081/62500000000000000000000000000000000000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 397351983159817217760782678 + } + ], + "cutoff_scope": "Displayed fixed bill only. The retained theorem rule uses C_full, including inherited primitive, wrapper and earlier ordinary-level constants, whose values are not supplied or replaced by this check.", + "inherited_assumptions": [ + "Pinned PR299 full unchanged bit decoder, original scalar bounds and stage admission.", + "Retained weighted-chart, prime-field, routing, cover, bank-normalizer and finite-compiler contracts.", + "Inherited setup, primitive, wrapper and earlier ordinary-level constants inside C_full.", + "Inherited all-size theorem and outer positive literal-gap and row-gap interfaces.", + "Pinned PR300 second-descent chronological/source-span admission and its unchanged chart/finite-compiler contracts; only the new composition is independently checked here." + ], + "full_inherited_admission_replayed": false, + "all_size_theorem_verified": false, + "additional_source_head": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "additional_source_pins": { + "pr300/descent2-selection.json": "5f947e418285a776d5c7170c07f1befcc44e626e53e6825f06c80a8c81b7a755", + "pr300/portable_bit.py": "93b2c72a63cf24b991a7cc0f35de4da016a245c58f45c1551fe888d5412a73a4", + "pr300/restore-selection.json": "aa85e17b5ff9e849f0decce611a9cc61f697e23aaeea87a7580084535e7f3e07", + "pr300/sink-selection.json": "cadc2c1e3975a3103bbd55992428b686950b4f13987f59146b527f86cebf639f" + }, + "pr300_composition_status": "PASS_ROLE_DISJOINT_PR300_COMPOSITION" +} diff --git a/research/gen5b-shared-kernels/certificates/kernel70/norm.json b/research/gen5b-shared-kernels/certificates/kernel70/norm.json new file mode 100644 index 0000000000..ab5456500e --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel70/norm.json @@ -0,0 +1,32 @@ +{ + "status": "PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS", + "selection": "candidate70", + "forward": { + "reverse": false, + "inherited_bound": 77985, + "max_added_majorant": 113674, + "certified_new_bound": 191659, + "max_added_helper": 113674, + "max_added_target": 609, + "max_added_source": 0 + }, + "inverse": { + "reverse": true, + "inherited_bound": 2475558, + "max_added_majorant": 2880897, + "certified_new_bound": 5356455, + "max_added_helper": 113674, + "max_added_target": 2880897, + "max_added_source": 0 + }, + "payload_bound": 12927738210344389271740351838400, + "payload_bits": 104, + "retained_payload_cap_2_to104": true, + "setup_restore_pairs": 601, + "max_target_prefix_degree": 3, + "target_majorant_acyclic_vertices": 908, + "target_majorant_edges": 681, + "actual_sink_redirects": 14, + "target_majorant_proof": "Targets are never read by helper/source operations. We include every target-prefix and terminal-sink setup/restore edge with its exact total multiplicity2. Their union is checked acyclic; propagating all uncompressed nonnegative increments in topological order through these weighted edges dominates every chronological placement of those ADDs. Actual sink writes are redirected, and removed sink reads/cleanup/root deliveries are absent.", + "scope": "Conditional on inherited old F/B and unchanged compiler; complete exact helper majorant paths are replayed, while target compression is conservatively bounded rather than reproducing record-index cut sites." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel70/pricing.json b/research/gen5b-shared-kernels/certificates/kernel70/pricing.json new file mode 100644 index 0000000000..b87b25aec2 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel70/pricing.json @@ -0,0 +1,782 @@ +{ + "status": "PASS_KERNEL70_PR300_FINAL12_EXACT_PRICING", + "physical_admission": false, + "local_histogram_delta": { + "3": -215, + "1": 149, + "2": 273, + "6": -2, + "5": 8, + "4": -30, + "7": -47, + "8": -2, + "9": 24, + "11": -1, + "12": -24, + "14": 24, + "16": -1, + "17": 1, + "18": -38, + "19": 39 + }, + "role_rank_count_delta": { + "24": -70, + "23": 70, + "2": 12, + "3": -18, + "4": 6 + }, + "histogram": { + "1": 221585, + "2": 84095, + "3": 43970, + "4": 25655, + "5": 12080, + "6": 10105, + "7": 4200, + "8": 1690, + "9": 3485, + "10": 2015, + "11": 3330, + "12": 3025, + "13": 1470, + "14": 2545, + "15": 300, + "16": 8340, + "17": 390, + "18": 3615, + "19": 375, + "20": 3180, + "21": 35095, + "22": 2320, + "23": 3520, + "46": 3520, + "50": 3520 + }, + "calls": 483425, + "rank_mass": 2454720, + "literal_stock": 1229560, + "unreplicated_stock": "61478/3", + "deficit": "4400", + "packing": { + "capacity": 120, + "demand": { + "10": 60, + "12": 60, + "13": 240, + "14": 60, + "15": 60, + "17": 120, + "18": 180, + "19": 120, + "20": 1260, + "21": 960, + "22": 4920, + "23": 98640, + "24": 684180, + "3": 27360, + "4": 104880, + "6": 1020, + "7": 180, + "8": 360, + "9": 240, + "2": 720 + }, + "patterns": [ + { + "widths": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 10 + }, + { + "widths": [ + 6, + 6, + 6, + 6, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 7, + 7, + 7, + 7, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 8, + 8, + 8, + 8, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 90 + }, + { + "widths": [ + 9, + 9, + 9, + 9, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 60 + }, + { + "widths": [ + 10, + 10, + 10, + 10, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 12, + 12, + 12, + 12, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 13, + 13, + 13, + 13, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 60 + }, + { + "widths": [ + 14, + 14, + 14, + 14, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 15, + 15, + 15, + 15, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 17, + 17, + 17, + 17, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 30 + }, + { + "widths": [ + 18, + 18, + 18, + 18, + 24, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 45 + }, + { + "widths": [ + 19, + 19, + 19, + 19, + 24, + 4, + 4, + 4, + 4, + 4 + ], + "count": 30 + }, + { + "widths": [ + 20, + 20, + 20, + 20, + 24, + 4, + 4, + 4, + 4 + ], + "count": 315 + }, + { + "widths": [ + 21, + 21, + 21, + 21, + 24, + 4, + 4, + 4 + ], + "count": 240 + }, + { + "widths": [ + 22, + 22, + 22, + 22, + 24, + 4, + 4 + ], + "count": 1230 + }, + { + "widths": [ + 23, + 23, + 23, + 23, + 24, + 4 + ], + "count": 24660 + }, + { + "widths": [ + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 2362 + }, + { + "widths": [ + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3 + ], + "count": 684 + }, + { + "widths": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6 + ], + "count": 48 + }, + { + "widths": [ + 24, + 24, + 24, + 24, + 24 + ], + "count": 131466 + }, + { + "widths": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "count": 12 + } + ], + "total_rank_demand": 19371840, + "feasible_bins": 161432, + "unused_coordinate_capacity": 0, + "dual_prices": { + "10": "1/12", + "12": "1/10", + "13": "13/120", + "14": "7/60", + "15": "1/8", + "17": "17/120", + "18": "3/20", + "19": "19/120", + "20": "1/6", + "21": "7/40", + "22": "11/60", + "23": "23/120", + "24": "1/5", + "3": "1/40", + "4": "1/30", + "6": "1/20", + "7": "7/120", + "8": "1/15", + "9": "3/40", + "2": "1/60" + }, + "dual_objective": "161432", + "integer_lower_bound": 161432, + "optimal": true + }, + "root_bracket": [ + "375251495279079/500000000000000000", + "750502990558159/1000000000000000000" + ], + "moment_interval": [ + "960593749999999999733003241313297823217086695626748058053435742491/960593750000000000000000000000000000000000000000000000000000000000", + "384237499999999999893201296525319129286834678250703058721374331803/384237500000000000000000000000000000000000000000000000000000000000" + ], + "adjacent_moment_interval": [ + "960593750000000002025675197240674272548979636548832081565301106557/960593750000000000000000000000000000000000000000000000000000000000", + "1921187500000000004051350394481348545097959273097683340630602387147/1921187500000000000000000000000000000000000000000000000000000000000" + ], + "kappa": "749940157923873/1000000000000000000", + "kappa_decimal": "0.000749940157923873", + "assembly": { + "coarse": "375251495279079/500000000000000000", + "complex_coarse": "754736418878859/1000000000000000000", + "bootstrap_chain": [ + "384599/10000000000", + "187492150022321957276191954911759/250000000000000000000000000000000000", + "93812823687064123395063249204381792532414523789961/125000000000000000000000000000000000000000000000000000", + "46906436891072502251230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000" + ], + "strict_constraints": { + "a_positive": "46906436891072502251230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000", + "a_below_b": "264589288856185248769399643683777315276721947709950355873526474081/62500000000000000000000000000000000000000000000000000000000000000000000", + "b_below_one_over32": "30495263581121141/1000000000000000000", + "beta_positive": "1/1000000000", + "beta_below_one": "999999999/1000000000", + "phase_leaf_above_bit": "264589241685159068840712143683777315276721947709950355873526474081/62500000000000000000000000000000000000000000000000000000000000000000000", + "q_positive": "23453218445489344688724227675906880742005322803460301544010946713315373526474081/31250000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_internal": "46906436891072502251230600356316222684723278052290049644126473525919/31250000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_leaf": "132294620889485971311428574093119257994677196539698455989053286684626473525919/31250000000000000000000000000000000000000000000000000000000000000000000000000000000", + "c_positive": "23453218453301844688724227675906880742005322803460301544010946713315373526474081/31250000000000000000000000000000000000000000000000000000000000000000000000000000000", + "c_below_one": "31226546781546698155311275772324093119257994677196539698455989053286684626473525919/31250000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_reservations": "1/4000000000000", + "lambda_above_tau": "46906436891072502251230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_above_sigma": "264589288903091685660472145935007915633038170394673633925816523725126473525919/62500000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_above_internal": "46906436891072502251230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_prime_above_lambda": "46906436891072502251230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000000000000000", + "compact_leaf": "132294620889485971311428574093119257994677196539698455989053286684626473525919/31250000000000000000000000000000000000000000000000000000000000000000000000000000000", + "compact_reservations": "1/4000000000000", + "lambda_prime_below_one": "23453218445489344688724227675906880742005322803460301544010946713315373526474081/31250000000000000000000000000000000000000000000000000000000000000000000000000000000", + "epsilon_positive": "2840909090906250000000000000000000000000000000000000000000000000000000000000000000/2843041201676862667698974929788718807340182302073041845594910086064846852138770371", + "epsilon_below_one": "2132110770612667698974929788718807340182302073041845594910086064846852138770371/2843041201676862667698974929788718807340182302073041845594910086064846852138770371", + "guard_width": "2132110770612667698974929788718807340182302073041845594910086064846852138770371/2843041201676862667698974929788718807340182302073041845594910086064846852138770371", + "K_geometry": "2132813928950300167698974929788718807340182302073041845594910086064846852138770371/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000", + "K_dominates_log": "2132110768479853770024629621019832410393583265701663292837044219251942052705524147861229629/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000", + "record_suffix": "2132110770612667698974929788718807340182302073041845594910086064846852138770371/2843041201676862667698974929788718807340182302073041845594910086064846852138770371", + "phase_local": "17056886162058300390122575642051483791669697776994582457207646673179907024098121147861229629/22744329613414901341591799438309750458721458416584334764759280688518774817110162968000000000000", + "phase_boundary": "3411377230137227116683024994251116814502964509526770649783095858160053335967746747861229629/4548865922682980268318359887661950091744291683316866952951856137703754963422032593600000000000", + "gamma_sublinear": "1/2000000000000", + "cell_above_band": "5681818181809656958798323137332301025070211281192659817697926958154405089913935153147861229629/11372164806707450670795899719154875229360729208292167382379640344259387408555081484000000000000", + "prime_interval_packing": "2132110770612667698974929788718807340182302073041845594910086064846852138770371/2843041201676862667698974929788718807340182302073041845594910086064846852138770371", + "alpha_positive": "4264221538382294196272996909738639750575885338743508887747130284098794191475895147861229629/5686082403353725335397949859577437614680364604146083691189820172129693704277540742000000000000", + "alpha_below_one": "5681818181815343041201676862667698974929788718807340182302073041845594910086064846852138770371/5686082403353725335397949859577437614680364604146083691189820172129693704277540742000000000000", + "alpha_below_one_fourth": "1417256379300049039653214467984620763919515265697777413909707912748324631877909290352138770371/5686082403353725335397949859577437614680364604146083691189820172129693704277540742000000000000", + "delta_positive": "1/8000000000000", + "delta_below_one_eighth": "999999999999/8000000000000", + "short_record_fallback": "177423461248935450311015241204438319878177243056775384838686898370956289259960017791703578883590705919289105413455964304721266034794224963740898542254051/177690075104803916731185933111794925458761393879565115349681880379052928258673148187500000000000000000000000000000000000000000000000000000000000000000000", + "small_field_exposure": "1/1000000000000", + "artificial_boundary": "159227364180077739856339426094481100594561033489096698664980464633686983267139498284556416311113/22744329613414901341591799438309750458721458416584334764759280688518774817110162968000000000000", + "literal_scalar_guard": "1", + "row_product_gap": "23971789/25", + "g1_above_kappa": "2843043642576513557738936515668059994322770923793942047487191012353477506359309554033117/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000000000", + "g2_above_kappa": "35177020830439751230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000", + "g3_above_kappa": "2440899650890039961585879341186982588621720900201892280926288630654220539183033117/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000000000", + "g4_above_kappa": "35177020830439751230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000", + "g5_above_kappa": "1066142891528474390427077184550110739735156984998290893990372208562948223772578072158117/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000000000", + "g6_above_kappa": "2487663492366905724276564649444470143405248136034811816787827251595371649841963257658117/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000000000", + "g7_above_kappa": "2838776980138480375943601583769020129175485757921280925328883855982640338873583106506359309554033117/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000000000" + }, + "margins": { + "g1": "2132110770612667698974929788718807340182302073041845594910086064846852138770371/2843041201676862667698974929788718807340182302073041845594910086064846852138770371", + "g2": "46906436891072502251230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000", + "g3": "2132110767769626497298067121019832410393583265701663292837044219251942052705524147861229629/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000", + "g4": "46906436891072502251230600356316222684723278052290049644126473525919/62500000000000000000000000000000000000000000000000000000000000000000000", + "g5": "3411377230137227116683024994251116814502964509526770649783095858160053335967746747861229629/4548865922682980268318359887661950091744291683316866952951856137703754963422032593600000000000", + "g6": "17056886162058300390122575642051483791669697776994582457207646673179907024098121147861229629/22744329613414901341591799438309750458721458416584334764759280688518774817110162968000000000000", + "g7": "2840909090906250000000000000000000000000000000000000000000000000000000000000000000/2843041201676862667698974929788718807340182302073041845594910086064846852138770371" + }, + "kappa": "749940157923873/1000000000000000000", + "kappa_decimal": "0.000749940157923873", + "minimum_margin": "2132110767769626497298067121019832410393583265701663292837044219251942052705524147861229629/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000", + "absorption_gap": "2440899650890039961585879341186982588621720900201892280926288630654220539183033117/2843041201676862667698974929788718807340182302073041845594910086064846852138770371000000000000000000", + "adjacent_grid_rejected": [ + "g3_above_kappa" + ], + "bridge_scope": "The positive literal gap and supplied row gap are assumptions in this arithmetic check." + }, + "selection": "candidate70", + "with_final12": true, + "on_PR300": true, + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "additional_source": { + "git_blob": "638d3a1669c850d91f93d04939abfdd5f3a86c05", + "sha256": "5f947e418285a776d5c7170c07f1befcc44e626e53e6825f06c80a8c81b7a755", + "bytes": 319700, + "repository": "rohanarun/integer-mult-bounds", + "commit": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "package": "research/five-stage-gen5b-full", + "path": "descent2-selection.json" + }, + "composition_status": "PASS_ROLE_DISJOINT_PR300_COMPOSITION", + "kernel_histogram_delta": { + "3": -137, + "1": 87, + "2": 137, + "6": -2, + "5": -16, + "4": 18 + }, + "final12_histogram_delta": { + "1": 18, + "2": -12 + }, + "pr300_histogram_delta": { + "1": 44, + "2": 148, + "3": -78, + "4": -48, + "5": 24, + "7": -47, + "8": -2, + "9": 24, + "11": -1, + "12": -24, + "14": 24, + "16": -1, + "17": 1, + "18": -38, + "19": 39 + }, + "kernel_residual_delta": { + "24": -70, + "23": 70 + }, + "final12_residual_delta": { + "2": 12, + "3": -18, + "4": 6 + }, + "pivots": 70, + "distinct_donors": 87, + "scalar_setup_gates": 601, + "scalar_restore_gates": 601, + "fallback_kernel72_kappa": "3749680601367/5000000000000000", + "kappa_gain_over_kernel72": "4037650473/1000000000000000000", + "binding": "Measured candidate70 first-frame ledger plus measured final12 chronological suffix delta and pinned PR300 descent2 delta, bound to role-disjoint composition.", + "scope": "Exact arithmetic and optimal inventory under the changed composition certificates. PR300 chronological/source-span admission and unchanged compiler, prime, routing and all-size interfaces remain inherited." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/banks.json b/research/gen5b-shared-kernels/certificates/kernel72/banks.json new file mode 100644 index 0000000000..892318c19c --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/banks.json @@ -0,0 +1,43 @@ +{ + "status": "PASS_UNIFIED_KERNEL72_CORETIME12_BANK_ASSIGNMENT", + "helper_roles": 15427, + "retained_old_restorations": 434, + "new_restorations": 12, + "reverted_old_restorations": 6, + "family_counts": { + "24": 11401, + "23": 1646, + "22": 82, + "21": 16, + "20": 21, + "19": 2, + "17": 2, + "18": 3, + "15": 1, + "14": 1, + "12": 1, + "13": 4, + "10": 1, + "9": 4, + "8": 6, + "7": 3, + "6": 17, + "4": 1748, + "3": 456, + "2": 12 + }, + "new_shared_kernel_pivots": 72, + "residual_rank_per_replica": 322862, + "banks_per_stage": 161431, + "total_banks": 807155, + "literal_data_stock": 422400, + "literal_stock": 1229555, + "unreplicated_stock": "245911/12", + "checked_role_replica_assignments_per_stage": 925620, + "total_stage_assignments": 4628100, + "stages_have_disjoint_bank_namespaces": true, + "all_banks_full": true, + "maximum_block_scalar": 60, + "assignment_sha256": "70da321406af20759213ffdfd5bb440ea2fd2757d89101c4f56d2efec01a951a", + "scope": "Role-resolved bijection into explicit full 120-wide banks, all 60 replicas. Five stages use disjoint bank namespaces. Existing address-normalizer and cover compiler contracts remain inherited; new/reverted chart factors are separately checked." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/bridge.json b/research/gen5b-shared-kernels/certificates/kernel72/bridge.json new file mode 100644 index 0000000000..49e910ca71 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/bridge.json @@ -0,0 +1,4819 @@ +{ + "status": "PASS_SHARED_DONOR_CHANGED_STAGE_COMPOSITION", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selection": "union72", + "chosen_lines": [ + [ + 6, + 7 + ], + [ + 16, + 17 + ], + [ + 2, + 3 + ] + ], + "pivots": 72, + "distinct_donors": 93, + "members": 165, + "setup_adds": 473, + "restore_adds": 473, + "donor_multiplicity_histogram": { + "3": 13, + "5": 6, + "4": 8, + "1": 22, + "8": 3, + "2": 13, + "7": 5, + "6": 1, + "14": 2, + "13": 4, + "15": 2, + "21": 1, + "9": 7, + "12": 2, + "11": 1, + "10": 3 + }, + "max_donor_multiplicity": 21, + "frozen_response_relations_reproduced": 1720, + "frozen_literal_cut_read_triples_reproduced": 1720, + "common_prefix_plain_reads": 648088, + "last_plain_read": [ + 3503, + 16719, + -1 + ], + "target_prefix_setup_record": 696719, + "common_cut": "Immediately before first source injection, after all plain compensation reads and all old kernel setups", + "all_column_dimension": 18954, + "field": "F2", + "arbitrary_source_target_dirty_inputs": true, + "formal_forward_and_inverse_equal": true, + "prefix_compensation_reads_removed": 832, + "source_compensation_integer_coefficient_max": 1, + "common_line_gram": 18, + "exact_containments": 663, + "old_restoration_donor_overlaps": [], + "local_paid_histogram_delta": { + "1": 93, + "2": 144, + "3": -144, + "4": 19, + "5": -17, + "6": -2 + }, + "residual_family_delta": { + "24": -72, + "23": 72 + }, + "paths": [ + { + "role": 8339, + "stream": 11859, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119570, + 111567, + 70436, + 27517, + 3137, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8341, + "stream": 11861, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119569, + 111523, + 68819, + 29266, + 3139, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8359, + "stream": 11879, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119558, + 111479, + 67201, + 27605, + 3169, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8361, + "stream": 11881, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119557, + 111435, + 65583, + 29210, + 3171, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8394, + "stream": 11914, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119534, + 115737, + 113062, + 61147, + 61145, + 60730, + 30101, + 2657, + 0 + ], + "old_dimensions": [ + 3, + 5, + 7, + 12, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8412, + "stream": 11932, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119522, + 115589, + 112958, + 57889, + 57887, + 57472, + 30087, + 2665, + 0 + ], + "old_dimensions": [ + 3, + 5, + 7, + 12, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8413, + "stream": 11933, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119522, + 111215, + 57452, + 29149, + 3201, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8415, + "stream": 11935, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119521, + 111171, + 55815, + 29147, + 3202, + 0 + ], + "old_dimensions": [ + 3, + 12, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8615, + "stream": 12135, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119391, + 73283, + 73278, + 72840, + 30526, + 2419, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8787, + "stream": 12307, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119284, + 68449, + 68444, + 68002, + 25735, + 2489, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8789, + "stream": 12309, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119283, + 66831, + 66826, + 66384, + 30400, + 2491, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8862, + "stream": 12382, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119234, + 115739, + 138594, + 61294, + 60837, + 28441, + 3473, + 0 + ], + "old_dimensions": [ + 3, + 5, + 9, + 15, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8864, + "stream": 12384, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119233, + 115665, + 138645, + 59673, + 59216, + 28678, + 3475, + 0 + ], + "old_dimensions": [ + 3, + 5, + 9, + 15, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8891, + "stream": 12411, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119214, + 117092, + 24746, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8894, + "stream": 12414, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119213, + 117018, + 24749, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8901, + "stream": 12421, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119210, + 107697, + 54464, + 28673, + 3473, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 8903, + "stream": 12423, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 119209, + 107671, + 52831, + 28671, + 3474, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9175, + "stream": 12695, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119024, + 116202, + 70673, + 27539, + 3145, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9177, + "stream": 12697, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119023, + 116128, + 69056, + 29252, + 3147, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9193, + "stream": 12713, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119012, + 116054, + 67439, + 27627, + 3177, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9195, + "stream": 12715, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119011, + 115980, + 65821, + 29196, + 3179, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9211, + "stream": 12731, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 119000, + 115906, + 64198, + 27693, + 3201, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9213, + "stream": 12733, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118999, + 115832, + 62572, + 29154, + 3203, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9228, + "stream": 12748, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118988, + 115780, + 61174, + 61125, + 0 + ], + "old_dimensions": [ + 3, + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9229, + "stream": 12749, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118988, + 115758, + 60954, + 27737, + 3217, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9230, + "stream": 12750, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118987, + 115706, + 59553, + 59504, + 0 + ], + "old_dimensions": [ + 3, + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9247, + "stream": 12767, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118976, + 115610, + 57697, + 29121, + 3217, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9267, + "stream": 12787, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118962, + 115462, + 54427, + 29107, + 3225, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9269, + "stream": 12789, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118961, + 115388, + 52794, + 29105, + 3226, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9346, + "stream": 12866, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118908, + 39449, + 39423, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9347, + "stream": 12867, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118907, + 39291, + 39265, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9353, + "stream": 12873, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118904, + 138092, + 76938, + 0 + ], + "old_dimensions": [ + 3, + 9, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9355, + "stream": 12875, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118903, + 138143, + 75347, + 0 + ], + "old_dimensions": [ + 3, + 9, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9402, + "stream": 12922, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118870, + 38501, + 38475, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9403, + "stream": 12923, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118869, + 38343, + 38317, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9691, + "stream": 13211, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118678, + 138602, + 60814, + 0 + ], + "old_dimensions": [ + 3, + 9, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9693, + "stream": 13213, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118677, + 138653, + 59193, + 0 + ], + "old_dimensions": [ + 3, + 9, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9719, + "stream": 13239, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118658, + 116944, + 25736, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9722, + "stream": 13242, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118657, + 116870, + 25739, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9726, + "stream": 13246, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118656, + 64039, + 63976, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9729, + "stream": 13249, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118654, + 62413, + 62350, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9790, + "stream": 13310, + "kind": "donor", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118610, + 54266, + 54202, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9793, + "stream": 13313, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 3, + "old_frames": [ + 118608, + 52633, + 52569, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9845, + "stream": 13365, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118572, + 70854, + 70673, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9847, + "stream": 13367, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118571, + 69237, + 69056, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9863, + "stream": 13383, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118560, + 67621, + 67439, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9865, + "stream": 13385, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118559, + 66003, + 65821, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9881, + "stream": 13401, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118548, + 64381, + 64198, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9883, + "stream": 13403, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118547, + 62755, + 62572, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 9898, + "stream": 13418, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118536, + 115744, + 61808, + 61032, + 0 + ], + "old_dimensions": [ + 3, + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9916, + "stream": 13436, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118524, + 115596, + 58562, + 57774, + 0 + ], + "old_dimensions": [ + 3, + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9935, + "stream": 13455, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118512, + 54612, + 54427, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 9937, + "stream": 13457, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118511, + 52979, + 52794, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10115, + "stream": 13635, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118393, + 113443, + 111627, + 72840, + 0 + ], + "old_dimensions": [ + 3, + 6, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10275, + "stream": 13795, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118286, + 113287, + 111495, + 68002, + 0 + ], + "old_dimensions": [ + 3, + 6, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10277, + "stream": 13797, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118285, + 113235, + 111451, + 66384, + 0 + ], + "old_dimensions": [ + 3, + 6, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10350, + "stream": 13870, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118236, + 115741, + 138594, + 60886, + 0 + ], + "old_dimensions": [ + 3, + 5, + 9, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10352, + "stream": 13872, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118235, + 115667, + 138645, + 59265, + 0 + ], + "old_dimensions": [ + 3, + 5, + 9, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10379, + "stream": 13899, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118216, + 116796, + 26528, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10382, + "stream": 13902, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118215, + 116722, + 26531, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10532, + "stream": 14052, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118114, + 62126, + 62123, + 0 + ], + "old_dimensions": [ + 3, + 6, + 8, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10534, + "stream": 14054, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 118113, + 60505, + 60502, + 0 + ], + "old_dimensions": [ + 3, + 6, + 8, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10623, + "stream": 14143, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 118055, + 113455, + 111611, + 110757, + 28071, + 0 + ], + "old_dimensions": [ + 3, + 7, + 12, + 14, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10733, + "stream": 14253, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117982, + 136819, + 60936, + 29331, + 3097, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10740, + "stream": 14260, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117976, + 35661, + 35635, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10741, + "stream": 14261, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117975, + 35503, + 35477, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10751, + "stream": 14271, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117970, + 136881, + 57679, + 29317, + 3105, + 0 + ], + "old_dimensions": [ + 3, + 8, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10758, + "stream": 14278, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117964, + 35345, + 35319, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10759, + "stream": 14279, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117963, + 35187, + 35161, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10764, + "stream": 14284, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117960, + 116202, + 70518, + 70734, + 70656, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10766, + "stream": 14286, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117959, + 116128, + 68901, + 69117, + 69039, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10782, + "stream": 14302, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117948, + 116086, + 67365, + 67247, + 26527, + 2777, + 0 + ], + "old_dimensions": [ + 3, + 5, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10783, + "stream": 14303, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117948, + 113299, + 111479, + 110673, + 28420, + 0 + ], + "old_dimensions": [ + 3, + 7, + 12, + 14, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10784, + "stream": 14304, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117947, + 116012, + 65747, + 65629, + 29896, + 2779, + 0 + ], + "old_dimensions": [ + 3, + 5, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10785, + "stream": 14305, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117947, + 113247, + 111435, + 110645, + 28423, + 0 + ], + "old_dimensions": [ + 3, + 7, + 12, + 14, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10812, + "stream": 14332, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117928, + 34397, + 34371, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10813, + "stream": 14333, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117927, + 34239, + 34213, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10830, + "stream": 14350, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117916, + 34081, + 34055, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10831, + "stream": 14351, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117915, + 33923, + 33897, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10836, + "stream": 14356, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117912, + 116054, + 67283, + 67501, + 67422, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10838, + "stream": 14358, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117911, + 115980, + 65665, + 65883, + 65804, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10859, + "stream": 14379, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117898, + 115737, + 60978, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10861, + "stream": 14381, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117897, + 115663, + 59357, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10877, + "stream": 14397, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117886, + 115589, + 57721, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10879, + "stream": 14399, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117885, + 115515, + 56084, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10884, + "stream": 14404, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117880, + 33133, + 33107, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10885, + "stream": 14405, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117879, + 32975, + 32949, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10887, + "stream": 14407, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117878, + 116648, + 27144, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10890, + "stream": 14410, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117877, + 116574, + 27147, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10892, + "stream": 14412, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117876, + 115906, + 64039, + 64260, + 64181, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10894, + "stream": 14414, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117875, + 115832, + 62413, + 62634, + 62555, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10910, + "stream": 14430, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117864, + 115744, + 61603, + 61106, + 30605, + 2369, + 0 + ], + "old_dimensions": [ + 3, + 5, + 15, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10911, + "stream": 14431, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117864, + 60793, + 61808, + 0 + ], + "old_dimensions": [ + 3, + 8, + 17, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10915, + "stream": 14435, + "kind": "donor", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117862, + 57536, + 58562, + 0 + ], + "old_dimensions": [ + 3, + 8, + 17, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 10922, + "stream": 14442, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117856, + 32501, + 32475, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10928, + "stream": 14448, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117852, + 115758, + 60793, + 61017, + 60936, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10929, + "stream": 14449, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117852, + 61145, + 61139, + 61106, + 0 + ], + "old_dimensions": [ + 3, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10940, + "stream": 14460, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117844, + 32185, + 32159, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10941, + "stream": 14461, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117843, + 32027, + 32001, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10946, + "stream": 14466, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117838, + 115610, + 57536, + 57759, + 57679, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10950, + "stream": 14470, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117836, + 115462, + 54266, + 54490, + 54409, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 10952, + "stream": 14472, + "kind": "pivot", + "line": [ + 6, + 7 + ], + "first_dimension": 3, + "old_frames": [ + 117835, + 115388, + 52633, + 52857, + 52776, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11006, + "stream": 14526, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117801, + 111609, + 73278, + 73275, + 72099, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11007, + "stream": 14527, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117801, + 110757, + 108684, + 107971, + 27939, + 0 + ], + "old_dimensions": [ + 3, + 14, + 16, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11168, + "stream": 14688, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117694, + 116086, + 113309, + 68337, + 67243, + 0 + ], + "old_dimensions": [ + 3, + 5, + 7, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11169, + "stream": 14689, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117694, + 111477, + 68444, + 68441, + 67247, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11170, + "stream": 14690, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117694, + 110673, + 108582, + 107893, + 67307, + 0 + ], + "old_dimensions": [ + 3, + 14, + 16, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11171, + "stream": 14691, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117693, + 116012, + 113257, + 66719, + 65625, + 0 + ], + "old_dimensions": [ + 3, + 5, + 7, + 17, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11172, + "stream": 14692, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117693, + 111433, + 66826, + 66823, + 65629, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11173, + "stream": 14693, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117693, + 110645, + 108548, + 107867, + 65689, + 0 + ], + "old_dimensions": [ + 3, + 14, + 16, + 18, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11255, + "stream": 14775, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117644, + 113092, + 61266, + 0 + ], + "old_dimensions": [ + 3, + 7, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11257, + "stream": 14777, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117643, + 113040, + 59645, + 0 + ], + "old_dimensions": [ + 3, + 7, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11283, + "stream": 14803, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117624, + 116500, + 27606, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11286, + "stream": 14806, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117623, + 116426, + 27609, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11448, + "stream": 14968, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117513, + 116284, + 72858, + 138214, + 73283, + 72576, + 72053, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 10, + 15, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11527, + "stream": 15047, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117462, + 113059, + 61334, + 60886, + 0 + ], + "old_dimensions": [ + 3, + 6, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11529, + "stream": 15049, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117461, + 113007, + 59713, + 59265, + 0 + ], + "old_dimensions": [ + 3, + 6, + 17, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11538, + "stream": 15058, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117453, + 116283, + 138214, + 72305, + 0 + ], + "old_dimensions": [ + 3, + 5, + 10, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11539, + "stream": 15059, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117453, + 108684, + 72696, + 27983, + 0 + ], + "old_dimensions": [ + 3, + 16, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11555, + "stream": 15075, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117442, + 116352, + 27936, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11557, + "stream": 15077, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117441, + 116283, + 107971, + 27851, + 0 + ], + "old_dimensions": [ + 3, + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11558, + "stream": 15078, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117441, + 116278, + 27939, + 0 + ], + "old_dimensions": [ + 3, + 5, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11632, + "stream": 15152, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117390, + 116062, + 68020, + 138367, + 68449, + 67738, + 67201, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 10, + 15, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11634, + "stream": 15154, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117389, + 115988, + 66402, + 138418, + 66831, + 66120, + 65583, + 0 + ], + "old_dimensions": [ + 3, + 5, + 8, + 10, + 15, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11709, + "stream": 15229, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117340, + 61294, + 61291, + 61282, + 60978, + 29205, + 3169, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11711, + "stream": 15231, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117339, + 59673, + 59670, + 59661, + 59357, + 29203, + 3170, + 0 + ], + "old_dimensions": [ + 3, + 15, + 17, + 19, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11824, + "stream": 15344, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117262, + 34408, + 34379, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11825, + "stream": 15345, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117261, + 34250, + 34221, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11828, + "stream": 15348, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117258, + 116061, + 138367, + 67459, + 0 + ], + "old_dimensions": [ + 3, + 5, + 10, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11830, + "stream": 15350, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117257, + 115987, + 138418, + 65841, + 0 + ], + "old_dimensions": [ + 3, + 5, + 10, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11842, + "stream": 15362, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117250, + 34092, + 34063, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11843, + "stream": 15363, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117249, + 33934, + 33905, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11846, + "stream": 15366, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117246, + 116061, + 107893, + 67580, + 0 + ], + "old_dimensions": [ + 3, + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11849, + "stream": 15369, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117245, + 115987, + 107867, + 65962, + 0 + ], + "old_dimensions": [ + 3, + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11864, + "stream": 15384, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117238, + 33776, + 33747, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11865, + "stream": 15385, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117237, + 33618, + 33589, + 0 + ], + "old_dimensions": [ + 3, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11933, + "stream": 15453, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117194, + 60734, + 31025, + 2129, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11935, + "stream": 15455, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117193, + 59113, + 31023, + 2130, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11937, + "stream": 15457, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117192, + 57476, + 31011, + 2137, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11950, + "stream": 15470, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117182, + 136814, + 60940, + 28995, + 3289, + 0 + ], + "old_dimensions": [ + 3, + 14, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11952, + "stream": 15472, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117181, + 136845, + 59319, + 28993, + 3290, + 0 + ], + "old_dimensions": [ + 3, + 14, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 11955, + "stream": 15475, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117180, + 54206, + 30997, + 2145, + 0 + ], + "old_dimensions": [ + 3, + 21, + 22, + 23, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11962, + "stream": 15482, + "kind": "donor", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117174, + 112152, + 109121, + 106363, + 32189, + 32165, + 0 + ], + "old_dimensions": [ + 3, + 7, + 13, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 0, + "new_paid_entrance_dimensions": [ + 1, + 2 + ] + }, + { + "role": 11963, + "stream": 15483, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 3, + "old_frames": [ + 117173, + 112147, + 109111, + 106353, + 32031, + 32007, + 0 + ], + "old_dimensions": [ + 3, + 7, + 13, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 2 + ] + }, + { + "role": 12233, + "stream": 15753, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 6, + "old_frames": [ + 146888, + 136503, + 77226, + 0 + ], + "old_dimensions": [ + 6, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 5 + ] + }, + { + "role": 12262, + "stream": 15782, + "kind": "pivot", + "line": [ + 2, + 3 + ], + "first_dimension": 6, + "old_frames": [ + 146889, + 136534, + 75635, + 0 + ], + "old_dimensions": [ + 6, + 8, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 5 + ] + }, + { + "role": 12331, + "stream": 15851, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116308, + 111627, + 72305, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12341, + "stream": 15861, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116284, + 108689, + 28093, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12344, + "stream": 15864, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116273, + 72770, + 27983, + 0 + ], + "old_dimensions": [ + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12410, + "stream": 15930, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116097, + 107907, + 67685, + 0 + ], + "old_dimensions": [ + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12418, + "stream": 15938, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116086, + 111495, + 67459, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12428, + "stream": 15948, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116062, + 108587, + 28442, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12439, + "stream": 15959, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116023, + 107881, + 66067, + 0 + ], + "old_dimensions": [ + 5, + 18, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12447, + "stream": 15967, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 116012, + 111451, + 65841, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12457, + "stream": 15977, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115988, + 108553, + 28445, + 0 + ], + "old_dimensions": [ + 5, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12546, + "stream": 16066, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115756, + 138600, + 61040, + 60837, + 0 + ], + "old_dimensions": [ + 5, + 10, + 17, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12547, + "stream": 16067, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115755, + 61453, + 61351, + 0 + ], + "old_dimensions": [ + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12549, + "stream": 16069, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115741, + 61040, + 60997, + 60734, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12550, + "stream": 16070, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115739, + 136814, + 61334, + 61333, + 0 + ], + "old_dimensions": [ + 5, + 14, + 17, + 19, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12575, + "stream": 16095, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115682, + 138651, + 59419, + 59216, + 0 + ], + "old_dimensions": [ + 5, + 10, + 17, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12576, + "stream": 16096, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115681, + 59832, + 59730, + 0 + ], + "old_dimensions": [ + 5, + 17, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12578, + "stream": 16098, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115667, + 59419, + 59376, + 59113, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12579, + "stream": 16099, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115665, + 136845, + 59713, + 59712, + 0 + ], + "old_dimensions": [ + 5, + 14, + 17, + 19, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12607, + "stream": 16127, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115593, + 57782, + 57740, + 57476, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + }, + { + "role": 12665, + "stream": 16185, + "kind": "pivot", + "line": [ + 16, + 17 + ], + "first_dimension": 5, + "old_frames": [ + 115445, + 54513, + 54470, + 54206, + 0 + ], + "old_dimensions": [ + 5, + 17, + 19, + 21, + 24 + ], + "new_initial_dimension": 1, + "new_paid_entrance_dimensions": [ + 4 + ] + } + ], + "candidate_sha256": "ff2539ed56c790545c33a03ce185e49a8132ca9db26c007686deb6a4009b06d6", + "scope": "Compositional changed-stage proof assuming the inherited complete bit decoder and a literal common prefix before any selected helper non-compensation use. The independently checked response matrix, disjoint supports and rational helper paths certify the algebra and paid demand changes. The literal common-cut witness is independently reproduced. Bank allocation and global inherited compiler hypotheses are separate obligations; the scalar payload bound is checked by the companion checker. No upstream code executed." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/charts.json b/research/gen5b-shared-kernels/certificates/kernel72/charts.json new file mode 100644 index 0000000000..e461ce4c7f --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/charts.json @@ -0,0 +1,5371 @@ +{ + "status": "PASS_UNION72_FINAL12_CHANGED_CHARTS", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selection": "union72", + "with_final12": true, + "charts": 176, + "kernel_programs": 158, + "final12_charts": 18, + "first_frame_quotient_demands": 165, + "donor_line_entrance_demands": 93, + "pivot_residual_demands": 72, + "role_chart_uses": [ + { + "kind": "first_frame_quotient", + "role": 8339, + "stream": 11859, + "frame": 119570, + "rank": 2, + "program_id": 0 + }, + { + "kind": "donor_line_entrance", + "role": 8339, + "stream": 11859, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8341, + "stream": 11861, + "frame": 119569, + "rank": 2, + "program_id": 2 + }, + { + "kind": "donor_line_entrance", + "role": 8341, + "stream": 11861, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8359, + "stream": 11879, + "frame": 119558, + "rank": 2, + "program_id": 3 + }, + { + "kind": "donor_line_entrance", + "role": 8359, + "stream": 11879, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8361, + "stream": 11881, + "frame": 119557, + "rank": 2, + "program_id": 4 + }, + { + "kind": "donor_line_entrance", + "role": 8361, + "stream": 11881, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8394, + "stream": 11914, + "frame": 119534, + "rank": 2, + "program_id": 5 + }, + { + "kind": "donor_line_entrance", + "role": 8394, + "stream": 11914, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8412, + "stream": 11932, + "frame": 119522, + "rank": 2, + "program_id": 6 + }, + { + "kind": "donor_line_entrance", + "role": 8412, + "stream": 11932, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8413, + "stream": 11933, + "frame": 119522, + "rank": 2, + "program_id": 6 + }, + { + "kind": "donor_line_entrance", + "role": 8413, + "stream": 11933, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8415, + "stream": 11935, + "frame": 119521, + "rank": 2, + "program_id": 7 + }, + { + "kind": "donor_line_entrance", + "role": 8415, + "stream": 11935, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 8615, + "stream": 12135, + "frame": 119391, + "rank": 2, + "program_id": 8 + }, + { + "kind": "donor_line_entrance", + "role": 8615, + "stream": 12135, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8787, + "stream": 12307, + "frame": 119284, + "rank": 2, + "program_id": 10 + }, + { + "kind": "donor_line_entrance", + "role": 8787, + "stream": 12307, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8789, + "stream": 12309, + "frame": 119283, + "rank": 2, + "program_id": 11 + }, + { + "kind": "donor_line_entrance", + "role": 8789, + "stream": 12309, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8862, + "stream": 12382, + "frame": 119234, + "rank": 2, + "program_id": 12 + }, + { + "kind": "donor_line_entrance", + "role": 8862, + "stream": 12382, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8864, + "stream": 12384, + "frame": 119233, + "rank": 2, + "program_id": 13 + }, + { + "kind": "donor_line_entrance", + "role": 8864, + "stream": 12384, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8891, + "stream": 12411, + "frame": 119214, + "rank": 2, + "program_id": 14 + }, + { + "kind": "donor_line_entrance", + "role": 8891, + "stream": 12411, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8894, + "stream": 12414, + "frame": 119213, + "rank": 2, + "program_id": 15 + }, + { + "kind": "donor_line_entrance", + "role": 8894, + "stream": 12414, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8901, + "stream": 12421, + "frame": 119210, + "rank": 2, + "program_id": 16 + }, + { + "kind": "donor_line_entrance", + "role": 8901, + "stream": 12421, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 8903, + "stream": 12423, + "frame": 119209, + "rank": 2, + "program_id": 17 + }, + { + "kind": "donor_line_entrance", + "role": 8903, + "stream": 12423, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 9175, + "stream": 12695, + "frame": 119024, + "rank": 2, + "program_id": 18 + }, + { + "kind": "donor_line_entrance", + "role": 9175, + "stream": 12695, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9177, + "stream": 12697, + "frame": 119023, + "rank": 2, + "program_id": 19 + }, + { + "kind": "donor_line_entrance", + "role": 9177, + "stream": 12697, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9193, + "stream": 12713, + "frame": 119012, + "rank": 2, + "program_id": 20 + }, + { + "kind": "donor_line_entrance", + "role": 9193, + "stream": 12713, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9195, + "stream": 12715, + "frame": 119011, + "rank": 2, + "program_id": 21 + }, + { + "kind": "donor_line_entrance", + "role": 9195, + "stream": 12715, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9211, + "stream": 12731, + "frame": 119000, + "rank": 2, + "program_id": 22 + }, + { + "kind": "donor_line_entrance", + "role": 9211, + "stream": 12731, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9213, + "stream": 12733, + "frame": 118999, + "rank": 2, + "program_id": 23 + }, + { + "kind": "donor_line_entrance", + "role": 9213, + "stream": 12733, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9228, + "stream": 12748, + "frame": 118988, + "rank": 2, + "program_id": 24 + }, + { + "kind": "donor_line_entrance", + "role": 9228, + "stream": 12748, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9229, + "stream": 12749, + "frame": 118988, + "rank": 2, + "program_id": 24 + }, + { + "kind": "donor_line_entrance", + "role": 9229, + "stream": 12749, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9230, + "stream": 12750, + "frame": 118987, + "rank": 2, + "program_id": 25 + }, + { + "kind": "donor_line_entrance", + "role": 9230, + "stream": 12750, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9247, + "stream": 12767, + "frame": 118976, + "rank": 2, + "program_id": 26 + }, + { + "kind": "donor_line_entrance", + "role": 9247, + "stream": 12767, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9267, + "stream": 12787, + "frame": 118962, + "rank": 2, + "program_id": 27 + }, + { + "kind": "donor_line_entrance", + "role": 9267, + "stream": 12787, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9269, + "stream": 12789, + "frame": 118961, + "rank": 2, + "program_id": 28 + }, + { + "kind": "donor_line_entrance", + "role": 9269, + "stream": 12789, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9346, + "stream": 12866, + "frame": 118908, + "rank": 2, + "program_id": 29 + }, + { + "kind": "donor_line_entrance", + "role": 9346, + "stream": 12866, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9347, + "stream": 12867, + "frame": 118907, + "rank": 2, + "program_id": 31 + }, + { + "kind": "donor_line_entrance", + "role": 9347, + "stream": 12867, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9353, + "stream": 12873, + "frame": 118904, + "rank": 2, + "program_id": 32 + }, + { + "kind": "donor_line_entrance", + "role": 9353, + "stream": 12873, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9355, + "stream": 12875, + "frame": 118903, + "rank": 2, + "program_id": 33 + }, + { + "kind": "pivot_residual", + "role": 9355, + "stream": 12875, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 9402, + "stream": 12922, + "frame": 118870, + "rank": 2, + "program_id": 35 + }, + { + "kind": "donor_line_entrance", + "role": 9402, + "stream": 12922, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9403, + "stream": 12923, + "frame": 118869, + "rank": 2, + "program_id": 36 + }, + { + "kind": "donor_line_entrance", + "role": 9403, + "stream": 12923, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9691, + "stream": 13211, + "frame": 118678, + "rank": 2, + "program_id": 37 + }, + { + "kind": "donor_line_entrance", + "role": 9691, + "stream": 13211, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 9693, + "stream": 13213, + "frame": 118677, + "rank": 2, + "program_id": 38 + }, + { + "kind": "donor_line_entrance", + "role": 9693, + "stream": 13213, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 9719, + "stream": 13239, + "frame": 118658, + "rank": 2, + "program_id": 39 + }, + { + "kind": "donor_line_entrance", + "role": 9719, + "stream": 13239, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 9722, + "stream": 13242, + "frame": 118657, + "rank": 2, + "program_id": 40 + }, + { + "kind": "donor_line_entrance", + "role": 9722, + "stream": 13242, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 9726, + "stream": 13246, + "frame": 118656, + "rank": 2, + "program_id": 41 + }, + { + "kind": "pivot_residual", + "role": 9726, + "stream": 13246, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 9729, + "stream": 13249, + "frame": 118654, + "rank": 2, + "program_id": 42 + }, + { + "kind": "pivot_residual", + "role": 9729, + "stream": 13249, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 9790, + "stream": 13310, + "frame": 118610, + "rank": 2, + "program_id": 43 + }, + { + "kind": "donor_line_entrance", + "role": 9790, + "stream": 13310, + "rank": 1, + "program_id": 30 + }, + { + "kind": "first_frame_quotient", + "role": 9793, + "stream": 13313, + "frame": 118608, + "rank": 2, + "program_id": 44 + }, + { + "kind": "pivot_residual", + "role": 9793, + "stream": 13313, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 9845, + "stream": 13365, + "frame": 118572, + "rank": 2, + "program_id": 45 + }, + { + "kind": "donor_line_entrance", + "role": 9845, + "stream": 13365, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9847, + "stream": 13367, + "frame": 118571, + "rank": 2, + "program_id": 46 + }, + { + "kind": "donor_line_entrance", + "role": 9847, + "stream": 13367, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9863, + "stream": 13383, + "frame": 118560, + "rank": 2, + "program_id": 47 + }, + { + "kind": "donor_line_entrance", + "role": 9863, + "stream": 13383, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9865, + "stream": 13385, + "frame": 118559, + "rank": 2, + "program_id": 48 + }, + { + "kind": "donor_line_entrance", + "role": 9865, + "stream": 13385, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9881, + "stream": 13401, + "frame": 118548, + "rank": 2, + "program_id": 49 + }, + { + "kind": "donor_line_entrance", + "role": 9881, + "stream": 13401, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9883, + "stream": 13403, + "frame": 118547, + "rank": 2, + "program_id": 50 + }, + { + "kind": "pivot_residual", + "role": 9883, + "stream": 13403, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 9898, + "stream": 13418, + "frame": 118536, + "rank": 2, + "program_id": 52 + }, + { + "kind": "donor_line_entrance", + "role": 9898, + "stream": 13418, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9916, + "stream": 13436, + "frame": 118524, + "rank": 2, + "program_id": 53 + }, + { + "kind": "donor_line_entrance", + "role": 9916, + "stream": 13436, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9935, + "stream": 13455, + "frame": 118512, + "rank": 2, + "program_id": 54 + }, + { + "kind": "donor_line_entrance", + "role": 9935, + "stream": 13455, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 9937, + "stream": 13457, + "frame": 118511, + "rank": 2, + "program_id": 55 + }, + { + "kind": "donor_line_entrance", + "role": 9937, + "stream": 13457, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10115, + "stream": 13635, + "frame": 118393, + "rank": 2, + "program_id": 56 + }, + { + "kind": "donor_line_entrance", + "role": 10115, + "stream": 13635, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10275, + "stream": 13795, + "frame": 118286, + "rank": 2, + "program_id": 57 + }, + { + "kind": "donor_line_entrance", + "role": 10275, + "stream": 13795, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10277, + "stream": 13797, + "frame": 118285, + "rank": 2, + "program_id": 58 + }, + { + "kind": "pivot_residual", + "role": 10277, + "stream": 13797, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 10350, + "stream": 13870, + "frame": 118236, + "rank": 2, + "program_id": 60 + }, + { + "kind": "donor_line_entrance", + "role": 10350, + "stream": 13870, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10352, + "stream": 13872, + "frame": 118235, + "rank": 2, + "program_id": 61 + }, + { + "kind": "donor_line_entrance", + "role": 10352, + "stream": 13872, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10379, + "stream": 13899, + "frame": 118216, + "rank": 2, + "program_id": 62 + }, + { + "kind": "donor_line_entrance", + "role": 10379, + "stream": 13899, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10382, + "stream": 13902, + "frame": 118215, + "rank": 2, + "program_id": 63 + }, + { + "kind": "pivot_residual", + "role": 10382, + "stream": 13902, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 10532, + "stream": 14052, + "frame": 118114, + "rank": 2, + "program_id": 64 + }, + { + "kind": "donor_line_entrance", + "role": 10532, + "stream": 14052, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10534, + "stream": 14054, + "frame": 118113, + "rank": 2, + "program_id": 65 + }, + { + "kind": "pivot_residual", + "role": 10534, + "stream": 14054, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10623, + "stream": 14143, + "frame": 118055, + "rank": 2, + "program_id": 66 + }, + { + "kind": "donor_line_entrance", + "role": 10623, + "stream": 14143, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10733, + "stream": 14253, + "frame": 117982, + "rank": 2, + "program_id": 67 + }, + { + "kind": "donor_line_entrance", + "role": 10733, + "stream": 14253, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10740, + "stream": 14260, + "frame": 117976, + "rank": 2, + "program_id": 68 + }, + { + "kind": "donor_line_entrance", + "role": 10740, + "stream": 14260, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10741, + "stream": 14261, + "frame": 117975, + "rank": 2, + "program_id": 69 + }, + { + "kind": "pivot_residual", + "role": 10741, + "stream": 14261, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10751, + "stream": 14271, + "frame": 117970, + "rank": 2, + "program_id": 70 + }, + { + "kind": "donor_line_entrance", + "role": 10751, + "stream": 14271, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10758, + "stream": 14278, + "frame": 117964, + "rank": 2, + "program_id": 71 + }, + { + "kind": "donor_line_entrance", + "role": 10758, + "stream": 14278, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10759, + "stream": 14279, + "frame": 117963, + "rank": 2, + "program_id": 72 + }, + { + "kind": "pivot_residual", + "role": 10759, + "stream": 14279, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10764, + "stream": 14284, + "frame": 117960, + "rank": 2, + "program_id": 73 + }, + { + "kind": "pivot_residual", + "role": 10764, + "stream": 14284, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10766, + "stream": 14286, + "frame": 117959, + "rank": 2, + "program_id": 74 + }, + { + "kind": "pivot_residual", + "role": 10766, + "stream": 14286, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10782, + "stream": 14302, + "frame": 117948, + "rank": 2, + "program_id": 75 + }, + { + "kind": "donor_line_entrance", + "role": 10782, + "stream": 14302, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10783, + "stream": 14303, + "frame": 117948, + "rank": 2, + "program_id": 75 + }, + { + "kind": "donor_line_entrance", + "role": 10783, + "stream": 14303, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10784, + "stream": 14304, + "frame": 117947, + "rank": 2, + "program_id": 76 + }, + { + "kind": "donor_line_entrance", + "role": 10784, + "stream": 14304, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10785, + "stream": 14305, + "frame": 117947, + "rank": 2, + "program_id": 76 + }, + { + "kind": "pivot_residual", + "role": 10785, + "stream": 14305, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 10812, + "stream": 14332, + "frame": 117928, + "rank": 2, + "program_id": 77 + }, + { + "kind": "pivot_residual", + "role": 10812, + "stream": 14332, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10813, + "stream": 14333, + "frame": 117927, + "rank": 2, + "program_id": 78 + }, + { + "kind": "pivot_residual", + "role": 10813, + "stream": 14333, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10830, + "stream": 14350, + "frame": 117916, + "rank": 2, + "program_id": 79 + }, + { + "kind": "pivot_residual", + "role": 10830, + "stream": 14350, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10831, + "stream": 14351, + "frame": 117915, + "rank": 2, + "program_id": 80 + }, + { + "kind": "pivot_residual", + "role": 10831, + "stream": 14351, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10836, + "stream": 14356, + "frame": 117912, + "rank": 2, + "program_id": 81 + }, + { + "kind": "pivot_residual", + "role": 10836, + "stream": 14356, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10838, + "stream": 14358, + "frame": 117911, + "rank": 2, + "program_id": 82 + }, + { + "kind": "pivot_residual", + "role": 10838, + "stream": 14358, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10859, + "stream": 14379, + "frame": 117898, + "rank": 2, + "program_id": 83 + }, + { + "kind": "donor_line_entrance", + "role": 10859, + "stream": 14379, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10861, + "stream": 14381, + "frame": 117897, + "rank": 2, + "program_id": 84 + }, + { + "kind": "donor_line_entrance", + "role": 10861, + "stream": 14381, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10877, + "stream": 14397, + "frame": 117886, + "rank": 2, + "program_id": 85 + }, + { + "kind": "pivot_residual", + "role": 10877, + "stream": 14397, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10879, + "stream": 14399, + "frame": 117885, + "rank": 2, + "program_id": 86 + }, + { + "kind": "pivot_residual", + "role": 10879, + "stream": 14399, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10884, + "stream": 14404, + "frame": 117880, + "rank": 2, + "program_id": 87 + }, + { + "kind": "pivot_residual", + "role": 10884, + "stream": 14404, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10885, + "stream": 14405, + "frame": 117879, + "rank": 2, + "program_id": 88 + }, + { + "kind": "pivot_residual", + "role": 10885, + "stream": 14405, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10887, + "stream": 14407, + "frame": 117878, + "rank": 2, + "program_id": 89 + }, + { + "kind": "donor_line_entrance", + "role": 10887, + "stream": 14407, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 10890, + "stream": 14410, + "frame": 117877, + "rank": 2, + "program_id": 90 + }, + { + "kind": "pivot_residual", + "role": 10890, + "stream": 14410, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 10892, + "stream": 14412, + "frame": 117876, + "rank": 2, + "program_id": 91 + }, + { + "kind": "pivot_residual", + "role": 10892, + "stream": 14412, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10894, + "stream": 14414, + "frame": 117875, + "rank": 2, + "program_id": 92 + }, + { + "kind": "pivot_residual", + "role": 10894, + "stream": 14414, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10910, + "stream": 14430, + "frame": 117864, + "rank": 2, + "program_id": 93 + }, + { + "kind": "donor_line_entrance", + "role": 10910, + "stream": 14430, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10911, + "stream": 14431, + "frame": 117864, + "rank": 2, + "program_id": 93 + }, + { + "kind": "donor_line_entrance", + "role": 10911, + "stream": 14431, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10915, + "stream": 14435, + "frame": 117862, + "rank": 2, + "program_id": 94 + }, + { + "kind": "donor_line_entrance", + "role": 10915, + "stream": 14435, + "rank": 1, + "program_id": 1 + }, + { + "kind": "first_frame_quotient", + "role": 10922, + "stream": 14442, + "frame": 117856, + "rank": 2, + "program_id": 95 + }, + { + "kind": "pivot_residual", + "role": 10922, + "stream": 14442, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10928, + "stream": 14448, + "frame": 117852, + "rank": 2, + "program_id": 96 + }, + { + "kind": "pivot_residual", + "role": 10928, + "stream": 14448, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10929, + "stream": 14449, + "frame": 117852, + "rank": 2, + "program_id": 96 + }, + { + "kind": "pivot_residual", + "role": 10929, + "stream": 14449, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10940, + "stream": 14460, + "frame": 117844, + "rank": 2, + "program_id": 97 + }, + { + "kind": "pivot_residual", + "role": 10940, + "stream": 14460, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10941, + "stream": 14461, + "frame": 117843, + "rank": 2, + "program_id": 98 + }, + { + "kind": "pivot_residual", + "role": 10941, + "stream": 14461, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10946, + "stream": 14466, + "frame": 117838, + "rank": 2, + "program_id": 99 + }, + { + "kind": "pivot_residual", + "role": 10946, + "stream": 14466, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10950, + "stream": 14470, + "frame": 117836, + "rank": 2, + "program_id": 100 + }, + { + "kind": "pivot_residual", + "role": 10950, + "stream": 14470, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 10952, + "stream": 14472, + "frame": 117835, + "rank": 2, + "program_id": 101 + }, + { + "kind": "pivot_residual", + "role": 10952, + "stream": 14472, + "rank": 23, + "program_id": 51 + }, + { + "kind": "first_frame_quotient", + "role": 11006, + "stream": 14526, + "frame": 117801, + "rank": 2, + "program_id": 102 + }, + { + "kind": "donor_line_entrance", + "role": 11006, + "stream": 14526, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11007, + "stream": 14527, + "frame": 117801, + "rank": 2, + "program_id": 102 + }, + { + "kind": "donor_line_entrance", + "role": 11007, + "stream": 14527, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11168, + "stream": 14688, + "frame": 117694, + "rank": 2, + "program_id": 103 + }, + { + "kind": "donor_line_entrance", + "role": 11168, + "stream": 14688, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11169, + "stream": 14689, + "frame": 117694, + "rank": 2, + "program_id": 103 + }, + { + "kind": "donor_line_entrance", + "role": 11169, + "stream": 14689, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11170, + "stream": 14690, + "frame": 117694, + "rank": 2, + "program_id": 103 + }, + { + "kind": "donor_line_entrance", + "role": 11170, + "stream": 14690, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11171, + "stream": 14691, + "frame": 117693, + "rank": 2, + "program_id": 104 + }, + { + "kind": "pivot_residual", + "role": 11171, + "stream": 14691, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11172, + "stream": 14692, + "frame": 117693, + "rank": 2, + "program_id": 104 + }, + { + "kind": "pivot_residual", + "role": 11172, + "stream": 14692, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11173, + "stream": 14693, + "frame": 117693, + "rank": 2, + "program_id": 104 + }, + { + "kind": "pivot_residual", + "role": 11173, + "stream": 14693, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11255, + "stream": 14775, + "frame": 117644, + "rank": 2, + "program_id": 105 + }, + { + "kind": "donor_line_entrance", + "role": 11255, + "stream": 14775, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11257, + "stream": 14777, + "frame": 117643, + "rank": 2, + "program_id": 106 + }, + { + "kind": "pivot_residual", + "role": 11257, + "stream": 14777, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11283, + "stream": 14803, + "frame": 117624, + "rank": 2, + "program_id": 107 + }, + { + "kind": "donor_line_entrance", + "role": 11283, + "stream": 14803, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11286, + "stream": 14806, + "frame": 117623, + "rank": 2, + "program_id": 108 + }, + { + "kind": "pivot_residual", + "role": 11286, + "stream": 14806, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11448, + "stream": 14968, + "frame": 117513, + "rank": 2, + "program_id": 109 + }, + { + "kind": "donor_line_entrance", + "role": 11448, + "stream": 14968, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11527, + "stream": 15047, + "frame": 117462, + "rank": 2, + "program_id": 110 + }, + { + "kind": "donor_line_entrance", + "role": 11527, + "stream": 15047, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11529, + "stream": 15049, + "frame": 117461, + "rank": 2, + "program_id": 111 + }, + { + "kind": "donor_line_entrance", + "role": 11529, + "stream": 15049, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11538, + "stream": 15058, + "frame": 117453, + "rank": 2, + "program_id": 112 + }, + { + "kind": "donor_line_entrance", + "role": 11538, + "stream": 15058, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11539, + "stream": 15059, + "frame": 117453, + "rank": 2, + "program_id": 112 + }, + { + "kind": "donor_line_entrance", + "role": 11539, + "stream": 15059, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11555, + "stream": 15075, + "frame": 117442, + "rank": 2, + "program_id": 113 + }, + { + "kind": "donor_line_entrance", + "role": 11555, + "stream": 15075, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11557, + "stream": 15077, + "frame": 117441, + "rank": 2, + "program_id": 114 + }, + { + "kind": "donor_line_entrance", + "role": 11557, + "stream": 15077, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11558, + "stream": 15078, + "frame": 117441, + "rank": 2, + "program_id": 114 + }, + { + "kind": "pivot_residual", + "role": 11558, + "stream": 15078, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11632, + "stream": 15152, + "frame": 117390, + "rank": 2, + "program_id": 115 + }, + { + "kind": "donor_line_entrance", + "role": 11632, + "stream": 15152, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11634, + "stream": 15154, + "frame": 117389, + "rank": 2, + "program_id": 116 + }, + { + "kind": "pivot_residual", + "role": 11634, + "stream": 15154, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11709, + "stream": 15229, + "frame": 117340, + "rank": 2, + "program_id": 117 + }, + { + "kind": "donor_line_entrance", + "role": 11709, + "stream": 15229, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11711, + "stream": 15231, + "frame": 117339, + "rank": 2, + "program_id": 118 + }, + { + "kind": "pivot_residual", + "role": 11711, + "stream": 15231, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11824, + "stream": 15344, + "frame": 117262, + "rank": 2, + "program_id": 119 + }, + { + "kind": "donor_line_entrance", + "role": 11824, + "stream": 15344, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11825, + "stream": 15345, + "frame": 117261, + "rank": 2, + "program_id": 120 + }, + { + "kind": "pivot_residual", + "role": 11825, + "stream": 15345, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11828, + "stream": 15348, + "frame": 117258, + "rank": 2, + "program_id": 121 + }, + { + "kind": "donor_line_entrance", + "role": 11828, + "stream": 15348, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11830, + "stream": 15350, + "frame": 117257, + "rank": 2, + "program_id": 122 + }, + { + "kind": "pivot_residual", + "role": 11830, + "stream": 15350, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11842, + "stream": 15362, + "frame": 117250, + "rank": 2, + "program_id": 123 + }, + { + "kind": "donor_line_entrance", + "role": 11842, + "stream": 15362, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11843, + "stream": 15363, + "frame": 117249, + "rank": 2, + "program_id": 124 + }, + { + "kind": "pivot_residual", + "role": 11843, + "stream": 15363, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11846, + "stream": 15366, + "frame": 117246, + "rank": 2, + "program_id": 125 + }, + { + "kind": "donor_line_entrance", + "role": 11846, + "stream": 15366, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11849, + "stream": 15369, + "frame": 117245, + "rank": 2, + "program_id": 126 + }, + { + "kind": "pivot_residual", + "role": 11849, + "stream": 15369, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11864, + "stream": 15384, + "frame": 117238, + "rank": 2, + "program_id": 127 + }, + { + "kind": "donor_line_entrance", + "role": 11864, + "stream": 15384, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11865, + "stream": 15385, + "frame": 117237, + "rank": 2, + "program_id": 128 + }, + { + "kind": "pivot_residual", + "role": 11865, + "stream": 15385, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11933, + "stream": 15453, + "frame": 117194, + "rank": 2, + "program_id": 129 + }, + { + "kind": "donor_line_entrance", + "role": 11933, + "stream": 15453, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11935, + "stream": 15455, + "frame": 117193, + "rank": 2, + "program_id": 130 + }, + { + "kind": "pivot_residual", + "role": 11935, + "stream": 15455, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11937, + "stream": 15457, + "frame": 117192, + "rank": 2, + "program_id": 131 + }, + { + "kind": "donor_line_entrance", + "role": 11937, + "stream": 15457, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11950, + "stream": 15470, + "frame": 117182, + "rank": 2, + "program_id": 132 + }, + { + "kind": "pivot_residual", + "role": 11950, + "stream": 15470, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11952, + "stream": 15472, + "frame": 117181, + "rank": 2, + "program_id": 133 + }, + { + "kind": "pivot_residual", + "role": 11952, + "stream": 15472, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 11955, + "stream": 15475, + "frame": 117180, + "rank": 2, + "program_id": 134 + }, + { + "kind": "donor_line_entrance", + "role": 11955, + "stream": 15475, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11962, + "stream": 15482, + "frame": 117174, + "rank": 2, + "program_id": 135 + }, + { + "kind": "donor_line_entrance", + "role": 11962, + "stream": 15482, + "rank": 1, + "program_id": 9 + }, + { + "kind": "first_frame_quotient", + "role": 11963, + "stream": 15483, + "frame": 117173, + "rank": 2, + "program_id": 136 + }, + { + "kind": "pivot_residual", + "role": 11963, + "stream": 15483, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12233, + "stream": 15753, + "frame": 146888, + "rank": 5, + "program_id": 137 + }, + { + "kind": "pivot_residual", + "role": 12233, + "stream": 15753, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 12262, + "stream": 15782, + "frame": 146889, + "rank": 5, + "program_id": 138 + }, + { + "kind": "pivot_residual", + "role": 12262, + "stream": 15782, + "rank": 23, + "program_id": 34 + }, + { + "kind": "first_frame_quotient", + "role": 12331, + "stream": 15851, + "frame": 116308, + "rank": 4, + "program_id": 139 + }, + { + "kind": "pivot_residual", + "role": 12331, + "stream": 15851, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12341, + "stream": 15861, + "frame": 116284, + "rank": 4, + "program_id": 140 + }, + { + "kind": "pivot_residual", + "role": 12341, + "stream": 15861, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12344, + "stream": 15864, + "frame": 116273, + "rank": 4, + "program_id": 141 + }, + { + "kind": "pivot_residual", + "role": 12344, + "stream": 15864, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12410, + "stream": 15930, + "frame": 116097, + "rank": 4, + "program_id": 142 + }, + { + "kind": "pivot_residual", + "role": 12410, + "stream": 15930, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12418, + "stream": 15938, + "frame": 116086, + "rank": 4, + "program_id": 143 + }, + { + "kind": "pivot_residual", + "role": 12418, + "stream": 15938, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12428, + "stream": 15948, + "frame": 116062, + "rank": 4, + "program_id": 144 + }, + { + "kind": "pivot_residual", + "role": 12428, + "stream": 15948, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12439, + "stream": 15959, + "frame": 116023, + "rank": 4, + "program_id": 145 + }, + { + "kind": "pivot_residual", + "role": 12439, + "stream": 15959, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12447, + "stream": 15967, + "frame": 116012, + "rank": 4, + "program_id": 146 + }, + { + "kind": "pivot_residual", + "role": 12447, + "stream": 15967, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12457, + "stream": 15977, + "frame": 115988, + "rank": 4, + "program_id": 147 + }, + { + "kind": "pivot_residual", + "role": 12457, + "stream": 15977, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12546, + "stream": 16066, + "frame": 115756, + "rank": 4, + "program_id": 148 + }, + { + "kind": "pivot_residual", + "role": 12546, + "stream": 16066, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12547, + "stream": 16067, + "frame": 115755, + "rank": 4, + "program_id": 149 + }, + { + "kind": "pivot_residual", + "role": 12547, + "stream": 16067, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12549, + "stream": 16069, + "frame": 115741, + "rank": 4, + "program_id": 150 + }, + { + "kind": "pivot_residual", + "role": 12549, + "stream": 16069, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12550, + "stream": 16070, + "frame": 115739, + "rank": 4, + "program_id": 151 + }, + { + "kind": "pivot_residual", + "role": 12550, + "stream": 16070, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12575, + "stream": 16095, + "frame": 115682, + "rank": 4, + "program_id": 152 + }, + { + "kind": "pivot_residual", + "role": 12575, + "stream": 16095, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12576, + "stream": 16096, + "frame": 115681, + "rank": 4, + "program_id": 153 + }, + { + "kind": "pivot_residual", + "role": 12576, + "stream": 16096, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12578, + "stream": 16098, + "frame": 115667, + "rank": 4, + "program_id": 154 + }, + { + "kind": "pivot_residual", + "role": 12578, + "stream": 16098, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12579, + "stream": 16099, + "frame": 115665, + "rank": 4, + "program_id": 155 + }, + { + "kind": "pivot_residual", + "role": 12579, + "stream": 16099, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12607, + "stream": 16127, + "frame": 115593, + "rank": 4, + "program_id": 156 + }, + { + "kind": "pivot_residual", + "role": 12607, + "stream": 16127, + "rank": 23, + "program_id": 59 + }, + { + "kind": "first_frame_quotient", + "role": 12665, + "stream": 16185, + "frame": 115445, + "rank": 4, + "program_id": 157 + }, + { + "kind": "pivot_residual", + "role": 12665, + "stream": 16185, + "rank": 23, + "program_id": 59 + } + ], + "max_changed_chart_factors": 489, + "max_factor_numerator": 390, + "max_factor_denominator": 540, + "retained_chart_factor_bound": 576, + "combined_normalizer_factor_bound": 815, + "literal_stock": 1229555, + "selector_calls_bound": 905994092400, + "scope": "Every changed union72 first-frame quotient, donor line entrance and rank23 pivot residual is bound to an exactly factored weighted chart; final12 charts are included. Unchanged chart admission and finite-compiler interfaces remain inherited.", + "chart_summaries": [ + { + "program_id": 0, + "kind": "first_frame_quotient", + "frame": 119570, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 466, + "max_numerator": 195, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "9dc4af1bdc8673ff6fedfe8e84b7f10d62bdd5554bd201ea9eb087d13fd1be5d" + }, + { + "program_id": 1, + "kind": "donor_line_entrance", + "line": [ + 6, + 7 + ], + "residual_rank": 1, + "completion_rank": 23, + "determinant": "2", + "count": 25, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "4197b7e963a1a5fe18abcec8d178d6a38e13a0404f9f7bbe4bef93b3e39c1017" + }, + { + "program_id": 2, + "kind": "first_frame_quotient", + "frame": 119569, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 465, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "9060388a578d65ef331de566286090d14438e47c0f967b63dcbd66bb33c1148e" + }, + { + "program_id": 3, + "kind": "first_frame_quotient", + "frame": 119558, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 464, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "bf9858858d62c0d2671f5ebc9309da2f1f68432efbd16efcd604aea7c7a5d18d" + }, + { + "program_id": 4, + "kind": "first_frame_quotient", + "frame": 119557, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 463, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "7e95644c9426088dfedbc3e75c373d38b6e78f1dfca66ea82aad7a289587cec0" + }, + { + "program_id": 5, + "kind": "first_frame_quotient", + "frame": 119534, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 460, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "cc8d0f1aa4ce46ed361617be467a88100a140cbbceb8e3fa8fab6b3e9289856f" + }, + { + "program_id": 6, + "kind": "first_frame_quotient", + "frame": 119522, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 457, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "9cd0e62061aa794d5df1e1bfa25fe5fc4a69b31334bee29c7739fd6f4482a864" + }, + { + "program_id": 7, + "kind": "first_frame_quotient", + "frame": 119521, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 456, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "463663376efdabeea4cbe56729ca7bb2a2995a87af17098d023d1ee1acf802e6" + }, + { + "program_id": 8, + "kind": "first_frame_quotient", + "frame": 119391, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 489, + "max_numerator": 255, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "4d0e6f31c36850f71e50f66f4fb423a186cca695bdeae50999157c768ef0425c" + }, + { + "program_id": 9, + "kind": "donor_line_entrance", + "line": [ + 16, + 17 + ], + "residual_rank": 1, + "completion_rank": 23, + "determinant": "2", + "count": 25, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "4a3d8e5e61c45cd9b302285de8bd00cf60b20e005a46c78533598c9960218347" + }, + { + "program_id": 10, + "kind": "first_frame_quotient", + "frame": 119284, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 483, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "1770a50ccc15b5202f98581b11af48c61de62744450af6ba3e4f86222bcb294d" + }, + { + "program_id": 11, + "kind": "first_frame_quotient", + "frame": 119283, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 481, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "11ef9bbc855f4b975e7c423228bd49ff693fdb60d7c1a855ebd1b3de1c80680b" + }, + { + "program_id": 12, + "kind": "first_frame_quotient", + "frame": 119234, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 460, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "a985c0d1408caa62db3e747ad2a073ff0185dc4b9b76d824f456a29fe184912f" + }, + { + "program_id": 13, + "kind": "first_frame_quotient", + "frame": 119233, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 459, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b34470adbf20c855c794b64ac60c790931649f2b029531f094cc7255d7a93e2f" + }, + { + "program_id": 14, + "kind": "first_frame_quotient", + "frame": 119214, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 358, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "4ad732da73d4dae71c7bdc82cfc0df442452c4197d0a887718b69d0f6d7ca651" + }, + { + "program_id": 15, + "kind": "first_frame_quotient", + "frame": 119213, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 359, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "fae717d5625421e7ea369ab02d02d1d607da9d8aa240bd9935845221250e118f" + }, + { + "program_id": 16, + "kind": "first_frame_quotient", + "frame": 119210, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 455, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "35d1bd9e4583ccfc7967ca7fc12f3f124c49a4d5057cbfd20dc71405845cc420" + }, + { + "program_id": 17, + "kind": "first_frame_quotient", + "frame": 119209, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 454, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "5c006b189d371c68400f9ab533bce70fc1ebda357fd4c5e6dd385b213e4e5f2a" + }, + { + "program_id": 18, + "kind": "first_frame_quotient", + "frame": 119024, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 468, + "max_numerator": 195, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "4c19943cab3beb5aab153ebcf98547c046497f3b356b69b21c9289173a54fc81" + }, + { + "program_id": 19, + "kind": "first_frame_quotient", + "frame": 119023, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 467, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "206eca104a131cc93bc2505d3af5fec0390c413c4a7c4ef2a8fb8abe1ca2a719" + }, + { + "program_id": 20, + "kind": "first_frame_quotient", + "frame": 119012, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 466, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "726804da3feb733ef0cdcd617010e365a272f29d50e39fd24aa2d777de33ae93" + }, + { + "program_id": 21, + "kind": "first_frame_quotient", + "frame": 119011, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 465, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "33a4c223adede19f3e5b4885cd265bedcba0b1f8b69099233b22f9d4cbc411ee" + }, + { + "program_id": 22, + "kind": "first_frame_quotient", + "frame": 119000, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 464, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "738ea73a9fcf561a545b56b13e3a5842ee5a251091365eaf929aa2f66508f6be" + }, + { + "program_id": 23, + "kind": "first_frame_quotient", + "frame": 118999, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 461, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "a62351460bb421c14a50852130f6d3d7d0753c38ee34dc4f24cdbac01bcfbeb2" + }, + { + "program_id": 24, + "kind": "first_frame_quotient", + "frame": 118988, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 462, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "a7bf762a42386a952aa441726c43d2a2191ca37d9ac8e2bee43601b774eb10f1" + }, + { + "program_id": 25, + "kind": "first_frame_quotient", + "frame": 118987, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 461, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "265def1e019f3b3dc7835955ef574ca58331a9c095d052b5a1d4f8e173e3d8b8" + }, + { + "program_id": 26, + "kind": "first_frame_quotient", + "frame": 118976, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 459, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "88fed89d6151221dc405c5a7f7534d24f748b86e751fb92fdff310d6b68b2c46" + }, + { + "program_id": 27, + "kind": "first_frame_quotient", + "frame": 118962, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 457, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "6bffb33c0fd7f97eecd852f7b0aa9bc5d4e50adfb48c776ce4041b5fb4b08873" + }, + { + "program_id": 28, + "kind": "first_frame_quotient", + "frame": 118961, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 456, + "max_numerator": 195, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "19223051048bb8a8cb1a2c9229c5508eed385cad1fb150f09b12952b6e652cbe" + }, + { + "program_id": 29, + "kind": "first_frame_quotient", + "frame": 118908, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 389, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "d84c77ef254faa62a7ec78b6672b597f48076ee3c9003fde2c0363ab8480f1d0" + }, + { + "program_id": 30, + "kind": "donor_line_entrance", + "line": [ + 2, + 3 + ], + "residual_rank": 1, + "completion_rank": 23, + "determinant": "2", + "count": 25, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "d1fa99795a2df038de598bb5398dc0192c34420f897028b7b677b3486d0ae3ae" + }, + { + "program_id": 31, + "kind": "first_frame_quotient", + "frame": 118907, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 389, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "090e8eeae7630b4a2aff79b223212252622e868fbd5fd5da3c12960814be834a" + }, + { + "program_id": 32, + "kind": "first_frame_quotient", + "frame": 118904, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 489, + "max_numerator": 390, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "4eeb8b38efd515280eb3f19bf546f4a68d4d20f4cb4ba5d5300171396bf73620" + }, + { + "program_id": 33, + "kind": "first_frame_quotient", + "frame": 118903, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 488, + "max_numerator": 345, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "bd2fdc549eed036c880cefab7c44eb1ab1142574341ab5e387caa390d9fe2ce0" + }, + { + "program_id": 34, + "kind": "pivot_residual", + "line": [ + 2, + 3 + ], + "residual_rank": 23, + "completion_rank": 1, + "determinant": "-2", + "count": 23, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "1df8fc59ef423a041f42b7eed68ddab27d9fe871308fa2903bb16e68910f54e6" + }, + { + "program_id": 35, + "kind": "first_frame_quotient", + "frame": 118870, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 389, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "274e98a5010f976d42cea5da2ae024ca5c87e2ffdb6453bef2e5b23a0f1b2ad1" + }, + { + "program_id": 36, + "kind": "first_frame_quotient", + "frame": 118869, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 389, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "98f6733fd100b0812a2b30a6f0fcd5e99b06ab1ab82f4dfb8faea00e3542c497" + }, + { + "program_id": 37, + "kind": "first_frame_quotient", + "frame": 118678, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 462, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f33134f33a385c19235f6d38e7e2c4f197905e4922307a05081b9c0278d3c9fd" + }, + { + "program_id": 38, + "kind": "first_frame_quotient", + "frame": 118677, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 461, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8f9121d0914f7eb63d18db6b06eb7a0d80c70d0569a57502b1c4ea1f1557d107" + }, + { + "program_id": 39, + "kind": "first_frame_quotient", + "frame": 118658, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 359, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "613793d2ddd723eb893a58a00d5a4220ac81980b7ce26a7b514ff6461f0b49d3" + }, + { + "program_id": 40, + "kind": "first_frame_quotient", + "frame": 118657, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 379, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "da000ceced6c46f49e1e31d4152b32ddaf1dc9d939bbaf42902120a20d67f915" + }, + { + "program_id": 41, + "kind": "first_frame_quotient", + "frame": 118656, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 482, + "max_numerator": 195, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "b4bda6ab50859da112ba813dbdcd8e013a589b97095e18f32f6cee28863e0d1d" + }, + { + "program_id": 42, + "kind": "first_frame_quotient", + "frame": 118654, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 480, + "max_numerator": 195, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "d9c5766087aa50fc8e50f6044d00941db2388415fe38c1817c745d15d7c8c5b1" + }, + { + "program_id": 43, + "kind": "first_frame_quotient", + "frame": 118610, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 458, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "8756375be64c5b7f09163bdc4d69a128e82e80dbced0e72df892d00e944d7d68" + }, + { + "program_id": 44, + "kind": "first_frame_quotient", + "frame": 118608, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 457, + "max_numerator": 195, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "d7be9abd78f66b0f701e6aeccb1d86618e0c6f146473fca1cf3df26275e60ae6" + }, + { + "program_id": 45, + "kind": "first_frame_quotient", + "frame": 118572, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 430, + "max_numerator": 75, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "e8dc478548f773ee79998e52b9cacc953447238baaeee7100d7049f60aeefa2e" + }, + { + "program_id": 46, + "kind": "first_frame_quotient", + "frame": 118571, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 429, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "1100117fea5ebca8ae6509afa7756aa491c3779f5c1f0b9b8edd08afe9661968" + }, + { + "program_id": 47, + "kind": "first_frame_quotient", + "frame": 118560, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 428, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "e2fa4ab3e17f77d8c0e25d94ea0eb25a9a8be76402e8035f5d72939b8170174a" + }, + { + "program_id": 48, + "kind": "first_frame_quotient", + "frame": 118559, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 427, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "99f89de271ad80b82cbdf82b8498c4ccec20c519bdd999b584ff0870397d4bf8" + }, + { + "program_id": 49, + "kind": "first_frame_quotient", + "frame": 118548, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 426, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "58daad0b8fc76050d2703d8fffe4d455fbaac8228c758e18ddeabe6f1a82147d" + }, + { + "program_id": 50, + "kind": "first_frame_quotient", + "frame": 118547, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 423, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "4673d354a7e123b34311e6991c15aed37f7ba8af3fe71f1740c43c488749d7da" + }, + { + "program_id": 51, + "kind": "pivot_residual", + "line": [ + 6, + 7 + ], + "residual_rank": 23, + "completion_rank": 1, + "determinant": "-2", + "count": 19, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "c212b1bf7e788665ca4ff8d3a78227490877e70cf63714987dc3f40ac4b9020b" + }, + { + "program_id": 52, + "kind": "first_frame_quotient", + "frame": 118536, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 424, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "96a4107ff16dd5b474019e81ad5ef9d84faf0d341f1447f6cdb7cba1a2e4dc12" + }, + { + "program_id": 53, + "kind": "first_frame_quotient", + "frame": 118524, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 421, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "53c46a18344cf806a0ad011a47fafd62f589154c7b6ea87905a01316a92cdf8d" + }, + { + "program_id": 54, + "kind": "first_frame_quotient", + "frame": 118512, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 419, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "af9cd831cc217e85aef9d5bbbcdc0c77891c8c7e7fa2590e94589f9f4743e02e" + }, + { + "program_id": 55, + "kind": "first_frame_quotient", + "frame": 118511, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 418, + "max_numerator": 45, + "max_denominator": 165, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "5ea396dd43b94d8353f1a374037f4d2f0068a84548937ce47403f51cba32d8ac" + }, + { + "program_id": 56, + "kind": "first_frame_quotient", + "frame": 118393, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 453, + "max_numerator": 255, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "4e71c691f084f5ab168d33d1c49bb532dc1840a4e178ab7ebe5b39fa33f29842" + }, + { + "program_id": 57, + "kind": "first_frame_quotient", + "frame": 118286, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 447, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "475da45e8e8db68940ca0ebd0e10995a6422688dd934c862ee638137411f372d" + }, + { + "program_id": 58, + "kind": "first_frame_quotient", + "frame": 118285, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 445, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "40adf8779f52c0b6a7f991966a935bf32cbabc60e9c59f06656a9554995cc883" + }, + { + "program_id": 59, + "kind": "pivot_residual", + "line": [ + 16, + 17 + ], + "residual_rank": 23, + "completion_rank": 1, + "determinant": "-2", + "count": 9, + "max_numerator": 1, + "max_denominator": 2, + "factor_program_sha256": "4f7413a86b21d55cd0e81a444612b7bc95d4c57cda5fb01afa487ca7fd030067" + }, + { + "program_id": 60, + "kind": "first_frame_quotient", + "frame": 118236, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 424, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "4fe2de2b15698b32236f0b9b18ac9018416e78f1f2647d1f4decddeaf6d41343" + }, + { + "program_id": 61, + "kind": "first_frame_quotient", + "frame": 118235, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 423, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "e154cbd440a73ce341c73924c8c01b49741277b2e006927d6cd294186f7b9108" + }, + { + "program_id": 62, + "kind": "first_frame_quotient", + "frame": 118216, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 359, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "e404ea335c18b090b2d9a0636626a34a9fc868d93cc353705c6d5aa61a77c37d" + }, + { + "program_id": 63, + "kind": "first_frame_quotient", + "frame": 118215, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 360, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "c3c6e83b9475d56917fb20eb85b1622cb38c727cb21a2c88a1a7d65bfd8a65b7" + }, + { + "program_id": 64, + "kind": "first_frame_quotient", + "frame": 118114, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 428, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "d9d23ce37bb93ddc352da8eae8447ead5113ef47a613609a75f5c36c1687e491" + }, + { + "program_id": 65, + "kind": "first_frame_quotient", + "frame": 118113, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 427, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "68a26c22ca9392b67e184aa4fa06015ab74c114b2bcd8b7f34045663b5098819" + }, + { + "program_id": 66, + "kind": "first_frame_quotient", + "frame": 118055, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 455, + "max_numerator": 255, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "7fc4da6e8ad5b6ddb9a3c85fcb558d899a2950343f2856856ebf5e9b93a3198c" + }, + { + "program_id": 67, + "kind": "first_frame_quotient", + "frame": 117982, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 428, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "fa6dd6c183fc4adb53637d3ed2832f69a43534a1e996dbb35fbd0327f6378e3b" + }, + { + "program_id": 68, + "kind": "first_frame_quotient", + "frame": 117976, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 75, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "2dd768b483d920c7bc3efab2f9368a70c65b5c8b9b2096f6630d8f3b2db582c7" + }, + { + "program_id": 69, + "kind": "first_frame_quotient", + "frame": 117975, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 75, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "ac1cf0fa5f5d509096c09400a6198e6b51486ddd9bb584b86626cc9b4e3d1d28" + }, + { + "program_id": 70, + "kind": "first_frame_quotient", + "frame": 117970, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 425, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "1cf00dc68f995fd3a5b0d6996258f9f74a9003ee196331234c00ce0af52087c3" + }, + { + "program_id": 71, + "kind": "first_frame_quotient", + "frame": 117964, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 75, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "841daa109948068650730121029162bec52fb4e7b8129be09271f2d3537fae87" + }, + { + "program_id": 72, + "kind": "first_frame_quotient", + "frame": 117963, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 75, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "e8c0d3b808cd5ffc190710e83d351c2efaeef2dc61dfcd2ea78268338d4a7292" + }, + { + "program_id": 73, + "kind": "first_frame_quotient", + "frame": 117960, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 450, + "max_numerator": 210, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "a44dc5df519a8014d3c769e255f4507fecc43f88fd986230dfe9861fa080439a" + }, + { + "program_id": 74, + "kind": "first_frame_quotient", + "frame": 117959, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 449, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "94b4f1923f6299685af2b42afcbd78400618184f593fb54214d58ee54f1e9591" + }, + { + "program_id": 75, + "kind": "first_frame_quotient", + "frame": 117948, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 449, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "d6084c30e4ba4f924c7b195d2168c6533804934edcdf8b2fd7728a8c29b555d1" + }, + { + "program_id": 76, + "kind": "first_frame_quotient", + "frame": 117947, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 447, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b3fb05492c295816aa2f95c88aa7be561d5fa23ee542ed88005342d6a4fe2456" + }, + { + "program_id": 77, + "kind": "first_frame_quotient", + "frame": 117928, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "1ba292b9c49b3c7338aa220e820ee8c23f4aa992f42fa723ed377ba7cd8d95d0" + }, + { + "program_id": 78, + "kind": "first_frame_quotient", + "frame": 117927, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "fd33efee6fd8249dc4e4e5e4ac8d89299a414d57b1026afb1e07b2bec2691d1c" + }, + { + "program_id": 79, + "kind": "first_frame_quotient", + "frame": 117916, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "850e3632631bbf7ce306e5f7549e454aac082592d2d6a74d43b106fb11cca562" + }, + { + "program_id": 80, + "kind": "first_frame_quotient", + "frame": 117915, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "c9f0c7cfcbce2a9d51028507193e9f66d9c3c6d2c16a51a2cfc9808c77b5c34e" + }, + { + "program_id": 81, + "kind": "first_frame_quotient", + "frame": 117912, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 448, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "c36fd947abfbead762df9797ab6c40b3907deb68c3d61b444179bcfac35daffc" + }, + { + "program_id": 82, + "kind": "first_frame_quotient", + "frame": 117911, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 447, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "d250f01a48d0fbd723bb312ec38a60a34126a8f7fb6edc5ddfb1b9981670d48e" + }, + { + "program_id": 83, + "kind": "first_frame_quotient", + "frame": 117898, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 426, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "9026711bbc30872e44bb88334d2a94d568ccc5f057947850b771ccceb787e83d" + }, + { + "program_id": 84, + "kind": "first_frame_quotient", + "frame": 117897, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 425, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "bb0e6e3ad60252e79cb17365fa1d9e6805e2a909f8c1deabf82d3ae04301031e" + }, + { + "program_id": 85, + "kind": "first_frame_quotient", + "frame": 117886, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 425, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "a1fd6212b164398c2b43374f86239cc7a273a79fbcf8a9021ce07bbcbf3c009f" + }, + { + "program_id": 86, + "kind": "first_frame_quotient", + "frame": 117885, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 424, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "39791bfc9f20cbad3325a7b2dc983fdbe770a29e063f6dbdc70328daf980adb0" + }, + { + "program_id": 87, + "kind": "first_frame_quotient", + "frame": 117880, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "37510ed05a074139769a47fc4d884a46845f8df0b81ae88f9f5eb71b48f8d842" + }, + { + "program_id": 88, + "kind": "first_frame_quotient", + "frame": 117879, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 357, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "c68364ad9be49d3b027f6d64765a0bbabdc09180e065009c96f7d19f89c7453d" + }, + { + "program_id": 89, + "kind": "first_frame_quotient", + "frame": 117878, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 359, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f8ba43dae155e72f73e4ec217c09dc6255ee79d40afdecf20ca4eb272cbba8e3" + }, + { + "program_id": 90, + "kind": "first_frame_quotient", + "frame": 117877, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 339, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "e965557173bec4d02acad5e1d59fd3626577a5f7ec77daf75eda5d086a69d9c8" + }, + { + "program_id": 91, + "kind": "first_frame_quotient", + "frame": 117876, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 446, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "8293e7f80658082488c1d9813ab2b7003e9c2a90ec2e0ef1d175047a782c5b42" + }, + { + "program_id": 92, + "kind": "first_frame_quotient", + "frame": 117875, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 444, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "8bc6c27a0b371e479fd34a8173d4a2ad177785b565a3161579a2e3e279a6125f" + }, + { + "program_id": 93, + "kind": "first_frame_quotient", + "frame": 117864, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 442, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "04e4da092d5da431424cf949b678b79db97003ea10142505c69325a61365d685" + }, + { + "program_id": 94, + "kind": "first_frame_quotient", + "frame": 117862, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 424, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "2559ec79242489599f2eab75afb99291e3ec59ae2f7a15e3173620e647f1e419" + }, + { + "program_id": 95, + "kind": "first_frame_quotient", + "frame": 117856, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 356, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "2e93d6d491b228a29a84d96a40dca2f3281b4c1813323c083b411ad909f5eff0" + }, + { + "program_id": 96, + "kind": "first_frame_quotient", + "frame": 117852, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 442, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "2f79a2ccae87f6fcad2128afbfe5a52a8f8a86ae279713877761ccaa3f3b61db" + }, + { + "program_id": 97, + "kind": "first_frame_quotient", + "frame": 117844, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 356, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "86fc97d42a1076e7c48979a5238048ab4e6cc6edec1637470a8fc5ad385c1efb" + }, + { + "program_id": 98, + "kind": "first_frame_quotient", + "frame": 117843, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 356, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "26009ed305649567ad7028d0af54c8064e16337c9eef16fd2124fdae3e0b8905" + }, + { + "program_id": 99, + "kind": "first_frame_quotient", + "frame": 117838, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 440, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "e725da879900b44e69b878e0b3f8b8e120d59498cc094f96bf97c1adf7e32dab" + }, + { + "program_id": 100, + "kind": "first_frame_quotient", + "frame": 117836, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 422, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "5181ccc8f506f1ae000655c45f3a4cbb3bb13e48b3fe18b16e1bc440858713cc" + }, + { + "program_id": 101, + "kind": "first_frame_quotient", + "frame": 117835, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 421, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 6, + 7 + ], + "factor_program_sha256": "020910e1a6ff4e6dca20e43530ddaacfa6feea7844565819f1ecd08301ed246a" + }, + { + "program_id": 102, + "kind": "first_frame_quotient", + "frame": 117801, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 419, + "max_numerator": 255, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "5a780afd5c639767365f2ba14965c5abf840a6433e66de198e3362ad9a457012" + }, + { + "program_id": 103, + "kind": "first_frame_quotient", + "frame": 117694, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 413, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "19b62f944e60491b54f38ed2d0c4ffedd0c79f372f7f636228711c22e468c525" + }, + { + "program_id": 104, + "kind": "first_frame_quotient", + "frame": 117693, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 411, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f0786ee6eafb0f0e4d7c5e78e3149f5fadc4f2550e81a32800e423747cb4dd50" + }, + { + "program_id": 105, + "kind": "first_frame_quotient", + "frame": 117644, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 390, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "ee0327b066f0fdfca9d8f7ad949b51dd7f43ee8f5c52ecbabc7ca3849ed33281" + }, + { + "program_id": 106, + "kind": "first_frame_quotient", + "frame": 117643, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 389, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "34807a00d3c438afe77719708436ea5a98b99be3fe5dde26d25b96396663183f" + }, + { + "program_id": 107, + "kind": "first_frame_quotient", + "frame": 117624, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 340, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "334888bd1e6305d8328814d9fb662bc93e993e257ebaa244d39f75b58a87b1fe" + }, + { + "program_id": 108, + "kind": "first_frame_quotient", + "frame": 117623, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 360, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "924b36448f8962063e8bb370dc0cb16fd9fc66c64d42b166e698ffac2a81dc03" + }, + { + "program_id": 109, + "kind": "first_frame_quotient", + "frame": 117513, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-23941848456573486328125000", + "count": 363, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "2da34df9dea919f999e40e5ba4f2aa2b8cfe06aedf93f0c2096dfb36e55776a3" + }, + { + "program_id": 110, + "kind": "first_frame_quotient", + "frame": 117462, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 352, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8ddb228e1b865c70012154a0b03f0589464645f921b7d5e501a7d8d669d869d2" + }, + { + "program_id": 111, + "kind": "first_frame_quotient", + "frame": 117461, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 351, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "150e3141a217dc6772f2f4f6f44cbe29d25c199702f4d8b56d8d1ac2a7b1a8a9" + }, + { + "program_id": 112, + "kind": "first_frame_quotient", + "frame": 117453, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 341, + "max_numerator": 165, + "max_denominator": 300, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8d3128c91a1c28d34a78ad2d076c42cbc8978f65674a35d5b823b8bf4797d1e1" + }, + { + "program_id": 113, + "kind": "first_frame_quotient", + "frame": 117442, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 340, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8a7e22a69dc91c5926f70979dc80730affef45ea6d5aaf46b9bc782737984c83" + }, + { + "program_id": 114, + "kind": "first_frame_quotient", + "frame": 117441, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 341, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "53fa96636b32e56d02be7b39a3ae79e68d0a8f6ea7249870d2aa6da53df841e5" + }, + { + "program_id": 115, + "kind": "first_frame_quotient", + "frame": 117390, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 377, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "57a9564042b70a631c250b74a7f49b6a731db397f364c7cc24327c187c4fa07e" + }, + { + "program_id": 116, + "kind": "first_frame_quotient", + "frame": 117389, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 375, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "c8fcdb15f6b44e54a08b6a3f94b9fc26cea37731cacf75bee5cbeff1afc5ca4d" + }, + { + "program_id": 117, + "kind": "first_frame_quotient", + "frame": 117340, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 354, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "7b0a6d36e3c87fcabb59df63180b703ccfcf0e4979590783618c0dfde7f73db2" + }, + { + "program_id": 118, + "kind": "first_frame_quotient", + "frame": 117339, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "1596123230438232421875000", + "count": 353, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f9676fbde44d9235d2ce9ced47b37fa7f4f700a2361ef9c5473c3990a95a6039" + }, + { + "program_id": 119, + "kind": "first_frame_quotient", + "frame": 117262, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "fd3e6cecce8bdca5a1cce69c32ef2bbf8b2410de65bfa8fc59ed961ab42faa78" + }, + { + "program_id": 120, + "kind": "first_frame_quotient", + "frame": 117261, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "9296a6018c89bf288b58a5982ba020c57b09124c9d9b4d3e1aff0070babed5e7" + }, + { + "program_id": 121, + "kind": "first_frame_quotient", + "frame": 117258, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 321, + "max_numerator": 165, + "max_denominator": 300, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b14702bb746373d80e6c1acabc43cf07f59914d71e4c7a92b60b9cf6e316833a" + }, + { + "program_id": 122, + "kind": "first_frame_quotient", + "frame": 117257, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 341, + "max_numerator": 165, + "max_denominator": 300, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "db7b4b6d971997e8c58afc6996f7b25294c16bfe98f3241ff7623ddd29c297a5" + }, + { + "program_id": 123, + "kind": "first_frame_quotient", + "frame": 117250, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "ac4a6144f7845bd4be77cf1f1a375dc478eea58a5fa47920dd963b1a7c8f32dd" + }, + { + "program_id": 124, + "kind": "first_frame_quotient", + "frame": 117249, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "de31fb37079b89611cbb66cf6c1aa2751a9c71185a385ab679ceaf269f865240" + }, + { + "program_id": 125, + "kind": "first_frame_quotient", + "frame": 117246, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "47883696913146972656250000", + "count": 321, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "aeaee6258879b36c80edf21b19fbe308ef1a2d9a5856f60933226302e90c3461" + }, + { + "program_id": 126, + "kind": "first_frame_quotient", + "frame": 117245, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-47883696913146972656250000", + "count": 341, + "max_numerator": 315, + "max_denominator": 540, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b040da9b30a988696329bddf8683a18eaca6177de2b2055182b3b1c5f97ef1ba" + }, + { + "program_id": 127, + "kind": "first_frame_quotient", + "frame": 117238, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "003a81f54f83f4e4b4746d432a1d1aab27db0cb4c748c3beeefdcc03855e99a7" + }, + { + "program_id": 128, + "kind": "first_frame_quotient", + "frame": 117237, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 259, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "6a51fbaf2c7b2529c6a8f6dfd33ebfb3d23f1d7bf06077fd622daf712081cf3a" + }, + { + "program_id": 129, + "kind": "first_frame_quotient", + "frame": 117194, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 297, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "140d514de820cc2d7d61a51137934f098dd6c4c87f2417c0778815d3599e076f" + }, + { + "program_id": 130, + "kind": "first_frame_quotient", + "frame": 117193, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 296, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "d1b420072ccf5db29d2540c36f7fd41b51d21a37aae461996595d26e3e20817a" + }, + { + "program_id": 131, + "kind": "first_frame_quotient", + "frame": 117192, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 279, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "8d74b8871fa108c64c87472a76b6e79429f4ddb632daf6da3f0b9b5a7df11e39" + }, + { + "program_id": 132, + "kind": "first_frame_quotient", + "frame": 117182, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 297, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "76067ed3a3fb262d88ad801bc0c5632605fbc03f06fd5dfd28f8e0c6abfe45ec" + }, + { + "program_id": 133, + "kind": "first_frame_quotient", + "frame": 117181, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "3192246460876464843750000", + "count": 296, + "max_numerator": 165, + "max_denominator": 195, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "17716bd071e4a005f17d18f1ed645aa1767a96b78abf80329139bc2c05c77550" + }, + { + "program_id": 134, + "kind": "first_frame_quotient", + "frame": 117180, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-1596123230438232421875000", + "count": 277, + "max_numerator": 165, + "max_denominator": 135, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "648b67850a75bcb52735cb3ed2e2d5afcad1d03294db62ec67e41a44691f45b9" + }, + { + "program_id": 135, + "kind": "first_frame_quotient", + "frame": 117174, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "14187762048339843750000", + "count": 227, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "1a39e3b1b6325c16c377d0d5aebfc601d603eaf37cb08ef3e7f9ca01a01ea5d4" + }, + { + "program_id": 136, + "kind": "first_frame_quotient", + "frame": 117173, + "residual_rank": 2, + "completion_rank": 22, + "determinant": "-14187762048339843750000", + "count": 227, + "max_numerator": 165, + "max_denominator": 45, + "first_dimension": 3, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "ddb41660e6ee38c5b6e34918b8d9e8665aba24fc04ccf020ec4635444051b883" + }, + { + "program_id": 137, + "kind": "first_frame_quotient", + "frame": 146888, + "residual_rank": 5, + "completion_rank": 19, + "determinant": "56751048193359375000000", + "count": 437, + "max_numerator": 180, + "max_denominator": 480, + "first_dimension": 6, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "829b74687e5396aed63376d528c66ab975dfb2023ccf425d48fcc1d4fb802548" + }, + { + "program_id": 138, + "kind": "first_frame_quotient", + "frame": 146889, + "residual_rank": 5, + "completion_rank": 19, + "determinant": "-56751048193359375000000", + "count": 417, + "max_numerator": 180, + "max_denominator": 480, + "first_dimension": 6, + "line": [ + 2, + 3 + ], + "factor_program_sha256": "10468cb771e774df758c46f760473a77dd9e255c2f48b5adb80c506ff4478987" + }, + { + "program_id": 139, + "kind": "first_frame_quotient", + "frame": 116308, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "86d4f72b296a957c5b329179d1c5f21ad1bde187da6eff320b68951f6a11593a" + }, + { + "program_id": 140, + "kind": "first_frame_quotient", + "frame": 116284, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "-53204107681274414062500", + "count": 307, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "969a06e453377f664d54c8102589585b9232078b2e10e12384d51777d531faed" + }, + { + "program_id": 141, + "kind": "first_frame_quotient", + "frame": 116273, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "-53204107681274414062500", + "count": 266, + "max_numerator": 135, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "180646b54b6be3aa8f8d3af7dc29a8a7166ca6fb629bf12aedd702e4708d51e3" + }, + { + "program_id": 142, + "kind": "first_frame_quotient", + "frame": 116097, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "27af37cfbe40a70ca04aa18d730c55d9ba18542d764787200f76f245d51cd663" + }, + { + "program_id": 143, + "kind": "first_frame_quotient", + "frame": 116086, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "cea12bfab489a461ad754be83cea01be95e8f6d9e75f8f1671882157c5c90ea1" + }, + { + "program_id": 144, + "kind": "first_frame_quotient", + "frame": 116062, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 389, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "4ce9f55b5ae4f65c93b7e871cd613a8fb3f1827d44be3769cd1b9e23bf3c67f2" + }, + { + "program_id": 145, + "kind": "first_frame_quotient", + "frame": 116023, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "4ecd0c8e00fd8a02be01bbce2addc7f34907017a0ea7234b660a25d458086cbb" + }, + { + "program_id": 146, + "kind": "first_frame_quotient", + "frame": 116012, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "40a085b219fea5a22d7883b4f8175f9a11ee9f2c1cbe46c5bf243a68959a3d4c" + }, + { + "program_id": 147, + "kind": "first_frame_quotient", + "frame": 115988, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 389, + "max_numerator": 225, + "max_denominator": 450, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "67c76775632545286a5031f39f65e9e932923b99af07c743f359a0e138259843" + }, + { + "program_id": 148, + "kind": "first_frame_quotient", + "frame": 115756, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 135, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "1b49ce903b2a006d67a09b078ebe358fb8045f7b0fba4d5835e1937f9e855367" + }, + { + "program_id": 149, + "kind": "first_frame_quotient", + "frame": 115755, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "159612323043823242187500", + "count": 323, + "max_numerator": 180, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "b2e877a2415ac7cc5b3db61e886a7d61dc3c39ef9ede1f791dcf7d95656bab46" + }, + { + "program_id": 150, + "kind": "first_frame_quotient", + "frame": 115741, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "e92a0d032372033fa2528427e7ce113fba39790393aa71143271d0e0c6f422d8" + }, + { + "program_id": 151, + "kind": "first_frame_quotient", + "frame": 115739, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "-159612323043823242187500", + "count": 308, + "max_numerator": 255, + "max_denominator": 390, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "e70846b9cd027de204b1d21e5acbab6e6c5476f4b2225a85958c26839ebbbcdb" + }, + { + "program_id": 152, + "kind": "first_frame_quotient", + "frame": 115682, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 385, + "max_numerator": 135, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "6ea71ee829dfb85ed16eb7940866b5227e0131b167c2711dd627c289a2488433" + }, + { + "program_id": 153, + "kind": "first_frame_quotient", + "frame": 115681, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "159612323043823242187500", + "count": 323, + "max_numerator": 180, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "d43580ca7fb0040a51352e8eacf644e364f3b584f1e45b2636eec88b0f8b12ea" + }, + { + "program_id": 154, + "kind": "first_frame_quotient", + "frame": 115667, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "af466d8c45a4f94e847bab3409d4ae2e712859fdeb882616a7d29f8280693f14" + }, + { + "program_id": 155, + "kind": "first_frame_quotient", + "frame": 115665, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "-159612323043823242187500", + "count": 307, + "max_numerator": 255, + "max_denominator": 390, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "f7c50bece4403584650e4b070ce447a53960f7f9533d3baaca609c25041fea28" + }, + { + "program_id": 156, + "kind": "first_frame_quotient", + "frame": 115593, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 300, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "2a6195a407f59f710beadea4d8d2b9f9af876a3b4c334e5bec03f7dfeec73486" + }, + { + "program_id": 157, + "kind": "first_frame_quotient", + "frame": 115445, + "residual_rank": 4, + "completion_rank": 20, + "determinant": "53204107681274414062500", + "count": 469, + "max_numerator": 195, + "max_denominator": 81, + "first_dimension": 5, + "line": [ + 16, + 17 + ], + "factor_program_sha256": "bd35a0f0a0386c3d9c6760def9c689682a192c9d70a75e3f3fbf1ce311eed2d5" + }, + { + "kind": "new_rank2", + "role": 15813, + "determinant": "131621703842267136", + "count": 141, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 158, + "scope": "final12", + "factor_program_sha256": "1c01f577339983a903cb1155db3847f7bf5408a078c8c799844862ac01fbb51f" + }, + { + "kind": "new_rank2", + "role": 15815, + "determinant": "131621703842267136", + "count": 142, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 159, + "scope": "final12", + "factor_program_sha256": "748bd5b711ecaa9b887c24affef4c79cdac7af188dece2c9b6af58a597698c83" + }, + { + "kind": "new_rank2", + "role": 15821, + "determinant": "131621703842267136", + "count": 132, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 160, + "scope": "final12", + "factor_program_sha256": "16db7e02856d784732aa3d9954d27047558e3a09564900c2ae3b9cc222e82503" + }, + { + "kind": "new_rank2", + "role": 15823, + "determinant": "131621703842267136", + "count": 133, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 161, + "scope": "final12", + "factor_program_sha256": "c0691c249deee7020dad5d2f5c6896fa99dbc34b45270a127eb3cce1d3a56204" + }, + { + "kind": "new_rank2", + "role": 15828, + "determinant": "-131621703842267136", + "count": 139, + "max_numerator": 11, + "max_denominator": 6, + "program_id": 162, + "scope": "final12", + "factor_program_sha256": "37e56760c6a4cde1efcb0f39703e491630d4baae6fb3c807d641a8ceab57ac4f" + }, + { + "kind": "new_rank2", + "role": 15829, + "determinant": "131621703842267136", + "count": 139, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 163, + "scope": "final12", + "factor_program_sha256": "3d14a85d83b25b743dfdf48fe676d3d55512344466e6ba5c3c9bc1ca3872bfbd" + }, + { + "kind": "new_rank2", + "role": 15830, + "determinant": "-131621703842267136", + "count": 140, + "max_numerator": 11, + "max_denominator": 6, + "program_id": 164, + "scope": "final12", + "factor_program_sha256": "4c8f5a2f5c11c33df104297c2c15d659e67af0d9f35474b4583f97c6d33bcb37" + }, + { + "kind": "new_rank2", + "role": 15831, + "determinant": "131621703842267136", + "count": 140, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 165, + "scope": "final12", + "factor_program_sha256": "3359f7b745c9de748bf83d8425ff5e3c49411f76a92a6ed3c1de7d3e95d56aec" + }, + { + "kind": "new_rank2", + "role": 15836, + "determinant": "-131621703842267136", + "count": 137, + "max_numerator": 11, + "max_denominator": 6, + "program_id": 166, + "scope": "final12", + "factor_program_sha256": "dbbe84e50bac1e4c935734883b75fb8b3ee488c8f49fb11d3391dad7b5ba12b5" + }, + { + "kind": "new_rank2", + "role": 15837, + "determinant": "131621703842267136", + "count": 137, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 167, + "scope": "final12", + "factor_program_sha256": "1049cae5e30061da14d716a24cdbbc6b0c220126b8daa75ebd0ea989ffabd776" + }, + { + "kind": "new_rank2", + "role": 15838, + "determinant": "-131621703842267136", + "count": 138, + "max_numerator": 11, + "max_denominator": 6, + "program_id": 168, + "scope": "final12", + "factor_program_sha256": "a4566308c131e7c8a1fffb27361cf17087e5773416738dbf1d2ef7024094d7bc" + }, + { + "kind": "new_rank2", + "role": 15839, + "determinant": "131621703842267136", + "count": 138, + "max_numerator": 11, + "max_denominator": 8, + "program_id": 169, + "scope": "final12", + "factor_program_sha256": "85962bd14637498df8f74140816ebff93862a9bf4f18d1e0b2331d3f22e03616" + }, + { + "kind": "reverted_rank4", + "role": 15329, + "determinant": "-36", + "count": 106, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 170, + "scope": "final12", + "factor_program_sha256": "de932dcf21dfeaa7f1c93cb6a932e353de96d3e0261356cd26141eac45903481" + }, + { + "kind": "reverted_rank4", + "role": 15349, + "determinant": "-36", + "count": 96, + "max_numerator": 4, + "max_denominator": 9, + "program_id": 171, + "scope": "final12", + "factor_program_sha256": "96786bdb129df734d2b6f7c4d30111b73426a0979b0de902d46436c650c5908d" + }, + { + "kind": "reverted_rank4", + "role": 15369, + "determinant": "-36", + "count": 98, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 172, + "scope": "final12", + "factor_program_sha256": "dfd454c1f52338a66123df3be7b46ae8819eba2863578fe8c4765f4667c48d50" + }, + { + "kind": "reverted_rank4", + "role": 15379, + "determinant": "-36", + "count": 98, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 173, + "scope": "final12", + "factor_program_sha256": "7180a6da9bf8668d16cc7f0b2324435c8dd8e27b435adf26b785a6ea2ef73b43" + }, + { + "kind": "reverted_rank4", + "role": 15389, + "determinant": "-36", + "count": 90, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 174, + "scope": "final12", + "factor_program_sha256": "34fb8662289be9a0709819f0005371639f76f27da8161886973fce7b2ecdbdb0" + }, + { + "kind": "reverted_rank4", + "role": 15399, + "determinant": "-36", + "count": 90, + "max_numerator": 4, + "max_denominator": 6, + "program_id": 175, + "scope": "final12", + "factor_program_sha256": "85f1b05841c93c188eaea4f00cc3027df85c2e032094a056d34ccaf2978b6eab" + } + ] +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/composition.json b/research/gen5b-shared-kernels/certificates/kernel72/composition.json new file mode 100644 index 0000000000..5b45c14bd6 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/composition.json @@ -0,0 +1,860 @@ +{ + "status": "PASS_ROLE_DISJOINT_PR300_COMPOSITION", + "source_head": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "baseline_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "id_space": "pre-sink18954 streams", + "new_descent_gate_count": 89, + "distinct_new_descent_helper_streams": 154, + "all_new_descent_operands_helpers": true, + "category_counts": { + "30": 2, + "12": 87 + }, + "rational_new_frame_ranks_and_nondegeneracy_checked": 89, + "unchanged_restore_entries": 440, + "unchanged_sink_entries": 7, + "final12_changed_frame_streams": 60, + "final12_broader_scalar_closure": 84, + "kernel72_streams": 165, + "descent2_overlap_final12": [], + "descent2_overlap_kernel72": [], + "paid_ledgers_additive": true, + "combined_local_histogram_delta_over299": { + "1": 155, + "2": 280, + "3": -222, + "4": -29, + "5": 7, + "6": -2, + "7": -47, + "8": -2, + "9": 24, + "11": -1, + "12": -24, + "14": 24, + "16": -1, + "17": 1, + "18": -38, + "19": 39 + }, + "combined_local_rank_drop": 78, + "final12_and_kernel72_source_response_unchanged": true, + "common_kernel_cut_and_final_restore_order_unchanged": true, + "scalar_majorants_unchanged_by_descent2": true, + "source_operand_columns_unchanged_by_new_kernel": true, + "proofs": { + "frame": "Every descent2 event and every affected per-role MOVE partition belongs to a helper disjoint from the full local-surgery role closure and new kernel members. Thus both modifications preserve each other's chronological frame path and their paid histogram differences add exactly.", + "scalar": "Descent2 preserves the scalar/COPY order and coefficients. Consequently final12's complete suffix identity and the new kernel's response relations/cut/restore identity remain unchanged. Inserting new kernel setup before every source injection changes only dirty columns, so each inherited old operand's source-column span remains identical over the integers.", + "prefix": "Descent2 changes only87 helper forward-gate frames and2 old kernel-setup frames. It neither changes initial dirty-read/source-injection ordering nor touches new kernel helpers. Its changed old kernel setups use disjoint helper support.", + "endpoints": "All440 restoration entries and all7 sink entries are semantically identical to299; changed input hashes and shifted raw record indices do not change their selected operators or endpoint bases." + }, + "matched_scalar_events": [ + { + "record": 614073, + "kind": "old_kernel_setup", + "streams": [ + 16639, + 16635 + ] + }, + { + "record": 614371, + "kind": "old_kernel_setup", + "streams": [ + 16711, + 16707 + ] + }, + { + "record": 686889, + "kind": "forward_gate", + "op": 22572, + "streams": [ + 12222, + 4901 + ] + }, + { + "record": 686891, + "kind": "forward_gate", + "op": 22573, + "streams": [ + 16432, + 12222 + ] + }, + { + "record": 686975, + "kind": "forward_gate", + "op": 22621, + "streams": [ + 12224, + 4911 + ] + }, + { + "record": 686977, + "kind": "forward_gate", + "op": 22622, + "streams": [ + 16436, + 12224 + ] + }, + { + "record": 687063, + "kind": "forward_gate", + "op": 22670, + "streams": [ + 13054, + 6161 + ] + }, + { + "record": 687065, + "kind": "forward_gate", + "op": 22671, + "streams": [ + 16440, + 13054 + ] + }, + { + "record": 687150, + "kind": "forward_gate", + "op": 22719, + "streams": [ + 13056, + 6171 + ] + }, + { + "record": 687152, + "kind": "forward_gate", + "op": 22720, + "streams": [ + 16444, + 13056 + ] + }, + { + "record": 687237, + "kind": "forward_gate", + "op": 22768, + "streams": [ + 13718, + 7169 + ] + }, + { + "record": 687239, + "kind": "forward_gate", + "op": 22769, + "streams": [ + 16448, + 13718 + ] + }, + { + "record": 687324, + "kind": "forward_gate", + "op": 22817, + "streams": [ + 13720, + 7179 + ] + }, + { + "record": 687326, + "kind": "forward_gate", + "op": 22818, + "streams": [ + 16452, + 13720 + ] + }, + { + "record": 687411, + "kind": "forward_gate", + "op": 22866, + "streams": [ + 14226, + 7953 + ] + }, + { + "record": 687413, + "kind": "forward_gate", + "op": 22867, + "streams": [ + 16456, + 14226 + ] + }, + { + "record": 687497, + "kind": "forward_gate", + "op": 22915, + "streams": [ + 14228, + 7963 + ] + }, + { + "record": 687499, + "kind": "forward_gate", + "op": 22916, + "streams": [ + 16460, + 14228 + ] + }, + { + "record": 687584, + "kind": "forward_gate", + "op": 22964, + "streams": [ + 14610, + 8541 + ] + }, + { + "record": 687586, + "kind": "forward_gate", + "op": 22965, + "streams": [ + 16464, + 14610 + ] + }, + { + "record": 687670, + "kind": "forward_gate", + "op": 23013, + "streams": [ + 14612, + 8551 + ] + }, + { + "record": 687672, + "kind": "forward_gate", + "op": 23014, + "streams": [ + 16468, + 14612 + ] + }, + { + "record": 687758, + "kind": "forward_gate", + "op": 23062, + "streams": [ + 14894, + 8961 + ] + }, + { + "record": 687760, + "kind": "forward_gate", + "op": 23063, + "streams": [ + 16472, + 14894 + ] + }, + { + "record": 687845, + "kind": "forward_gate", + "op": 23111, + "streams": [ + 14896, + 8971 + ] + }, + { + "record": 687847, + "kind": "forward_gate", + "op": 23112, + "streams": [ + 16476, + 14896 + ] + }, + { + "record": 687933, + "kind": "forward_gate", + "op": 23160, + "streams": [ + 14898, + 9241 + ] + }, + { + "record": 687935, + "kind": "forward_gate", + "op": 23161, + "streams": [ + 16480, + 14898 + ] + }, + { + "record": 688020, + "kind": "forward_gate", + "op": 23209, + "streams": [ + 14900, + 9251 + ] + }, + { + "record": 688022, + "kind": "forward_gate", + "op": 23210, + "streams": [ + 16484, + 14900 + ] + }, + { + "record": 688107, + "kind": "forward_gate", + "op": 23258, + "streams": [ + 14970, + 9409 + ] + }, + { + "record": 688109, + "kind": "forward_gate", + "op": 23259, + "streams": [ + 16488, + 14970 + ] + }, + { + "record": 688193, + "kind": "forward_gate", + "op": 23307, + "streams": [ + 14972, + 9419 + ] + }, + { + "record": 688195, + "kind": "forward_gate", + "op": 23308, + "streams": [ + 16492, + 14972 + ] + }, + { + "record": 688280, + "kind": "forward_gate", + "op": 23356, + "streams": [ + 14974, + 9417 + ] + }, + { + "record": 688282, + "kind": "forward_gate", + "op": 23357, + "streams": [ + 16496, + 14974 + ] + }, + { + "record": 688366, + "kind": "forward_gate", + "op": 23405, + "streams": [ + 14976, + 9425 + ] + }, + { + "record": 688368, + "kind": "forward_gate", + "op": 23406, + "streams": [ + 16500, + 14976 + ] + }, + { + "record": 688454, + "kind": "forward_gate", + "op": 23454, + "streams": [ + 14992, + 9401 + ] + }, + { + "record": 688456, + "kind": "forward_gate", + "op": 23455, + "streams": [ + 16504, + 14992 + ] + }, + { + "record": 688541, + "kind": "forward_gate", + "op": 23503, + "streams": [ + 14994, + 9405 + ] + }, + { + "record": 688543, + "kind": "forward_gate", + "op": 23504, + "streams": [ + 16508, + 14994 + ] + }, + { + "record": 688628, + "kind": "forward_gate", + "op": 23552, + "streams": [ + 15010, + 9429 + ] + }, + { + "record": 688630, + "kind": "forward_gate", + "op": 23553, + "streams": [ + 16512, + 15010 + ] + }, + { + "record": 688715, + "kind": "forward_gate", + "op": 23601, + "streams": [ + 15012, + 9433 + ] + }, + { + "record": 688717, + "kind": "forward_gate", + "op": 23602, + "streams": [ + 16516, + 15012 + ] + }, + { + "record": 688803, + "kind": "forward_gate", + "op": 23650, + "streams": [ + 15028, + 9457 + ] + }, + { + "record": 688805, + "kind": "forward_gate", + "op": 23651, + "streams": [ + 16520, + 15028 + ] + }, + { + "record": 688889, + "kind": "forward_gate", + "op": 23699, + "streams": [ + 15030, + 9461 + ] + }, + { + "record": 688891, + "kind": "forward_gate", + "op": 23700, + "streams": [ + 16524, + 15030 + ] + }, + { + "record": 695015, + "kind": "forward_gate", + "op": 26229, + "streams": [ + 16642, + 5077 + ] + }, + { + "record": 695215, + "kind": "forward_gate", + "op": 26312, + "streams": [ + 16646, + 5085 + ] + }, + { + "record": 695415, + "kind": "forward_gate", + "op": 26395, + "streams": [ + 16650, + 5061 + ] + }, + { + "record": 695613, + "kind": "forward_gate", + "op": 26478, + "streams": [ + 16654, + 5065 + ] + }, + { + "record": 695758, + "kind": "forward_gate", + "op": 26536, + "streams": [ + 16656, + 13977 + ] + }, + { + "record": 695815, + "kind": "forward_gate", + "op": 26561, + "streams": [ + 16658, + 5089 + ] + }, + { + "record": 695959, + "kind": "forward_gate", + "op": 26619, + "streams": [ + 16660, + 13979 + ] + }, + { + "record": 696016, + "kind": "forward_gate", + "op": 26644, + "streams": [ + 16662, + 5093 + ] + }, + { + "record": 696160, + "kind": "forward_gate", + "op": 26702, + "streams": [ + 16664, + 13981 + ] + }, + { + "record": 696360, + "kind": "forward_gate", + "op": 26785, + "streams": [ + 16668, + 13983 + ] + }, + { + "record": 696435, + "kind": "forward_gate", + "op": 26818, + "streams": [ + 16671, + 4085 + ] + }, + { + "record": 696559, + "kind": "forward_gate", + "op": 26868, + "streams": [ + 16672, + 13999 + ] + }, + { + "record": 696635, + "kind": "forward_gate", + "op": 26901, + "streams": [ + 16675, + 4109 + ] + }, + { + "record": 696759, + "kind": "forward_gate", + "op": 26951, + "streams": [ + 16676, + 14001 + ] + }, + { + "record": 696835, + "kind": "forward_gate", + "op": 26984, + "streams": [ + 16679, + 4113 + ] + }, + { + "record": 696958, + "kind": "forward_gate", + "op": 27034, + "streams": [ + 16680, + 14017 + ] + }, + { + "record": 697016, + "kind": "forward_gate", + "op": 27059, + "streams": [ + 16682, + 5173 + ] + }, + { + "record": 697035, + "kind": "forward_gate", + "op": 27067, + "streams": [ + 16683, + 4137 + ] + }, + { + "record": 697157, + "kind": "forward_gate", + "op": 27117, + "streams": [ + 16684, + 14019 + ] + }, + { + "record": 697214, + "kind": "forward_gate", + "op": 27142, + "streams": [ + 16686, + 5177 + ] + }, + { + "record": 697233, + "kind": "forward_gate", + "op": 27150, + "streams": [ + 16687, + 4141 + ] + }, + { + "record": 697358, + "kind": "forward_gate", + "op": 27200, + "streams": [ + 16688, + 14035 + ] + }, + { + "record": 697415, + "kind": "forward_gate", + "op": 27225, + "streams": [ + 16690, + 5201 + ] + }, + { + "record": 697558, + "kind": "forward_gate", + "op": 27283, + "streams": [ + 16692, + 14037 + ] + }, + { + "record": 697615, + "kind": "forward_gate", + "op": 27308, + "streams": [ + 16694, + 5205 + ] + }, + { + "record": 697758, + "kind": "forward_gate", + "op": 27366, + "streams": [ + 16696, + 14053 + ] + }, + { + "record": 697816, + "kind": "forward_gate", + "op": 27391, + "streams": [ + 16698, + 5229 + ] + }, + { + "record": 697956, + "kind": "forward_gate", + "op": 27449, + "streams": [ + 16700, + 14055 + ] + }, + { + "record": 698013, + "kind": "forward_gate", + "op": 27474, + "streams": [ + 16702, + 5233 + ] + }, + { + "record": 698157, + "kind": "forward_gate", + "op": 27532, + "streams": [ + 16704, + 14071 + ] + }, + { + "record": 698214, + "kind": "forward_gate", + "op": 27557, + "streams": [ + 16706, + 5257 + ] + }, + { + "record": 698357, + "kind": "forward_gate", + "op": 27615, + "streams": [ + 16708, + 14073 + ] + }, + { + "record": 698414, + "kind": "forward_gate", + "op": 27640, + "streams": [ + 16710, + 5261 + ] + }, + { + "record": 698557, + "kind": "forward_gate", + "op": 27698, + "streams": [ + 16712, + 14089 + ] + }, + { + "record": 698615, + "kind": "forward_gate", + "op": 27723, + "streams": [ + 16714, + 5285 + ] + }, + { + "record": 698634, + "kind": "forward_gate", + "op": 27731, + "streams": [ + 16715, + 4249 + ] + }, + { + "record": 698757, + "kind": "forward_gate", + "op": 27781, + "streams": [ + 16716, + 14091 + ] + }, + { + "record": 698814, + "kind": "forward_gate", + "op": 27806, + "streams": [ + 16718, + 5289 + ] + }, + { + "record": 698832, + "kind": "forward_gate", + "op": 27814, + "streams": [ + 16719, + 4253 + ] + } + ], + "input_sha256": { + "pr300/descent2-selection.json": "5f947e418285a776d5c7170c07f1befcc44e626e53e6825f06c80a8c81b7a755", + "pr300/expected/kernel-pins.json": "5421d38c4624a5d05b8936fa86f490ee0e932e9e6fe7c6a24defd9b7c671cf4e", + "pr300/portable_bit.py": "93b2c72a63cf24b991a7cc0f35de4da016a245c58f45c1551fe888d5412a73a4", + "pr300/restore-selection.json": "aa85e17b5ff9e849f0decce611a9cc61f697e23aaeea87a7580084535e7f3e07", + "pr300/sink-selection.json": "cadc2c1e3975a3103bbd55992428b686950b4f13987f59146b527f86cebf639f" + }, + "scope": "A changed-stage composition certificate, conditional on the admitted PR300 descent2/source contracts. It independently matches all89 scalar events, checks rational frame rank/nondegeneracy and proves support disjointness; it does not rerun PR300's complete physical producer, source-span admission, all-size compiler or unified finite/bank assembly. No upstream program was executed." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/finite-bill.json b/research/gen5b-shared-kernels/certificates/kernel72/finite-bill.json new file mode 100644 index 0000000000..3a1ff5c7e0 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/finite-bill.json @@ -0,0 +1,91 @@ +{ + "status": "PASS_UNIFIED_KERNEL72_FINAL12_FINITE_OBLIGATIONS_UNDER_RETAINED_INTERFACES", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selection": "union72", + "with_final12": true, + "gross_added_scalar_events_per_stage": 946, + "omitted_reads_not_credited": 832, + "scalar_weighted_additions_upper": 217342800, + "scalar_unit_additions_upper": 218398800, + "literal_children": 28987800, + "literal_rank_mass": 147282600, + "literal_stock": 1229555, + "route_families": 11790600, + "changed_chart_programs": 176, + "changed_role_chart_uses": 330, + "pivot_residual_demands": 72, + "max_changed_chart_factors": 489, + "max_changed_chart_numerator": 390, + "max_changed_chart_denominator": 540, + "normalizer_factor_bound": 815, + "bank_selector_calls": 905994092400, + "displayed_finite_coefficient": 90435658164483601, + "coefficient_bits": 57, + "retained_coefficient_cap_bits": 80, + "sink_aware_forward_norm": 158647, + "sink_aware_inverse_norm": 3809875, + "conservative_payload_upper": 3709343221562739318443143000000, + "payload_bits": 102, + "retained_payload_cap_bits": 104, + "actual_sink_redirects": 14, + "target_majorant_edges": 681, + "target_majorant_acyclic_vertices": 908, + "new_bank_block_scalars_up_to": 60, + "scalar_unit_reason": "All chart factor numerators and denominators, and every block+1 scalar, are nonzero and smaller than the retained prime characteristic q>2^80.", + "bad_fallback_per_child": 460800, + "internal_row_coefficient": 14401, + "external_row_coefficient": 20161, + "ordinary_degree_gap": "23971789/25", + "delta_tau_lower": "3386810281644564901035805085014933112087173010663/2401474609375000000000000000000000000000000000000000000000000000000", + "delta_linear": "85937499565183/48029492187500000", + "bootstrap_chain": [ + "384599/10000000000", + "749945844325726351902845225189711/1000000000000000000000000000000000000", + "750479800440563450884264785497766069952493954840087/1000000000000000000000000000000000000000000000000000000", + "750480201164056087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "bootstrap_gaps": [ + { + "stage": 1, + "slacks": { + "atom": "534357139290648097154774810289/1000000000000000000000000000000000000", + "borrowing": "998499573954209256648097154774810289/1000000000000000000000000000000000000", + "remainder": "998499602817602756972504473074810289/1000000000000000000000000000000000000", + "stock": "999249519798534983/1000000000000000000" + }, + "minimum": "534357139290648097154774810289/1000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 126077987671493 + }, + { + "stage": 2, + "slacks": { + "atom": "401024453549115735214502233930047506045159913/1000000000000000000000000000000000000000000000000000000", + "borrowing": "998499039998094419549115735214502233930047506045159913/1000000000000000000000000000000000000000000000000000000", + "remainder": "998499602817602756972504473074810289/1000000000000000000000000000000000000", + "stock": "999249519798534983/1000000000000000000" + }, + "minimum": "401024453549115735214502233930047506045159913/1000000000000000000000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 223851902285465857654 + }, + { + "stage": 3, + "slacks": { + "atom": "300960912691938728652091566477013257591769227703984640263521/1000000000000000000000000000000000000000000000000000000000000000000000000", + "borrowing": "998499039597370926912691938728652091566477013257591769227703984640263521/1000000000000000000000000000000000000000000000000000000000000000000000000", + "remainder": "998499602817602756972504473074810289/1000000000000000000000000000000000000", + "stock": "999249519798534983/1000000000000000000" + }, + "minimum": "300960912691938728652091566477013257591769227703984640263521/1000000000000000000000000000000000000000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 397449825162080515280296586 + } + ], + "cutoff_scope": "Displayed fixed bill only. The retained theorem rule uses C_full, including inherited primitive, wrapper and earlier ordinary-level constants, whose values are not supplied or replaced by this check.", + "inherited_assumptions": [ + "Pinned PR299 full unchanged bit decoder, original scalar bounds and stage admission.", + "Retained weighted-chart, prime-field, routing, cover, bank-normalizer and finite-compiler contracts.", + "Inherited setup, primitive, wrapper and earlier ordinary-level constants inside C_full.", + "Inherited all-size theorem and outer positive literal-gap and row-gap interfaces." + ], + "full_inherited_admission_replayed": false, + "all_size_theorem_verified": false +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/norm.json b/research/gen5b-shared-kernels/certificates/kernel72/norm.json new file mode 100644 index 0000000000..935f7447b6 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/norm.json @@ -0,0 +1,32 @@ +{ + "status": "PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS", + "selection": "three_lines_trimmed", + "forward": { + "reverse": false, + "inherited_bound": 77985, + "max_added_majorant": 80662, + "certified_new_bound": 158647, + "max_added_helper": 80662, + "max_added_target": 369, + "max_added_source": 0 + }, + "inverse": { + "reverse": true, + "inherited_bound": 2475558, + "max_added_majorant": 1334317, + "certified_new_bound": 3809875, + "max_added_helper": 80662, + "max_added_target": 1334317, + "max_added_source": 0 + }, + "payload_bound": 3709343221562739318443143000000, + "payload_bits": 102, + "retained_payload_cap_2_to104": true, + "setup_restore_pairs": 473, + "max_target_prefix_degree": 3, + "target_majorant_acyclic_vertices": 908, + "target_majorant_edges": 681, + "actual_sink_redirects": 14, + "target_majorant_proof": "Targets are never read by helper/source operations. We include every target-prefix and terminal-sink setup/restore edge with its exact total multiplicity2. Their union is checked acyclic; propagating all uncompressed nonnegative increments in topological order through these weighted edges dominates every chronological placement of those ADDs. Actual sink writes are redirected, and removed sink reads/cleanup/root deliveries are absent.", + "scope": "Conditional on inherited old F/B and unchanged compiler; complete exact helper majorant paths are replayed, while target compression is conservatively bounded rather than reproducing record-index cut sites." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/pr300-finite-bill.json b/research/gen5b-shared-kernels/certificates/kernel72/pr300-finite-bill.json new file mode 100644 index 0000000000..21b2fb4f17 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/pr300-finite-bill.json @@ -0,0 +1,101 @@ +{ + "status": "PASS_UNIFIED_PR300_KERNEL72_FINAL12_CHANGED_FINITE_OBLIGATIONS_UNDER_RETAINED_INTERFACES", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selection": "union72", + "with_final12": true, + "gross_added_scalar_events_per_stage": 946, + "omitted_reads_not_credited": 832, + "scalar_weighted_additions_upper": 217342800, + "scalar_unit_additions_upper": 218398800, + "literal_children": 29007300, + "literal_rank_mass": 147282600, + "literal_stock": 1229555, + "route_families": 11790600, + "changed_chart_programs": 176, + "changed_role_chart_uses": 330, + "pivot_residual_demands": 72, + "max_changed_chart_factors": 489, + "max_changed_chart_numerator": 390, + "max_changed_chart_denominator": 540, + "normalizer_factor_bound": 815, + "bank_selector_calls": 905994092400, + "displayed_finite_coefficient": 90470165115059101, + "coefficient_bits": 57, + "retained_coefficient_cap_bits": 80, + "sink_aware_forward_norm": 158647, + "sink_aware_inverse_norm": 3809875, + "conservative_payload_upper": 3709343221562739318443143000000, + "payload_bits": 102, + "retained_payload_cap_bits": 104, + "actual_sink_redirects": 14, + "target_majorant_edges": 681, + "target_majorant_acyclic_vertices": 908, + "new_bank_block_scalars_up_to": 60, + "scalar_unit_reason": "All chart factor numerators and denominators, and every block+1 scalar, are nonzero and smaller than the retained prime characteristic q>2^80.", + "bad_fallback_per_child": 460800, + "internal_row_coefficient": 14401, + "external_row_coefficient": 20161, + "ordinary_degree_gap": "23971789/25", + "delta_tau_lower": "15296888111414771252236468656244160341001308370261/9605898437500000000000000000000000000000000000000000000000000000000", + "delta_linear": "171874999129781/96058984375000000", + "bootstrap_chain": [ + "384599/10000000000", + "749964562290113480996991236716311/1000000000000000000000000000000000000", + "750498545789837435304289527616803008853558792986613/1000000000000000000000000000000000000000000000000000000", + "750498946543891610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "bootstrap_gaps": [ + { + "stage": 1, + "slacks": { + "atom": "534384554769519003008763283689/1000000000000000000000000000000000000", + "borrowing": "998499536490865003519003008763283689/1000000000000000000000000000000000000", + "remainder": "998499565354979449278518700463283689/1000000000000000000000000000000000000", + "stock": "999249501053155117/1000000000000000000" + }, + "minimum": "534384554769519003008763283689/1000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 126065051669836 + }, + { + "stage": 2, + "slacks": { + "atom": "401055045564695710472383196991146441207013387/1000000000000000000000000000000000000000000000000000000", + "borrowing": "998499002507365279564695710472383196991146441207013387/1000000000000000000000000000000000000000000000000000000", + "remainder": "998499565354979449278518700463283689/1000000000000000000000000000000000000", + "stock": "999249501053155117/1000000000000000000" + }, + "minimum": "401055045564695710472383196991146441207013387/1000000000000000000000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 223817753258910997887 + }, + { + "stage": 3, + "slacks": { + "atom": "300991389323130695582081557401004308080985293437695193448721/1000000000000000000000000000000000000000000000000000000000000000000000000", + "borrowing": "998499002106611225389323130695582081557401004308080985293437695193448721/1000000000000000000000000000000000000000000000000000000000000000000000000", + "remainder": "998499565354979449278518700463283689/1000000000000000000000000000000000000", + "stock": "999249501053155117/1000000000000000000" + }, + "minimum": "300991389323130695582081557401004308080985293437695193448721/1000000000000000000000000000000000000000000000000000000000000000000000000", + "cutoff_log2_at_displayed_coefficient": 397369342338145701842915788 + } + ], + "cutoff_scope": "Displayed fixed bill only. The retained theorem rule uses C_full, including inherited primitive, wrapper and earlier ordinary-level constants, whose values are not supplied or replaced by this check.", + "inherited_assumptions": [ + "Pinned PR299 full unchanged bit decoder, original scalar bounds and stage admission.", + "Retained weighted-chart, prime-field, routing, cover, bank-normalizer and finite-compiler contracts.", + "Inherited setup, primitive, wrapper and earlier ordinary-level constants inside C_full.", + "Inherited all-size theorem and outer positive literal-gap and row-gap interfaces.", + "Pinned PR300 second-descent chronological/source-span admission and its unchanged chart/finite-compiler contracts; only the new composition is independently checked here." + ], + "full_inherited_admission_replayed": false, + "all_size_theorem_verified": false, + "additional_source_head": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "additional_source_pins": { + "pr300/descent2-selection.json": "5f947e418285a776d5c7170c07f1befcc44e626e53e6825f06c80a8c81b7a755", + "pr300/expected/kernel-pins.json": "5421d38c4624a5d05b8936fa86f490ee0e932e9e6fe7c6a24defd9b7c671cf4e", + "pr300/portable_bit.py": "93b2c72a63cf24b991a7cc0f35de4da016a245c58f45c1551fe888d5412a73a4", + "pr300/restore-selection.json": "aa85e17b5ff9e849f0decce611a9cc61f697e23aaeea87a7580084535e7f3e07", + "pr300/sink-selection.json": "cadc2c1e3975a3103bbd55992428b686950b4f13987f59146b527f86cebf639f" + }, + "pr300_composition_status": "PASS_ROLE_DISJOINT_PR300_COMPOSITION" +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/pr300-pricing.json b/research/gen5b-shared-kernels/certificates/kernel72/pr300-pricing.json new file mode 100644 index 0000000000..d1994db1c4 --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/pr300-pricing.json @@ -0,0 +1,756 @@ +{ + "status": "CONDITIONAL_PINNED_ADDITIONAL_HISTOGRAM_ARITHMETIC", + "physical_admission": false, + "local_histogram_delta": { + "3": -222, + "1": 155, + "2": 280, + "6": -2, + "5": 7, + "4": -29, + "7": -47, + "8": -2, + "9": 24, + "11": -1, + "12": -24, + "14": 24, + "16": -1, + "17": 1, + "18": -38, + "19": 39 + }, + "role_rank_count_delta": { + "24": -72, + "23": 72, + "2": 12, + "3": -18, + "4": 6 + }, + "histogram": { + "1": 221615, + "2": 84130, + "3": 43935, + "4": 25660, + "5": 12075, + "6": 10105, + "7": 4200, + "8": 1690, + "9": 3485, + "10": 2015, + "11": 3330, + "12": 3025, + "13": 1470, + "14": 2545, + "15": 300, + "16": 8340, + "17": 390, + "18": 3615, + "19": 375, + "20": 3180, + "21": 35095, + "22": 2320, + "23": 3520, + "46": 3520, + "50": 3520 + }, + "calls": 483455, + "rank_mass": 2454710, + "literal_stock": 1229555, + "unreplicated_stock": "245911/12", + "deficit": "4400", + "packing": { + "capacity": 120, + "demand": { + "10": 60, + "12": 60, + "13": 240, + "14": 60, + "15": 60, + "17": 120, + "18": 180, + "19": 120, + "20": 1260, + "21": 960, + "22": 4920, + "23": 98760, + "24": 684060, + "3": 27360, + "4": 104880, + "6": 1020, + "7": 180, + "8": 360, + "9": 240, + "2": 720 + }, + "patterns": [ + { + "widths": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 10 + }, + { + "widths": [ + 6, + 6, + 6, + 6, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 7, + 7, + 7, + 7, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 8, + 8, + 8, + 8, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 90 + }, + { + "widths": [ + 9, + 9, + 9, + 9, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 60 + }, + { + "widths": [ + 10, + 10, + 10, + 10, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 12, + 12, + 12, + 12, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 13, + 13, + 13, + 13, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 60 + }, + { + "widths": [ + 14, + 14, + 14, + 14, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 15, + 15, + 15, + 15, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 17, + 17, + 17, + 17, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 30 + }, + { + "widths": [ + 18, + 18, + 18, + 18, + 24, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 45 + }, + { + "widths": [ + 19, + 19, + 19, + 19, + 24, + 4, + 4, + 4, + 4, + 4 + ], + "count": 30 + }, + { + "widths": [ + 20, + 20, + 20, + 20, + 24, + 4, + 4, + 4, + 4 + ], + "count": 315 + }, + { + "widths": [ + 21, + 21, + 21, + 21, + 24, + 4, + 4, + 4 + ], + "count": 240 + }, + { + "widths": [ + 22, + 22, + 22, + 22, + 24, + 4, + 4 + ], + "count": 1230 + }, + { + "widths": [ + 23, + 23, + 23, + 23, + 24, + 4 + ], + "count": 24690 + }, + { + "widths": [ + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 2361 + }, + { + "widths": [ + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3 + ], + "count": 684 + }, + { + "widths": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6 + ], + "count": 48 + }, + { + "widths": [ + 24, + 24, + 24, + 24, + 24 + ], + "count": 131436 + }, + { + "widths": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "count": 12 + } + ], + "total_rank_demand": 19371720, + "feasible_bins": 161431, + "unused_coordinate_capacity": 0, + "dual_prices": { + "10": "1/12", + "12": "1/10", + "13": "13/120", + "14": "7/60", + "15": "1/8", + "17": "17/120", + "18": "3/20", + "19": "19/120", + "20": "1/6", + "21": "7/40", + "22": "11/60", + "23": "23/120", + "24": "1/5", + "3": "1/40", + "4": "1/30", + "6": "1/20", + "7": "7/120", + "8": "1/15", + "9": "3/40", + "2": "1/60" + }, + "dual_objective": "161431", + "integer_lower_bound": 161431, + "optimal": true + }, + "root_bracket": [ + "750498946844883/1000000000000000000", + "187624736711221/250000000000000000" + ], + "moment_interval": [ + "60036865234374999904394449303657679673522070898473398574308223497/60036865234375000000000000000000000000000000000000000000000000000", + "9605898437499999984703111888585228747763531343755839658998691629739/9605898437500000000000000000000000000000000000000000000000000000000" + ], + "adjacent_moment_interval": [ + "1876152038574218751490225646164233544116776825485662716434821167/1876152038574218750000000000000000000000000000000000000000000000", + "9605898437500000007629955308360875745877897346486688995255660245259/9605898437500000000000000000000000000000000000000000000000000000000" + ], + "kappa": "3749680601367/5000000000000000", + "kappa_decimal": "0.0007499361202734", + "assembly": { + "coarse": "750498946844883/1000000000000000000", + "complex_coarse": "754736418878859/1000000000000000000", + "bootstrap_chain": [ + "384599/10000000000", + "749964562290113480996991236716311/1000000000000000000000000000000000000", + "750498545789837435304289527616803008853558792986613/1000000000000000000000000000000000000000000000000000000", + "750498946543891610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "strict_constraints": { + "a_positive": "750498946543891610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000", + "a_below_b": "4237472334967389323130695582081557401004308080985293437695193448721/1000000000000000000000000000000000000000000000000000000000000000000000000", + "b_below_one_over32": "30495263581121141/1000000000000000000", + "beta_positive": "1/1000000000", + "beta_below_one": "999999999/1000000000", + "phase_leaf_above_bit": "4237471580230970444271695582081557401004308080985293437695193448721/1000000000000000000000000000000000000000000000000000000000000000000000000", + "q_positive": "375249473271195306391890760598282351995079927516908357589233388569077195193448721/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_internal": "750498946543891610676869304417918442598995691919014706562304806551279/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_leaf": "2118735790865984168679739401717648004920072483091642410766611430922804806551279/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "c_positive": "375249473396195306391890760598282351995079927516908357589233388569077195193448721/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "c_below_one": "499624750526603804693608109239401717648004920072483091642410766611430922804806551279/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_reservations": "1/4000000000000", + "lambda_above_tau": "750498946543891610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_above_sigma": "4237472335717888269674587192758426705422226523584289129614208155283304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_above_internal": "750498946543891610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_prime_above_lambda": "750498946543891610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "compact_leaf": "2118735790865984168679739401717648004920072483091642410766611430922804806551279/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "compact_reservations": "1/4000000000000", + "lambda_prime_below_one": "375249473271195306391890760598282351995079927516908357589233388569077195193448721/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "epsilon_positive": "499999999999500000000000000000000000000000000000000000000000000000000000000000000000/500375249473271195306391890760598282351995079927516908357589233388569077195193448721", + "epsilon_below_one": "375249473771195306391890760598282351995079927516908357589233388569077195193448721/500375249473271195306391890760598282351995079927516908357589233388569077195193448721", + "guard_width": "375249473771195306391890760598282351995079927516908357589233388569077195193448721/500375249473271195306391890760598282351995079927516908357589233388569077195193448721", + "K_geometry": "375375249473396195306391890760598282351995079927516908357589233388569077195193448721/500375249473271195306391890760598282351995079927516908357589233388569077195193448721000000000000", + "K_dominates_log": "375249473395820056918494565291890461234481645164913277661716480211487961804879643804806551279/500375249473271195306391890760598282351995079927516908357589233388569077195193448721000000000000", + "record_suffix": "375249473771195306391890760598282351995079927516908357589233388569077195193448721/500375249473271195306391890760598282351995079927516908357589233388569077195193448721", + "phase_local": "3001995789669187201661854889479866925200041137783271780786350200195028328159020690804806551279/4003001995786169562451135126084786258815960639420135266860713867108552617561547589768000000000000", + "phase_boundary": "600399157533537240753754021650859872431529601675058292215256513352934278920948876404806551279/800600399157233912490227025216957251763192127884027053372142773421710523512309517953600000000000", + "gamma_sublinear": "1/2000000000000", + "cell_above_band": "999999999998499624750526728804693608109239401717648004920072483091642410766611430922804806551279/2001500997893084781225567563042393129407980319710067633430356933554276308780773794884000000000000", + "prime_interval_packing": "375249473771195306391890760598282351995079927516908357589233388569077195193448721/500375249473271195306391890760598282351995079927516908357589233388569077195193448721", + "alpha_positive": "750498947042015363310510325890172813229561572681821635250949868780565156998328364804806551279/1000750498946542390612783781521196564703990159855033816715178466777138154390386897442000000000000", + "alpha_below_one": "999999999999500375249473271195306391890760598282351995079927516908357589233388569077195193448721/1000750498946542390612783781521196564703990159855033816715178466777138154390386897442000000000000", + "alpha_below_one_fourth": "249437125789593582289885435054408968362767978391076632543543666825503973440598395995695193448721/1000750498946542390612783781521196564703990159855033816715178466777138154390386897442000000000000", + "delta_positive": "1/8000000000000", + "delta_below_one_eighth": "999999999999/8000000000000", + "short_record_fallback": "499624468901893673012371534969480490436463452383951864732790634455147885479711727523744770826639569869637716660867688765152748034336484860351378097656535841/500375249473271195306391890760598282351995079927516908357589233388569077195193448721000000000000000000000000000000000000000000000000000000000000000000000000", + "small_field_exposure": "1/1000000000000", + "artificial_boundary": "28024015966294857625357500822264209246199966910208138120125493487593493708192546425375585580346163/4003001995786169562451135126084786258815960639420135266860713867108552617561547589768000000000000", + "literal_scalar_guard": "1", + "row_product_gap": "23971789/25", + "g1_above_kappa": "2501878346350303350225239421577063463109704956244821117914571763406350388557942042998393/2501876247366355976531959453802991411759975399637584541787946166942845385975967243605000000000000000", + "g2_above_kappa": "562826270491610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g3_above_kappa": "2098983947373693279967774072051349729556607236576126625596463505002581974799393393/2501876247366355976531959453802991411759975399637584541787946166942845385975967243605000000000000000", + "g4_above_kappa": "562826270491610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g5_above_kappa": "234551422936582716223191190737548457689930082867832694824276352266768005580740628936317/625469061841588994132989863450747852939993849909396135446986541735711346493991810901250000000000000", + "g6_above_kappa": "273642976928688606644843061231461192079963503911265381273884811567311839413868267193471/312734530920794497066494931725373926469996924954698067723493270867855673246995905450625000000000000", + "g7_above_kappa": "2498123752631145901814390849547233827661601663825525163168298654175069185787439106783557942042998393/2501876247366355976531959453802991411759975399637584541787946166942845385975967243605000000000000000" + }, + "margins": { + "g1": "375249473771195306391890760598282351995079927516908357589233388569077195193448721/500375249473271195306391890760598282351995079927516908357589233388569077195193448721", + "g2": "750498946543891610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g3": "375249473270820056918619565291890461234481645164913277661716480211487961804879643804806551279/500375249473271195306391890760598282351995079927516908357589233388569077195193448721000000000000", + "g4": "750498946543891610676869304417918442598995691919014706562304806551279/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g5": "600399157533537240753754021650859872431529601675058292215256513352934278920948876404806551279/800600399157233912490227025216957251763192127884027053372142773421710523512309517953600000000000", + "g6": "3001995789669187201661854889479866925200041137783271780786350200195028328159020690804806551279/4003001995786169562451135126084786258815960639420135266860713867108552617561547589768000000000000", + "g7": "499999999999500000000000000000000000000000000000000000000000000000000000000000000000/500375249473271195306391890760598282351995079927516908357589233388569077195193448721" + }, + "kappa": "3749680601367/5000000000000000", + "kappa_decimal": "0.0007499361202734", + "minimum_margin": "375249473270820056918619565291890461234481645164913277661716480211487961804879643804806551279/500375249473271195306391890760598282351995079927516908357589233388569077195193448721000000000000", + "absorption_gap": "2098983947373693279967774072051349729556607236576126625596463505002581974799393393/2501876247366355976531959453802991411759975399637584541787946166942845385975967243605000000000000000", + "adjacent_grid_rejected": [ + "g3_above_kappa" + ], + "bridge_scope": "The positive literal gap and supplied row gap are assumptions in this arithmetic check." + }, + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "selection": "union72", + "with_final12": true, + "additional_source": { + "git_blob": "638d3a1669c850d91f93d04939abfdd5f3a86c05", + "sha256": "5f947e418285a776d5c7170c07f1befcc44e626e53e6825f06c80a8c81b7a755", + "bytes": 319700, + "repository": "rohanarun/integer-mult-bounds", + "commit": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "package": "research/five-stage-gen5b-full", + "path": "descent2-selection.json" + }, + "additional_declared_local_histogram_delta": { + "1": 44, + "2": 148, + "3": -78, + "4": -48, + "5": 24, + "7": -47, + "8": -2, + "9": 24, + "11": -1, + "12": -24, + "14": 24, + "16": -1, + "17": 1, + "18": -38, + "19": 39 + }, + "preceding_kappa": "749917402998347/1000000000000000000", + "gain_over_preceding_case": "18717275053/1000000000000000000", + "extra_chronology_and_interactions_verified": false, + "updated_finite_bill_verified": false, + "scope": "Separate declared-histogram arithmetic with verified source bytes; does not replace the union72+final12 receipt or certify extra admission, composition, scalar norms, or finite bounds." +} diff --git a/research/gen5b-shared-kernels/certificates/kernel72/pricing.json b/research/gen5b-shared-kernels/certificates/kernel72/pricing.json new file mode 100644 index 0000000000..8aba4fdc0a --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/kernel72/pricing.json @@ -0,0 +1,744 @@ +{ + "status": "PASS_UNION72_FINAL12_EXACT_PRICING", + "physical_admission": false, + "local_histogram_delta": { + "3": -144, + "1": 111, + "2": 132, + "6": -2, + "5": -17, + "4": 19 + }, + "role_rank_count_delta": { + "24": -72, + "23": 72, + "2": 12, + "3": -18, + "4": 6 + }, + "histogram": { + "1": 221395, + "2": 83390, + "3": 44325, + "4": 25900, + "5": 11955, + "6": 10105, + "7": 4435, + "8": 1700, + "9": 3365, + "10": 2015, + "11": 3335, + "12": 3145, + "13": 1470, + "14": 2425, + "15": 300, + "16": 8345, + "17": 385, + "18": 3805, + "19": 180, + "20": 3180, + "21": 35095, + "22": 2320, + "23": 3520, + "46": 3520, + "50": 3520 + }, + "calls": 483130, + "rank_mass": 2454710, + "literal_stock": 1229555, + "unreplicated_stock": "245911/12", + "deficit": "4400", + "packing": { + "capacity": 120, + "demand": { + "10": 60, + "12": 60, + "13": 240, + "14": 60, + "15": 60, + "17": 120, + "18": 180, + "19": 120, + "20": 1260, + "21": 960, + "22": 4920, + "23": 98760, + "24": 684060, + "3": 27360, + "4": 104880, + "6": 1020, + "7": 180, + "8": 360, + "9": 240, + "2": 720 + }, + "patterns": [ + { + "widths": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 10 + }, + { + "widths": [ + 6, + 6, + 6, + 6, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 7, + 7, + 7, + 7, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 8, + 8, + 8, + 8, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 90 + }, + { + "widths": [ + 9, + 9, + 9, + 9, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 60 + }, + { + "widths": [ + 10, + 10, + 10, + 10, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 12, + 12, + 12, + 12, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 13, + 13, + 13, + 13, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 60 + }, + { + "widths": [ + 14, + 14, + 14, + 14, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 15, + 15, + 15, + 15, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 15 + }, + { + "widths": [ + 17, + 17, + 17, + 17, + 24, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 30 + }, + { + "widths": [ + 18, + 18, + 18, + 18, + 24, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 45 + }, + { + "widths": [ + 19, + 19, + 19, + 19, + 24, + 4, + 4, + 4, + 4, + 4 + ], + "count": 30 + }, + { + "widths": [ + 20, + 20, + 20, + 20, + 24, + 4, + 4, + 4, + 4 + ], + "count": 315 + }, + { + "widths": [ + 21, + 21, + 21, + 21, + 24, + 4, + 4, + 4 + ], + "count": 240 + }, + { + "widths": [ + 22, + 22, + 22, + 22, + 24, + 4, + 4 + ], + "count": 1230 + }, + { + "widths": [ + 23, + 23, + 23, + 23, + 24, + 4 + ], + "count": 24690 + }, + { + "widths": [ + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "count": 2361 + }, + { + "widths": [ + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3 + ], + "count": 684 + }, + { + "widths": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6 + ], + "count": 48 + }, + { + "widths": [ + 24, + 24, + 24, + 24, + 24 + ], + "count": 131436 + }, + { + "widths": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "count": 12 + } + ], + "total_rank_demand": 19371720, + "feasible_bins": 161431, + "unused_coordinate_capacity": 0, + "dual_prices": { + "10": "1/12", + "12": "1/10", + "13": "13/120", + "14": "7/60", + "15": "1/8", + "17": "17/120", + "18": "3/20", + "19": "19/120", + "20": "1/6", + "21": "7/40", + "22": "11/60", + "23": "23/120", + "24": "1/5", + "3": "1/40", + "4": "1/30", + "6": "1/20", + "7": "7/120", + "8": "1/15", + "9": "3/40", + "2": "1/60" + }, + "dual_objective": "161431", + "integer_lower_bound": 161431, + "optimal": true + }, + "root_bracket": [ + "750480201465017/1000000000000000000", + "375240100732509/500000000000000000" + ], + "moment_interval": [ + "4802949218749999993226379436710870197928389829970085832270966043857/4802949218750000000000000000000000000000000000000000000000000000000", + "2401474609374999996613189718355435098964194914985066887912826989337/2401474609375000000000000000000000000000000000000000000000000000000" + ], + "adjacent_moment_interval": [ + "4802949218750000004690085114750427419669804985871964186345732004077/4802949218750000000000000000000000000000000000000000000000000000000", + "2401474609375000002345042557375213709834902492936006064950209969447/2401474609375000000000000000000000000000000000000000000000000000000" + ], + "kappa": "749917402998347/1000000000000000000", + "kappa_decimal": "0.000749917402998347", + "assembly": { + "coarse": "750480201465017/1000000000000000000", + "complex_coarse": "754736418878859/1000000000000000000", + "bootstrap_chain": [ + "384599/10000000000", + "749945844325726351902845225189711/1000000000000000000000000000000000000", + "750479800440563450884264785497766069952493954840087/1000000000000000000000000000000000000000000000000000000", + "750480201164056087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "strict_constraints": { + "a_positive": "750480201164056087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000", + "a_below_b": "4256217714802912691938728652091566477013257591769227703984640263521/1000000000000000000000000000000000000000000000000000000000000000000000000", + "b_below_one_over32": "30495263581121141/1000000000000000000", + "beta_positive": "1/1000000000", + "beta_below_one": "999999999/1000000000", + "phase_leaf_above_bit": "4256216960066493813079728652091566477013257591769227703984640263521/1000000000000000000000000000000000000000000000000000000000000000000000000", + "q_positive": "375240100581277563452866579586646155490145462770592399405599449095943484640263521/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_internal": "750480201164056087308061271347908433522986742408230772296015359736479/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_leaf": "2128108480783727107703920413353844509854537229407600594400550904056515359736479/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "c_positive": "375240100706277563452866579586646155490145462770592399405599449095943484640263521/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "c_below_one": "499624759899293722436547133420413353844509854537229407600594400550904056515359736479/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "q_below_reservations": "1/4000000000000", + "lambda_above_tau": "750480201164056087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_above_sigma": "4256217715553392893102784739399627748361166025292214446392871035817015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_above_internal": "750480201164056087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "lambda_prime_above_lambda": "750480201164056087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "compact_leaf": "2128108480783727107703920413353844509854537229407600594400550904056515359736479/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "compact_reservations": "1/4000000000000", + "lambda_prime_below_one": "375240100581277563452866579586646155490145462770592399405599449095943484640263521/500000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "epsilon_positive": "499999999999500000000000000000000000000000000000000000000000000000000000000000000000/500375240100581277563452866579586646155490145462770592399405599449095943484640263521", + "epsilon_below_one": "375240101081277563452866579586646155490145462770592399405599449095943484640263521/500375240100581277563452866579586646155490145462770592399405599449095943484640263521", + "guard_width": "375240101081277563452866579586646155490145462770592399405599449095943484640263521/500375240100581277563452866579586646155490145462770592399405599449095943484640263521", + "K_geometry": "375375240100706277563452866579586646155490145462770592399405599449095943484640263521/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000", + "K_dominates_log": "375240100705902323352160302023193288910558816615102253942828856696537885191167577515359736479/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000", + "record_suffix": "375240101081277563452866579586646155490145462770592399405599449095943484640263521/500375240100581277563452866579586646155490145462770592399405599449095943484640263521", + "phase_local": "3001920808149845267522351359129716377341577056009249049782025000368142277673012224515359736479/4003001920804650220507622932636693169243921163702164739195244795592767547877122108168000000000000", + "phase_boundary": "600384161229668861424005249775180982204646094277457693586188526154103975975325690115359736479/800600384160930044101524586527338633848784232740432947839048959118553509575424421633600000000000", + "gamma_sublinear": "1/2000000000000", + "cell_above_band": "999999999998499624759899418722436547133420413353844509854537229407600594400550904056515359736479/2001500960402325110253811466318346584621960581851082369597622397796383773938561054084000000000000", + "prime_interval_packing": "375240101081277563452866579586646155490145462770592399405599449095943484640263521/500375240100581277563452866579586646155490145462770592399405599449095943484640263521", + "alpha_positive": "750480201662179886805151881609839444400704279385694653348428305792481369831431098515359736479/1000750480201162555126905733159173292310980290925541184798811198898191886969280527042000000000000", + "alpha_below_one": "999999999999500375240100581277563452866579586646155490145462770592399405599449095943484640263521/1000750480201162555126905733159173292310980290925541184798811198898191886969280527042000000000000", + "alpha_below_one_fourth": "249437139848628458894921281408183483633344368451999601546354371418755490372488700661984640263521/1000750480201162555126905733159173292310980290925541184798811198898191886969280527042000000000000", + "delta_positive": "1/8000000000000", + "delta_below_one_eighth": "999999999999/8000000000000", + "short_record_fallback": "499624478288651802898520610018996404657634249134438578225854000125933186554633351676305022722264487803959928203741997934208071522085818501834352204323317441/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000000000000000000000000000000000000000000000000000000000000000", + "small_field_exposure": "1/1000000000000", + "artificial_boundary": "28024015366442702889781285204926235712551108069555784383998346676519338599815324153174453920790563/4003001920804650220507622932636693169243921163702164739195244795592767547877122108168000000000000", + "literal_scalar_guard": "1", + "row_product_gap": "23971789/25", + "g1_above_kappa": "500375313263946099020189432580196415419154268779115623002655441460316679785676154392600213/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000000000", + "g2_above_kappa": "562798165709087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g3_above_kappa": "73163364821456736566000609769263664123316345030603249842011220736301035890871600213/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000000000", + "g4_above_kappa": "562798165709087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g5_above_kappa": "187640788201082800543031390967954761571972927864884002753026941804631715107775989691975213/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000000000", + "g6_above_kappa": "437828408251373439324757824257748084649718000596269298952729741529179686850096121452475213/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000000000", + "g7_above_kappa": "499624759898919097749811079519433543277090050952648561869373516173906711956820053158785676154392600213/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000000000" + }, + "margins": { + "g1": "375240101081277563452866579586646155490145462770592399405599449095943484640263521/500375240100581277563452866579586646155490145462770592399405599449095943484640263521", + "g2": "750480201164056087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g3": "375240100580902323352285302023193288910558816615102253942828856696537885191167577515359736479/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000", + "g4": "750480201164056087308061271347908433522986742408230772296015359736479/1000000000000000000000000000000000000000000000000000000000000000000000000", + "g5": "600384161229668861424005249775180982204646094277457693586188526154103975975325690115359736479/800600384160930044101524586527338633848784232740432947839048959118553509575424421633600000000000", + "g6": "3001920808149845267522351359129716377341577056009249049782025000368142277673012224515359736479/4003001920804650220507622932636693169243921163702164739195244795592767547877122108168000000000000", + "g7": "499999999999500000000000000000000000000000000000000000000000000000000000000000000000/500375240100581277563452866579586646155490145462770592399405599449095943484640263521" + }, + "kappa": "749917402998347/1000000000000000000", + "kappa_decimal": "0.000749917402998347", + "minimum_margin": "375240100580902323352285302023193288910558816615102253942828856696537885191167577515359736479/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000", + "absorption_gap": "73163364821456736566000609769263664123316345030603249842011220736301035890871600213/500375240100581277563452866579586646155490145462770592399405599449095943484640263521000000000000000000", + "adjacent_grid_rejected": [ + "g3_above_kappa" + ], + "bridge_scope": "The positive literal gap and supplied row gap are assumptions in this arithmetic check." + }, + "selection": "union72", + "with_final12": true, + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "kernel_histogram_delta": { + "3": -144, + "1": 93, + "2": 144, + "6": -2, + "5": -17, + "4": 19 + }, + "final12_histogram_delta": { + "1": 18, + "2": -12 + }, + "kernel_residual_delta": { + "24": -72, + "23": 72 + }, + "final12_residual_delta": { + "2": 12, + "3": -18, + "4": 6 + }, + "pivots": 72, + "distinct_donors": 93, + "scalar_setup_gates": 473, + "scalar_restore_gates": 473, + "prior_final12_kappa": "749906929903449/1000000000000000000", + "kappa_gain_over_final12": "5236547449/500000000000000000", + "binding": "Measured union72 first-frame ledger plus measured final12 chronological suffix delta; exact residual inventory.", + "scope": "Exact arithmetic and optimal inventory under separately checked changed-stage certificates. Literal bank assignment, unchanged PR299 admission, finite compiler and all-size theorem remain separate." +} diff --git a/research/gen5b-shared-kernels/certificates/pr300-bases.json b/research/gen5b-shared-kernels/certificates/pr300-bases.json new file mode 100644 index 0000000000..09f1950b1d --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/pr300-bases.json @@ -0,0 +1,664 @@ +{ + "unique_selected_bases": 65, + "nondegenerate_over_Q": true, + "maximum_gram_determinant_bits": 103, + "all_gram_prime_factors": [ + 2, + 3, + 5 + ], + "nondegenerate_over_every_field_of_characteristic_above5": true, + "bases": [ + { + "dimension": 18, + "gram_determinant": -9005678117819947260, + "absolute_determinant_bits": 63, + "prime_factorization": { + "2": 2, + "3": 37, + "5": 1 + } + }, + { + "dimension": 17, + "gram_determinant": -500315450989997070, + "absolute_determinant_bits": 59, + "prime_factorization": { + "2": 1, + "3": 35, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -23028533304243058114560, + "absolute_determinant_bits": 75, + "prime_factorization": { + "2": 26, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1372607547297660, + "absolute_determinant_bits": 51, + "prime_factorization": { + "2": 2, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -23028533304243058114560, + "absolute_determinant_bits": 75, + "prime_factorization": { + "2": 26, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1372607547297660, + "absolute_determinant_bits": 51, + "prime_factorization": { + "2": 2, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -23028533304243058114560, + "absolute_determinant_bits": 75, + "prime_factorization": { + "2": 26, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1372607547297660, + "absolute_determinant_bits": 51, + "prime_factorization": { + "2": 2, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -23028533304243058114560, + "absolute_determinant_bits": 75, + "prime_factorization": { + "2": 26, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1372607547297660, + "absolute_determinant_bits": 51, + "prime_factorization": { + "2": 2, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -23028533304243058114560, + "absolute_determinant_bits": 75, + "prime_factorization": { + "2": 26, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1372607547297660, + "absolute_determinant_bits": 51, + "prime_factorization": { + "2": 2, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 14, + "gram_determinant": -1545418709633918009954103459840, + "absolute_determinant_bits": 101, + "prime_factorization": { + "2": 52, + "3": 29, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -8354684086777333792399278735360, + "absolute_determinant_bits": 103, + "prime_factorization": { + "2": 37, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -8354684086777333792399278735360, + "absolute_determinant_bits": 103, + "prime_factorization": { + "2": 37, + "3": 40, + "5": 1 + } + }, + { + "dimension": 19, + "gram_determinant": -121576654590569288010, + "absolute_determinant_bits": 67, + "prime_factorization": { + "2": 1, + "3": 40, + "5": 1 + } + } + ], + "scope": "Exact nondegeneracy and row independence only; actual chronological frame replacement requires a separate check." +} diff --git a/research/gen5b-shared-kernels/certificates/summary.json b/research/gen5b-shared-kernels/certificates/summary.json new file mode 100644 index 0000000000..60f9f1349a --- /dev/null +++ b/research/gen5b-shared-kernels/certificates/summary.json @@ -0,0 +1,35 @@ +{ + "status": "PASS_UNIFIED_CHANGED_STAGE_CHECKS_UNDER_RETAINED_INTERFACES", + "verified_source_files": 16, + "baseline_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "additional_head": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "headline_case": "PR300 + final12 + 70 shared-donor pivots", + "kappa": "749940157923873/1000000000000000000", + "kappa_decimal": "0.000749940157923873", + "literal_stock": 1229560, + "calls": 483425, + "rank_mass": 2454720, + "deficit": "4400", + "displayed_finite_coefficient": 90466979917115701, + "payload_upper": 12927738210344389271740351838400, + "payload_strict_gap": 7354671393307281152206899447616, + "fallback_PR300_kernel72_kappa": "3749680601367/5000000000000000", + "checkpoint_PR299_kernel72_kappa": "749917402998347/1000000000000000000", + "all_changed_role_bank_assignments": 4628100, + "inherited_assumptions": [ + "Pinned PR299 full unchanged bit decoder, original scalar bounds and stage admission.", + "Retained weighted-chart, prime-field, routing, cover, bank-normalizer and finite-compiler contracts.", + "Inherited setup, primitive, wrapper and earlier ordinary-level constants inside C_full.", + "Inherited all-size theorem and outer positive literal-gap and row-gap interfaces.", + "Pinned PR300 second-descent chronological/source-span admission and its unchanged chart/finite-compiler contracts; only the new composition is independently checked here." + ], + "full_inherited_admission_replayed": false, + "all_size_theorem_verified": false, + "global_optimality_or_priority_claimed": false, + "verification_limits": [ + "The shared-kernel F2 all-column proof is compositional under the inherited old decoder, not a full physical-word replay.", + "PR300 complete chronological/source-span admission remains inherited; scalar incidences, support disjointness and exact selected basis determinants are checked here.", + "Original row bounds and unchanged compiler, chart, normalizer, routing, prime, setup, complex-supplier and all-size interfaces remain hypotheses.", + "Displayed finite bounds do not supply unknown retained constants inside C_full." + ] +} diff --git a/research/gen5b-shared-kernels/chart_bounds.py b/research/gen5b-shared-kernels/chart_bounds.py new file mode 100644 index 0000000000..2dc075b7cc --- /dev/null +++ b/research/gen5b-shared-kernels/chart_bounds.py @@ -0,0 +1,130 @@ +"""Original exact constructions and factor programs for all 18 changed charts. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as F +from math import gcd,lcm +import hashlib,json +import source_data as sd +import check_coretime +import exact_geometry as geo +def rref(A): + A=[[F(x)for x in row]for row in A];piv=[] + for j in range(len(A[0])if A else 0): + q=next((i for i in range(len(piv),len(A))if A[i][j]),None) + if q is None:continue + i=len(piv);A[i],A[q]=A[q],A[i];v=A[i][j];A[i]=[x/v for x in A[i]] + for k in range(len(A)): + if k!=i and A[k][j]: + v=A[k][j];A[k]=[a-v*b for a,b in zip(A[k],A[i])] + piv.append(j) + if len(piv)==len(A):break + return A,piv + + +def primitive(v): + d=lcm(*(F(x).denominator for x in v));v=[int(F(x)*d)for x in v];g=gcd(*v) + assert g;return [x//g for x in v] + + +def nullspace(A,n=24): + R,piv=rref(A);out=[] + for free in range(n): + if free in piv:continue + v=[F(0)]*n;v[free]=1 + for i,j in enumerate(piv):v[j]=-R[i][free] + out.append(primitive(v)) + return out + + +def factor(B): + n=len(B);A=[[F(x)for x in row]for row in B];ops=[];det=F(1) + for j in range(n): + pivot=next(i for i in range(j,n)if A[i][j]) + if pivot!=j:A[pivot],A[j]=A[j],A[pivot];ops.append(('swap',j,pivot,F(1)));det=-det + v=A[j][j];det*=v + if v!=1:A[j]=[x/v for x in A[j]];ops.append(('scale',j,j,1/v)) + for i in range(n): + if i!=j and A[i][j]: + q=-A[i][j];A[i]=[x+q*y for x,y in zip(A[i],A[j])];ops.append(('add',i,j,q)) + assert A==[[int(i==j)for j in range(n)]for i in range(n)] + # Independently replay inverse operations from I and recover B. + C=[[F(i==j)for j in range(n)]for i in range(n)] + for kind,i,j,q in reversed(ops): + if kind=='swap':C[i],C[j]=C[j],C[i] + elif kind=='scale':C[i]=[x/q for x in C[i]] + else:C[i]=[x-q*y for x,y in zip(C[i],C[j])] + assert C==B + return dict(determinant=det,factors=ops,count=len(ops), + max_numerator=max((abs(q.numerator)for kind,i,j,q in ops),default=1), + max_denominator=max((q.denominator for kind,i,j,q in ops),default=1)) + + +def serial(x): + if isinstance(x,F):return str(x) + if isinstance(x,dict):return {str(k):serial(v)for k,v in x.items()} + if isinstance(x,(list,tuple)):return [serial(v)for v in x] + return x + + +def endpoint_columns(candidate,w,frames): + gauges={z['role']:z for z in w['gauges']} + sigma=frames[str(gauges[candidate['helper']]['frame'])]['a'] + endpoint=frames[str(candidate['new_endpoint'])]['a'] + common=frames[str(candidate['common_frame'])]['a'] + assert gauges[candidate['helper']]['dim']==21 + assert len(rref(sigma)[1])==3 and len(rref(sigma+endpoint)[1])==3 + assert len(rref(common)[1])==2 and len(rref(common+endpoint)[1])==2 + P=geo.projector(sigma);E=geo.projector(endpoint);I=geo.eye(24) + assert geo.mul(P,E)==P and geo.mul(E,P)==P + residual=geo.add(E,P,-1);completion=geo.add(I,residual,-1) + assert geo.mul(residual,residual)==residual and sum(residual[i][i]for i in range(24))==2 + assert geo.mul(completion,completion)==completion and sum(completion[i][i]for i in range(24))==22 + residual_columns,_=geo.integer_columns(residual,2) + entrance_columns,_=geo.integer_columns(P,21) + exterior_columns,_=geo.integer_columns(geo.add(I,E,-1),1) + columns=residual_columns+entrance_columns+exterior_columns + assert len(rref(list(zip(*columns)))[1])==24 + gram=lambda a,b:9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b) + assert all(gram(a,b)==0 for a in columns[:2]for b in columns[2:]) + assert all(gram(a,columns[-1])==0 for a in columns[:23]) + return columns + + +def run(): + candidate=check_coretime.run(minimal=True) + w=sd.read_json('gen5bit/selected/bit/word_p12.json.gz') + frames=sd.read_json('gen5bit/selected/bit/frames_p12.json.gz')['frames'] + pins=sd.read_json('expected/kernel-pins.json') + undone={c['old_restored_helper']for c in candidate['candidates']} + assert len(candidate['candidates'])==12 and len(undone)==6 + gauges={z['role']:z for z in w['gauges']};matrices=[] + for c in candidate['candidates']: + matrices.append(('new_rank2',c['helper'],endpoint_columns(c,w,frames))) + for role in sorted(undone): + ann=frames[str(gauges[role]['frame'])]['a'];assert len(ann)==4 + residual=[primitive([15*x-sum(a)for x in a])for a in ann] + entrance=nullspace(ann);assert len(entrance)==20 + assert all(9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b)==0 for a in residual for b in entrance) + matrices.append(('reverted_rank4',role,residual+entrance)) + out=[] + for kind,role,cols in matrices: + assert len(cols)==24 and all(len(c)==24 for c in cols) + B=[list(row)for row in zip(*cols)];f=factor(B) + assert f['max_numerator']<2**80 and f['max_denominator']<2**80 + out.append(dict(kind=kind,role=role,basis_columns=cols,**f)) + assert len(out)==18 + largest=max(z['count']for z in out) + retained=pins['max_chart_factors'];assert retained==576 + bound=max(retained,largest)+119+120 + assert bound==pins['normalizer_factor_bound']==815 + stock=pins['literal_stock']-15;roles=pins['physical_R'] + selectors=600*((stock-1)+roles*120*bound) + assert selectors<2**40 + return dict(status='PASS_CHANGED_CHART_FACTORIZATION_BOUNDS',charts=len(out), + max_changed_chart_factors=largest,retained_chart_factor_bound=retained, + combined_normalizer_factor_bound=bound,selector_calls_bound=selectors, + selector_bound_less_than_2_power_40=True, + max_factor_numerator=max(z['max_numerator']for z in out), + max_factor_denominator=max(z['max_denominator']for z in out), + source_head=sd.HEAD,factor_programs=out, + scope='All changed chart constructions, exact inverse factor replay and selector bounds; retained finite-compiler and unchanged-stage hypotheses remain conditional.') diff --git a/research/gen5b-shared-kernels/check_bank_assignment.py b/research/gen5b-shared-kernels/check_bank_assignment.py new file mode 100644 index 0000000000..cd370caee9 --- /dev/null +++ b/research/gen5b-shared-kernels/check_bank_assignment.py @@ -0,0 +1,113 @@ +"""Explicit role-resolved bank assignment for the minimal twelve-helper rewrite.""" +from collections import Counter,defaultdict +import hashlib,json,time +from check_complete_suffix import read,HERE,CANDIDATE_FILE + +def run(output_dir=None, mutation=None): + started=time.monotonic() + w=read('gen5bit__selected__bit__word_p12.json.gz.base64') + selection=read(CANDIDATE_FILE)['candidates'];kernel=read('kernel-selection.json') + restore=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'] + removed={b for a,b in w['pairs']};regs=sorted(set(range(17160))-removed) + original_from_stream={3520+i:r for i,r in enumerate(regs)} + sinkroles={r['role']for r in sinks};roles=sorted(set(regs)-sinkroles) + assert len(roles)==15427 + entrances={r:0 for r in roles};entrance_type={r:'ZERO'for r in roles} + for z in w['gauges']: + if z['role']in entrances: + entrances[z['role']]=z['dim'];entrance_type[z['role']]=f'frame:{z["frame"]}' + pivots=[(z['a'],z['rank'])for z in kernel['pairs']]+[(z['pivot'],z['rank'])for z in kernel['families']] + pivot_residuals=Counter() + for stream,rank in pivots: + role=original_from_stream[stream];assert entrances[role]==0 + entrances[role]=rank;entrance_type[role]=f'kernel:{stream}' + pivot_residuals[24-rank]+=1 + endpoints={r:24 for r in roles};endpoint_type={r:'FULL'for r in roles} + undo={z['old_restored_helper_stream']for z in selection} + assert len(undo)==6 + retained=[z for z in restore if z['helper']not in undo] + assert len(retained)==434 + for z in retained: + r=original_from_stream[z['helper']];assert entrances[r]==20 + endpoints[r]=23;endpoint_type[r]=f'old_restore:{z["helper"]}' + for z in selection: + r=z['helper'];assert entrances[r]==21 and endpoints[r]==24 + endpoints[r]=23;endpoint_type[r]=f'frame:{z["new_endpoint"]}' + families=defaultdict(list) + for r in roles: + width=endpoints[r]-entrances[r];assert 0=0 and 120%width==0 and leftover%blocks==0 + patterns.append(([width]*blocks,leftover//blocks)) + total=Counter();segments=defaultdict(list);bank_start=0 + for pattern,(widths,n) in enumerate(patterns): + assert sum(widths)==120 and n>0 + offsets=[];x=0 + for r in widths:offsets.append(x);x+=r + for r in set(widths): + blocks=[(i,offsets[i])for i,v in enumerate(widths)if v==r] + lo=total[r];hi=lo+n*len(blocks) + segments[r].append(dict(lo=lo,hi=hi,pattern=pattern,bank_start=bank_start,blocks=blocks)) + total[r]=hi + bank_start+=n + assert total=={r:60*n for r,n in counts.items()} + assert bank_start==161467 + def assignment(role_index,replica,width): + q=60*role_index+replica + for s in segments[width]: + if s['lo']<=q0: + positive_plain.update(alias.get(s,s)for s in w['ops'][index][:2]if alias.get(s,s)not in gauges) + assert len(positive_plain)==13200 + lower_moves=len(positive_plain)-2*904 + last_close=max(x['close_after_record']for x in target['groups']) + assert prefix_adds+lower_moves>last_close + # No target-prefix changes remain in this suffix; descent never changes + # scalar coefficients. Kernel restoration calls are appended explicitly. + byroot=defaultdict(list) + for e in partner:byroot[e['deliver_after_root']].append(e) + insert={z['blocker_root']:z for z in candidate} + omit={z['donor_root']for z in candidate} + finish={z['helper_root']:z for z in candidate} + undo={z['old_restored_helper_stream']for z in candidate} + assert len(candidate)==12 and len(undo)==6 + + def emit(changed): + out=[] + def add(a,b,c,tag): + assert a!=b and c%2 + out.append((a,b,c,tag)) + def root(i,exclude=None,only=None): + r=graph['roots'][i];s=w['rootroles'][i] + if r['kind']!='side' or s in sunk:return + for t in r['targets']: + if t==exclude or only is not None and t!=only:continue + add(V+t,sid(s),r.get('coefficient',1),f'root:{i}:{t}') + for i,r in enumerate(graph['roots']): + if changed and i in insert: + z=insert[i];root(z['donor_root']);root(i,exclude=z['target']) + for e in byroot[i]: + add(e['carrier'],e['passive'],1,f'partner_setup:{i}') + for t in e['receivers']: + if t!=z['target']:add(V+t,e['carrier'],1,f'partner_delivery:{i}:{t}') + root(i,only=z['target']) + for e in byroot[i]: + for t in e['receivers']: + if t==z['target']:add(V+t,e['carrier'],1,f'partner_delivery:{i}:{t}') + else: + if not(changed and i in omit):root(i) + for e in byroot[i]: + add(e['carrier'],e['passive'],1,f'partner_setup:{i}') + for t in e['receivers']:add(V+t,e['carrier'],1,f'partner_delivery:{i}:{t}') + if changed and i in finish: + z=finish[i];add(sid(z['helper']),sid(z['donor']),-1,f'new_restore:{z["helper"]}') + for e in partner:add(e['carrier'],e['passive'],-1,'partner_cleanup') + retained=[z for z in oldrestore if not(changed and z['helper']in undo)] + for z in sorted(retained,key=lambda z:z['helper']):add(z['helper'],z['donor'],z['coefficient'],f'old_restore:{z["helper"]}') + moved={(z['helper'],z['donor']):0 for z in retained} + newpairs={(sid(z['helper']),sid(z['donor'])):0 for z in candidate}if changed else {} + for index in reversed(order): + a,b,_=w['ops'][index] + if a in sunk:continue + pair=(sid(a),sid(b)) + if pair in moved:moved[pair]+=1;continue + if pair in newpairs:newpairs[pair]+=1;continue + add(*pair,-1,f'cleanup:{index}') + assert all(x==1 for x in moved.values())and all(x==1 for x in newpairs.values()) + for source,role in w['sources'].items():add(sid(role),int(source),-1,'uninject') + for z in entries: + for donor in z['donors']:add(donor,z['pivot'],-1,f'kernel_restore:{z["pivot"]}') + return out + old,new=emit(False),emit(True) + assert Counter((a,b,c)for a,b,c,_ in old)==Counter((a,b,c)for a,b,c,_ in new) + return n,old,new,dict(all_independent_entry_roles=n,active_roles_after_sinks=n-7, + selected=len(candidate),old_restorations_undone=len(undo),sink_roles_removed=7, + kernel_member_donors=kernel_candidate_donors,sink_target_overlaps_contained_in_new_frame=sink_target_overlaps, + target_prefix_closed_before_suffix=dict(prefix_odd_adds=prefix_adds, + mandatory_positive_move_lower_bound=lower_moves,last_close_record=last_close), + co_retimed_partner_deliveries=sum(z['target'] in e['receivers']for z in candidate for e in byroot[z['blocker_root']]), + original_suffix_adds=len(old),modified_suffix_adds=len(new)) + +def evaluate(events,n,reverse=False): + rows=[1<>s&1] + assert len(leaves)==180 + assert all(not any(sum(z[j]for j in g['labels'][s])for z in J)for s in leaves) + assert g['roots'][bi]['node']==g['roots'][ai]['node'] + # a has exactly one forward incidence and b is unchanged from that write to the roots. + ai_ops=[(i,o)for i,o in enumerate(w['ops'])if a in o[:2]] + assert len(ai_ops)==1 and ai_ops[0][1][:2]==[a,b] + aop=ai_ops[0][0] + assert not any(o[0]==b for o in w['ops'][aop+1:]) + candidates.append(dict(helper=a,donor=b,blocker=c,target=t,helper_root=ai,donor_root=bi, + blocker_root=ki,old_restored_helper=regs[prior['helper']-3520],old_restored_helper_stream=prior['helper'], + common_frame=row['write_frame_id'],new_endpoint=row['helper_frame_id'],promoted_blocker_frame=row['donor_frame_id'], + target_precursor_roots=predecessors,prefix_group_present=bool(group),source_union_size=len(leaves))) + if minimal: + multiplicity=Counter(z['old_restored_helper_stream'] for z in candidates) + candidates=[z for z in candidates if multiplicity[z['old_restored_helper_stream']]==2] + retained={z['old_restored_helper_stream']for z in candidates} + lost={h:z for h,z in lost.items()if h in retained} + expected_candidates,expected_undo=(12,6)if minimal else(32,26) + if mutation=='omit_old_restoration_undo':lost.pop(next(iter(lost))) + if mutation=='shared_blocker':candidates[1]['blocker']=candidates[0]['blocker'] + if mutation=='wrong_promoted_frame':candidates[0]['promoted_blocker_frame']=candidates[0]['new_endpoint'] + assert {z['old_restored_helper_stream']for z in candidates}<=set(lost),'Missing old restoration undo' + assert len({z['blocker']for z in candidates})==len(candidates),'Shared blocker' + for z in candidates: + promoted=f[z['promoted_blocker_frame']]['a'];cap=f[w['root_frame'][z['donor_root']]]['a'] + assert sub(promoted,cap),'Promoted delivery outside target cap' + assert len(candidates)==expected_candidates and len(lost)==expected_undo and len(rejected)==2 + aa={z['helper']for z in candidates};bb={z['donor']for z in candidates};cc={z['blocker']for z in candidates} + assert len(aa)==len(bb)==len(cc)==expected_candidates and not(aa&bb or aa&cc or bb&cc) + kernel_donor_contracts=[z for z in kernel_donor_contracts if z['donor'] in bb] + assert not (aa|bb|cc)&set(w['sources'].values()), 'A moved helper is a source carrier with possible partner-mix writes' + # Construct the literal altered root schedule and compare its EXACT INTEGER + # linear map on arbitrary independent helper registers and target contents. + insert={z['blocker_root']:z for z in candidates};omit={z['donor_root']for z in candidates} + finish={z['helper_root']:z for z in candidates} + def root_events(i,exclude=None): + z=g['roots'][i] + return [(1760*10+t,w['rootroles'][i],z.get('coefficient',1))for t in z['targets']if t!=exclude] + original=[];modified=[] + for i,z in enumerate(g['roots']): + original+=root_events(i) + if i in insert: + row=insert[i];modified+=root_events(row['donor_root']) + # First deliver K-source to its unaffected target(s), then promote + # that source and the affected target to B and deliver there. + modified+=root_events(i,exclude=row['target']) + modified += [(1760*10+row['target'],row['blocker'],z.get('coefficient',1))] + elif i not in omit:modified+=root_events(i) + if i in finish: + row=finish[i];modified.append((row['helper'],row['donor'],-1)) + original += [(z['helper'],z['donor'],-1)for z in candidates] + def evaluate(events): + rows={} + def get(i):return rows.setdefault(i,{i:1}) + for dest,src,coeff in events:add(get(dest),get(src),coeff) + return {i:row for i,row in rows.items()if row!={i:1}} + A=evaluate(original);C=evaluate(modified);assert A==C + corrupted=modified[:];removed_restore=next(i for i,z in enumerate(corrupted)if z[0]in aa) + del corrupted[removed_restore];assert evaluate(corrupted)!=A + # Local role-path ledger. Unchanged target dimensions 21->22->23. + # Per new surgery a loses 23->24; blocker changes 22->24 to 22->23->24. + gross=Counter({1:len(candidates),2:-len(candidates)}) + gross.update({1:-3*len(lost),2:2*len(lost)}) + residual={2:len(candidates),3:-len(candidates)-len(lost),4:len(lost)} + assert dict(gross)==({1:-6,2:0}if minimal else{1:-46,2:20}) + assert sum(r*n for r,n in gross.items())==-6 + assert sum(r*n for r,n in residual.items())==-6 and sum(residual.values())==0 + return dict(status='PASS_LOCAL_INTEGER_ROOT_SCHEDULE_CERTIFICATE',head=old['head'], + selected=len(candidates),undone_old_restorations=len(lost),local_histogram_delta=dict(gross), + residual_rank_count_delta=residual,literal_stock_delta=-15,unreplicated_stock_delta='-1/4', + exact_integer_root_schedule_identity=True,missing_restoration_control_rejected=True, + unchanged_root_read_coefficients=True,candidates=candidates,rejected=rejected, + kernel_donor_contracts=kernel_donor_contracts, + scope='Local source-data surgery certificate with exact integer root map, geometry/source-span conditions and net ledger. Full emitted postkernel word and global all-column replay have NOT been reconstructed. Existing valid monotone source-stage/target-prefix/sink contracts are retained assumptions; no certified new multiplication exponent is claimed.') + +if __name__=='__main__': + r=run();(HERE/'coretime-result.json').write_text(json.dumps(r,indent=2)+'\n') + print(r['status'],r['selected'],'new restorations,',r['undone_old_restorations'],'old restorations undone, delta',r['local_histogram_delta']) diff --git a/research/gen5b-shared-kernels/check_kernel70.py b/research/gen5b-shared-kernels/check_kernel70.py new file mode 100644 index 0000000000..4c84949f91 --- /dev/null +++ b/research/gen5b-shared-kernels/check_kernel70.py @@ -0,0 +1,219 @@ +"""Independently authored shared-donor validation; upstream is inert JSON only. + +The all-column comparison is a compositional F2 matrix certificate using the +inherited old complete-word decoder, not a replay of the upstream producer. +""" +from pathlib import Path +from collections import Counter,defaultdict +from fractions import Fraction as Q +import base64,gzip,hashlib,json,time +HERE=Path(__file__).resolve().parent +import source_data as sd +import check_coretime +import kernel_witness +import kernel70_witness +CANDIDATE=kernel70_witness.PATH + +def verify_inputs(): + sd.verify_all() + kernel_witness.load() + kernel70_witness.load() + +def read(name): + if name=='coretime-candidate12.json': + return check_coretime.run(minimal=True) + aliases={'graph.json':'gen5bit/selected/bit/graph_p12.json'} + return sd.read_json(aliases.get(name,name.replace('__','/').removesuffix('.base64'))) + +def echelon(A): + A=[[Q(x)for x in row]for row in A];rank=0;piv=[] + for j in range(24): + p=next((i for i in range(rank,len(A))if A[i][j]),None) + if p is None:continue + A[rank],A[p]=A[p],A[rank];d=A[rank][j];A[rank]=[x/d for x in A[rank]] + for i in range(len(A)): + if i!=rank and A[i][j]: + d=A[i][j];A[i]=[x-d*y for x,y in zip(A[i],A[rank])] + piv.append(j);rank+=1 + return A[:rank],piv + +def nullspace(B): + R,piv=echelon(B);out=[] + for j in range(24): + if j in piv:continue + v=[Q(0)]*24;v[j]=1 + for i,k in enumerate(piv):v[k]=-R[i][j] + out.append(v) + return out + +def run(mutation=None, selection="candidate70"): + verify_inputs();start=time.monotonic();w=read('gen5bit__selected__bit__word_p12.json.gz.base64') + f={int(k):v for k,v in read('gen5bit__selected__bit__frames_p12.json.gz.base64')['frames'].items()} + graph=read('graph.json');ks=read('kernel-selection.json');desc=read('descent-selection.json') + oldrest=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'];core=read('coretime-candidate12.json')['candidates'] + candidate=json.loads(CANDIDATE.read_text());raw_entries=candidate['entries'] + families=[];line_set=set() + for z in raw_entries: + assert z['rank']==1 and len(z['basis'])==1 + row=z['basis'][0];assert len(row)==24 and sorted(x for x in row if x)==[-1,1] + line=[row.index(1),row.index(-1)];line_set.add(tuple(line)) + families.append(dict(pivot=z['virtual_pivot'],donors=z['virtual_donors'],line=line)) + chosen=[dict(line=list(line))for line in sorted(line_set)] + if mutation=='bad_relation':families[0]=dict(families[0],donors=families[0]['donors'][1:]) + P={z['pivot']for z in families};D={d for z in families for d in z['donors']};M=P|D + assert (len(P),len(D))==(70,87) and not P&D + removed={b for a,b in w['pairs']};reused={a for a,b in w['pairs']};regs=sorted(set(range(17160))-removed) + physical={r:3520+i for i,r in enumerate(regs)};sid=lambda r:physical[r] + for z in raw_entries: + assert z['pivot']==sid(z['virtual_pivot']) and z['donors']==[sid(d)for d in z['virtual_donors']] + assert not M&(removed|reused|{z['role']for z in w['gauges']}|{z['role']for z in sinks}|set(w['sources'].values())) + oldentries=[dict(pivot=z['a'],donors=[z['b']])for z in ks['pairs']]+[dict(pivot=z['pivot'],donors=z['donors'])for z in ks['families']] + oldmembers={s for z in oldentries for s in[z['pivot']]+z['donors']} + assert not {sid(r)for r in M}&oldmembers + assert not {sid(r)for r in M}&{s for z in desc['entries']for s in z['scalar'][:2]} + assert not M&{z[k]for z in core for k in('helper','donor','blocker')} + assert not {sid(r)for r in M}&{z['helper']for z in oldrest} + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase] + # Integer adjoint coefficients, reduced only at the declared bit interface. + adj=[{}for _ in range(17160)] + for root,r in zip(graph['roots'],w['rootroles']): + for t in root['targets']:adj[r][t]=adj[r].get(t,0)+1 + for index in reversed(order): + a,b,_=w['ops'][index] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + response=[sum(1<1:H[d-1]+=1 + if r in D:H[1]+=1 + pathrows.append(dict(role=r,stream=sid(r),kind='pivot'if r in P else'donor',line=[i,j],first_dimension=d,old_frames=frames, + old_dimensions=[f[z]['dim']for z in frames],new_initial_dimension=1 if r in P else 0, + new_paid_entrance_dimensions=[d-1]if r in P else[1,d-1])) + H={r:c for r,c in sorted(H.items())if c} + assert H=={1:87,2:137,3:-137,4:18,5:-16,6:-2},H + assert sum(r*c for r,c in H.items())==-len(P) + # Full formal matrix composition. Q is precisely the selected dirty-column + # part of the common prefix. All other prefix operations commute with the + # selected shear by the checked no-touch/disjoint-support hypotheses. + n=3520+len(regs) + def prefix(skip): + out=[] + for r in sorted(M-skip): + for t,c in adj[r].items(): + if c%2:out.append((1760+t,sid(r))) + return out + setup=[(sid(d),sid(z['pivot']))for z in families for d in z['donors']] + oldprefix=prefix(set());newprefix=prefix(P) + # Baseline remainder is U*Q^{-1}, where U is the inherited exact decoder. + # U adds source[t] to target[t] and fixes every dirty helper, so it commutes + # with setup. This explicit all-column representative proves the identity. + U=[(1760+t,t)for t in range(1760)] + tail=list(reversed(oldprefix))+U + def evaluate(events): + rows=[1<1 else'candidate70' + result=run(selection=selection) + print(json.dumps({k:v for k,v in result.items()if k!='paths'},indent=2)) diff --git a/research/gen5b-shared-kernels/check_kernel70_bank_assignment.py b/research/gen5b-shared-kernels/check_kernel70_bank_assignment.py new file mode 100644 index 0000000000..ae4b5ee3af --- /dev/null +++ b/research/gen5b-shared-kernels/check_kernel70_bank_assignment.py @@ -0,0 +1,125 @@ +"""Explicit role-resolved bank assignment for the 70-pivot and final12 rewrite.""" +from collections import Counter,defaultdict +from fractions import Fraction +import hashlib,json,time +from check_complete_suffix import read,HERE,CANDIDATE_FILE +import kernel70_witness + +def run(output_dir=None, mutation=None): + started=time.monotonic() + w=read('gen5bit__selected__bit__word_p12.json.gz.base64') + selection=read(CANDIDATE_FILE)['candidates'];kernel=read('kernel-selection.json') + restore=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'] + removed={b for a,b in w['pairs']};regs=sorted(set(range(17160))-removed) + original_from_stream={3520+i:r for i,r in enumerate(regs)} + sinkroles={r['role']for r in sinks};roles=sorted(set(regs)-sinkroles) + assert len(roles)==15427 + entrances={r:0 for r in roles};entrance_type={r:'ZERO'for r in roles} + for z in w['gauges']: + if z['role']in entrances: + entrances[z['role']]=z['dim'];entrance_type[z['role']]=f'frame:{z["frame"]}' + pivots=[(z['a'],z['rank'])for z in kernel['pairs']]+[(z['pivot'],z['rank'])for z in kernel['families']] + pivot_residuals=Counter() + for stream,rank in pivots: + role=original_from_stream[stream];assert entrances[role]==0 + entrances[role]=rank;entrance_type[role]=f'kernel:{stream}' + pivot_residuals[24-rank]+=1 + new_kernel=kernel70_witness.load()['entries'] + assert len(new_kernel)==70 and len({z['pivot']for z in new_kernel})==70 + for z in new_kernel: + role=original_from_stream[z['pivot']] + assert role==z['virtual_pivot'] and entrances[role]==0 + assert z['rank']==1 and len(z['basis'])==1 + entrances[role]=1 + entrance_type[role]=f'shared_kernel:{z["pivot"]}' + pivot_residuals[23]+=1 + endpoints={r:24 for r in roles};endpoint_type={r:'FULL'for r in roles} + undo={z['old_restored_helper_stream']for z in selection} + assert len(undo)==6 + retained=[z for z in restore if z['helper']not in undo] + assert len(retained)==434 + for z in retained: + r=original_from_stream[z['helper']];assert entrances[r]==20 + endpoints[r]=23;endpoint_type[r]=f'old_restore:{z["helper"]}' + for z in selection: + r=z['helper'];assert entrances[r]==21 and endpoints[r]==24 + endpoints[r]=23;endpoint_type[r]=f'frame:{z["new_endpoint"]}' + families=defaultdict(list) + for r in roles: + width=endpoints[r]-entrances[r];assert 0=0 and 120%width==0 and leftover%blocks==0 + patterns.append(([width]*blocks,leftover//blocks)) + total=Counter();segments=defaultdict(list);bank_start=0 + for pattern,(widths,n) in enumerate(patterns): + assert sum(widths)==120 and n>0 + offsets=[];x=0 + for r in widths:offsets.append(x);x+=r + for r in set(widths): + blocks=[(i,offsets[i])for i,v in enumerate(widths)if v==r] + lo=total[r];hi=lo+n*len(blocks) + segments[r].append(dict(lo=lo,hi=hi,pattern=pattern,bank_start=bank_start,blocks=blocks)) + total[r]=hi + bank_start+=n + assert total=={r:60*n for r,n in counts.items()} + assert bank_start==161432 + def assignment(role_index,replica,width): + q=60*role_index+replica + for s in segments[width]: + if s['lo']<=q=0 + delta=close_target_majorant(delta) + # The old full compressed decoder bounds all its own prefixes. The helper + # paths above are exact; the full target-only acyclic graph is majorized. + inherited=2475558 if reverse else 77985 + out=inherited+max(delta) + return dict(reverse=reverse,inherited_bound=inherited,max_added_majorant=max(delta),certified_new_bound=out, + max_added_helper=max(delta[3520:]),max_added_target=max(delta[1760:3520]),max_added_source=max(delta[:1760])) + F,B=bound(False),bound(True);payload=64*F['certified_new_bound']**3*B['certified_new_bound']**2 + return dict(status='PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS',selection='candidate70',forward=F,inverse=B, + payload_bound=payload,payload_bits=payload.bit_length(),retained_payload_cap_2_to104=payload<2**104, + setup_restore_pairs=len(newsetup),max_target_prefix_degree=max(map(len,dependency.values())),target_majorant_acyclic_vertices=len(topology),target_majorant_edges=len(edges),actual_sink_redirects=sum(z['forward_writes']for z in sinks), + target_majorant_proof='Targets are never read by helper/source operations. We include every target-prefix and terminal-sink setup/restore edge with its exact total multiplicity2. Their union is checked acyclic; propagating all uncompressed nonnegative increments in topological order through these weighted edges dominates every chronological placement of those ADDs. Actual sink writes are redirected, and removed sink reads/cleanup/root deliveries are absent.', + scope='Conditional on inherited old F/B and unchanged compiler; complete exact helper majorant paths are replayed, while target compression is conservatively bounded rather than reproducing record-index cut sites.',seconds=time.monotonic()-start) +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + r=run();print(json.dumps(r,indent=2)) diff --git a/research/gen5b-shared-kernels/check_kernel_bank_assignment.py b/research/gen5b-shared-kernels/check_kernel_bank_assignment.py new file mode 100644 index 0000000000..baf5aa21cd --- /dev/null +++ b/research/gen5b-shared-kernels/check_kernel_bank_assignment.py @@ -0,0 +1,124 @@ +"""Explicit role-resolved bank assignment for the minimal twelve-helper rewrite.""" +from collections import Counter,defaultdict +import hashlib,json,time +from check_complete_suffix import read,HERE,CANDIDATE_FILE +import kernel_witness + +def run(output_dir=None, mutation=None): + started=time.monotonic() + w=read('gen5bit__selected__bit__word_p12.json.gz.base64') + selection=read(CANDIDATE_FILE)['candidates'];kernel=read('kernel-selection.json') + restore=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'] + removed={b for a,b in w['pairs']};regs=sorted(set(range(17160))-removed) + original_from_stream={3520+i:r for i,r in enumerate(regs)} + sinkroles={r['role']for r in sinks};roles=sorted(set(regs)-sinkroles) + assert len(roles)==15427 + entrances={r:0 for r in roles};entrance_type={r:'ZERO'for r in roles} + for z in w['gauges']: + if z['role']in entrances: + entrances[z['role']]=z['dim'];entrance_type[z['role']]=f'frame:{z["frame"]}' + pivots=[(z['a'],z['rank'])for z in kernel['pairs']]+[(z['pivot'],z['rank'])for z in kernel['families']] + pivot_residuals=Counter() + for stream,rank in pivots: + role=original_from_stream[stream];assert entrances[role]==0 + entrances[role]=rank;entrance_type[role]=f'kernel:{stream}' + pivot_residuals[24-rank]+=1 + new_kernel=kernel_witness.load()['portable']['variants']['three_lines_trimmed']['entries'] + assert len(new_kernel)==72 and len({z['pivot']for z in new_kernel})==72 + for z in new_kernel: + role=original_from_stream[z['pivot']] + assert role==z['virtual_pivot'] and entrances[role]==0 + assert z['rank']==1 and len(z['basis'])==1 + entrances[role]=1 + entrance_type[role]=f'shared_kernel:{z["pivot"]}' + pivot_residuals[23]+=1 + endpoints={r:24 for r in roles};endpoint_type={r:'FULL'for r in roles} + undo={z['old_restored_helper_stream']for z in selection} + assert len(undo)==6 + retained=[z for z in restore if z['helper']not in undo] + assert len(retained)==434 + for z in retained: + r=original_from_stream[z['helper']];assert entrances[r]==20 + endpoints[r]=23;endpoint_type[r]=f'old_restore:{z["helper"]}' + for z in selection: + r=z['helper'];assert entrances[r]==21 and endpoints[r]==24 + endpoints[r]=23;endpoint_type[r]=f'frame:{z["new_endpoint"]}' + families=defaultdict(list) + for r in roles: + width=endpoints[r]-entrances[r];assert 0=0 and 120%width==0 and leftover%blocks==0 + patterns.append(([width]*blocks,leftover//blocks)) + total=Counter();segments=defaultdict(list);bank_start=0 + for pattern,(widths,n) in enumerate(patterns): + assert sum(widths)==120 and n>0 + offsets=[];x=0 + for r in widths:offsets.append(x);x+=r + for r in set(widths): + blocks=[(i,offsets[i])for i,v in enumerate(widths)if v==r] + lo=total[r];hi=lo+n*len(blocks) + segments[r].append(dict(lo=lo,hi=hi,pattern=pattern,bank_start=bank_start,blocks=blocks)) + total[r]=hi + bank_start+=n + assert total=={r:60*n for r,n in counts.items()} + assert bank_start==161431 + def assignment(role_index,replica,width): + q=60*role_index+replica + for s in segments[width]: + if s['lo']<=q=0 + delta=close_target_majorant(delta) + # The old full compressed decoder bounds all its own prefixes. The helper + # paths above are exact; the full target-only acyclic graph is majorized. + inherited=2475558 if reverse else 77985 + out=inherited+max(delta) + return dict(reverse=reverse,inherited_bound=inherited,max_added_majorant=max(delta),certified_new_bound=out, + max_added_helper=max(delta[3520:]),max_added_target=max(delta[1760:3520]),max_added_source=max(delta[:1760])) + F,B=bound(False),bound(True);payload=64*F['certified_new_bound']**3*B['certified_new_bound']**2 + return dict(status='PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS',selection='three_lines_trimmed',forward=F,inverse=B, + payload_bound=payload,payload_bits=payload.bit_length(),retained_payload_cap_2_to104=payload<2**104, + setup_restore_pairs=len(newsetup),max_target_prefix_degree=max(map(len,dependency.values())),target_majorant_acyclic_vertices=len(topology),target_majorant_edges=len(edges),actual_sink_redirects=sum(z['forward_writes']for z in sinks), + target_majorant_proof='Targets are never read by helper/source operations. We include every target-prefix and terminal-sink setup/restore edge with its exact total multiplicity2. Their union is checked acyclic; propagating all uncompressed nonnegative increments in topological order through these weighted edges dominates every chronological placement of those ADDs. Actual sink writes are redirected, and removed sink reads/cleanup/root deliveries are absent.', + scope='Conditional on inherited old F/B and unchanged compiler; complete exact helper majorant paths are replayed, while target compression is conservatively bounded rather than reproducing record-index cut sites.',seconds=time.monotonic()-start) +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + r=run();print(json.dumps(r,indent=2)) diff --git a/research/gen5b-shared-kernels/check_shared_kernel.py b/research/gen5b-shared-kernels/check_shared_kernel.py new file mode 100644 index 0000000000..329fe381d8 --- /dev/null +++ b/research/gen5b-shared-kernels/check_shared_kernel.py @@ -0,0 +1,214 @@ +"""Independently authored shared-donor validation; upstream is inert JSON only. + +The all-column comparison is a compositional F2 matrix certificate using the +inherited old complete-word decoder, not a replay of the upstream producer. +""" +from pathlib import Path +from collections import Counter,defaultdict +from fractions import Fraction as Q +import base64,gzip,hashlib,json,time +HERE=Path(__file__).resolve().parent +import source_data as sd +import check_coretime +import kernel_witness +CANDIDATE=kernel_witness.PATH + +def verify_inputs(): + sd.verify_all() + kernel_witness.load() + +def read(name): + if name=='coretime-candidate12.json': + return check_coretime.run(minimal=True) + aliases={'graph.json':'gen5bit/selected/bit/graph_p12.json'} + return sd.read_json(aliases.get(name,name.replace('__','/').removesuffix('.base64'))) + +def echelon(A): + A=[[Q(x)for x in row]for row in A];rank=0;piv=[] + for j in range(24): + p=next((i for i in range(rank,len(A))if A[i][j]),None) + if p is None:continue + A[rank],A[p]=A[p],A[rank];d=A[rank][j];A[rank]=[x/d for x in A[rank]] + for i in range(len(A)): + if i!=rank and A[i][j]: + d=A[i][j];A[i]=[x-d*y for x,y in zip(A[i],A[rank])] + piv.append(j);rank+=1 + return A[:rank],piv + +def nullspace(B): + R,piv=echelon(B);out=[] + for j in range(24): + if j in piv:continue + v=[Q(0)]*24;v[j]=1 + for i,k in enumerate(piv):v[k]=-R[i][j] + out.append(v) + return out + +def run(mutation=None, selection="union34"): + verify_inputs();start=time.monotonic();w=read('gen5bit__selected__bit__word_p12.json.gz.base64') + f={int(k):v for k,v in read('gen5bit__selected__bit__frames_p12.json.gz.base64')['frames'].items()} + graph=read('graph.json');ks=read('kernel-selection.json');desc=read('descent-selection.json') + oldrest=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'];core=read('coretime-candidate12.json')['candidates'] + candidates=json.loads(CANDIDATE.read_text())['best_candidates'] + lines={'union34':[[6,7],[2,3]],'union72':[[6,7],[16,17],[2,3]],'line6':[[6,7]],'line16':[[16,17]],'line2':[[2,3]]}[selection] + chosen=[z for z in candidates if z['line']in lines] + assert len(chosen)==len(lines) + families=[dict(z,line=c['line'])for c in chosen for z in c['relations']if not(selection=='union72' and c['line']==[6,7] and z['pivot']in(10859,10861))] + if mutation=='bad_relation':families[0]=dict(families[0],donors=families[0]['donors'][1:]) + P={z['pivot']for z in families};D={d for z in families for d in z['donors']};M=P|D + counts={'union34':(34,43),'union72':(72,93),'line6':(28,37),'line16':(40,50),'line2':(6,6)} + assert (len(P),len(D))==counts[selection] and not P&D + removed={b for a,b in w['pairs']};reused={a for a,b in w['pairs']};regs=sorted(set(range(17160))-removed) + physical={r:3520+i for i,r in enumerate(regs)};sid=lambda r:physical[r] + assert not M&(removed|reused|{z['role']for z in w['gauges']}|{z['role']for z in sinks}|set(w['sources'].values())) + oldentries=[dict(pivot=z['a'],donors=[z['b']])for z in ks['pairs']]+[dict(pivot=z['pivot'],donors=z['donors'])for z in ks['families']] + oldmembers={s for z in oldentries for s in[z['pivot']]+z['donors']} + assert not {sid(r)for r in M}&oldmembers + assert not {sid(r)for r in M}&{s for z in desc['entries']for s in z['scalar'][:2]} + assert not M&{z[k]for z in core for k in('helper','donor','blocker')} + assert not {sid(r)for r in M}&{z['helper']for z in oldrest} + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase] + # Integer adjoint coefficients, reduced only at the declared bit interface. + adj=[{}for _ in range(17160)] + for root,r in zip(graph['roots'],w['rootroles']): + for t in root['targets']:adj[r][t]=adj[r].get(t,0)+1 + for index in reversed(order): + a,b,_=w['ops'][index] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + response=[sum(1<1:H[d-1]+=1 + if r in D:H[1]+=1 + pathrows.append(dict(role=r,stream=sid(r),kind='pivot'if r in P else'donor',line=[i,j],first_dimension=d,old_frames=frames, + old_dimensions=[f[z]['dim']for z in frames],new_initial_dimension=1 if r in P else 0, + new_paid_entrance_dimensions=[d-1]if r in P else[1,d-1])) + H={r:c for r,c in sorted(H.items())if c} + expected={'union34':{1:43,2:75,3:-75,5:2,6:-2},'union72':{1:93,2:144,3:-144,4:19,5:-17,6:-2}} + if selection in expected:assert H==expected[selection],H + assert sum(r*c for r,c in H.items())==-len(P) + # Full formal matrix composition. Q is precisely the selected dirty-column + # part of the common prefix. All other prefix operations commute with the + # selected shear by the checked no-touch/disjoint-support hypotheses. + n=3520+len(regs) + def prefix(skip): + out=[] + for r in sorted(M-skip): + for t,c in adj[r].items(): + if c%2:out.append((1760+t,sid(r))) + return out + setup=[(sid(d),sid(z['pivot']))for z in families for d in z['donors']] + oldprefix=prefix(set());newprefix=prefix(P) + # Baseline remainder is U*Q^{-1}, where U is the inherited exact decoder. + # U adds source[t] to target[t] and fixes every dirty helper, so it commutes + # with setup. This explicit all-column representative proves the identity. + U=[(1760+t,t)for t in range(1760)] + tail=list(reversed(oldprefix))+U + def evaluate(events): + rows=[1<1 else'union34' + result=run(selection=selection) + print(json.dumps({k:v for k,v in result.items()if k!='paths'},indent=2)) diff --git a/research/gen5b-shared-kernels/check_suffix_frames.py b/research/gen5b-shared-kernels/check_suffix_frames.py new file mode 100644 index 0000000000..786131e8ed --- /dev/null +++ b/research/gen5b-shared-kernels/check_suffix_frames.py @@ -0,0 +1,128 @@ +"""Independent chronological frame-path recount of every affected stream.""" +from collections import Counter +from fractions import Fraction as Q +from pathlib import Path +import json,time +from check_complete_suffix import build,read,HERE,V,CANDIDATE_FILE +from exact_geometry import echelon + +def nullspace(B): + rows,piv=echelon(B);free=[j for j in range(24)if j not in piv] + out=[] + for j in free: + v=[Q(0)]*24;v[j]=1 + for i,k in enumerate(piv):v[k]=-rows[i][j] + out.append(v) + return out + +def run(mutation=None): + start=time.monotonic();n,old,new,scalar=build() + w=read('gen5bit__selected__bit__word_p12.json.gz.base64') + ff=read('gen5bit__selected__bit__frames_p12.json.gz.base64')['frames'];g=read('graph.json') + sel=read(CANDIDATE_FILE)['candidates'];restore=read('restore-selection.json')['entries'] + partner=read('gen5bit__selected__bit__kchron_p12.json')['entries'] + aliases={b:a for a,b in w['pairs']};regs=sorted(set(range(17160))-set(aliases));ids={s:3520+i for i,s in enumerate(regs)} + sid=lambda s:ids[aliases.get(s,s)] + undo={z['old_restored_helper_stream']for z in sel};oldr={z['helper']:z for z in restore} + bynew={z['helper']:z for z in sel};bydonor={z['donor_root']:z for z in sel};byblocker={z['blocker_root']:z for z in sel} + affected={sid(z[k])for z in sel for k in ('helper','donor','blocker')} + affected|={oldr[h][k]for h in undo for k in ('helper','donor')} + affected|={V+z['target']for z in sel} + partner_by_root={e['deliver_after_root']:e for e in partner} + assert len(partner_by_root)==len(partner) + affected|={partner_by_root[z['blocker_root']]['carrier']for z in sel} + descent=read('descent-selection.json')['entries'] + affected_helpers={s for s in affected if s>=3520} + assert not [e for e in descent if set(e['scalar'][:2])&affected_helpers] + # Canonical annihilator matrices; exact containment uses row-span inclusion. + cache={'FULL':[], 'ZERO':[[Q(i==j)for j in range(24)]for i in range(24)]} + dims={'FULL':24,'ZERO':0} + def ann(key): + if key not in cache: + if isinstance(key,int): + d=ff[str(key)];cache[key]=d.get('a') if 'a'in d else nullspace(d['b']);dims[key]=d['dim'] + elif key.startswith('REST:'): + z=oldr[int(key[5:])];cache[key]=nullspace(z['basis']);dims[key]=z['rank'] + elif key.startswith('CAP:'): + t=int(key[4:]);S=set(g['labels'][t]);cache[key]=[[3*int(j in S)-1 for j in range(24)]];dims[key]=23 + else:raise ValueError(key) + return cache[key] + containment={} + def sub(a,b): + if (a,b)not in containment: + A,B=ann(a),ann(b) + containment[a,b]=len(echelon(A+B)[1])==len(A) + return containment[a,b] + setup_frames={} + for z in sel: + e=partner_by_root[z['blocker_root']] + selected=[d for d in descent if d['scalar'][:3]==[e['carrier'],e['passive'],1]] + assert len(selected)==1 and selected[0]['old_dimension']==2 and selected[0]['new_dimension']==22 + d=selected[0];A=ann(e['deliver_frame']) + assert len(echelon(d['new_basis'])[1])==22 + assert all(sum(x*y for x,y in zip(a,b))==0 for a in A for b in d['new_basis']) + setup_frames[z['blocker_root']]=e['deliver_frame'] + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase] + initial={x:'ZERO'for x in affected} + for x in affected: + if x=3520:ann(initial[x]);assert dims[initial[x]]<=22,(x,initial[x],dims[initial[x]]) + def frame(tag,changed): + if tag.startswith('root:'): + _,ii,tt=tag.split(':');i,t=int(ii),int(tt) + if changed and i in bydonor:return bydonor[i]['common_frame'] + if changed and i in byblocker and t==byblocker[i]['target']:return byblocker[i]['promoted_blocker_frame'] + return w['root_frame'][i] + if tag.startswith('new_restore:'):return bynew[int(tag.split(':')[1])]['new_endpoint'] + if tag.startswith('old_restore:'):return 'REST:'+tag.split(':')[1] + if tag.startswith('partner_setup:'): + i=int(tag.split(':')[1]);return setup_frames.get(i,partner_by_root[i]['mix_frame']) + if tag.startswith('partner_delivery:'): + _,ii,tt=tag.split(':');i,t=int(ii),int(tt) + if changed and mutation!='omit_partner_promotion' and i in byblocker and t==byblocker[i]['target']:return byblocker[i]['promoted_blocker_frame'] + return partner_by_root[i]['deliver_frame'] + return 'FULL' + def check(events,changed): + state=dict(initial);hist=Counter();paths={x:[initial[x]]for x in affected} + def move(x,f): + if x not in affected:return + a=state[x];assert sub(a,f),('nonnested',changed,x,a,f) + ann(f);delta=dims[f]-dims[a] + if delta:hist[delta]+=1;paths[x].append(f) + state[x]=f + for a,b,c,tag in events: + f=frame(tag,changed);move(a,f);move(b,f) + for x in affected: + endpoint='FULL'if x<1760 or x>=3520 else 'CAP:'+str(x-V) + if x in oldr and not(changed and x in undo and mutation!='omit_old_undo'):endpoint='REST:'+str(x) + if changed: + match=next((z for z in sel if sid(z['helper'])==x),None) + if match:endpoint=match['new_endpoint'] + move(x,endpoint) + return hist,paths + oldH,oldP=check(old,False);newH,newP=check(new,True) + delta=Counter(newH);delta.subtract(oldH);delta={r:c for r,c in delta.items()if c} + assert delta=={1:18,2:-12},delta + byrole=[] + for x in sorted(affected): + if oldP[x]!=newP[x]: + byrole.append(dict(stream=x,before_frames=oldP[x],after_frames=newP[x], + before_dimensions=[dims[f]for f in oldP[x]],after_dimensions=[dims[f]for f in newP[x]])) + return dict(status='PASS_MEASURED_AFFECTED_SUFFIX_FRAME_LEDGER',source_head='5f6bd3fbc0e6796dd31263cef1f06dc968186f64', + affected_streams=len(affected),changed_paths=len(byrole),exact_rational_containment_checks=len(containment), + affected_helper_descent_overlaps=0,partner_setup_descent_replacements_applied=len(setup_frames), + old_histogram=dict(oldH),new_histogram=dict(newH),local_histogram_delta=delta, + both_reflected_ledgers=True,reflected_justification='For each nested frame pair A⊂B, the annihilator inclusion reverses and the codimension drop equals the dimension gain.', + paths=byrole,seconds=time.monotonic()-start, + scope='Chronological required-frame census of all affected helper, source-carrier and target streams. Targets start at ZERO for this difference census; their unchanged prior prefixes terminate within the checked first unchanged precursor frame, under retained source admission. Helper prefix frames are read from the actual base forward word and no affected helper overlaps descent changes; all 12 selected partner setups use their verified post-descent rank-22 frames. No global finite/compiler replay is claimed.') + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + r=run() + print(json.dumps({k:v for k,v in r.items()if k!='paths'},indent=2)) diff --git a/research/gen5b-shared-kernels/exact_geometry.py b/research/gen5b-shared-kernels/exact_geometry.py new file mode 100644 index 0000000000..e4bbb9d0d9 --- /dev/null +++ b/research/gen5b-shared-kernels/exact_geometry.py @@ -0,0 +1,57 @@ +"""Original exact weighted-frame linear algebra over rational numbers. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as Q +from math import gcd,lcm +def transpose(A):return list(map(list,zip(*A))) + + +def eye(n):return [[Q(i==j)for j in range(n)]for i in range(n)] + + +def add(A,B,c=1):return [[x+c*y for x,y in zip(a,b)]for a,b in zip(A,B)] + + +def mul(A,B): + cols=transpose(B) + return [[sum((x*y for x,y in zip(row,col)if x and y),Q(0))for col in cols]for row in A] + + +def echelon(A): + A=[[Q(x)for x in row]for row in A];piv=[];n=len(A) + if not n:return A,piv + for j in range(len(A[0])): + k=next((k for k in range(len(piv),n)if A[k][j]),None) + if k is None:continue + i=len(piv);A[i],A[k]=A[k],A[i];c=A[i][j];A[i]=[x/c for x in A[i]] + for k in range(n): + if k!=i and A[k][j]: + c=A[k][j];A[k]=[x-c*y for x,y in zip(A[k],A[i])] + piv.append(j) + if len(piv)==n:break + return A,piv + + +def inv(A): + n=len(A);B,p=echelon([a+b for a,b in zip(A,eye(n))]);assert p[:n]==list(range(n)) + return [r[n:]for r in B] + + +def projector(ann): + # G=I-J/9; its inverse is I-J/15 in dimension24. + I=eye(24);Gi=[[I[i][j]-Q(1,15)for j in range(24)]for i in range(24)] + A=[[Q(x)for x in row]for row in ann] + gram=mul(mul(A,Gi),transpose(A));gram_inv=inv(gram) + return add(I,mul(mul(mul(Gi,transpose(A)),gram_inv),A),-1) + + +def integer_columns(A,count): + _,p=echelon(A);assert len(p)==count + out=[] + for j in p: + col=[row[j]for row in A];den=lcm(*(x.denominator for x in col)) + col=[int(x*den)for x in col];g=0 + for x in col:g=gcd(g,abs(x)) + out.append([x//g for x in col]) + return out,p + diff --git a/research/gen5b-shared-kernels/exact_intervals.py b/research/gen5b-shared-kernels/exact_intervals.py new file mode 100644 index 0000000000..e28b500b2b --- /dev/null +++ b/research/gen5b-shared-kernels/exact_intervals.py @@ -0,0 +1,77 @@ +"""Original rational log/exp enclosures; upstream programs are never run. + +Atanh series uses 64 terms and an explicit positive tail. Exponential series +uses 32 terms with a geometric upper bound for its tail, on arguments <= 1. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as F +from decimal import Decimal, localcontext +from functools import lru_cache +GRID=10**50 +def floor_grid(x): + return F((x * GRID).numerator // (x * GRID).denominator, GRID) + + +def ceil_grid(x): + return -floor_grid(-x) + + +@lru_cache(None) +def log_interval(x): + """ln(x), x>=1, binary reduction and 64-term positive atanh series.""" + x = F(x) + if x < 1: + raise ValueError('log argument must be at least one') + k = 0 + while x >= 2: + x /= 2 + k += 1 + def short(y): + z = (y - 1) / (y + 1) + power, total = z, F(0) + for j in range(64): + total += 2 * power / (2*j + 1) + power *= z*z + return total, total + 2*power / (129*(1-z*z)) + lo, hi = short(x) + a, b = short(F(2)) + return floor_grid(lo+k*a), ceil_grid(hi+k*b) + + +def exp_interval(lo, hi): + if not 0 <= lo <= hi <= 1: + raise ValueError('exponential interval is outside certified range') + def poly(x): + term = total = F(1) + for n in range(1, 33): + term = term*x/n + total += term + return total, term + low, _ = poly(lo) + high, term = poly(hi) + tail = (term*hi/33) / (1-hi/34) + return floor_grid(low), ceil_grid(high+tail) + + +def moment_interval(m, W, histogram, a): + W, a = F(W), F(a) + if not isinstance(m, int) or m <= 1 or W <= 0 or not 0 <= a < 1: + raise ValueError('invalid moment dimensions or exponent') + lo = hi = F(0) + for r, n in histogram.items(): + if not isinstance(r, int) or not 0 < r < m or F(n) <= 0: + raise ValueError('invalid positive-rank child') + L, U = log_interval(F(m,r)) + E, G = exp_interval(a*L,a*U) + weight = F(n)*r/(m*W) + lo += weight*E + hi += weight*G + return lo, hi + + +def dec(x): + x = F(x) + with localcontext() as c: + c.prec = 45 + return str(Decimal(x.numerator)/Decimal(x.denominator)) + diff --git a/research/gen5b-shared-kernels/fetch_inputs.py b/research/gen5b-shared-kernels/fetch_inputs.py new file mode 100644 index 0000000000..ae1a1752a9 --- /dev/null +++ b/research/gen5b-shared-kernels/fetch_inputs.py @@ -0,0 +1,35 @@ +"""Download only hash-pinned public data; no upstream program is executed.""" +import argparse +from pathlib import Path +import urllib.request + +from source_data import MANIFEST, verify_bytes + + +def fetch(destination): + destination = Path(destination).expanduser().resolve() + for name, pin in MANIFEST['files'].items(): + target = destination / name + if target.exists(): + verify_bytes(name, target.read_bytes()) + print('Verified existing ' + name) + continue + url = ('https://raw.githubusercontent.com/' + pin.get('repository', MANIFEST['repository']) + '/' + + pin.get('commit', MANIFEST['commit']) + '/' + pin.get('package', MANIFEST['package']) + + '/' + pin.get('path', name)) + with urllib.request.urlopen(url, timeout=60) as response: + data = response.read(pin['bytes'] + 1) + verify_bytes(name, data) + target.parent.mkdir(parents=True, exist_ok=True) + # Exclusive creation avoids replacing a file written during download. + with target.open('xb') as output: + output.write(data) + print('Verified downloaded ' + name) + return destination + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--destination', type=Path, required=True) + args = parser.parse_args() + print('Input directory: ' + str(fetch(args.destination))) diff --git a/research/gen5b-shared-kernels/finite_bill.py b/research/gen5b-shared-kernels/finite_bill.py new file mode 100644 index 0000000000..d74463da3c --- /dev/null +++ b/research/gen5b-shared-kernels/finite_bill.py @@ -0,0 +1,72 @@ +"""Original changed-obligation check for the retained finite bill. + +Constants and formulas are independently transcribed from pinned PR299. +Unchanged all-size interfaces and original norm bounds remain hypotheses. +""" +from pathlib import Path +from fractions import Fraction as F +import json,hashlib +import source_data as sd + +def ceil(x):return -((-x.numerator)//x.denominator) +def cutoff(delta,C): + assert 00 + return max(1,ceil(36/delta**2),ceil(F(2*(4+(C-1).bit_length()),1)/delta)) + +def serial(x): + if isinstance(x,F):return str(x) + if isinstance(x,dict):return {str(k):serial(v)for k,v in x.items()} + if isinstance(x,(list,tuple)):return [serial(v)for v in x] + return x + +def run(chart,norm,math): + pins=sd.read_json('expected/kernel-pins.json') + assert chart['charts']==18 and chart['max_changed_chart_factors']==142 + assert norm['status']=='PASS_EXACT_SCALAR_NORM_TRANSPORT' + m=120;R=pins['physical_R'];v=1760;T=60;stock=math['literal_stock'];d=m*m;N=2*m + assert R==15427 and stock==1229735 + E=T*math['calls'];mass=T*math['rank_mass'];assert m*stock-mass==264000 + assert math['calls']==482665 and math['rank_mass']==2455070 + weighted=T*(5*pins['scalar_events']+6*v) + unit=T*(5*pins['literal_unit_additions']+6*v) + J=T*(24*v+10*R);good=8*m*m+8;high=16*(d+1)**2 + K=600*((stock-1)+R*120*chart['combined_normalizer_factor_bound']) + assert K==chart['selector_calls_bound']==905994200400<2**40 + coefficient=unit+J*high+J*(stock+24)+E*good+E*(128*N**3)+16*m**3+120*T+E+K+1 + assert coefficient<2**80 and 2*m**3*10**16<2**80 and stock+24<2**80 + # Use the independent conservative factor-two norm transport, even though + # the bridge worker separately checks the stronger unchanged majorant. + payload=64*(2*pins['forward_max_row_l1'])**3*(2*pins['inverse_max_row_l1'])**2 + assert payload==norm['payload_upper']<2**104 + c=F(math['root_bracket'][0]);moment_upper=F(math['moment_interval'][1]) + delta_tau=1-moment_upper + delta_linear=1-F(mass,m*stock)-F(32*m*E,10**16*stock) + assert delta_tau>0 and delta_linear>0 + chain=[F(384599,10**10)];gaps=[] + for stage in range(3): + prior=chain[-1];a=(1-c)*c+c*prior + ds=dict(atom=c-a,borrowing=1-a-c,remainder=1-a-c*(1-prior),stock=1-c) + delta=min(ds.values());assert prior0 + L=cutoff(delta,coefficient) + assert F(L)*delta**2>=36 and F(L)*delta>=2*(4+(coefficient-1).bit_length()) + gaps.append(dict(stage=stage+1,slacks=ds,minimum=delta,cutoff_log2_at_displayed_coefficient=L)) + chain.append(a) + assert chain==list(map(F,math['assembly']['bootstrap_chain'])) + # Pure rank-2 banks introduce sixty block-separation scalar choices. + max_bank_scalar=max(len(p['widths'])for p in math['packing']['patterns']) + assert max_bank_scalar==60<=m + return dict(status='PASS_CHANGED_FINITE_OBLIGATIONS_UNDER_RETAINED_INTERFACES', + scalar_weighted_additions=weighted,scalar_unit_additions=unit,literal_children=E, + literal_rank_mass=mass,literal_stock=stock,route_families=J, + new_chart_count=18,max_changed_chart_factors=142,max_changed_chart_numerator=11,max_changed_chart_denominator=9, + new_bank_block_scalars_up_to=max_bank_scalar, + scalar_unit_reason='Every block+1 scalar is at most60; chart factor numerators≤11 and denominators≤9. All are units in retained prime characteristic q>2^80.', + normalizer_factor_bound=815,bank_selector_calls=K,displayed_finite_coefficient=coefficient, + coefficient_bits=coefficient.bit_length(),retained_coefficient_cap_bits=80, + conservative_payload_upper=payload,payload_bits=payload.bit_length(),retained_payload_cap_bits=104, + bad_fallback_per_child=32*m*m,internal_row_coefficient=14401,external_row_coefficient=20161, + ordinary_degree_gap=F(10**6)-F(51*20161,25),delta_tau_lower=delta_tau,delta_linear=delta_linear, + bootstrap_chain=chain,bootstrap_gaps=gaps, + cutoff_scope='Displayed fixed bill only. The retained theorem rule uses C_full including inherited primitive, wrapper and earlier ordinary-level constants; this check does not assign those unknown constants a value.', + source_head=sd.HEAD,source_pins_sha256=sd.MANIFEST['files']['expected/kernel-pins.json']['sha256']) + diff --git a/research/gen5b-shared-kernels/inputs.json b/research/gen5b-shared-kernels/inputs.json new file mode 100644 index 0000000000..223e0943af --- /dev/null +++ b/research/gen5b-shared-kernels/inputs.json @@ -0,0 +1,107 @@ +{ + "repository": "CrocSwap/integer-mult-bounds", + "commit": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "package": "research/five-stage-gen5b-kernels-restorations-sinks", + "files": { + "gen5bit/selected/bit/word_p12.json.gz": { + "git_blob": "ad318242f00ab47190660dd57f30e0d1d612f6f8", + "sha256": "f2a8b915209c28812c73a6a51a1b30b9cf830d7e0acbf00e7094b976d513cdb8", + "bytes": 727150 + }, + "gen5bit/selected/bit/frames_p12.json.gz": { + "git_blob": "a558091c81ab56c8a8b74ab3c5ebe28b2a1d9694", + "sha256": "c5e9eadf7ea06cefcb31f94f00b99c9cf3b850231af222bc88efee51f5d01295", + "bytes": 297501 + }, + "gen5bit/selected/bit/graph_p12.json": { + "git_blob": "d25a5f7be51c6a064a30a210c0aac3811e44e9f1", + "sha256": "73814dd03979f08b13cf981a30b56dc9b8127f618162407b815009e44298cb00", + "bytes": 927750 + }, + "gen5bit/selected/bit/kchron_p12.json": { + "git_blob": "f8295fab205a81dfdf2612e9b37ef536aea952e7", + "sha256": "e28cd9e9842605af568eea62203a15c48fb08a92e99b38a3480f2fe462d8e1b4", + "bytes": 226522 + }, + "gen5bit/selected/bit/profile_p12.json": { + "git_blob": "f00ab5c99495fd3912dd8c744e0611bdbf3d9753", + "sha256": "bcfebb851f1d2e91c604867da2235d83f36f3d591a14d113a4aab734417b3c0b", + "bytes": 917 + }, + "restore-selection.json": { + "git_blob": "118ea83e27fc4cb51c28fcef6ce96a8aa076c834", + "sha256": "494885a7c371c60c29c7dc8add574c589be9705f4299fcf1f64138bdd7878f7b", + "bytes": 808745 + }, + "kernel-selection.json": { + "git_blob": "32afa7b3dbab3b661c47cb0b84b9a038fa0e133b", + "sha256": "cf4321ad481b99a59a6e0e022a770d55da9ecc69070ca203398ff615181880a9", + "bytes": 873734 + }, + "target-selection.json": { + "git_blob": "e43472750bb21afca82c3f0853a8f3e64792affe", + "sha256": "2feaa1d43d663f3360722f5377824ca2e9f31ac52294827c2f753cf95f82a4ea", + "bytes": 1040746 + }, + "sink-selection.json": { + "git_blob": "7112747fca58dfa86ed38da6a994c21b92f4594e", + "sha256": "9909ec8ecbbf28fb0f6b22af7e4d3a7cf83a6af9e8d4b8545940389d11de1efb", + "bytes": 31837 + }, + "expected/kernel-pins.json": { + "git_blob": "f66743863692473f2862792eaa13ca28cb125b27", + "sha256": "bdc0cb4aebaa9c1209c0598f14f69df4e0489e65b2208d0c51f7a3aaee1f1a77", + "bytes": 2937 + }, + "descent-selection.json": { + "git_blob": "d204e192f859a2055e9b1947a7709ec275904953", + "sha256": "f68d5a0949e22e4f4ddc8da915caa4a1b30919e25ae1ce956ddd7ce4fb18bfd8", + "bytes": 4225342 + }, + "pr300/descent2-selection.json": { + "git_blob": "638d3a1669c850d91f93d04939abfdd5f3a86c05", + "sha256": "5f947e418285a776d5c7170c07f1befcc44e626e53e6825f06c80a8c81b7a755", + "bytes": 319700, + "repository": "rohanarun/integer-mult-bounds", + "commit": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "package": "research/five-stage-gen5b-full", + "path": "descent2-selection.json" + }, + "pr300/expected/kernel-pins.json": { + "git_blob": "5f551166c73a8acb566fe10ad1f733147aad0c13", + "sha256": "5421d38c4624a5d05b8936fa86f490ee0e932e9e6fe7c6a24defd9b7c671cf4e", + "bytes": 3281, + "repository": "rohanarun/integer-mult-bounds", + "commit": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "package": "research/five-stage-gen5b-full", + "path": "expected/kernel-pins.json" + }, + "pr300/portable_bit.py": { + "git_blob": "47749a7028739552798e230d81e781681307a061", + "sha256": "93b2c72a63cf24b991a7cc0f35de4da016a245c58f45c1551fe888d5412a73a4", + "bytes": 6831, + "repository": "rohanarun/integer-mult-bounds", + "commit": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "package": "research/five-stage-gen5b-full", + "path": "portable_bit.py" + }, + "pr300/restore-selection.json": { + "git_blob": "f76b0bb16b9aad7af144ac1ae4facc1a71da90f6", + "sha256": "aa85e17b5ff9e849f0decce611a9cc61f697e23aaeea87a7580084535e7f3e07", + "bytes": 808745, + "repository": "rohanarun/integer-mult-bounds", + "commit": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "package": "research/five-stage-gen5b-full", + "path": "restore-selection.json" + }, + "pr300/sink-selection.json": { + "git_blob": "bf403cb657dd451e3d64c49d6edc856eb29f7b23", + "sha256": "cadc2c1e3975a3103bbd55992428b686950b4f13987f59146b527f86cebf639f", + "bytes": 31837, + "repository": "rohanarun/integer-mult-bounds", + "commit": "fd516176fd068e4fa7af14b40cd878ce8c305296", + "package": "research/five-stage-gen5b-full", + "path": "sink-selection.json" + } + } +} diff --git a/research/gen5b-shared-kernels/kernel-witness.json b/research/gen5b-shared-kernels/kernel-witness.json new file mode 100644 index 0000000000..b3b17b4d01 --- /dev/null +++ b/research/gen5b-shared-kernels/kernel-witness.json @@ -0,0 +1,7098 @@ +{ + "schema": "shared-donor-candidates/1", + "source_head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "best_candidates": [ + { + "line": [ + 6, + 7 + ], + "relations": [ + { + "pivot": 9883, + "donors": [ + 8413, + 8415, + 9881 + ] + }, + { + "pivot": 10534, + "donors": [ + 9228, + 9230, + 9935, + 9937, + 10532 + ] + }, + { + "pivot": 10741, + "donors": [ + 8339, + 8341, + 10740 + ] + }, + { + "pivot": 10759, + "donors": [ + 9845, + 9847, + 10758 + ] + }, + { + "pivot": 10764, + "donors": [ + 9175, + 9845 + ] + }, + { + "pivot": 10766, + "donors": [ + 9177, + 9847 + ] + }, + { + "pivot": 10812, + "donors": [ + 8339, + 8359, + 8394, + 9229, + 9898, + 10733, + 10740 + ] + }, + { + "pivot": 10813, + "donors": [ + 8339, + 8361, + 8394, + 9229, + 9898, + 10733, + 10740 + ] + }, + { + "pivot": 10830, + "donors": [ + 8412, + 9247, + 9845, + 9863, + 9916, + 10751, + 10758 + ] + }, + { + "pivot": 10831, + "donors": [ + 8412, + 9247, + 9845, + 9865, + 9916, + 10751, + 10758 + ] + }, + { + "pivot": 10836, + "donors": [ + 9193, + 9863 + ] + }, + { + "pivot": 10838, + "donors": [ + 9195, + 9865 + ] + }, + { + "pivot": 10859, + "donors": [ + 8339, + 8394, + 9229, + 9898, + 10733, + 10740 + ] + }, + { + "pivot": 10861, + "donors": [ + 8339, + 8359, + 8361, + 8394, + 9229, + 9898, + 10733, + 10740 + ] + }, + { + "pivot": 10877, + "donors": [ + 8412, + 9247, + 9845, + 9916, + 10751, + 10758 + ] + }, + { + "pivot": 10879, + "donors": [ + 8412, + 9247, + 9845, + 9863, + 9865, + 9916, + 10751, + 10758 + ] + }, + { + "pivot": 10884, + "donors": [ + 8413, + 9881 + ] + }, + { + "pivot": 10885, + "donors": [ + 8415, + 9881 + ] + }, + { + "pivot": 10892, + "donors": [ + 9211, + 9881 + ] + }, + { + "pivot": 10894, + "donors": [ + 8413, + 8415, + 9213, + 9881 + ] + }, + { + "pivot": 10922, + "donors": [ + 8339, + 9229, + 9247, + 9845, + 10733, + 10740, + 10751, + 10758, + 10911, + 10915 + ] + }, + { + "pivot": 10928, + "donors": [ + 8339, + 10733, + 10740, + 10911 + ] + }, + { + "pivot": 10929, + "donors": [ + 9228, + 9229, + 10532, + 10910, + 10911 + ] + }, + { + "pivot": 10940, + "donors": [ + 9228, + 9935, + 10532 + ] + }, + { + "pivot": 10941, + "donors": [ + 9228, + 9937, + 10532 + ] + }, + { + "pivot": 10946, + "donors": [ + 9845, + 10751, + 10758, + 10915 + ] + }, + { + "pivot": 10950, + "donors": [ + 9267, + 9935 + ] + }, + { + "pivot": 10952, + "donors": [ + 9269, + 9937 + ] + } + ] + }, + { + "line": [ + 16, + 17 + ], + "relations": [ + { + "pivot": 10277, + "donors": [ + 9719, + 9722, + 10275 + ] + }, + { + "pivot": 10382, + "donors": [ + 9691, + 9693, + 10379 + ] + }, + { + "pivot": 10785, + "donors": [ + 8787, + 8789, + 8891, + 8894, + 9691, + 9693, + 9719, + 9722, + 10350, + 10352, + 10783 + ] + }, + { + "pivot": 10890, + "donors": [ + 8787, + 8789, + 9691, + 9693, + 9719, + 9722, + 10887 + ] + }, + { + "pivot": 11171, + "donors": [ + 9691, + 9693, + 10782, + 10784, + 11168 + ] + }, + { + "pivot": 11172, + "donors": [ + 8787, + 8789, + 8862, + 8864, + 8891, + 8894, + 9691, + 9693, + 10350, + 10352, + 11169 + ] + }, + { + "pivot": 11173, + "donors": [ + 8787, + 8789, + 8862, + 8864, + 10859, + 10861, + 11170 + ] + }, + { + "pivot": 11257, + "donors": [ + 8787, + 8789, + 9691, + 9693, + 9719, + 9722, + 11255 + ] + }, + { + "pivot": 11286, + "donors": [ + 10859, + 10861, + 11283 + ] + }, + { + "pivot": 11558, + "donors": [ + 8615, + 10115, + 11006, + 11007, + 11448, + 11557 + ] + }, + { + "pivot": 11634, + "donors": [ + 8615, + 9691, + 9693, + 9719, + 9722, + 10115, + 10350, + 10352, + 11006, + 11007, + 11448, + 11527, + 11529, + 11555, + 11557, + 11632 + ] + }, + { + "pivot": 11711, + "donors": [ + 8615, + 8787, + 8789, + 9691, + 9693, + 9719, + 9722, + 10115, + 10859, + 10861, + 11006, + 11007, + 11448, + 11555, + 11557, + 11709 + ] + }, + { + "pivot": 11825, + "donors": [ + 8862, + 8864, + 8891, + 8894, + 9691, + 9693, + 9719, + 9722, + 10350, + 10352, + 11824 + ] + }, + { + "pivot": 11830, + "donors": [ + 8787, + 8789, + 8891, + 8894, + 10859, + 10861, + 11828 + ] + }, + { + "pivot": 11843, + "donors": [ + 8862, + 8864, + 8891, + 8894, + 9691, + 9693, + 9719, + 9722, + 10350, + 10352, + 11842 + ] + }, + { + "pivot": 11849, + "donors": [ + 8615, + 8787, + 8789, + 8891, + 8894, + 10115, + 10859, + 10861, + 11006, + 11007, + 11448, + 11555, + 11557, + 11846 + ] + }, + { + "pivot": 11865, + "donors": [ + 8615, + 8787, + 8789, + 8862, + 8864, + 10115, + 10859, + 10861, + 11006, + 11007, + 11448, + 11527, + 11529, + 11555, + 11557, + 11864 + ] + }, + { + "pivot": 11935, + "donors": [ + 8891, + 8894, + 11933 + ] + }, + { + "pivot": 11950, + "donors": [ + 8787, + 8862, + 10275, + 10350, + 10859, + 11169, + 11255, + 11527, + 11709, + 11824, + 11933 + ] + }, + { + "pivot": 11952, + "donors": [ + 8615, + 8787, + 8862, + 9691, + 9693, + 9719, + 9722, + 10115, + 10275, + 10350, + 10859, + 11006, + 11007, + 11169, + 11255, + 11448, + 11529, + 11555, + 11557, + 11709, + 11824, + 11933 + ] + }, + { + "pivot": 11963, + "donors": [ + 8901, + 8903, + 11962 + ] + }, + { + "pivot": 12331, + "donors": [ + 10623, + 11006, + 11007, + 11538 + ] + }, + { + "pivot": 12341, + "donors": [ + 8615, + 10623, + 11007, + 11448 + ] + }, + { + "pivot": 12344, + "donors": [ + 11007, + 11539 + ] + }, + { + "pivot": 12410, + "donors": [ + 8787, + 10275, + 10782, + 11168 + ] + }, + { + "pivot": 12418, + "donors": [ + 10783, + 11169, + 11170, + 11828 + ] + }, + { + "pivot": 12428, + "donors": [ + 8787, + 10783, + 11170, + 11632 + ] + }, + { + "pivot": 12439, + "donors": [ + 8789, + 9691, + 9693, + 9719, + 9722, + 10275, + 10782, + 11168 + ] + }, + { + "pivot": 12447, + "donors": [ + 8891, + 8894, + 9719, + 9722, + 10783, + 11169, + 11170, + 11828 + ] + }, + { + "pivot": 12457, + "donors": [ + 8615, + 8789, + 8862, + 8864, + 8891, + 8894, + 10115, + 10783, + 10859, + 10861, + 11006, + 11007, + 11170, + 11448, + 11527, + 11529, + 11555, + 11557, + 11632 + ] + }, + { + "pivot": 12546, + "donors": [ + 10350, + 11527, + 11709 + ] + }, + { + "pivot": 12547, + "donors": [ + 8787, + 8901, + 10275, + 10350, + 11169, + 11527, + 11709, + 11824, + 11933, + 11962 + ] + }, + { + "pivot": 12549, + "donors": [ + 8787, + 10275, + 11169, + 11824, + 11933 + ] + }, + { + "pivot": 12550, + "donors": [ + 8787, + 8862, + 10275, + 10350, + 11169, + 11527, + 11824, + 11933 + ] + }, + { + "pivot": 12575, + "donors": [ + 8615, + 8787, + 8789, + 9691, + 9693, + 9719, + 9722, + 10115, + 10352, + 10859, + 10861, + 11006, + 11007, + 11448, + 11529, + 11555, + 11557, + 11709 + ] + }, + { + "pivot": 12576, + "donors": [ + 8615, + 8789, + 8862, + 8864, + 8903, + 10115, + 10275, + 10350, + 10859, + 10861, + 11006, + 11007, + 11169, + 11448, + 11529, + 11555, + 11557, + 11709, + 11824, + 11933, + 11962 + ] + }, + { + "pivot": 12578, + "donors": [ + 8787, + 8862, + 8864, + 9691, + 9693, + 9719, + 9722, + 10275, + 10350, + 10352, + 11169, + 11824, + 11933 + ] + }, + { + "pivot": 12579, + "donors": [ + 8787, + 8862, + 9691, + 9693, + 9719, + 9722, + 10275, + 10350, + 11169, + 11529, + 11824, + 11933 + ] + }, + { + "pivot": 12607, + "donors": [ + 8787, + 10275, + 11169, + 11842, + 11937 + ] + }, + { + "pivot": 12665, + "donors": [ + 8787, + 10275, + 11169, + 11632, + 11828, + 11864, + 11955 + ] + } + ] + }, + { + "line": [ + 2, + 3 + ], + "relations": [ + { + "pivot": 9355, + "donors": [ + 9346, + 9347, + 9353 + ] + }, + { + "pivot": 9726, + "donors": [ + 9346, + 9353 + ] + }, + { + "pivot": 9729, + "donors": [ + 9347, + 9353 + ] + }, + { + "pivot": 9793, + "donors": [ + 9402, + 9403, + 9790 + ] + }, + { + "pivot": 12233, + "donors": [ + 9402, + 9790 + ] + }, + { + "pivot": 12262, + "donors": [ + 9403, + 9790 + ] + } + ] + } + ], + "portable": { + "status": "PASS_EXACT_SIGNED_PREFIX_AND_PORTABLE_SELECTION", + "head": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64", + "plain_odd_initial_read_events": 648088, + "last_plain_read": { + "record": 648087, + "scalar": [ + 3503, + 16719, + -1 + ] + }, + "target_prefix_setup_record": 696719, + "frozen_literal_cut_reads_reproduced": 1720, + "common_cut": "After all initial plain dirty compensation reads and all frozen kernel setups, before the first source injection. Per-entry latest-read cuts also legal because every first non-read use is later than the entire plain-read block.", + "variants": { + "two_lines": { + "entries": [ + { + "pivot": 13403, + "donors": [ + 11933, + 11935, + 13401 + ], + "virtual_pivot": 9883, + "virtual_donors": [ + 8413, + 8415, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3207, + 13403, + -1 + ], + "base_prefix_cut_record": 563335, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14054, + "donors": [ + 12748, + 12750, + 13455, + 13457, + 14052 + ], + "virtual_pivot": 10534, + "virtual_donors": [ + 9228, + 9230, + 9935, + 9937, + 10532 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2183, + 14054, + -1 + ], + "base_prefix_cut_record": 579815, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14261, + "donors": [ + 11859, + 11861, + 14260 + ], + "virtual_pivot": 10741, + "virtual_donors": [ + 8339, + 8341, + 10740 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3143, + 14261, + -1 + ], + "base_prefix_cut_record": 583735, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14279, + "donors": [ + 13365, + 13367, + 14278 + ], + "virtual_pivot": 10759, + "virtual_donors": [ + 9845, + 9847, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3151, + 14279, + -1 + ], + "base_prefix_cut_record": 584263, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14284, + "donors": [ + 12695, + 13365 + ], + "virtual_pivot": 10764, + "virtual_donors": [ + 9175, + 9845 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2638, + 14284, + -1 + ], + "base_prefix_cut_record": 584351, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14286, + "donors": [ + 12697, + 13367 + ], + "virtual_pivot": 10766, + "virtual_donors": [ + 9177, + 9847 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2639, + 14286, + -1 + ], + "base_prefix_cut_record": 584383, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14332, + "donors": [ + 11859, + 11879, + 11914, + 12749, + 13418, + 14253, + 14260 + ], + "virtual_pivot": 10812, + "virtual_donors": [ + 8339, + 8359, + 8394, + 9229, + 9898, + 10733, + 10740 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3174, + 14332, + -1 + ], + "base_prefix_cut_record": 585515, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14333, + "donors": [ + 11859, + 11881, + 11914, + 12749, + 13418, + 14253, + 14260 + ], + "virtual_pivot": 10813, + "virtual_donors": [ + 8339, + 8361, + 8394, + 9229, + 9898, + 10733, + 10740 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3175, + 14333, + -1 + ], + "base_prefix_cut_record": 585519, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14350, + "donors": [ + 11932, + 12767, + 13365, + 13383, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10830, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9863, + 9916, + 10751, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3182, + 14350, + -1 + ], + "base_prefix_cut_record": 586203, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14351, + "donors": [ + 11932, + 12767, + 13365, + 13385, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10831, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9865, + 9916, + 10751, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3183, + 14351, + -1 + ], + "base_prefix_cut_record": 586207, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14356, + "donors": [ + 12713, + 13383 + ], + "virtual_pivot": 10836, + "virtual_donors": [ + 9193, + 9863 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2646, + 14356, + -1 + ], + "base_prefix_cut_record": 586319, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14358, + "donors": [ + 12715, + 13385 + ], + "virtual_pivot": 10838, + "virtual_donors": [ + 9195, + 9865 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2647, + 14358, + -1 + ], + "base_prefix_cut_record": 586351, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14379, + "donors": [ + 11859, + 11914, + 12749, + 13418, + 14253, + 14260 + ], + "virtual_pivot": 10859, + "virtual_donors": [ + 8339, + 8394, + 9229, + 9898, + 10733, + 10740 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3174, + 14379, + -1 + ], + "base_prefix_cut_record": 586831, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14381, + "donors": [ + 11859, + 11879, + 11881, + 11914, + 12749, + 13418, + 14253, + 14260 + ], + "virtual_pivot": 10861, + "virtual_donors": [ + 8339, + 8359, + 8361, + 8394, + 9229, + 9898, + 10733, + 10740 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3175, + 14381, + -1 + ], + "base_prefix_cut_record": 586879, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14397, + "donors": [ + 11932, + 12767, + 13365, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10877, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9916, + 10751, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3182, + 14397, + -1 + ], + "base_prefix_cut_record": 587087, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14399, + "donors": [ + 11932, + 12767, + 13365, + 13383, + 13385, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10879, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9863, + 9865, + 9916, + 10751, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3183, + 14399, + -1 + ], + "base_prefix_cut_record": 587135, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14404, + "donors": [ + 11933, + 13401 + ], + "virtual_pivot": 10884, + "virtual_donors": [ + 8413, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3206, + 14404, + -1 + ], + "base_prefix_cut_record": 587163, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14405, + "donors": [ + 11935, + 13401 + ], + "virtual_pivot": 10885, + "virtual_donors": [ + 8415, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3207, + 14405, + -1 + ], + "base_prefix_cut_record": 587167, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14412, + "donors": [ + 12731, + 13401 + ], + "virtual_pivot": 10892, + "virtual_donors": [ + 9211, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2654, + 14412, + -1 + ], + "base_prefix_cut_record": 587559, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14414, + "donors": [ + 11933, + 11935, + 12733, + 13401 + ], + "virtual_pivot": 10894, + "virtual_donors": [ + 8413, + 8415, + 9213, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2655, + 14414, + -1 + ], + "base_prefix_cut_record": 587591, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14442, + "donors": [ + 11859, + 12749, + 12767, + 13365, + 14253, + 14260, + 14271, + 14278, + 14431, + 14435 + ], + "virtual_pivot": 10922, + "virtual_donors": [ + 8339, + 9229, + 9247, + 9845, + 10733, + 10740, + 10751, + 10758, + 10911, + 10915 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3222, + 14442, + -1 + ], + "base_prefix_cut_record": 587963, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14448, + "donors": [ + 11859, + 14253, + 14260, + 14431 + ], + "virtual_pivot": 10928, + "virtual_donors": [ + 8339, + 10733, + 10740, + 10911 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2662, + 14448, + -1 + ], + "base_prefix_cut_record": 588063, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14449, + "donors": [ + 12748, + 12749, + 14052, + 14430, + 14431 + ], + "virtual_pivot": 10929, + "virtual_donors": [ + 9228, + 9229, + 10532, + 10910, + 10911 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3221, + 14449, + -1 + ], + "base_prefix_cut_record": 588071, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14460, + "donors": [ + 12748, + 13455, + 14052 + ], + "virtual_pivot": 10940, + "virtual_donors": [ + 9228, + 9935, + 10532 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3230, + 14460, + -1 + ], + "base_prefix_cut_record": 588195, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14461, + "donors": [ + 12748, + 13457, + 14052 + ], + "virtual_pivot": 10941, + "virtual_donors": [ + 9228, + 9937, + 10532 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3231, + 14461, + -1 + ], + "base_prefix_cut_record": 588199, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14466, + "donors": [ + 13365, + 14271, + 14278, + 14435 + ], + "virtual_pivot": 10946, + "virtual_donors": [ + 9845, + 10751, + 10758, + 10915 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2670, + 14466, + -1 + ], + "base_prefix_cut_record": 588599, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14470, + "donors": [ + 12787, + 13455 + ], + "virtual_pivot": 10950, + "virtual_donors": [ + 9267, + 9935 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2678, + 14470, + -1 + ], + "base_prefix_cut_record": 588663, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14472, + "donors": [ + 12789, + 13457 + ], + "virtual_pivot": 10952, + "virtual_donors": [ + 9269, + 9937 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2679, + 14472, + -1 + ], + "base_prefix_cut_record": 588695, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 12875, + "donors": [ + 12866, + 12867, + 12873 + ], + "virtual_pivot": 9355, + "virtual_donors": [ + 9346, + 9347, + 9353 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2655, + 12875, + -1 + ], + "base_prefix_cut_record": 549359, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 13246, + "donors": [ + 12866, + 12873 + ], + "virtual_pivot": 9726, + "virtual_donors": [ + 9346, + 9353 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2654, + 13246, + -1 + ], + "base_prefix_cut_record": 558975, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 13249, + "donors": [ + 12867, + 12873 + ], + "virtual_pivot": 9729, + "virtual_donors": [ + 9347, + 9353 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2655, + 13249, + -1 + ], + "base_prefix_cut_record": 559167, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 13313, + "donors": [ + 12922, + 12923, + 13310 + ], + "virtual_pivot": 9793, + "virtual_donors": [ + 9402, + 9403, + 9790 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2679, + 13313, + -1 + ], + "base_prefix_cut_record": 561487, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15753, + "donors": [ + 12922, + 13310 + ], + "virtual_pivot": 12233, + "virtual_donors": [ + 9402, + 9790 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2677, + 15753, + -1 + ], + "base_prefix_cut_record": 625503, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15782, + "donors": [ + 12923, + 13310 + ], + "virtual_pivot": 12262, + "virtual_donors": [ + 9403, + 9790 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2679, + 15782, + -1 + ], + "base_prefix_cut_record": 626351, + "kind": "shared-donor-contrast-line" + } + ], + "groups": [ + { + "line": [ + 6, + 7 + ], + "pivots": 28, + "distinct_donors": 37, + "active_virtual_roles": [ + 8339, + 8341, + 8359, + 8361, + 8394, + 8412, + 8413, + 8415, + 9175, + 9177, + 9193, + 9195, + 9211, + 9213, + 9228, + 9229, + 9230, + 9247, + 9267, + 9269, + 9845, + 9847, + 9863, + 9865, + 9881, + 9883, + 9898, + 9916, + 9935, + 9937, + 10532, + 10534, + 10733, + 10740, + 10741, + 10751, + 10758, + 10759, + 10764, + 10766, + 10812, + 10813, + 10830, + 10831, + 10836, + 10838, + 10859, + 10861, + 10877, + 10879, + 10884, + 10885, + 10892, + 10894, + 10910, + 10911, + 10915, + 10922, + 10928, + 10929, + 10940, + 10941, + 10946, + 10950, + 10952 + ] + }, + { + "line": [ + 2, + 3 + ], + "pivots": 6, + "distinct_donors": 6, + "active_virtual_roles": [ + 9346, + 9347, + 9353, + 9355, + 9402, + 9403, + 9726, + 9729, + 9790, + 9793, + 12233, + 12262 + ] + } + ], + "pivots": 34, + "distinct_donors": 43, + "scalar_setup_gates": 135, + "scalar_restore_gates": 135 + }, + "three_lines_trimmed": { + "entries": [ + { + "pivot": 13403, + "donors": [ + 11933, + 11935, + 13401 + ], + "virtual_pivot": 9883, + "virtual_donors": [ + 8413, + 8415, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3207, + 13403, + -1 + ], + "base_prefix_cut_record": 563335, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14054, + "donors": [ + 12748, + 12750, + 13455, + 13457, + 14052 + ], + "virtual_pivot": 10534, + "virtual_donors": [ + 9228, + 9230, + 9935, + 9937, + 10532 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2183, + 14054, + -1 + ], + "base_prefix_cut_record": 579815, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14261, + "donors": [ + 11859, + 11861, + 14260 + ], + "virtual_pivot": 10741, + "virtual_donors": [ + 8339, + 8341, + 10740 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3143, + 14261, + -1 + ], + "base_prefix_cut_record": 583735, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14279, + "donors": [ + 13365, + 13367, + 14278 + ], + "virtual_pivot": 10759, + "virtual_donors": [ + 9845, + 9847, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3151, + 14279, + -1 + ], + "base_prefix_cut_record": 584263, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14284, + "donors": [ + 12695, + 13365 + ], + "virtual_pivot": 10764, + "virtual_donors": [ + 9175, + 9845 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2638, + 14284, + -1 + ], + "base_prefix_cut_record": 584351, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14286, + "donors": [ + 12697, + 13367 + ], + "virtual_pivot": 10766, + "virtual_donors": [ + 9177, + 9847 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2639, + 14286, + -1 + ], + "base_prefix_cut_record": 584383, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14332, + "donors": [ + 11859, + 11879, + 11914, + 12749, + 13418, + 14253, + 14260 + ], + "virtual_pivot": 10812, + "virtual_donors": [ + 8339, + 8359, + 8394, + 9229, + 9898, + 10733, + 10740 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3174, + 14332, + -1 + ], + "base_prefix_cut_record": 585515, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14333, + "donors": [ + 11859, + 11881, + 11914, + 12749, + 13418, + 14253, + 14260 + ], + "virtual_pivot": 10813, + "virtual_donors": [ + 8339, + 8361, + 8394, + 9229, + 9898, + 10733, + 10740 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3175, + 14333, + -1 + ], + "base_prefix_cut_record": 585519, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14350, + "donors": [ + 11932, + 12767, + 13365, + 13383, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10830, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9863, + 9916, + 10751, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3182, + 14350, + -1 + ], + "base_prefix_cut_record": 586203, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14351, + "donors": [ + 11932, + 12767, + 13365, + 13385, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10831, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9865, + 9916, + 10751, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3183, + 14351, + -1 + ], + "base_prefix_cut_record": 586207, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14356, + "donors": [ + 12713, + 13383 + ], + "virtual_pivot": 10836, + "virtual_donors": [ + 9193, + 9863 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2646, + 14356, + -1 + ], + "base_prefix_cut_record": 586319, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14358, + "donors": [ + 12715, + 13385 + ], + "virtual_pivot": 10838, + "virtual_donors": [ + 9195, + 9865 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2647, + 14358, + -1 + ], + "base_prefix_cut_record": 586351, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14397, + "donors": [ + 11932, + 12767, + 13365, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10877, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9916, + 10751, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3182, + 14397, + -1 + ], + "base_prefix_cut_record": 587087, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14399, + "donors": [ + 11932, + 12767, + 13365, + 13383, + 13385, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10879, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9863, + 9865, + 9916, + 10751, + 10758 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3183, + 14399, + -1 + ], + "base_prefix_cut_record": 587135, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14404, + "donors": [ + 11933, + 13401 + ], + "virtual_pivot": 10884, + "virtual_donors": [ + 8413, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3206, + 14404, + -1 + ], + "base_prefix_cut_record": 587163, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14405, + "donors": [ + 11935, + 13401 + ], + "virtual_pivot": 10885, + "virtual_donors": [ + 8415, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3207, + 14405, + -1 + ], + "base_prefix_cut_record": 587167, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14412, + "donors": [ + 12731, + 13401 + ], + "virtual_pivot": 10892, + "virtual_donors": [ + 9211, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2654, + 14412, + -1 + ], + "base_prefix_cut_record": 587559, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14414, + "donors": [ + 11933, + 11935, + 12733, + 13401 + ], + "virtual_pivot": 10894, + "virtual_donors": [ + 8413, + 8415, + 9213, + 9881 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2655, + 14414, + -1 + ], + "base_prefix_cut_record": 587591, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14442, + "donors": [ + 11859, + 12749, + 12767, + 13365, + 14253, + 14260, + 14271, + 14278, + 14431, + 14435 + ], + "virtual_pivot": 10922, + "virtual_donors": [ + 8339, + 9229, + 9247, + 9845, + 10733, + 10740, + 10751, + 10758, + 10911, + 10915 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3222, + 14442, + -1 + ], + "base_prefix_cut_record": 587963, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14448, + "donors": [ + 11859, + 14253, + 14260, + 14431 + ], + "virtual_pivot": 10928, + "virtual_donors": [ + 8339, + 10733, + 10740, + 10911 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2662, + 14448, + -1 + ], + "base_prefix_cut_record": 588063, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14449, + "donors": [ + 12748, + 12749, + 14052, + 14430, + 14431 + ], + "virtual_pivot": 10929, + "virtual_donors": [ + 9228, + 9229, + 10532, + 10910, + 10911 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3221, + 14449, + -1 + ], + "base_prefix_cut_record": 588071, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14460, + "donors": [ + 12748, + 13455, + 14052 + ], + "virtual_pivot": 10940, + "virtual_donors": [ + 9228, + 9935, + 10532 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3230, + 14460, + -1 + ], + "base_prefix_cut_record": 588195, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14461, + "donors": [ + 12748, + 13457, + 14052 + ], + "virtual_pivot": 10941, + "virtual_donors": [ + 9228, + 9937, + 10532 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3231, + 14461, + -1 + ], + "base_prefix_cut_record": 588199, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14466, + "donors": [ + 13365, + 14271, + 14278, + 14435 + ], + "virtual_pivot": 10946, + "virtual_donors": [ + 9845, + 10751, + 10758, + 10915 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2670, + 14466, + -1 + ], + "base_prefix_cut_record": 588599, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14470, + "donors": [ + 12787, + 13455 + ], + "virtual_pivot": 10950, + "virtual_donors": [ + 9267, + 9935 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2678, + 14470, + -1 + ], + "base_prefix_cut_record": 588663, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14472, + "donors": [ + 12789, + 13457 + ], + "virtual_pivot": 10952, + "virtual_donors": [ + 9269, + 9937 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2679, + 14472, + -1 + ], + "base_prefix_cut_record": 588695, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 13797, + "donors": [ + 13239, + 13242, + 13795 + ], + "virtual_pivot": 10277, + "virtual_donors": [ + 9719, + 9722, + 10275 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2495, + 13797, + -1 + ], + "base_prefix_cut_record": 572567, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 13902, + "donors": [ + 13211, + 13213, + 13899 + ], + "virtual_pivot": 10382, + "virtual_donors": [ + 9691, + 9693, + 10379 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2783, + 13902, + -1 + ], + "base_prefix_cut_record": 575507, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14305, + "donors": [ + 12307, + 12309, + 12411, + 12414, + 13211, + 13213, + 13239, + 13242, + 13870, + 13872, + 14303 + ], + "virtual_pivot": 10785, + "virtual_donors": [ + 8787, + 8789, + 8891, + 8894, + 9691, + 9693, + 9719, + 9722, + 10350, + 10352, + 10783 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3175, + 14305, + -1 + ], + "base_prefix_cut_record": 584759, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14410, + "donors": [ + 12307, + 12309, + 13211, + 13213, + 13239, + 13242, + 14407 + ], + "virtual_pivot": 10890, + "virtual_donors": [ + 8787, + 8789, + 9691, + 9693, + 9719, + 9722, + 10887 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3007, + 14410, + -1 + ], + "base_prefix_cut_record": 587379, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14691, + "donors": [ + 13211, + 13213, + 14302, + 14304, + 14688 + ], + "virtual_pivot": 11171, + "virtual_donors": [ + 9691, + 9693, + 10782, + 10784, + 11168 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2495, + 14691, + -1 + ], + "base_prefix_cut_record": 593415, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14692, + "donors": [ + 12307, + 12309, + 12382, + 12384, + 12411, + 12414, + 13211, + 13213, + 13870, + 13872, + 14689 + ], + "virtual_pivot": 11172, + "virtual_donors": [ + 8787, + 8789, + 8862, + 8864, + 8891, + 8894, + 9691, + 9693, + 10350, + 10352, + 11169 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3471, + 14692, + -1 + ], + "base_prefix_cut_record": 593427, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14693, + "donors": [ + 12307, + 12309, + 12382, + 12384, + 14379, + 14381, + 14690 + ], + "virtual_pivot": 11173, + "virtual_donors": [ + 8787, + 8789, + 8862, + 8864, + 10859, + 10861, + 11170 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3479, + 14693, + -1 + ], + "base_prefix_cut_record": 593439, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14777, + "donors": [ + 12307, + 12309, + 13211, + 13213, + 13239, + 13242, + 14775 + ], + "virtual_pivot": 11257, + "virtual_donors": [ + 8787, + 8789, + 9691, + 9693, + 9719, + 9722, + 11255 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3007, + 14777, + -1 + ], + "base_prefix_cut_record": 595911, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 14806, + "donors": [ + 14379, + 14381, + 14803 + ], + "virtual_pivot": 11286, + "virtual_donors": [ + 10859, + 10861, + 11283 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3175, + 14806, + -1 + ], + "base_prefix_cut_record": 596595, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15078, + "donors": [ + 12135, + 13635, + 14526, + 14527, + 14968, + 15077 + ], + "virtual_pivot": 11558, + "virtual_donors": [ + 8615, + 10115, + 11006, + 11007, + 11448, + 11557 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3295, + 15078, + -1 + ], + "base_prefix_cut_record": 604483, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15154, + "donors": [ + 12135, + 13211, + 13213, + 13239, + 13242, + 13635, + 13870, + 13872, + 14526, + 14527, + 14968, + 15047, + 15049, + 15075, + 15077, + 15152 + ], + "virtual_pivot": 11634, + "virtual_donors": [ + 8615, + 9691, + 9693, + 9719, + 9722, + 10115, + 10350, + 10352, + 11006, + 11007, + 11448, + 11527, + 11529, + 11555, + 11557, + 11632 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2135, + 15154, + -1 + ], + "base_prefix_cut_record": 606751, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15231, + "donors": [ + 12135, + 12307, + 12309, + 13211, + 13213, + 13239, + 13242, + 13635, + 14379, + 14381, + 14526, + 14527, + 14968, + 15075, + 15077, + 15229 + ], + "virtual_pivot": 11711, + "virtual_donors": [ + 8615, + 8787, + 8789, + 9691, + 9693, + 9719, + 9722, + 10115, + 10859, + 10861, + 11006, + 11007, + 11448, + 11555, + 11557, + 11709 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3295, + 15231, + -1 + ], + "base_prefix_cut_record": 609295, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15345, + "donors": [ + 12382, + 12384, + 12411, + 12414, + 13211, + 13213, + 13239, + 13242, + 13870, + 13872, + 15344 + ], + "virtual_pivot": 11825, + "virtual_donors": [ + 8862, + 8864, + 8891, + 8894, + 9691, + 9693, + 9719, + 9722, + 10350, + 10352, + 11824 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3471, + 15345, + -1 + ], + "base_prefix_cut_record": 613327, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15350, + "donors": [ + 12307, + 12309, + 12411, + 12414, + 14379, + 14381, + 15348 + ], + "virtual_pivot": 11830, + "virtual_donors": [ + 8787, + 8789, + 8891, + 8894, + 10859, + 10861, + 11828 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3007, + 15350, + -1 + ], + "base_prefix_cut_record": 613391, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15363, + "donors": [ + 12382, + 12384, + 12411, + 12414, + 13211, + 13213, + 13239, + 13242, + 13870, + 13872, + 15362 + ], + "virtual_pivot": 11843, + "virtual_donors": [ + 8862, + 8864, + 8891, + 8894, + 9691, + 9693, + 9719, + 9722, + 10350, + 10352, + 11842 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3471, + 15363, + -1 + ], + "base_prefix_cut_record": 613623, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15369, + "donors": [ + 12135, + 12307, + 12309, + 12411, + 12414, + 13635, + 14379, + 14381, + 14526, + 14527, + 14968, + 15075, + 15077, + 15366 + ], + "virtual_pivot": 11849, + "virtual_donors": [ + 8615, + 8787, + 8789, + 8891, + 8894, + 10115, + 10859, + 10861, + 11006, + 11007, + 11448, + 11555, + 11557, + 11846 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3007, + 15369, + -1 + ], + "base_prefix_cut_record": 613839, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15385, + "donors": [ + 12135, + 12307, + 12309, + 12382, + 12384, + 13635, + 14379, + 14381, + 14526, + 14527, + 14968, + 15047, + 15049, + 15075, + 15077, + 15384 + ], + "virtual_pivot": 11865, + "virtual_donors": [ + 8615, + 8787, + 8789, + 8862, + 8864, + 10115, + 10859, + 10861, + 11006, + 11007, + 11448, + 11527, + 11529, + 11555, + 11557, + 11864 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3479, + 15385, + -1 + ], + "base_prefix_cut_record": 614503, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15455, + "donors": [ + 12411, + 12414, + 15453 + ], + "virtual_pivot": 11935, + "virtual_donors": [ + 8891, + 8894, + 11933 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2135, + 15455, + -1 + ], + "base_prefix_cut_record": 616615, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15470, + "donors": [ + 12307, + 12382, + 13795, + 13870, + 14379, + 14689, + 14775, + 15047, + 15229, + 15344, + 15453 + ], + "virtual_pivot": 11950, + "virtual_donors": [ + 8787, + 8862, + 10275, + 10350, + 10859, + 11169, + 11255, + 11527, + 11709, + 11824, + 11933 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3374, + 15470, + -1 + ], + "base_prefix_cut_record": 616831, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15472, + "donors": [ + 12135, + 12307, + 12382, + 13211, + 13213, + 13239, + 13242, + 13635, + 13795, + 13870, + 14379, + 14526, + 14527, + 14689, + 14775, + 14968, + 15049, + 15075, + 15077, + 15229, + 15344, + 15453 + ], + "virtual_pivot": 11952, + "virtual_donors": [ + 8615, + 8787, + 8862, + 9691, + 9693, + 9719, + 9722, + 10115, + 10275, + 10350, + 10859, + 11006, + 11007, + 11169, + 11255, + 11448, + 11529, + 11555, + 11557, + 11709, + 11824, + 11933 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3375, + 15472, + -1 + ], + "base_prefix_cut_record": 616867, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15483, + "donors": [ + 12421, + 12423, + 15482 + ], + "virtual_pivot": 11963, + "virtual_donors": [ + 8901, + 8903, + 11962 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3431, + 15483, + -1 + ], + "base_prefix_cut_record": 617007, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15851, + "donors": [ + 14143, + 14526, + 14527, + 15058 + ], + "virtual_pivot": 12331, + "virtual_donors": [ + 10623, + 11006, + 11007, + 11538 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2423, + 15851, + -1 + ], + "base_prefix_cut_record": 628451, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15861, + "donors": [ + 12135, + 14143, + 14527, + 14968 + ], + "virtual_pivot": 12341, + "virtual_donors": [ + 8615, + 10623, + 11007, + 11448 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2063, + 15861, + -1 + ], + "base_prefix_cut_record": 628823, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15864, + "donors": [ + 14527, + 15059 + ], + "virtual_pivot": 12344, + "virtual_donors": [ + 11007, + 11539 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3311, + 15864, + -1 + ], + "base_prefix_cut_record": 628863, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15930, + "donors": [ + 12307, + 13795, + 14302, + 14688 + ], + "virtual_pivot": 12410, + "virtual_donors": [ + 8787, + 10275, + 10782, + 11168 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3005, + 15930, + -1 + ], + "base_prefix_cut_record": 630611, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15938, + "donors": [ + 14303, + 14689, + 14690, + 15348 + ], + "virtual_pivot": 12418, + "virtual_donors": [ + 10783, + 11169, + 11170, + 11828 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2493, + 15938, + -1 + ], + "base_prefix_cut_record": 630995, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15948, + "donors": [ + 12307, + 14303, + 14690, + 15152 + ], + "virtual_pivot": 12428, + "virtual_donors": [ + 8787, + 10783, + 11170, + 11632 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2133, + 15948, + -1 + ], + "base_prefix_cut_record": 631367, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15959, + "donors": [ + 12309, + 13211, + 13213, + 13239, + 13242, + 13795, + 14302, + 14688 + ], + "virtual_pivot": 12439, + "virtual_donors": [ + 8789, + 9691, + 9693, + 9719, + 9722, + 10275, + 10782, + 11168 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3007, + 15959, + -1 + ], + "base_prefix_cut_record": 631459, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15967, + "donors": [ + 12411, + 12414, + 13239, + 13242, + 14303, + 14689, + 14690, + 15348 + ], + "virtual_pivot": 12447, + "virtual_donors": [ + 8891, + 8894, + 9719, + 9722, + 10783, + 11169, + 11170, + 11828 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2495, + 15967, + -1 + ], + "base_prefix_cut_record": 631843, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15977, + "donors": [ + 12135, + 12309, + 12382, + 12384, + 12411, + 12414, + 13635, + 14303, + 14379, + 14381, + 14526, + 14527, + 14690, + 14968, + 15047, + 15049, + 15075, + 15077, + 15152 + ], + "virtual_pivot": 12457, + "virtual_donors": [ + 8615, + 8789, + 8862, + 8864, + 8891, + 8894, + 10115, + 10783, + 10859, + 10861, + 11006, + 11007, + 11170, + 11448, + 11527, + 11529, + 11555, + 11557, + 11632 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2135, + 15977, + -1 + ], + "base_prefix_cut_record": 632215, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16066, + "donors": [ + 13870, + 15047, + 15229 + ], + "virtual_pivot": 12546, + "virtual_donors": [ + 10350, + 11527, + 11709 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3469, + 16066, + -1 + ], + "base_prefix_cut_record": 634795, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16067, + "donors": [ + 12307, + 12421, + 13795, + 13870, + 14689, + 15047, + 15229, + 15344, + 15453, + 15482 + ], + "virtual_pivot": 12547, + "virtual_donors": [ + 8787, + 8901, + 10275, + 10350, + 11169, + 11527, + 11709, + 11824, + 11933, + 11962 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3429, + 16067, + -1 + ], + "base_prefix_cut_record": 634799, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16069, + "donors": [ + 12307, + 13795, + 14689, + 15344, + 15453 + ], + "virtual_pivot": 12549, + "virtual_donors": [ + 8787, + 10275, + 11169, + 11824, + 11933 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3469, + 16069, + -1 + ], + "base_prefix_cut_record": 634811, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16070, + "donors": [ + 12307, + 12382, + 13795, + 13870, + 14689, + 15047, + 15344, + 15453 + ], + "virtual_pivot": 12550, + "virtual_donors": [ + 8787, + 8862, + 10275, + 10350, + 11169, + 11527, + 11824, + 11933 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3374, + 16070, + -1 + ], + "base_prefix_cut_record": 634823, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16095, + "donors": [ + 12135, + 12307, + 12309, + 13211, + 13213, + 13239, + 13242, + 13635, + 13872, + 14379, + 14381, + 14526, + 14527, + 14968, + 15049, + 15075, + 15077, + 15229 + ], + "virtual_pivot": 12575, + "virtual_donors": [ + 8615, + 8787, + 8789, + 9691, + 9693, + 9719, + 9722, + 10115, + 10352, + 10859, + 10861, + 11006, + 11007, + 11448, + 11529, + 11555, + 11557, + 11709 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3471, + 16095, + -1 + ], + "base_prefix_cut_record": 635643, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16096, + "donors": [ + 12135, + 12309, + 12382, + 12384, + 12423, + 13635, + 13795, + 13870, + 14379, + 14381, + 14526, + 14527, + 14689, + 14968, + 15049, + 15075, + 15077, + 15229, + 15344, + 15453, + 15482 + ], + "virtual_pivot": 12576, + "virtual_donors": [ + 8615, + 8789, + 8862, + 8864, + 8903, + 10115, + 10275, + 10350, + 10859, + 10861, + 11006, + 11007, + 11169, + 11448, + 11529, + 11555, + 11557, + 11709, + 11824, + 11933, + 11962 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3431, + 16096, + -1 + ], + "base_prefix_cut_record": 635647, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16098, + "donors": [ + 12307, + 12382, + 12384, + 13211, + 13213, + 13239, + 13242, + 13795, + 13870, + 13872, + 14689, + 15344, + 15453 + ], + "virtual_pivot": 12578, + "virtual_donors": [ + 8787, + 8862, + 8864, + 9691, + 9693, + 9719, + 9722, + 10275, + 10350, + 10352, + 11169, + 11824, + 11933 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3471, + 16098, + -1 + ], + "base_prefix_cut_record": 635659, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16099, + "donors": [ + 12307, + 12382, + 13211, + 13213, + 13239, + 13242, + 13795, + 13870, + 14689, + 15049, + 15344, + 15453 + ], + "virtual_pivot": 12579, + "virtual_donors": [ + 8787, + 8862, + 9691, + 9693, + 9719, + 9722, + 10275, + 10350, + 11169, + 11529, + 11824, + 11933 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3375, + 16099, + -1 + ], + "base_prefix_cut_record": 635671, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16127, + "donors": [ + 12307, + 13795, + 14689, + 15362, + 15457 + ], + "virtual_pivot": 12607, + "virtual_donors": [ + 8787, + 10275, + 11169, + 11842, + 11937 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3470, + 16127, + -1 + ], + "base_prefix_cut_record": 636507, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 16185, + "donors": [ + 12307, + 13795, + 14689, + 15152, + 15348, + 15384, + 15475 + ], + "virtual_pivot": 12665, + "virtual_donors": [ + 8787, + 10275, + 11169, + 11632, + 11828, + 11864, + 11955 + ], + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 3478, + 16185, + -1 + ], + "base_prefix_cut_record": 638203, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 12875, + "donors": [ + 12866, + 12867, + 12873 + ], + "virtual_pivot": 9355, + "virtual_donors": [ + 9346, + 9347, + 9353 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2655, + 12875, + -1 + ], + "base_prefix_cut_record": 549359, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 13246, + "donors": [ + 12866, + 12873 + ], + "virtual_pivot": 9726, + "virtual_donors": [ + 9346, + 9353 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2654, + 13246, + -1 + ], + "base_prefix_cut_record": 558975, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 13249, + "donors": [ + 12867, + 12873 + ], + "virtual_pivot": 9729, + "virtual_donors": [ + 9347, + 9353 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2655, + 13249, + -1 + ], + "base_prefix_cut_record": 559167, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 13313, + "donors": [ + 12922, + 12923, + 13310 + ], + "virtual_pivot": 9793, + "virtual_donors": [ + 9402, + 9403, + 9790 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2679, + 13313, + -1 + ], + "base_prefix_cut_record": 561487, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15753, + "donors": [ + 12922, + 13310 + ], + "virtual_pivot": 12233, + "virtual_donors": [ + 9402, + 9790 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2677, + 15753, + -1 + ], + "base_prefix_cut_record": 625503, + "kind": "shared-donor-contrast-line" + }, + { + "pivot": 15782, + "donors": [ + 12923, + 13310 + ], + "virtual_pivot": 12262, + "virtual_donors": [ + 9403, + 9790 + ], + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "rank": 1, + "cut_read": [ + 2679, + 15782, + -1 + ], + "base_prefix_cut_record": 626351, + "kind": "shared-donor-contrast-line" + } + ], + "groups": [ + { + "line": [ + 6, + 7 + ], + "pivots": 26, + "distinct_donors": 37, + "active_virtual_roles": [ + 8339, + 8341, + 8359, + 8361, + 8394, + 8412, + 8413, + 8415, + 9175, + 9177, + 9193, + 9195, + 9211, + 9213, + 9228, + 9229, + 9230, + 9247, + 9267, + 9269, + 9845, + 9847, + 9863, + 9865, + 9881, + 9883, + 9898, + 9916, + 9935, + 9937, + 10532, + 10534, + 10733, + 10740, + 10741, + 10751, + 10758, + 10759, + 10764, + 10766, + 10812, + 10813, + 10830, + 10831, + 10836, + 10838, + 10877, + 10879, + 10884, + 10885, + 10892, + 10894, + 10910, + 10911, + 10915, + 10922, + 10928, + 10929, + 10940, + 10941, + 10946, + 10950, + 10952 + ] + }, + { + "line": [ + 16, + 17 + ], + "pivots": 40, + "distinct_donors": 50, + "active_virtual_roles": [ + 8615, + 8787, + 8789, + 8862, + 8864, + 8891, + 8894, + 8901, + 8903, + 9691, + 9693, + 9719, + 9722, + 10115, + 10275, + 10277, + 10350, + 10352, + 10379, + 10382, + 10623, + 10782, + 10783, + 10784, + 10785, + 10859, + 10861, + 10887, + 10890, + 11006, + 11007, + 11168, + 11169, + 11170, + 11171, + 11172, + 11173, + 11255, + 11257, + 11283, + 11286, + 11448, + 11527, + 11529, + 11538, + 11539, + 11555, + 11557, + 11558, + 11632, + 11634, + 11709, + 11711, + 11824, + 11825, + 11828, + 11830, + 11842, + 11843, + 11846, + 11849, + 11864, + 11865, + 11933, + 11935, + 11937, + 11950, + 11952, + 11955, + 11962, + 11963, + 12331, + 12341, + 12344, + 12410, + 12418, + 12428, + 12439, + 12447, + 12457, + 12546, + 12547, + 12549, + 12550, + 12575, + 12576, + 12578, + 12579, + 12607, + 12665 + ] + }, + { + "line": [ + 2, + 3 + ], + "pivots": 6, + "distinct_donors": 6, + "active_virtual_roles": [ + 9346, + 9347, + 9353, + 9355, + 9402, + 9403, + 9726, + 9729, + 9790, + 9793, + 12233, + 12262 + ] + } + ], + "pivots": 72, + "distinct_donors": 93, + "scalar_setup_gates": 473, + "scalar_restore_gates": 473 + } + }, + "scope": "Exact signed prefix, parity response relations, cut ordering, physical stream mapping and new relation selections. This is not a newly replayed complete physical word. Bank charts, whole-word scalar/finite bounds and assembler admission need independent certificates." + } +} diff --git a/research/gen5b-shared-kernels/kernel70-witness.json b/research/gen5b-shared-kernels/kernel70-witness.json new file mode 100644 index 0000000000..8379343ab6 --- /dev/null +++ b/research/gen5b-shared-kernels/kernel70-witness.json @@ -0,0 +1,3818 @@ +{ + "status": "EXACT_RESPONSE_CANDIDATE_PENDING_ADMISSION", + "entries": [ + { + "pivot": 13403, + "donors": [ + 11933, + 11935, + 13401 + ], + "virtual_pivot": 9883, + "virtual_donors": [ + 8413, + 8415, + 9881 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14054, + "donors": [ + 12748, + 12750, + 13455, + 13457, + 14052 + ], + "virtual_pivot": 10534, + "virtual_donors": [ + 9228, + 9230, + 9935, + 9937, + 10532 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14261, + "donors": [ + 11859, + 11861, + 14260 + ], + "virtual_pivot": 10741, + "virtual_donors": [ + 8339, + 8341, + 10740 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14279, + "donors": [ + 13365, + 13367, + 14278 + ], + "virtual_pivot": 10759, + "virtual_donors": [ + 9845, + 9847, + 10758 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14284, + "donors": [ + 12695, + 13365 + ], + "virtual_pivot": 10764, + "virtual_donors": [ + 9175, + 9845 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14286, + "donors": [ + 12697, + 13367 + ], + "virtual_pivot": 10766, + "virtual_donors": [ + 9177, + 9847 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14332, + "donors": [ + 11859, + 11879, + 11914, + 12749, + 13418, + 14253, + 14260 + ], + "virtual_pivot": 10812, + "virtual_donors": [ + 8339, + 8359, + 8394, + 9229, + 9898, + 10733, + 10740 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14333, + "donors": [ + 11859, + 11881, + 11914, + 12749, + 13418, + 14253, + 14260 + ], + "virtual_pivot": 10813, + "virtual_donors": [ + 8339, + 8361, + 8394, + 9229, + 9898, + 10733, + 10740 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14350, + "donors": [ + 11932, + 12767, + 13365, + 13383, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10830, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9863, + 9916, + 10751, + 10758 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14351, + "donors": [ + 11932, + 12767, + 13365, + 13385, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10831, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9865, + 9916, + 10751, + 10758 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14356, + "donors": [ + 12713, + 13383 + ], + "virtual_pivot": 10836, + "virtual_donors": [ + 9193, + 9863 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14358, + "donors": [ + 12715, + 13385 + ], + "virtual_pivot": 10838, + "virtual_donors": [ + 9195, + 9865 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14397, + "donors": [ + 11932, + 12767, + 13365, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10877, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9916, + 10751, + 10758 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14399, + "donors": [ + 11932, + 12767, + 13365, + 13383, + 13385, + 13436, + 14271, + 14278 + ], + "virtual_pivot": 10879, + "virtual_donors": [ + 8412, + 9247, + 9845, + 9863, + 9865, + 9916, + 10751, + 10758 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14404, + "donors": [ + 11933, + 13401 + ], + "virtual_pivot": 10884, + "virtual_donors": [ + 8413, + 9881 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14405, + "donors": [ + 11935, + 13401 + ], + "virtual_pivot": 10885, + "virtual_donors": [ + 8415, + 9881 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14412, + "donors": [ + 12731, + 13401 + ], + "virtual_pivot": 10892, + "virtual_donors": [ + 9211, + 9881 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14414, + "donors": [ + 11933, + 11935, + 12733, + 13401 + ], + "virtual_pivot": 10894, + "virtual_donors": [ + 8413, + 8415, + 9213, + 9881 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14442, + "donors": [ + 11859, + 12749, + 12767, + 13365, + 14253, + 14260, + 14271, + 14278, + 14431, + 14435 + ], + "virtual_pivot": 10922, + "virtual_donors": [ + 8339, + 9229, + 9247, + 9845, + 10733, + 10740, + 10751, + 10758, + 10911, + 10915 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14448, + "donors": [ + 11859, + 14253, + 14260, + 14431 + ], + "virtual_pivot": 10928, + "virtual_donors": [ + 8339, + 10733, + 10740, + 10911 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14449, + "donors": [ + 12748, + 12749, + 14052, + 14430, + 14431 + ], + "virtual_pivot": 10929, + "virtual_donors": [ + 9228, + 9229, + 10532, + 10910, + 10911 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14460, + "donors": [ + 12748, + 13455, + 14052 + ], + "virtual_pivot": 10940, + "virtual_donors": [ + 9228, + 9935, + 10532 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14461, + "donors": [ + 12748, + 13457, + 14052 + ], + "virtual_pivot": 10941, + "virtual_donors": [ + 9228, + 9937, + 10532 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14466, + "donors": [ + 13365, + 14271, + 14278, + 14435 + ], + "virtual_pivot": 10946, + "virtual_donors": [ + 9845, + 10751, + 10758, + 10915 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14470, + "donors": [ + 12787, + 13455 + ], + "virtual_pivot": 10950, + "virtual_donors": [ + 9267, + 9935 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14472, + "donors": [ + 12789, + 13457 + ], + "virtual_pivot": 10952, + "virtual_donors": [ + 9269, + 9937 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15470, + "donors": [ + 14693, + 13870, + 14379, + 16099, + 14692, + 14777, + 15075, + 15078, + 15967, + 16095, + 15047, + 14303, + 15348 + ], + "virtual_pivot": 11950, + "virtual_donors": [ + 11173, + 10350, + 10859, + 12579, + 11172, + 11257, + 11555, + 11558, + 12447, + 12575, + 11527, + 10783, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15977, + "donors": [ + 13870, + 14379, + 15930, + 15948, + 16099, + 14692, + 15075, + 15078, + 15455, + 14691, + 15047, + 12384, + 14304, + 15345, + 14381 + ], + "virtual_pivot": 12457, + "virtual_donors": [ + 10350, + 10859, + 12410, + 12428, + 12579, + 11172, + 11555, + 11558, + 11935, + 11171, + 11527, + 8864, + 10784, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15344, + "donors": [ + 13870, + 14379, + 15930, + 16099, + 14692, + 15075, + 15078, + 16095, + 16066, + 15455, + 14691, + 15047, + 12384, + 14304, + 14381 + ], + "virtual_pivot": 11824, + "virtual_donors": [ + 10350, + 10859, + 12410, + 12579, + 11172, + 11555, + 11558, + 12575, + 12546, + 11935, + 11171, + 11527, + 8864, + 10784, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15049, + "donors": [ + 14693, + 13870, + 14379, + 15930, + 16099, + 14692, + 15453, + 14690, + 14691, + 12384, + 14304, + 15345, + 14381 + ], + "virtual_pivot": 11529, + "virtual_donors": [ + 11173, + 10350, + 10859, + 12410, + 12579, + 11172, + 11933, + 11170, + 11171, + 8864, + 10784, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15472, + "donors": [ + 14693, + 13870, + 14379, + 14692, + 14777, + 15967, + 16095, + 15047, + 14303, + 16070, + 15348 + ], + "virtual_pivot": 11952, + "virtual_donors": [ + 11173, + 10350, + 10859, + 11172, + 11257, + 12447, + 12575, + 11527, + 10783, + 12550, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 16098, + "donors": [ + 14693, + 13870, + 14379, + 14692, + 15967, + 15047, + 12384, + 14303, + 16070, + 15348, + 14381 + ], + "virtual_pivot": 12578, + "virtual_donors": [ + 11173, + 10350, + 10859, + 11172, + 12447, + 11527, + 8864, + 10783, + 12550, + 11828, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 13239, + "donors": [ + 14693, + 13870, + 14379, + 12307, + 14692, + 13795, + 15453, + 14690, + 13242, + 15047, + 12384, + 16070, + 15345, + 14381 + ], + "virtual_pivot": 9719, + "virtual_donors": [ + 11173, + 10350, + 10859, + 8787, + 11172, + 10275, + 11933, + 11170, + 9722, + 11527, + 8864, + 12550, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 13872, + "donors": [ + 15930, + 15967, + 15453, + 14690, + 14691, + 15047, + 12384, + 14303, + 16070, + 14304, + 15345, + 15348 + ], + "virtual_pivot": 10352, + "virtual_donors": [ + 12410, + 12447, + 11933, + 11170, + 11171, + 11527, + 8864, + 10783, + 12550, + 10784, + 11825, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15152, + "donors": [ + 12307, + 15948, + 14690, + 14303 + ], + "virtual_pivot": 11632, + "virtual_donors": [ + 8787, + 12428, + 11170, + 10783 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15229, + "donors": [ + 13870, + 16066, + 15047 + ], + "virtual_pivot": 11709, + "virtual_donors": [ + 10350, + 12546, + 11527 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15350, + "donors": [ + 13870, + 15930, + 16099, + 15075, + 15078, + 15967, + 16095, + 16066, + 15455, + 14690, + 14691, + 15047, + 12384, + 14303, + 14304, + 15345 + ], + "virtual_pivot": 11830, + "virtual_donors": [ + 10350, + 12410, + 12579, + 11555, + 11558, + 12447, + 12575, + 12546, + 11935, + 11170, + 11171, + 11527, + 8864, + 10783, + 10784, + 11825 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14689, + "donors": [ + 14693, + 13870, + 14379, + 12307, + 14692, + 15967, + 13795, + 15455, + 15047, + 12384, + 14303, + 16070, + 15345, + 15348, + 14381 + ], + "virtual_pivot": 11169, + "virtual_donors": [ + 11173, + 10350, + 10859, + 8787, + 11172, + 12447, + 10275, + 11935, + 11527, + 8864, + 10783, + 12550, + 11825, + 11828, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15231, + "donors": [ + 14693, + 13870, + 14379, + 16099, + 14692, + 15967, + 16095, + 15047, + 14303, + 16070, + 15348, + 14381 + ], + "virtual_pivot": 11711, + "virtual_donors": [ + 11173, + 10350, + 10859, + 12579, + 11172, + 12447, + 12575, + 11527, + 10783, + 12550, + 11828, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 13213, + "donors": [ + 12307, + 15930, + 13795, + 14691, + 14304, + 13211 + ], + "virtual_pivot": 9693, + "virtual_donors": [ + 8787, + 12410, + 10275, + 11171, + 10784, + 9691 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15459, + "donors": [ + 13870, + 14379, + 15457, + 15930, + 16099, + 14692, + 15075, + 16127, + 15078, + 16095, + 16066, + 15455, + 16156, + 14691, + 15047, + 12384, + 14304, + 15345, + 14381 + ], + "virtual_pivot": 11939, + "virtual_donors": [ + 10350, + 10859, + 11937, + 12410, + 12579, + 11172, + 11555, + 12607, + 11558, + 12575, + 12546, + 11935, + 12636, + 11171, + 11527, + 8864, + 10784, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 16069, + "donors": [ + 14693, + 15930, + 16099, + 15075, + 15078, + 15967, + 15453, + 16095, + 16066, + 14691, + 14303, + 16070, + 14304, + 15345, + 15348 + ], + "virtual_pivot": 12549, + "virtual_donors": [ + 11173, + 12410, + 12579, + 11555, + 11558, + 12447, + 11933, + 12575, + 12546, + 11171, + 10783, + 12550, + 10784, + 11825, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 12414, + "donors": [ + 15453, + 15455, + 12411 + ], + "virtual_pivot": 8894, + "virtual_donors": [ + 11933, + 11935, + 8891 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14305, + "donors": [ + 14693, + 13870, + 15930, + 16099, + 14692, + 15075, + 15078, + 16095, + 16066, + 15455, + 14690, + 14691, + 15047, + 12384, + 14303, + 14304, + 15345 + ], + "virtual_pivot": 10785, + "virtual_donors": [ + 11173, + 10350, + 12410, + 12579, + 11172, + 11555, + 11558, + 12575, + 12546, + 11935, + 11170, + 11171, + 11527, + 8864, + 10783, + 10784, + 11825 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15482, + "donors": [ + 14693, + 13870, + 14379, + 16096, + 14692, + 15967, + 16095, + 12423, + 15047, + 12384, + 14303, + 16070, + 15348, + 14381 + ], + "virtual_pivot": 11962, + "virtual_donors": [ + 11173, + 10350, + 10859, + 12576, + 11172, + 12447, + 12575, + 8903, + 11527, + 8864, + 10783, + 12550, + 11828, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15483, + "donors": [ + 14693, + 15930, + 16099, + 15075, + 16067, + 15078, + 15967, + 15453, + 16095, + 12423, + 14691, + 14303, + 16070, + 14304, + 15345, + 15348 + ], + "virtual_pivot": 11963, + "virtual_donors": [ + 11173, + 12410, + 12579, + 11555, + 12547, + 11558, + 12447, + 11933, + 12575, + 8903, + 11171, + 10783, + 12550, + 10784, + 11825, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 12382, + "donors": [ + 14693, + 13870, + 15930, + 16099, + 15075, + 15078, + 15967, + 15453, + 16095, + 16066, + 14691, + 15047, + 14303, + 14304, + 15345, + 15348 + ], + "virtual_pivot": 8862, + "virtual_donors": [ + 11173, + 10350, + 12410, + 12579, + 11555, + 11558, + 12447, + 11933, + 12575, + 12546, + 11171, + 11527, + 10783, + 10784, + 11825, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15477, + "donors": [ + 14693, + 15384, + 12307, + 15930, + 15948, + 16099, + 15075, + 15078, + 15967, + 15453, + 15455, + 14690, + 14691, + 16214, + 16070, + 14304 + ], + "virtual_pivot": 11957, + "virtual_donors": [ + 11173, + 11864, + 8787, + 12410, + 12428, + 12579, + 11555, + 11558, + 12447, + 11933, + 11935, + 11170, + 11171, + 12694, + 12550, + 10784 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14302, + "donors": [ + 12307, + 15930, + 13795, + 14688 + ], + "virtual_pivot": 10782, + "virtual_donors": [ + 8787, + 12410, + 10275, + 11168 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15385, + "donors": [ + 13870, + 15384, + 14379, + 15930, + 16099, + 14692, + 15075, + 15078, + 15453, + 14691, + 15047, + 12384, + 14304, + 15345, + 14381 + ], + "virtual_pivot": 11865, + "virtual_donors": [ + 10350, + 11864, + 10859, + 12410, + 12579, + 11172, + 11555, + 11558, + 11933, + 11171, + 11527, + 8864, + 10784, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15363, + "donors": [ + 14693, + 15457, + 15930, + 16099, + 15075, + 16127, + 15078, + 15967, + 16095, + 16066, + 14691, + 14303, + 16070, + 14304, + 15348 + ], + "virtual_pivot": 11843, + "virtual_donors": [ + 11173, + 11937, + 12410, + 12579, + 11555, + 12607, + 11558, + 12447, + 12575, + 12546, + 11171, + 10783, + 12550, + 10784, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 13797, + "donors": [ + 14693, + 13870, + 14379, + 12307, + 14692, + 15453, + 14690, + 15047, + 12384, + 16070, + 15345, + 14381 + ], + "virtual_pivot": 10277, + "virtual_donors": [ + 11173, + 10350, + 10859, + 8787, + 11172, + 11933, + 11170, + 11527, + 8864, + 12550, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15938, + "donors": [ + 14693, + 13870, + 14379, + 12307, + 14692, + 15967, + 13795, + 15455, + 14690, + 15047, + 12384, + 16070, + 15345, + 14381 + ], + "virtual_pivot": 12418, + "virtual_donors": [ + 11173, + 10350, + 10859, + 8787, + 11172, + 12447, + 10275, + 11935, + 11170, + 11527, + 8864, + 12550, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15362, + "donors": [ + 14693, + 13870, + 14379, + 15457, + 14692, + 16127, + 15967, + 15455, + 15047, + 12384, + 14303, + 16070, + 15345, + 15348, + 14381 + ], + "virtual_pivot": 11842, + "virtual_donors": [ + 11173, + 10350, + 10859, + 11937, + 11172, + 12607, + 12447, + 11935, + 11527, + 8864, + 10783, + 12550, + 11825, + 11828, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15154, + "donors": [ + 13870, + 12307, + 15930, + 15948, + 16099, + 15075, + 15078, + 15967, + 15453, + 14691, + 15047, + 12384, + 14304, + 15345, + 15348 + ], + "virtual_pivot": 11634, + "virtual_donors": [ + 10350, + 8787, + 12410, + 12428, + 12579, + 11555, + 11558, + 12447, + 11933, + 11171, + 11527, + 8864, + 10784, + 11825, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14407, + "donors": [ + 14693, + 14410, + 16099, + 14692, + 15075, + 15078, + 15967, + 16095, + 16066, + 14303, + 16070, + 15348 + ], + "virtual_pivot": 10887, + "virtual_donors": [ + 11173, + 10890, + 12579, + 11172, + 11555, + 11558, + 12447, + 12575, + 12546, + 10783, + 12550, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15369, + "donors": [ + 13870, + 15930, + 16099, + 15967, + 16095, + 16066, + 15455, + 14690, + 14691, + 15366, + 15047, + 12384, + 14303, + 14304, + 15345, + 15348 + ], + "virtual_pivot": 11849, + "virtual_donors": [ + 10350, + 12410, + 12579, + 12447, + 12575, + 12546, + 11935, + 11170, + 11171, + 11846, + 11527, + 8864, + 10783, + 10784, + 11825, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 12309, + "donors": [ + 13870, + 14379, + 12307, + 15930, + 16099, + 15075, + 15078, + 15967, + 15453, + 16095, + 16066, + 14690, + 14691, + 15047, + 12384, + 14303, + 14304, + 15345, + 15348, + 14381 + ], + "virtual_pivot": 8789, + "virtual_donors": [ + 10350, + 10859, + 8787, + 12410, + 12579, + 11555, + 11558, + 12447, + 11933, + 12575, + 12546, + 11170, + 11171, + 11527, + 8864, + 10783, + 10784, + 11825, + 11828, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14803, + "donors": [ + 14379, + 14806, + 14381 + ], + "virtual_pivot": 11283, + "virtual_donors": [ + 10859, + 11286, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 14775, + "donors": [ + 14693, + 16099, + 14692, + 14777, + 15075, + 15078, + 15967, + 16095, + 16066, + 14303, + 16070, + 15348 + ], + "virtual_pivot": 11255, + "virtual_donors": [ + 11173, + 12579, + 11172, + 11257, + 11555, + 11558, + 12447, + 12575, + 12546, + 10783, + 12550, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15475, + "donors": [ + 14693, + 13870, + 15384, + 14379, + 16185, + 12307, + 15948, + 14692, + 15967, + 15455, + 14690, + 15047, + 12384, + 16070, + 15345, + 14381 + ], + "virtual_pivot": 11955, + "virtual_donors": [ + 11173, + 10350, + 11864, + 10859, + 12665, + 8787, + 12428, + 11172, + 12447, + 11935, + 11170, + 11527, + 8864, + 12550, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 13902, + "donors": [ + 12307, + 15930, + 13795, + 14691, + 14304, + 13899 + ], + "virtual_pivot": 10382, + "virtual_donors": [ + 8787, + 12410, + 10275, + 11171, + 10784, + 10379 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 12421, + "donors": [ + 13870, + 14379, + 15930, + 16099, + 16096, + 14692, + 15075, + 16067, + 15078, + 15453, + 12423, + 14691, + 15047, + 12384, + 14304, + 15345, + 14381 + ], + "virtual_pivot": 8901, + "virtual_donors": [ + 10350, + 10859, + 12410, + 12579, + 12576, + 11172, + 11555, + 12547, + 11558, + 11933, + 8903, + 11171, + 11527, + 8864, + 10784, + 11825, + 10861 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15959, + "donors": [ + 14693, + 15930, + 16099, + 14692, + 15075, + 15078, + 15967, + 16095, + 16066, + 14303, + 16070, + 15348 + ], + "virtual_pivot": 12439, + "virtual_donors": [ + 11173, + 12410, + 12579, + 11172, + 11555, + 11558, + 12447, + 12575, + 12546, + 10783, + 12550, + 11828 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 12875, + "donors": [ + 12866, + 12867, + 12873 + ], + "virtual_pivot": 9355, + "virtual_donors": [ + 9346, + 9347, + 9353 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 13246, + "donors": [ + 12866, + 12873 + ], + "virtual_pivot": 9726, + "virtual_donors": [ + 9346, + 9353 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 13249, + "donors": [ + 12867, + 12873 + ], + "virtual_pivot": 9729, + "virtual_donors": [ + 9347, + 9353 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 13313, + "donors": [ + 12922, + 12923, + 13310 + ], + "virtual_pivot": 9793, + "virtual_donors": [ + 9402, + 9403, + 9790 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15753, + "donors": [ + 12922, + 13310 + ], + "virtual_pivot": 12233, + "virtual_donors": [ + 9402, + 9790 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "pivot": 15782, + "donors": [ + 12923, + 13310 + ], + "virtual_pivot": 12262, + "virtual_donors": [ + 9403, + 9790 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + } + ], + "pr300_descent2_endpoint_overlap": [], + "max_shared_donor_fan_in": 24, + "pivots": 70, + "donors": 87, + "scalar_setup_gates": 601, + "local_histogram_delta": { + "3": -137, + "2": 137, + "1": 87, + "5": -16, + "4": 18, + "6": -2 + }, + "phi_delta": -23.074146200742753, + "replacement_line": [ + 16, + 17 + ], + "replacement_order": "shuffle_20261011", + "final12_extended_closure_size": 84, + "final12_extended_closure_overlap": [] +} diff --git a/research/gen5b-shared-kernels/kernel70_charts.py b/research/gen5b-shared-kernels/kernel70_charts.py new file mode 100644 index 0000000000..746777a950 --- /dev/null +++ b/research/gen5b-shared-kernels/kernel70_charts.py @@ -0,0 +1,123 @@ +"""Exact changed-chart constructions for candidate70 and final12. + +Every member receives its new first-frame quotient chart. All 70 pivot bank +residuals and 87 donor line entrances are bound to reusable exact programs. +""" +from collections import Counter +from fractions import Fraction as F + +import chart_bounds as base +import source_data as sd +from kernel70_pricing import measured_kernel_delta + + +def gram(a, b): + return 9 * sum(x * y for x, y in zip(a, b)) - sum(a) * sum(b) + + +def checked_chart(columns, residual_rank): + assert len(columns) == 24 and all(len(c) == 24 for c in columns) + assert 0 < residual_rank < 24 + assert all(gram(a, b) == 0 for a in columns[:residual_rank] + for b in columns[residual_rank:]) + matrix = [list(row) for row in zip(*columns)] + assert len(base.rref(matrix)[1]) == 24 + f = base.factor(matrix) # Includes an exact inverse-program replay. + assert f['determinant'] and f['count'] <= 576 + assert f['max_numerator'] < 2**80 and f['max_denominator'] < 2**80 + return dict(basis_columns=columns, residual_rank=residual_rank, + completion_rank=24-residual_rank, **f) + + +def line_chart(i, j, residual_rank): + assert type(i) is int and type(j) is int and 0 <= i < j < 24 + line = [int(k == i) - int(k == j) for k in range(24)] + complement = [[int(k == r) for k in range(24)] for r in range(24) if r not in (i, j)] + complement.append([int(k == i or k == j) for k in range(24)]) + assert gram(line, line) == 18 + if residual_rank == 1: + columns = [line] + complement + elif residual_rank == 23: + columns = complement + [line] + else: + raise ValueError('A line chart has residual rank 1 or 23') + return dict(line=[i, j], **checked_chart(columns, residual_rank)) + + +def first_frame_chart(frame, line): + """F/L from ker(A) intersect L-perp; completion is L direct-sum F-perp.""" + ann = frame['a'] if 'a' in frame else base.nullspace(frame['b']) + d = frame['dim']; i, j = line + assert len(base.rref(ann)[1]) == 24 - d + v = [int(k == i) - int(k == j) for k in range(24)] + assert all(sum(a * b for a, b in zip(row, v)) == 0 for row in ann) + assert gram(v, v) == 18 + # Since sum(v)=0, the weighted condition =0 is x_i=x_j. + residual = base.nullspace(ann + [v]) + assert len(residual) == d - 1 + # (9I-J)^(-1) a is proportional to 15*a-sum(a). + exterior = [base.primitive([15 * x - sum(row) for x in row]) for row in ann] + assert len(exterior) == 24 - d + assert all(sum(a * b for a, b in zip(row, col)) == 0 + for row in ann for col in residual + [v]) + assert all(gram(col, other) == 0 for col in residual + [v] for other in exterior) + out = checked_chart(residual + [v] + exterior, d - 1) + out.update(first_dimension=d, line=line) + return out + + +def run(bridge=None, final12_charts=None, literal_stock=1229560): + sd.verify_all() + if bridge is None: + import check_kernel70 + bridge = check_kernel70.run() + measured_kernel_delta(bridge) + if final12_charts is None: + final12_charts = base.run() + frames = sd.read_json('gen5bit/selected/bit/frames_p12.json.gz')['frames'] + programs = []; uses = []; index = {} + def put(key, builder): + if key not in index: + index[key] = len(programs) + programs.append(dict(program_id=len(programs), **builder())) + return index[key] + for p in sorted(bridge['paths'], key=lambda p: p['role']): + line = tuple(p['line']); frame_id = p['old_frames'][0] + first = frames[str(frame_id)] + assert first['dim'] == p['first_dimension'] + program = put(('first_frame', frame_id, line), + lambda: dict(kind='first_frame_quotient', frame=frame_id, + **first_frame_chart(first, list(line)))) + uses.append(dict(kind='first_frame_quotient', role=p['role'], stream=p['stream'], + frame=frame_id, rank=p['first_dimension']-1, program_id=program)) + rank = 23 if p['kind'] == 'pivot' else 1 + program = put(('line', line, rank), + lambda: dict(kind='pivot_residual' if rank == 23 else 'donor_line_entrance', + **line_chart(*line, rank))) + uses.append(dict(kind='pivot_residual' if rank == 23 else 'donor_line_entrance', + role=p['role'], stream=p['stream'], rank=rank, program_id=program)) + assert Counter(u['kind'] for u in uses) == { + 'first_frame_quotient': 157, 'pivot_residual': 70, 'donor_line_entrance': 87} + assert final12_charts['charts'] == 18 + for program in final12_charts['factor_programs']: + programs.append(dict(program, program_id=len(programs), scope='final12')) + pins = sd.read_json('expected/kernel-pins.json') + largest = max(p['count'] for p in programs) + retained = pins['max_chart_factors'] + bound = max(largest, retained) + 119 + 120 + assert retained == 576 and bound == pins['normalizer_factor_bound'] == 815 + assert literal_stock == pins['literal_stock'] - 190 + selectors = 600 * ((literal_stock - 1) + pins['physical_R'] * 120 * bound) + assert selectors < 2**40 + return dict(status='PASS_KERNEL70_PR300_FINAL12_CHANGED_CHARTS', source_head=sd.HEAD, + selection='candidate70', with_final12=True, charts=len(programs), + kernel_programs=len(programs)-18, final12_charts=18, + first_frame_quotient_demands=157, donor_line_entrance_demands=87, + pivot_residual_demands=70, role_chart_uses=uses, + max_changed_chart_factors=largest, + max_factor_numerator=max(p['max_numerator'] for p in programs), + max_factor_denominator=max(p['max_denominator'] for p in programs), + retained_chart_factor_bound=retained, + combined_normalizer_factor_bound=bound, literal_stock=literal_stock, + selector_calls_bound=selectors, factor_programs=programs, + scope='Every changed candidate70 first-frame quotient, donor line entrance and rank23 pivot residual is bound to an exactly factored weighted chart; final12 charts are included. Unchanged chart admission and finite-compiler interfaces remain inherited.') diff --git a/research/gen5b-shared-kernels/kernel70_finite_bill.py b/research/gen5b-shared-kernels/kernel70_finite_bill.py new file mode 100644 index 0000000000..74a5e8e1ab --- /dev/null +++ b/research/gen5b-shared-kernels/kernel70_finite_bill.py @@ -0,0 +1,154 @@ +"""Unified changed finite bill for the 70-pivot union plus final12. + +Closes changed chart, selector, scalar-cost and sink-aware payload obligations. +Original compiler, primitive, weighted-chart, routing and all-size contracts +remain explicit assumptions; their unspecified constants are not set to zero. +""" +from collections import Counter +from fractions import Fraction as F + +import finite_bill as base +import source_data as sd +import bank_binding +from kernel70_pricing import integer_map, measured_kernel_delta, verify_composition + + +def run(chart, norm, math, bridge, banks=None, suffix=None, composition=None): + sd.verify_all() + measured_kernel_delta(bridge) + assert chart['status'] == 'PASS_KERNEL70_PR300_FINAL12_CHANGED_CHARTS' + assert chart['selection'] == math['selection'] == 'candidate70' + assert chart['with_final12'] and math['with_final12'] + assert chart['source_head'] == math['source_head'] == sd.HEAD + assert math['status'] == 'PASS_KERNEL70_PR300_FINAL12_EXACT_PRICING' + if composition is None: + import check_pr300_kernel70_composition + composition = check_pr300_kernel70_composition.run() + verify_composition(composition, math['local_histogram_delta']) + assert math['additional_source']['sha256'] == sd.MANIFEST['files']['pr300/descent2-selection.json']['sha256'] + assert chart['first_frame_quotient_demands'] == bridge['members'] == 157 + assert chart['pivot_residual_demands'] == bridge['pivots'] == 70 + assert chart['donor_line_entrance_demands'] == bridge['distinct_donors'] == 87 + assert chart['final12_charts'] == 18 + programs = {p['program_id']: p for p in chart['factor_programs']} + assert len(programs) == chart['charts'] + expected = {(p['role'], p['stream'], 'first_frame_quotient', p['first_dimension'] - 1) + for p in bridge['paths']} + expected.update((p['role'], p['stream'], 'pivot_residual' if p['kind'] == 'pivot' else 'donor_line_entrance', + 23 if p['kind'] == 'pivot' else 1) for p in bridge['paths']) + uses = chart['role_chart_uses'] + assert len(uses) == len(expected) == 314 + assert {(u['role'], u['stream'], u['kind'], u['rank']) for u in uses} == expected + for u in uses: + assert programs[u['program_id']]['residual_rank'] == u['rank'] + assert norm['status'] == 'PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS' + assert norm['selection'] in ('candidate70',) + assert norm['setup_restore_pairs'] == bridge['setup_adds'] == bridge['restore_adds'] == 601 + pins = sd.read_json('expected/kernel-pins.json') + forward = norm['forward']; inverse = norm['inverse'] + assert forward['reverse'] is False and inverse['reverse'] is True + assert forward['inherited_bound'] == pins['forward_max_row_l1'] == 77985 + assert inverse['inherited_bound'] == pins['inverse_max_row_l1'] == 2475558 + for row in (forward, inverse): + assert row['certified_new_bound'] == row['inherited_bound'] + row['max_added_majorant'] + assert row['max_added_source'] == 0 + assert forward['certified_new_bound'] == 191659 and inverse['certified_new_bound'] == 5356455 + # These guards specifically reject the superseded target-only majorant. + sinks = sd.read_json('sink-selection.json')['sinks'] + assert norm['actual_sink_redirects'] == sum(s['forward_writes'] for s in sinks) == 14 + assert norm['target_majorant_edges'] == 681 and norm['target_majorant_acyclic_vertices'] == 908 + payload = 64 * forward['certified_new_bound']**3 * inverse['certified_new_bound']**2 + assert payload == norm['payload_bound'] == 12927738210344389271740351838400 + assert payload.bit_length() == norm['payload_bits'] == 104 + assert norm['retained_payload_cap_2_to104'] and payload < 2**104 + assert 2**104 - payload == 7354671393307281152206899447616 + if suffix is None: + import check_complete_suffix + suffix = check_complete_suffix.run() + assert suffix['status'] == 'PASS_COMPLETE_SUFFIX_ALL_COLUMN_EQUALITY' + assert suffix['source_head'] == sd.HEAD and suffix['unchanged_scalar_multiset'] + assert suffix['original_suffix_adds'] == suffix['modified_suffix_adds'] + if banks is None: + import check_kernel70_bank_assignment + banks = check_kernel70_bank_assignment.run() + assert banks['status'] == 'PASS_UNIFIED_KERNEL70_CORETIME12_BANK_ASSIGNMENT' + assert banks['new_shared_kernel_pivots'] == 70 and banks['helper_roles'] == pins['physical_R'] + assert banks['all_banks_full'] and banks['stages_have_disjoint_bank_namespaces'] + assert integer_map(banks['family_counts']) == {r: n // 60 for r, n in integer_map(math['packing']['demand']).items()} + assert banks['banks_per_stage'] == math['packing']['feasible_bins'] == 161432 + bank_binding.check(banks, math) + m = 120; R = pins['physical_R']; v = 1760; T = 60; d = m*m; N = 2*m + stock = math['literal_stock'] + assert R == 15427 and stock == chart['literal_stock'] == banks['literal_stock'] == 1229560 + assert F(banks['unreplicated_stock']) == F(math['unreplicated_stock']) == F(stock, 60) + assert math['calls'] == 483425 and math['rank_mass'] == 2454720 + E = T * math['calls']; mass = T * math['rank_mass'] + assert m * stock - mass == 264000 + # All 601 setup and 601 restore additions are charged. The 860 omitted + # old compensation reads are deliberately not subtracted from this bound. + added = bridge['setup_adds'] + bridge['restore_adds'] + weighted = T * (5 * (pins['scalar_events'] + added) + 6*v) + unit = T * (5 * (pins['literal_unit_additions'] + added) + 6*v) + J = T * (24*v + 10*R); good = 8*m*m + 8; high = 16*(d+1)**2 + bound = chart['combined_normalizer_factor_bound'] + assert bound == 815 and chart['max_changed_chart_factors'] <= pins['max_chart_factors'] == 576 + K = 600 * ((stock-1) + R*120*bound) + assert K == chart['selector_calls_bound'] < 2**40 + coefficient = unit + J*high + J*(stock+24) + E*good + E*(128*N**3) + 16*m**3 + 120*T + E + K + 1 + assert coefficient == 90466979917115701 + assert coefficient < 2**80 and 2*m**3*10**16 < 2**80 and stock+24 < 2**80 + c = F(math['root_bracket'][0]); moment_upper = F(math['moment_interval'][1]) + delta_tau = 1 - moment_upper + delta_linear = 1 - F(mass, m*stock) - F(32*m*E, 10**16*stock) + assert delta_tau > 0 and delta_linear > 0 + chain = [F(384599, 10**10)]; gaps = [] + for stage in range(3): + prior = chain[-1]; a = (1-c)*c + c*prior + slacks = dict(atom=c-a, borrowing=1-a-c, remainder=1-a-c*(1-prior), stock=1-c) + delta = min(slacks.values()); assert prior < a < c < 1-a and delta > 0 + L = base.cutoff(delta, coefficient) + assert F(L)*delta**2 >= 36 and F(L)*delta >= 2*(4+(coefficient-1).bit_length()) + gaps.append(dict(stage=stage+1, slacks=slacks, minimum=delta, + cutoff_log2_at_displayed_coefficient=L)) + chain.append(a) + assert chain == list(map(F, math['assembly']['bootstrap_chain'])) + max_bank_scalar = max(len(p['widths']) for p in math['packing']['patterns']) + assert max_bank_scalar == banks['maximum_block_scalar'] == 60 <= m + result = dict(status='PASS_UNIFIED_PR300_KERNEL70_FINAL12_FINITE_OBLIGATIONS_UNDER_RETAINED_INTERFACES', + source_head=sd.HEAD, selection='candidate70', with_final12=True, + gross_added_scalar_events_per_stage=added, + omitted_reads_not_credited=bridge['prefix_compensation_reads_removed'], + scalar_weighted_additions_upper=weighted, scalar_unit_additions_upper=unit, + literal_children=E, literal_rank_mass=mass, literal_stock=stock, + route_families=J, changed_chart_programs=chart['charts'], + changed_role_chart_uses=314, pivot_residual_demands=70, + max_changed_chart_factors=chart['max_changed_chart_factors'], + max_changed_chart_numerator=chart['max_factor_numerator'], + max_changed_chart_denominator=chart['max_factor_denominator'], + normalizer_factor_bound=bound, bank_selector_calls=K, + displayed_finite_coefficient=coefficient, coefficient_bits=coefficient.bit_length(), + retained_coefficient_cap_bits=80, + sink_aware_forward_norm=forward['certified_new_bound'], + sink_aware_inverse_norm=inverse['certified_new_bound'], + conservative_payload_upper=payload, payload_bits=payload.bit_length(), + retained_payload_cap_bits=104, payload_strict_gap=2**104-payload, actual_sink_redirects=14, + target_majorant_edges=681, target_majorant_acyclic_vertices=908, + new_bank_block_scalars_up_to=max_bank_scalar, + scalar_unit_reason='All chart factor numerators and denominators, and every block+1 scalar, are nonzero and smaller than the retained prime characteristic q>2^80.', + bad_fallback_per_child=32*m*m, internal_row_coefficient=14401, + external_row_coefficient=20161, ordinary_degree_gap=F(10**6)-F(51*20161,25), + delta_tau_lower=delta_tau, delta_linear=delta_linear, + bootstrap_chain=chain, bootstrap_gaps=gaps, + cutoff_scope='Displayed fixed bill only. The retained theorem rule uses C_full, including inherited primitive, wrapper and earlier ordinary-level constants, whose values are not supplied or replaced by this check.', + inherited_assumptions=[ + 'Pinned PR299 full unchanged bit decoder, original scalar bounds and stage admission.', + 'Retained weighted-chart, prime-field, routing, cover, bank-normalizer and finite-compiler contracts.', + 'Inherited setup, primitive, wrapper and earlier ordinary-level constants inside C_full.', + 'Inherited all-size theorem and outer positive literal-gap and row-gap interfaces.' + ], full_inherited_admission_replayed=False, all_size_theorem_verified=False) + result['additional_source_head'] = composition['source_head'] + result['additional_source_pins'] = composition['input_sha256'] + result['pr300_composition_status'] = composition['status'] + result['inherited_assumptions'].append( + 'Pinned PR300 second-descent chronological/source-span admission and its unchanged chart/finite-compiler contracts; only the new composition is independently checked here.') + return result diff --git a/research/gen5b-shared-kernels/kernel70_pricing.py b/research/gen5b-shared-kernels/kernel70_pricing.py new file mode 100644 index 0000000000..51f6c092f6 --- /dev/null +++ b/research/gen5b-shared-kernels/kernel70_pricing.py @@ -0,0 +1,119 @@ +"""Exact portable kernel70 + final12 pricing on the separately pinned PR300 case. + +PR299 raw inputs and declared PR300 descent2 delta remain byte-pinned. The +composition checker binds changed role paths; inherited source admission and +all-size interfaces remain conditional. The kernel72 fallback is unchanged. +""" +from collections import Counter +from fractions import Fraction as F + +import source_data as sd +import check_coretime +import check_suffix_frames +import reprice +from kernel72_pricing import integer_map, patterns + +PR300_HEAD = 'fd516176fd068e4fa7af14b40cd878ce8c305296' + + +def measured_kernel_delta(bridge): + """Bind the price to the full measured entrance ledger, not a copied delta.""" + assert bridge['status'] == 'PASS_SHARED_DONOR_CHANGED_STAGE_COMPOSITION' + assert bridge['selection'] == 'candidate70' and bridge['source_head'] == sd.HEAD + assert bridge['formal_forward_and_inverse_equal'] + assert bridge['arbitrary_source_target_dirty_inputs'] + paths = bridge['paths'] + assert len(paths) == bridge['members'] == 157 + assert len({p['role'] for p in paths}) == len({p['stream'] for p in paths}) == len(paths) + assert Counter(p['kind'] for p in paths) == {'pivot': 70, 'donor': 87} + assert bridge['pivots'] == 70 and bridge['distinct_donors'] == 87 + assert bridge['setup_adds'] == bridge['restore_adds'] == 601 + assert {tuple(p['line']) for p in paths} == {(6, 7), (16, 17), (2, 3)} + delta = Counter() + for p in paths: + d = p['first_dimension'] + assert type(d) is int and 1 < d <= 24 + assert p['old_dimensions'][0] == d and p['old_dimensions'][-1] == 24 + assert len(p['old_frames']) == len(p['old_dimensions']) + assert all(a <= b for a, b in zip(p['old_dimensions'], p['old_dimensions'][1:])) + paid = [d - 1] if p['kind'] == 'pivot' else [1, d - 1] + assert p['new_paid_entrance_dimensions'] == paid + assert p['new_initial_dimension'] == (1 if p['kind'] == 'pivot' else 0) + delta[d] -= 1 + delta.update(paid) + delta = {r: n for r, n in delta.items() if n} + assert delta == integer_map(bridge['local_paid_histogram_delta']) + assert delta == {1: 87, 2: 137, 3: -137, 4: 18, 5: -16, 6: -2} + residual = {24: -70, 23: 70} + assert integer_map(bridge['residual_family_delta']) == residual + assert sum(r * n for r, n in delta.items()) == -70 + return delta, residual + + + +def verify_composition(composition, combined_delta=None): + assert composition['status'] == 'PASS_ROLE_DISJOINT_PR300_COMPOSITION' + assert composition['baseline_head'] == sd.HEAD + assert composition['source_head'] == PR300_HEAD + pin = sd.MANIFEST['files']['pr300/descent2-selection.json'] + assert pin['commit'] == PR300_HEAD + assert composition['input_sha256']['pr300/descent2-selection.json'] == pin['sha256'] + assert composition['paid_ledgers_additive'] + assert composition['new_descent_gate_count'] == 89 + assert composition['rational_new_frame_ranks_and_nondegeneracy_checked'] == 89 + assert composition['final12_broader_scalar_closure'] == 84 + assert composition['kernel70_streams'] == 157 + assert composition['descent2_overlap_final12'] == composition['descent2_overlap_kernel70'] == [] + assert composition['scalar_majorants_unchanged_by_descent2'] + assert composition['source_operand_columns_unchanged_by_new_kernel'] + assert composition['common_kernel_cut_and_final_restore_order_unchanged'] + assert composition['final12_and_kernel70_source_response_unchanged'] + assert composition['unchanged_restore_entries'] == 440 and composition['unchanged_sink_entries'] == 7 + if combined_delta is not None: + assert integer_map(composition['combined_local_histogram_delta_over299']) == integer_map(combined_delta) + return pin + + +def run(bridge=None, final12_frames=None, final12_local=None, composition=None): + sd.verify_all() + if bridge is None: + import check_kernel70 + bridge = check_kernel70.run() + if final12_frames is None: + final12_frames = check_suffix_frames.run() + if final12_local is None: + final12_local = check_coretime.run(minimal=True) + if composition is None: + import check_pr300_kernel70_composition + composition = check_pr300_kernel70_composition.run() + H, D = measured_kernel_delta(bridge) + assert final12_frames['status'] == 'PASS_MEASURED_AFFECTED_SUFFIX_FRAME_LEDGER' + assert final12_frames['source_head'] == sd.HEAD and final12_frames['both_reflected_ledgers'] + finalH = integer_map(final12_frames['local_histogram_delta']) + assert finalH == {1: 18, 2: -12} + assert final12_local['selected'] == 12 and final12_local['undone_old_restorations'] == 6 + finalD = integer_map(final12_local['residual_rank_count_delta']) + assert finalD == {2: 12, 3: -18, 4: 6} + extraH = integer_map(sd.read_json('pr300/descent2-selection.json')['expected_local_histogram_delta']) + assert sum(r*n for r,n in extraH.items()) == 0 and sum(extraH.values()) == 65 + combinedH = Counter(H); combinedH.update(finalH); combinedH.update(extraH) + combinedD = Counter(D); combinedD.update(finalD) + pin = verify_composition(composition, combinedH) + result = reprice.reprice(dict(combinedH), dict(combinedD), patterns(70, finalD)) + assert result['packing']['optimal'] and result['packing']['unused_coordinate_capacity'] == 0 + assert result['literal_stock'] == 1229560 + assert result['calls'] == 483425 and result['rank_mass'] == 2454720 + assert result['deficit'] == 4400 and result['packing']['feasible_bins'] == 161432 + assert result['kappa'] == F(749940157923873, 10**18) + result.update(status='PASS_KERNEL70_PR300_FINAL12_EXACT_PRICING', selection='candidate70', + with_final12=True, on_PR300=True, source_head=sd.HEAD, + additional_source=dict(pin), composition_status=composition['status'], + kernel_histogram_delta=H, final12_histogram_delta=finalH, + pr300_histogram_delta=extraH, kernel_residual_delta=D, + final12_residual_delta=finalD, pivots=70, distinct_donors=87, + scalar_setup_gates=601, scalar_restore_gates=601, + fallback_kernel72_kappa=F(749936120273400, 10**18), + kappa_gain_over_kernel72=result['kappa']-F(749936120273400, 10**18), + binding='Measured candidate70 first-frame ledger plus measured final12 chronological suffix delta and pinned PR300 descent2 delta, bound to role-disjoint composition.', + scope='Exact arithmetic and optimal inventory under the changed composition certificates. PR300 chronological/source-span admission and unchanged compiler, prime, routing and all-size interfaces remain inherited.') + return result diff --git a/research/gen5b-shared-kernels/kernel70_witness.py b/research/gen5b-shared-kernels/kernel70_witness.py new file mode 100644 index 0000000000..245e50d0d4 --- /dev/null +++ b/research/gen5b-shared-kernels/kernel70_witness.py @@ -0,0 +1,10 @@ +"""Byte-pinned new 70-pivot witness, rechecked against immutable upstream data.""" +from pathlib import Path +import hashlib,json +PATH=Path(__file__).resolve().parent/'kernel70-witness.json' +SHA256='8b99bb2f0e9f352c303d251009058cc30e7ad4c20b8e32e863afb0ebcc3388b7' +def load(): + raw=PATH.read_bytes() + if hashlib.sha256(raw).hexdigest()!=SHA256: + raise ValueError('70-pivot witness bytes changed') + return json.loads(raw) diff --git a/research/gen5b-shared-kernels/kernel72_charts.py b/research/gen5b-shared-kernels/kernel72_charts.py new file mode 100644 index 0000000000..cd8c3ec0ed --- /dev/null +++ b/research/gen5b-shared-kernels/kernel72_charts.py @@ -0,0 +1,123 @@ +"""Exact changed-chart constructions for union72 and final12. + +Every member receives its new first-frame quotient chart. All 72 pivot bank +residuals and 93 donor line entrances are bound to reusable exact programs. +""" +from collections import Counter +from fractions import Fraction as F + +import chart_bounds as base +import source_data as sd +from kernel72_pricing import measured_kernel_delta + + +def gram(a, b): + return 9 * sum(x * y for x, y in zip(a, b)) - sum(a) * sum(b) + + +def checked_chart(columns, residual_rank): + assert len(columns) == 24 and all(len(c) == 24 for c in columns) + assert 0 < residual_rank < 24 + assert all(gram(a, b) == 0 for a in columns[:residual_rank] + for b in columns[residual_rank:]) + matrix = [list(row) for row in zip(*columns)] + assert len(base.rref(matrix)[1]) == 24 + f = base.factor(matrix) # Includes an exact inverse-program replay. + assert f['determinant'] and f['count'] <= 576 + assert f['max_numerator'] < 2**80 and f['max_denominator'] < 2**80 + return dict(basis_columns=columns, residual_rank=residual_rank, + completion_rank=24-residual_rank, **f) + + +def line_chart(i, j, residual_rank): + assert type(i) is int and type(j) is int and 0 <= i < j < 24 + line = [int(k == i) - int(k == j) for k in range(24)] + complement = [[int(k == r) for k in range(24)] for r in range(24) if r not in (i, j)] + complement.append([int(k == i or k == j) for k in range(24)]) + assert gram(line, line) == 18 + if residual_rank == 1: + columns = [line] + complement + elif residual_rank == 23: + columns = complement + [line] + else: + raise ValueError('A line chart has residual rank 1 or 23') + return dict(line=[i, j], **checked_chart(columns, residual_rank)) + + +def first_frame_chart(frame, line): + """F/L from ker(A) intersect L-perp; completion is L direct-sum F-perp.""" + ann = frame['a'] if 'a' in frame else base.nullspace(frame['b']) + d = frame['dim']; i, j = line + assert len(base.rref(ann)[1]) == 24 - d + v = [int(k == i) - int(k == j) for k in range(24)] + assert all(sum(a * b for a, b in zip(row, v)) == 0 for row in ann) + assert gram(v, v) == 18 + # Since sum(v)=0, the weighted condition =0 is x_i=x_j. + residual = base.nullspace(ann + [v]) + assert len(residual) == d - 1 + # (9I-J)^(-1) a is proportional to 15*a-sum(a). + exterior = [base.primitive([15 * x - sum(row) for x in row]) for row in ann] + assert len(exterior) == 24 - d + assert all(sum(a * b for a, b in zip(row, col)) == 0 + for row in ann for col in residual + [v]) + assert all(gram(col, other) == 0 for col in residual + [v] for other in exterior) + out = checked_chart(residual + [v] + exterior, d - 1) + out.update(first_dimension=d, line=line) + return out + + +def run(bridge=None, final12_charts=None, literal_stock=1229555): + sd.verify_all() + if bridge is None: + import check_shared_kernel + bridge = check_shared_kernel.run(selection='union72') + measured_kernel_delta(bridge) + if final12_charts is None: + final12_charts = base.run() + frames = sd.read_json('gen5bit/selected/bit/frames_p12.json.gz')['frames'] + programs = []; uses = []; index = {} + def put(key, builder): + if key not in index: + index[key] = len(programs) + programs.append(dict(program_id=len(programs), **builder())) + return index[key] + for p in sorted(bridge['paths'], key=lambda p: p['role']): + line = tuple(p['line']); frame_id = p['old_frames'][0] + first = frames[str(frame_id)] + assert first['dim'] == p['first_dimension'] + program = put(('first_frame', frame_id, line), + lambda: dict(kind='first_frame_quotient', frame=frame_id, + **first_frame_chart(first, list(line)))) + uses.append(dict(kind='first_frame_quotient', role=p['role'], stream=p['stream'], + frame=frame_id, rank=p['first_dimension']-1, program_id=program)) + rank = 23 if p['kind'] == 'pivot' else 1 + program = put(('line', line, rank), + lambda: dict(kind='pivot_residual' if rank == 23 else 'donor_line_entrance', + **line_chart(*line, rank))) + uses.append(dict(kind='pivot_residual' if rank == 23 else 'donor_line_entrance', + role=p['role'], stream=p['stream'], rank=rank, program_id=program)) + assert Counter(u['kind'] for u in uses) == { + 'first_frame_quotient': 165, 'pivot_residual': 72, 'donor_line_entrance': 93} + assert final12_charts['charts'] == 18 + for program in final12_charts['factor_programs']: + programs.append(dict(program, program_id=len(programs), scope='final12')) + pins = sd.read_json('expected/kernel-pins.json') + largest = max(p['count'] for p in programs) + retained = pins['max_chart_factors'] + bound = max(largest, retained) + 119 + 120 + assert retained == 576 and bound == pins['normalizer_factor_bound'] == 815 + assert literal_stock == pins['literal_stock'] - 195 + selectors = 600 * ((literal_stock - 1) + pins['physical_R'] * 120 * bound) + assert selectors < 2**40 + return dict(status='PASS_UNION72_FINAL12_CHANGED_CHARTS', source_head=sd.HEAD, + selection='union72', with_final12=True, charts=len(programs), + kernel_programs=len(programs)-18, final12_charts=18, + first_frame_quotient_demands=165, donor_line_entrance_demands=93, + pivot_residual_demands=72, role_chart_uses=uses, + max_changed_chart_factors=largest, + max_factor_numerator=max(p['max_numerator'] for p in programs), + max_factor_denominator=max(p['max_denominator'] for p in programs), + retained_chart_factor_bound=retained, + combined_normalizer_factor_bound=bound, literal_stock=literal_stock, + selector_calls_bound=selectors, factor_programs=programs, + scope='Every changed union72 first-frame quotient, donor line entrance and rank23 pivot residual is bound to an exactly factored weighted chart; final12 charts are included. Unchanged chart admission and finite-compiler interfaces remain inherited.') diff --git a/research/gen5b-shared-kernels/kernel72_finite_bill.py b/research/gen5b-shared-kernels/kernel72_finite_bill.py new file mode 100644 index 0000000000..2e79b39962 --- /dev/null +++ b/research/gen5b-shared-kernels/kernel72_finite_bill.py @@ -0,0 +1,167 @@ +"""Unified changed finite bill for the 72-pivot union plus final12. + +Closes changed chart, selector, scalar-cost and sink-aware payload obligations. +Original compiler, primitive, weighted-chart, routing and all-size contracts +remain explicit assumptions; their unspecified constants are not set to zero. +""" +from collections import Counter +from fractions import Fraction as F + +import finite_bill as base +import source_data as sd +import bank_binding +from kernel72_pricing import integer_map, measured_kernel_delta + + +def run(chart, norm, math, bridge, banks=None, suffix=None, composition=None): + sd.verify_all() + measured_kernel_delta(bridge) + assert chart['status'] == 'PASS_UNION72_FINAL12_CHANGED_CHARTS' + assert chart['selection'] == math['selection'] == 'union72' + assert chart['with_final12'] and math['with_final12'] + assert chart['source_head'] == math['source_head'] == sd.HEAD + extra_case = composition is not None + if not extra_case: + assert math['status'] == 'PASS_UNION72_FINAL12_EXACT_PRICING' + else: + assert math['status'] == 'CONDITIONAL_PINNED_ADDITIONAL_HISTOGRAM_ARITHMETIC' + assert composition['status'] == 'PASS_ROLE_DISJOINT_PR300_COMPOSITION' + assert composition['baseline_head'] == sd.HEAD + assert composition['source_head'] == math['additional_source']['commit'] == 'fd516176fd068e4fa7af14b40cd878ce8c305296' + assert composition['input_sha256']['pr300/descent2-selection.json'] == math['additional_source']['sha256'] == sd.MANIFEST['files']['pr300/descent2-selection.json']['sha256'] + assert composition['paid_ledgers_additive'] + assert integer_map(composition['combined_local_histogram_delta_over299']) == integer_map(math['local_histogram_delta']) + assert composition['scalar_majorants_unchanged_by_descent2'] + assert composition['source_operand_columns_unchanged_by_new_kernel'] + assert composition['common_kernel_cut_and_final_restore_order_unchanged'] + assert composition['descent2_overlap_final12'] == composition['descent2_overlap_kernel72'] == [] + assert composition['new_descent_gate_count'] == 89 + assert composition['rational_new_frame_ranks_and_nondegeneracy_checked'] == 89 + assert composition['final12_broader_scalar_closure'] == 84 + assert composition['kernel72_streams'] == 165 + assert composition['unchanged_restore_entries'] == 440 and composition['unchanged_sink_entries'] == 7 + assert chart['first_frame_quotient_demands'] == bridge['members'] == 165 + assert chart['pivot_residual_demands'] == bridge['pivots'] == 72 + assert chart['donor_line_entrance_demands'] == bridge['distinct_donors'] == 93 + assert chart['final12_charts'] == 18 + programs = {p['program_id']: p for p in chart['factor_programs']} + assert len(programs) == chart['charts'] + expected = {(p['role'], p['stream'], 'first_frame_quotient', p['first_dimension'] - 1) + for p in bridge['paths']} + expected.update((p['role'], p['stream'], 'pivot_residual' if p['kind'] == 'pivot' else 'donor_line_entrance', + 23 if p['kind'] == 'pivot' else 1) for p in bridge['paths']) + uses = chart['role_chart_uses'] + assert len(uses) == len(expected) == 330 + assert {(u['role'], u['stream'], u['kind'], u['rank']) for u in uses} == expected + for u in uses: + assert programs[u['program_id']]['residual_rank'] == u['rank'] + assert norm['status'] == 'PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS' + assert norm['selection'] in ('three_lines_trimmed', 'union72') + assert norm['setup_restore_pairs'] == bridge['setup_adds'] == bridge['restore_adds'] == 473 + pins = sd.read_json('expected/kernel-pins.json') + forward = norm['forward']; inverse = norm['inverse'] + assert forward['reverse'] is False and inverse['reverse'] is True + assert forward['inherited_bound'] == pins['forward_max_row_l1'] == 77985 + assert inverse['inherited_bound'] == pins['inverse_max_row_l1'] == 2475558 + for row in (forward, inverse): + assert row['certified_new_bound'] == row['inherited_bound'] + row['max_added_majorant'] + assert row['max_added_source'] == 0 + assert forward['certified_new_bound'] == 158647 and inverse['certified_new_bound'] == 3809875 + # These guards specifically reject the superseded target-only majorant. + sinks = sd.read_json('sink-selection.json')['sinks'] + assert norm['actual_sink_redirects'] == sum(s['forward_writes'] for s in sinks) == 14 + assert norm['target_majorant_edges'] == 681 and norm['target_majorant_acyclic_vertices'] == 908 + payload = 64 * forward['certified_new_bound']**3 * inverse['certified_new_bound']**2 + assert payload == norm['payload_bound'] == 3709343221562739318443143000000 + assert payload.bit_length() == norm['payload_bits'] == 102 + assert norm['retained_payload_cap_2_to104'] and payload < 2**104 + if suffix is None: + import check_complete_suffix + suffix = check_complete_suffix.run() + assert suffix['status'] == 'PASS_COMPLETE_SUFFIX_ALL_COLUMN_EQUALITY' + assert suffix['source_head'] == sd.HEAD and suffix['unchanged_scalar_multiset'] + assert suffix['original_suffix_adds'] == suffix['modified_suffix_adds'] + if banks is None: + import check_kernel_bank_assignment + banks = check_kernel_bank_assignment.run() + assert banks['status'] == 'PASS_UNIFIED_KERNEL72_CORETIME12_BANK_ASSIGNMENT' + assert banks['new_shared_kernel_pivots'] == 72 and banks['helper_roles'] == pins['physical_R'] + assert banks['all_banks_full'] and banks['stages_have_disjoint_bank_namespaces'] + assert integer_map(banks['family_counts']) == {r: n // 60 for r, n in integer_map(math['packing']['demand']).items()} + assert banks['banks_per_stage'] == math['packing']['feasible_bins'] == 161431 + bank_binding.check(banks, math) + m = 120; R = pins['physical_R']; v = 1760; T = 60; d = m*m; N = 2*m + stock = math['literal_stock'] + assert R == 15427 and stock == chart['literal_stock'] == banks['literal_stock'] == 1229555 + assert math['calls'] == (483455 if extra_case else 483130) and math['rank_mass'] == 2454710 + E = T * math['calls']; mass = T * math['rank_mass'] + assert m * stock - mass == 264000 + # All 473 setup and 473 restore additions are charged. The 832 omitted + # old compensation reads are deliberately not subtracted from this bound. + added = bridge['setup_adds'] + bridge['restore_adds'] + weighted = T * (5 * (pins['scalar_events'] + added) + 6*v) + unit = T * (5 * (pins['literal_unit_additions'] + added) + 6*v) + J = T * (24*v + 10*R); good = 8*m*m + 8; high = 16*(d+1)**2 + bound = chart['combined_normalizer_factor_bound'] + assert bound == 815 and chart['max_changed_chart_factors'] <= pins['max_chart_factors'] == 576 + K = 600 * ((stock-1) + R*120*bound) + assert K == chart['selector_calls_bound'] < 2**40 + coefficient = unit + J*high + J*(stock+24) + E*good + E*(128*N**3) + 16*m**3 + 120*T + E + K + 1 + assert coefficient < 2**80 and 2*m**3*10**16 < 2**80 and stock+24 < 2**80 + c = F(math['root_bracket'][0]); moment_upper = F(math['moment_interval'][1]) + delta_tau = 1 - moment_upper + delta_linear = 1 - F(mass, m*stock) - F(32*m*E, 10**16*stock) + assert delta_tau > 0 and delta_linear > 0 + chain = [F(384599, 10**10)]; gaps = [] + for stage in range(3): + prior = chain[-1]; a = (1-c)*c + c*prior + slacks = dict(atom=c-a, borrowing=1-a-c, remainder=1-a-c*(1-prior), stock=1-c) + delta = min(slacks.values()); assert prior < a < c < 1-a and delta > 0 + L = base.cutoff(delta, coefficient) + assert F(L)*delta**2 >= 36 and F(L)*delta >= 2*(4+(coefficient-1).bit_length()) + gaps.append(dict(stage=stage+1, slacks=slacks, minimum=delta, + cutoff_log2_at_displayed_coefficient=L)) + chain.append(a) + assert chain == list(map(F, math['assembly']['bootstrap_chain'])) + max_bank_scalar = max(len(p['widths']) for p in math['packing']['patterns']) + assert max_bank_scalar == banks['maximum_block_scalar'] == 60 <= m + result = dict(status='PASS_UNIFIED_KERNEL72_FINAL12_FINITE_OBLIGATIONS_UNDER_RETAINED_INTERFACES', + source_head=sd.HEAD, selection='union72', with_final12=True, + gross_added_scalar_events_per_stage=added, + omitted_reads_not_credited=bridge['prefix_compensation_reads_removed'], + scalar_weighted_additions_upper=weighted, scalar_unit_additions_upper=unit, + literal_children=E, literal_rank_mass=mass, literal_stock=stock, + route_families=J, changed_chart_programs=chart['charts'], + changed_role_chart_uses=330, pivot_residual_demands=72, + max_changed_chart_factors=chart['max_changed_chart_factors'], + max_changed_chart_numerator=chart['max_factor_numerator'], + max_changed_chart_denominator=chart['max_factor_denominator'], + normalizer_factor_bound=bound, bank_selector_calls=K, + displayed_finite_coefficient=coefficient, coefficient_bits=coefficient.bit_length(), + retained_coefficient_cap_bits=80, + sink_aware_forward_norm=forward['certified_new_bound'], + sink_aware_inverse_norm=inverse['certified_new_bound'], + conservative_payload_upper=payload, payload_bits=payload.bit_length(), + retained_payload_cap_bits=104, actual_sink_redirects=14, + target_majorant_edges=681, target_majorant_acyclic_vertices=908, + new_bank_block_scalars_up_to=max_bank_scalar, + scalar_unit_reason='All chart factor numerators and denominators, and every block+1 scalar, are nonzero and smaller than the retained prime characteristic q>2^80.', + bad_fallback_per_child=32*m*m, internal_row_coefficient=14401, + external_row_coefficient=20161, ordinary_degree_gap=F(10**6)-F(51*20161,25), + delta_tau_lower=delta_tau, delta_linear=delta_linear, + bootstrap_chain=chain, bootstrap_gaps=gaps, + cutoff_scope='Displayed fixed bill only. The retained theorem rule uses C_full, including inherited primitive, wrapper and earlier ordinary-level constants, whose values are not supplied or replaced by this check.', + inherited_assumptions=[ + 'Pinned PR299 full unchanged bit decoder, original scalar bounds and stage admission.', + 'Retained weighted-chart, prime-field, routing, cover, bank-normalizer and finite-compiler contracts.', + 'Inherited setup, primitive, wrapper and earlier ordinary-level constants inside C_full.', + 'Inherited all-size theorem and outer positive literal-gap and row-gap interfaces.' + ], full_inherited_admission_replayed=False, all_size_theorem_verified=False) + if extra_case: + result['status'] = 'PASS_UNIFIED_PR300_KERNEL72_FINAL12_CHANGED_FINITE_OBLIGATIONS_UNDER_RETAINED_INTERFACES' + result['additional_source_head'] = composition['source_head'] + result['additional_source_pins'] = composition['input_sha256'] + result['pr300_composition_status'] = composition['status'] + result['inherited_assumptions'].append( + 'Pinned PR300 second-descent chronological/source-span admission and its unchanged chart/finite-compiler contracts; only the new composition is independently checked here.') + return result diff --git a/research/gen5b-shared-kernels/kernel72_pricing.py b/research/gen5b-shared-kernels/kernel72_pricing.py new file mode 100644 index 0000000000..484048477c --- /dev/null +++ b/research/gen5b-shared-kernels/kernel72_pricing.py @@ -0,0 +1,158 @@ +"""Exact portable pricing of the admitted union72 plus final12 changes. + +Only independently authored helpers and byte-pinned PR299 JSON are used. +Physical bank admission and inherited all-size interfaces remain separate. +""" +from collections import Counter +from fractions import Fraction as F + +import check_coretime +import check_suffix_frames +import reprice +import source_data as sd + + +def integer_map(values): + result = {} + for rank, count in values.items(): + if isinstance(rank, str): + if not rank.isdecimal(): + raise ValueError('Invalid histogram rank') + rank = int(rank) + if type(rank) is not int or type(count) is not int or rank <= 0: + raise ValueError('Histogram requires positive integer ranks and integer counts') + if count: + if rank in result: + raise ValueError('Duplicate histogram rank') + result[rank] = count + return result + + +def measured_kernel_delta(bridge): + """Bind the price to the full measured entrance ledger, not a copied delta.""" + assert bridge['status'] == 'PASS_SHARED_DONOR_CHANGED_STAGE_COMPOSITION' + assert bridge['selection'] == 'union72' and bridge['source_head'] == sd.HEAD + assert bridge['formal_forward_and_inverse_equal'] + assert bridge['arbitrary_source_target_dirty_inputs'] + paths = bridge['paths'] + assert len(paths) == bridge['members'] == 165 + assert len({p['role'] for p in paths}) == len({p['stream'] for p in paths}) == len(paths) + assert Counter(p['kind'] for p in paths) == {'pivot': 72, 'donor': 93} + assert bridge['pivots'] == 72 and bridge['distinct_donors'] == 93 + assert bridge['setup_adds'] == bridge['restore_adds'] == 473 + assert {tuple(p['line']) for p in paths} == {(6, 7), (16, 17), (2, 3)} + delta = Counter() + for p in paths: + d = p['first_dimension'] + assert type(d) is int and 1 < d <= 24 + assert p['old_dimensions'][0] == d and p['old_dimensions'][-1] == 24 + assert len(p['old_frames']) == len(p['old_dimensions']) + assert all(a <= b for a, b in zip(p['old_dimensions'], p['old_dimensions'][1:])) + paid = [d - 1] if p['kind'] == 'pivot' else [1, d - 1] + assert p['new_paid_entrance_dimensions'] == paid + assert p['new_initial_dimension'] == (1 if p['kind'] == 'pivot' else 0) + delta[d] -= 1 + delta.update(paid) + delta = {r: n for r, n in delta.items() if n} + assert delta == integer_map(bridge['local_paid_histogram_delta']) + assert delta == {1: 93, 2: 144, 3: -144, 4: 19, 5: -17, 6: -2} + residual = {24: -72, 23: 72} + assert integer_map(bridge['residual_family_delta']) == residual + assert sum(r * n for r, n in delta.items()) == -72 + return delta, residual + + +def patterns(pivots, final12_residual): + """Exact mixed-bin exchange: 4*23 + 24 + 4 = 120, with 60 replicas.""" + if type(pivots) is not int or pivots <= 0 or pivots % 2: + raise ValueError('An even positive pivot count is required') + out = reprice.pure_retile(final12_residual) + for widths, change in (([23] * 4 + [24, 4], 15 * pivots), + ([24] * 5, -15 * pivots), + ([4] * 30, -pivots // 2)): + row = next((r for r in out if r['widths'] == widths), None) + if row is None or row['count'] + change < 0: + raise ValueError('Mixed packing exchange is unavailable') + row['count'] += change + return [row for row in out if row['count']] + + +def run(bridge=None, final12_frames=None, final12_local=None): + sd.verify_all() + if bridge is None: + import check_shared_kernel + bridge = check_shared_kernel.run(selection='union72') + if final12_frames is None: + final12_frames = check_suffix_frames.run() + if final12_local is None: + final12_local = check_coretime.run(minimal=True) + H, D = measured_kernel_delta(bridge) + assert final12_frames['status'] == 'PASS_MEASURED_AFFECTED_SUFFIX_FRAME_LEDGER' + assert final12_frames['source_head'] == sd.HEAD and final12_frames['both_reflected_ledgers'] + finalH = integer_map(final12_frames['local_histogram_delta']) + assert finalH == {1: 18, 2: -12} + assert final12_local['selected'] == 12 and final12_local['undone_old_restorations'] == 6 + finalD = integer_map(final12_local['residual_rank_count_delta']) + assert finalD == {2: 12, 3: -18, 4: 6} + combinedH = Counter(H); combinedH.update(finalH) + combinedD = Counter(D); combinedD.update(finalD) + result = reprice.reprice(dict(combinedH), dict(combinedD), patterns(72, finalD)) + assert result['packing']['optimal'] and result['packing']['unused_coordinate_capacity'] == 0 + assert result['literal_stock'] == 1229555 + assert result['calls'] == 483130 and result['rank_mass'] == 2454710 + assert result['deficit'] == 4400 + assert result['kappa'] == F(749917402998347, 10**18) + result.update(status='PASS_UNION72_FINAL12_EXACT_PRICING', selection='union72', + with_final12=True, source_head=sd.HEAD, + kernel_histogram_delta=H, final12_histogram_delta=finalH, + kernel_residual_delta=D, final12_residual_delta=finalD, + pivots=72, distinct_donors=93, scalar_setup_gates=473, + scalar_restore_gates=473, + prior_final12_kappa=F(749906929903449, 10**18), + kappa_gain_over_final12=result['kappa'] - F(749906929903449, 10**18), + binding='Measured union72 first-frame ledger plus measured final12 chronological suffix delta; exact residual inventory.', + scope='Exact arithmetic and optimal inventory under separately checked changed-stage certificates. Literal bank assignment, unchanged PR299 admission, finite compiler and all-size theorem remain separate.') + return result + + +def price_additional_histogram(base_receipt, selection_bytes, pin): + """Separate conditional case; byte-pin an extra declared local histogram. + + This does not certify the extra transformation's chronological admission, + compatibility, scalar norms or finite bill. The base receipt is untouched. + """ + import hashlib + import json + import re + assert base_receipt['status'] == 'PASS_UNION72_FINAL12_EXACT_PRICING' + assert base_receipt['source_head'] == sd.HEAD + assert isinstance(selection_bytes, bytes) + assert pin['repository'] and pin['path'] + assert re.fullmatch('[0-9a-f]{40}', pin['commit']) + assert re.fullmatch('[0-9a-f]{40}', pin['git_blob']) + assert re.fullmatch('[0-9a-f]{64}', pin['sha256']) + if hashlib.sha256(selection_bytes).hexdigest() != pin['sha256']: + raise ValueError('Additional histogram source SHA-256 mismatch') + blob = hashlib.sha1(b'blob ' + str(len(selection_bytes)).encode() + b'\0' + selection_bytes).hexdigest() + if blob != pin['git_blob']: + raise ValueError('Additional histogram source Git blob mismatch') + data = json.loads(selection_bytes) + extra = integer_map(data['expected_local_histogram_delta']) + if sum(rank * count for rank, count in extra.items()): + raise ValueError('This overlay requires unchanged total rank and bank inventory') + H = Counter(integer_map(base_receipt['local_histogram_delta'])); H.update(extra) + D = integer_map(base_receipt['role_rank_count_delta']) + result = reprice.reprice(dict(H), D, base_receipt['packing']['patterns']) + assert result['literal_stock'] == base_receipt['literal_stock'] + assert result['rank_mass'] == base_receipt['rank_mass'] + assert result['calls'] == base_receipt['calls'] + 5 * sum(extra.values()) + result.update(status='CONDITIONAL_PINNED_ADDITIONAL_HISTOGRAM_ARITHMETIC', + source_head=sd.HEAD, selection='union72', with_final12=True, + additional_source=dict(pin), + additional_declared_local_histogram_delta=extra, + preceding_kappa=F(base_receipt['kappa']), + gain_over_preceding_case=result['kappa']-F(base_receipt['kappa']), + extra_chronology_and_interactions_verified=False, + updated_finite_bill_verified=False, + scope='Separate declared-histogram arithmetic with verified source bytes; does not replace the union72+final12 receipt or certify extra admission, composition, scalar norms, or finite bounds.') + return result diff --git a/research/gen5b-shared-kernels/kernel_witness.py b/research/gen5b-shared-kernels/kernel_witness.py new file mode 100644 index 0000000000..98496a8528 --- /dev/null +++ b/research/gen5b-shared-kernels/kernel_witness.py @@ -0,0 +1,12 @@ +"""Frozen new relation witnesses; equations are rechecked against pinned data.""" +from pathlib import Path +import hashlib,json +HERE=Path(__file__).resolve().parent +PATH=HERE/'kernel-witness.json' +SHA256='ff2539ed56c790545c33a03ce185e49a8132ca9db26c007686deb6a4009b06d6' + +def load(): + data=PATH.read_bytes() + if hashlib.sha256(data).hexdigest()!=SHA256: + raise ValueError('Kernel witness bytes changed') + return json.loads(data) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/.gitignore b/research/gen5b-shared-kernels/p10-paid-completion892-presink/.gitignore new file mode 100644 index 0000000000..0e4e8e3c32 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/.gitignore @@ -0,0 +1,4 @@ +local-inputs/ +output/ +__pycache__/ +*.pyc diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/ADAPTER-REVIEW.json b/research/gen5b-shared-kernels/p10-paid-completion892-presink/ADAPTER-REVIEW.json new file mode 100644 index 0000000000..1963e07dea --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/ADAPTER-REVIEW.json @@ -0,0 +1,50 @@ +{ + "status": "PASS_INDEPENDENT_PR322_PR323_PORTABLE_ADAPTER_REVIEW", + "portable_code_sha256": { + "acquire_inputs.py": "ea78e00b2210468554edf53205d61f620bcf98ab08fb24ef38788f4c3f15e74c", + "admission/build_local.py": "f5a79e338824dd4feb322b437eaea9776b598861c705a0044bb9d45fcbd9bf49", + "admission/check_frozen_experiment.py": "6bb5621601f13be680f5278152171034da4e033178a162e14a94767b572d7b87", + "admission/test_admission.py": "fa1f99496633b2431c900313cd38b5dfa7b13be1dc76f5aab884fd8c1a6db3f5", + "admission/validate_local.py": "984849b426a1010debb928c5e0f7999ee1d6a144859192c6b998385be309d824", + "audit/check_banks_price.py": "7982de46a0189cddebf4be6e882dfe739cac5b6e79bd3c81a10ca1b646bbd35e", + "audit/check_global_frames.py": "3210b934bafef55881824cfa60bfc11fdb99badf814760c569ae5daa7f4f9e47", + "audit/check_source_composition.py": "83189d5fe3f4a3300966c579d1d237b568c3a9d7949e1808a5f14940e772248e", + "companion.py": "2d95dc976a9b64f495b97104a17aa6ec651bc9414bb14bfab83d585e67a1fd9f", + "experiment/check_changed_banks.py": "3320abb9d298be59bb12bd715b71f1b15ab2836ca73d3e6d82023da1a0226be5", + "experiment/check_composition.py": "bc612ef1510987647bb0e7ec59f463b527ee27732537446bb17b566e197685db", + "experiment/check_controls.py": "6ee881582dcd0ee90994b1c4e04e2d1317ed88ab488c4919a9ca9bb1b7611137", + "experiment/price_candidate.py": "c3585c5b967a9e4bdcbd5a23909aa72a3dc9add28caf8542ff3c76d53a2cbf34", + "experiment/price_cases.py": "55f67e63058dde95b10a1a4a91da057908fde1c4b8f7cfef6571e52e41005834", + "lowering/check_emitted_projectors.py": "3a78be3652e291930a0773cdfb2491ff3850615ce41f55b61d3f0d54e2b12a02", + "lowering/lower_combined.py": "7ec4d85c17e7594055065f8b72f3c2dd6b8c76a1aa84a2551f87058db338a0dd", + "lowering/retained_ir_helpers.py": "c6b2bd1d0419360b2c2bf0dc039bbe8a461915c6918e25eba19cd095aedf8bc5", + "run_checks.py": "231a0598415c3051de8e21c65c05ce336baebaa9ea04ffbe871dc530ae4fb7a6", + "test_companion.py": "14e270059ab89603aff837fa9b14d5916259f7c1c5293e34c07d894481613825" + }, + "portable_document_sha256": { + "inputs.json": "a196acbb23fdf75d12c1f43ad0d4baf669b26c40615c2f8548a272211e45528f", + "README.md": "c75ff660b5a1ec59562745cbce5ce7a34d69c504b3cfb64bd51fb69e15e1b566", + "PROOF.md": "c109981c09397aed7bc43df233c064f4357af72f62727e5181228c921e638776", + "NOTICE.md": "ff8e7e822ee76258ab64a714746ed2d0d6a4bc6cf5adf76caa4a062e12000ff5", + "requirements.txt": "7bd6b8946940b79948c548c8048e545684b91c8edc9444d8dfc0c8f76a97c0a7", + "expected/receipts.json": "0fa98ae1d8597905c67d331e8cbb325f76c799a2f3a52bd48b18b35f629fc334" + }, + "base_packet_files_sha256": "a97606376a6a42abe3c1aab1815da4ec1b2f82ea8b4648c859039491bcbb7aa5", + "original_finite_audit_sha256": "e9cb05b2dc85f219753176130ff032877c77e6189e7a9b8702f98722dfff4577", + "source_diff_review": "All 15 adapted producer/audit sources manually compared with frozen originals. Differences are explicit root, input and producer binding changes, assertion guards, canonical path serialization, readable descriptor prose, and exclusion of the separately regenerated projector-control receipt from the emitter manifest. Mathematical checks are retained.", + "verified_contracts": { + "complete_predecessor_receipts": 31, + "complete_transitive_dependency_files": 31, + "inert_source_files": 8, + "current_experiment_producers": 5, + "byte_identical_concrete_artifacts": 28, + "two_portable_outputs_byte_identical": true, + "expected_portable_receipts": 15, + "independently_rerun_portability_tests": 17, + "negative_controls": "Wrong predecessor, missing publication manifest, missing/stale producer, mutated source bytes/blob, and disabled assertions reject.", + "program_hash_recomputed": "9738f0dba40e0558a40152a1607bd2a77497c063c3f8ca2675ee336c98bb630b" + }, + "review_checker_sha256": "dfeda0afdbfce21aa2ff2b68f7c58af7c6a05ebef73c78c839fb1972b053909d", + "scope": "Adapter integrity and exact preservation of the separately audited conditional finite composition. No production/upstream programs executed. Existing primitive/compiler, prime and all-size interfaces remain inherited.", + "freeze_requirements": "Require exact equality of the current Python path set and portable_code_sha256 keys, and verify every code and portable_document_sha256 digest before freezing." +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/BASELINE.json b/research/gen5b-shared-kernels/p10-paid-completion892-presink/BASELINE.json new file mode 100644 index 0000000000..8f96acf295 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/BASELINE.json @@ -0,0 +1,8 @@ +{ + "head": "4c40c0151cf8317e57a3e7759d495fb84653bc74", + "tree": "25d778000cfcc133d7bc93d7e04d7179a4b6e144", + "preserved_contribution_files": 323, + "preserved_repository_leaves": 2506, + "paid892_files_sha256": "a97606376a6a42abe3c1aab1815da4ec1b2f82ea8b4648c859039491bcbb7aa5", + "additive_only": true +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/FILES.json b/research/gen5b-shared-kernels/p10-paid-completion892-presink/FILES.json new file mode 100644 index 0000000000..01654f1a55 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/FILES.json @@ -0,0 +1,162 @@ +{ + "baseline": { + "head": "4c40c0151cf8317e57a3e7759d495fb84653bc74", + "tree": "25d778000cfcc133d7bc93d7e04d7179a4b6e144", + "preserved_contribution_files": 323, + "preserved_repository_leaves": 2506, + "paid892_files_sha256": "a97606376a6a42abe3c1aab1815da4ec1b2f82ea8b4648c859039491bcbb7aa5", + "additive_only": true + }, + "files": { + ".gitignore": { + "bytes": 41, + "sha256": "fa1930eb7b0f20d59e3ec4991a62ecd5ad76cba5754951aebe1472b054461271", + "git_blob": "0e4e8e3c329a5b45da9991e44303765ce8d89559" + }, + "ADAPTER-REVIEW.json": { + "bytes": 4334, + "sha256": "4dd63850ef5828bc5fa5951a656000e6812bbb65b10d20291ac052d0eb3fc3d7", + "git_blob": "1963e07dea2ae84325b9a0b4da942a76b230704f" + }, + "BASELINE.json": { + "bytes": 308, + "sha256": "9b65a919de1d79b25f1667ab59c5bbe2c83d5c61312d3af4f434fb21e96da669", + "git_blob": "8f96acf295060ace596155ecd3d7994b56ea9b06" + }, + "NOTICE.md": { + "bytes": 1201, + "sha256": "ff8e7e822ee76258ab64a714746ed2d0d6a4bc6cf5adf76caa4a062e12000ff5", + "git_blob": "ed98fcf0d702095199c780f05c00c928f88de160" + }, + "PROOF.md": { + "bytes": 4946, + "sha256": "c109981c09397aed7bc43df233c064f4357af72f62727e5181228c921e638776", + "git_blob": "a647ac96cb917c85acd207b6964ff4650c9a8e1d" + }, + "PROVENANCE.json": { + "bytes": 12071, + "sha256": "bdc30c2a1c9e6e476834cca9d56c0c401f0f6c13c6c1a4a5745e50c2e42e835f", + "git_blob": "53954b6700d0e084c21449670079ff99b58df319" + }, + "README.md": { + "bytes": 7433, + "sha256": "c75ff660b5a1ec59562745cbce5ce7a34d69c504b3cfb64bd51fb69e15e1b566", + "git_blob": "89e4e46d876189a62600f0e2620ad83f0a80f839" + }, + "REPRODUCTION.json": { + "bytes": 6368, + "sha256": "dfefd94b1d4f354da305526b6b14e0547c54f952d2ffa2ffd593bbb06cdcc6cd", + "git_blob": "b3cad24e75236b86d1f527dc94774e429a74f8ce" + }, + "acquire_inputs.py": { + "bytes": 1140, + "sha256": "ea78e00b2210468554edf53205d61f620bcf98ab08fb24ef38788f4c3f15e74c", + "git_blob": "ed617ebd9211a2f62c23c970ee4e0bb4ad82684e" + }, + "admission/build_local.py": { + "bytes": 15681, + "sha256": "f5a79e338824dd4feb322b437eaea9776b598861c705a0044bb9d45fcbd9bf49", + "git_blob": "7a1af3d89f82a0eda55fbfd1f7c29e87e8ccbc70" + }, + "admission/check_frozen_experiment.py": { + "bytes": 3165, + "sha256": "6bb5621601f13be680f5278152171034da4e033178a162e14a94767b572d7b87", + "git_blob": "3367676138190ef5e1d544a0c625340eaacd6dda" + }, + "admission/test_admission.py": { + "bytes": 5539, + "sha256": "fa1f99496633b2431c900313cd38b5dfa7b13be1dc76f5aab884fd8c1a6db3f5", + "git_blob": "39bf4af21fb639da99cb6bc2e2ea99cbcb6a6846" + }, + "admission/validate_local.py": { + "bytes": 5506, + "sha256": "984849b426a1010debb928c5e0f7999ee1d6a144859192c6b998385be309d824", + "git_blob": "4db049228515627cad0ffd70e96472106b7d4f32" + }, + "audit/check_banks_price.py": { + "bytes": 12381, + "sha256": "7982de46a0189cddebf4be6e882dfe739cac5b6e79bd3c81a10ca1b646bbd35e", + "git_blob": "5992042e9a787f2d52c5914b36e13f24a5562ddd" + }, + "audit/check_global_frames.py": { + "bytes": 10121, + "sha256": "3210b934bafef55881824cfa60bfc11fdb99badf814760c569ae5daa7f4f9e47", + "git_blob": "8edf795122aa616ca85496243bcd113582fca381" + }, + "audit/check_source_composition.py": { + "bytes": 14597, + "sha256": "83189d5fe3f4a3300966c579d1d237b568c3a9d7949e1808a5f14940e772248e", + "git_blob": "5de2ed4765f35491f447f5755290da9920b66e7b" + }, + "companion.py": { + "bytes": 6555, + "sha256": "2d95dc976a9b64f495b97104a17aa6ec651bc9414bb14bfab83d585e67a1fd9f", + "git_blob": "634d78669720d7c902597c4b25a9705a9b5d900e" + }, + "expected/receipts.json": { + "bytes": 3339, + "sha256": "0fa98ae1d8597905c67d331e8cbb325f76c799a2f3a52bd48b18b35f629fc334", + "git_blob": "76a7020e4fc156a561c23f60a137e6a94ff5f5e0" + }, + "experiment/check_changed_banks.py": { + "bytes": 6702, + "sha256": "3320abb9d298be59bb12bd715b71f1b15ab2836ca73d3e6d82023da1a0226be5", + "git_blob": "047be2ead78716ffd32637630951b0ff91aabe18" + }, + "experiment/check_composition.py": { + "bytes": 15782, + "sha256": "bc612ef1510987647bb0e7ec59f463b527ee27732537446bb17b566e197685db", + "git_blob": "15b05b862da4586e671e35626d9114725cf8e585" + }, + "experiment/check_controls.py": { + "bytes": 6090, + "sha256": "6ee881582dcd0ee90994b1c4e04e2d1317ed88ab488c4919a9ca9bb1b7611137", + "git_blob": "65ceac21bc7ecedc3dac2dc7a69531276845e824" + }, + "experiment/price_candidate.py": { + "bytes": 7964, + "sha256": "c3585c5b967a9e4bdcbd5a23909aa72a3dc9add28caf8542ff3c76d53a2cbf34", + "git_blob": "6c7d739ced83011d5696d23f2c6eea7f7e2377f4" + }, + "experiment/price_cases.py": { + "bytes": 7873, + "sha256": "55f67e63058dde95b10a1a4a91da057908fde1c4b8f7cfef6571e52e41005834", + "git_blob": "674e814bac4158e5e942f2490e150d5d38b100be" + }, + "inputs.json": { + "bytes": 5603, + "sha256": "a196acbb23fdf75d12c1f43ad0d4baf669b26c40615c2f8548a272211e45528f", + "git_blob": "3debfaf288b2f8aac06f0cfddcf87e8007366443" + }, + "lowering/check_emitted_projectors.py": { + "bytes": 3697, + "sha256": "3a78be3652e291930a0773cdfb2491ff3850615ce41f55b61d3f0d54e2b12a02", + "git_blob": "9fd7568b350c818534a5112d56443ce4445f0f4d" + }, + "lowering/lower_combined.py": { + "bytes": 23921, + "sha256": "7ec4d85c17e7594055065f8b72f3c2dd6b8c76a1aa84a2551f87058db338a0dd", + "git_blob": "4c577d59ecbb12e073fedd34c5a676e904c8141e" + }, + "lowering/retained_ir_helpers.py": { + "bytes": 2178, + "sha256": "c6b2bd1d0419360b2c2bf0dc039bbe8a461915c6918e25eba19cd095aedf8bc5", + "git_blob": "e941c7638509bec4613428a09b84706f144d1c15" + }, + "requirements.txt": { + "bytes": 13, + "sha256": "7bd6b8946940b79948c548c8048e545684b91c8edc9444d8dfc0c8f76a97c0a7", + "git_blob": "d59d856f1cc6c05962ca6bd4f14dd3315acd207c" + }, + "run_checks.py": { + "bytes": 6134, + "sha256": "231a0598415c3051de8e21c65c05ce336baebaa9ea04ffbe871dc530ae4fb7a6", + "git_blob": "12669ea5c52d065ab0d53fc9498f421ad8b91362" + }, + "test_companion.py": { + "bytes": 5856, + "sha256": "14e270059ab89603aff837fa9b14d5916259f7c1c5293e34c07d894481613825", + "git_blob": "1fc619adaa5dfcdc40656a449a91fec28c9b3057" + } + } +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/NOTICE.md b/research/gen5b-shared-kernels/p10-paid-completion892-presink/NOTICE.md new file mode 100644 index 0000000000..ed98fcf0d7 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/NOTICE.md @@ -0,0 +1,7 @@ +# Attribution and source notices + +The four retiming selections are eumemic's PR322 contribution, with declared OpenAI Codex assistance. The frame-retiming/descent mechanism is inherited from Rohan Arun's PR287 work, with Anthropic Claude assistance, according to the upstream attribution. The three rank-two quad-kernel selections are eumemic's PR323 contribution, with declared OpenAI Codex assistance. + +The inherited PR320 matching/source material credits Chafik Boukhalfa, DreamingOfClouds's PR315 work and the earlier source527, transcript, kernel and five-stage contributors, as recorded in the unchanged predecessor notices. This packet does not replace those notices. Exact PR322 and PR323 notices are acquired as inert, hash-pinned files alongside their selections and proofs. + +Independent integration, finite verification, changed paid-bank packing and portable packaging were prepared with substantial OpenAI assistance. These checks are distributed under Apache-2.0, subject to the repository's retained license and notices. Selection authorship and the original mechanisms remain attributed to their contributors; the packet claims only its independently checked composition and evidence. diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/PROOF.md b/research/gen5b-shared-kernels/p10-paid-completion892-presink/PROOF.md new file mode 100644 index 0000000000..a647ac96cb --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/PROOF.md @@ -0,0 +1,37 @@ +# Finite composition and retained interfaces + +## 1. Source identity and local construction + +The fixed PR322/PR323 selections are inert data, pinned to the immutable heads and hashes in `inputs.json`. The predecessor paid892 packet is pinned by its complete file manifest. Its corrected source geometry distinguishes the original rank-two source setups from all 480 final descended rank-18 setups and 960 relevant source chains. + +The new builder independently resolves the four retimings using semantic scalar identity and old-basis hashes. It temporarily reverses the prior 133 relocations, checks the unchanged base round trip, installs the four frame changes and three rank-two kernels, then reapplies the same admitted relocations. The 20 changed roles are disjoint from the 266 moved operands. All resulting crossings and live frame boundaries are checked. + +The complete forward and inverse scalar/COPY maps on 10,141 columns are verified. The independent exported-record validator checks every used frame, exact containment, final endpoint state and rational Gram nondegeneracy. The separate source auditor reconstructs the new records and checks all integer operand-source spans, own-cut responses and restoration identities. + +## 2. Changed endpoint charts and packing + +Three helper residual widths decrease by two. The new allocator enumerates every role, replica and stage, retaining 60 replicas and the existing helper population. Each of the five stage partitions contains 85,571 banks, with exactly one 80-coordinate final bank. The remaining 20 coordinates are arbitrary-dirty coordinates, not free padding. + +Each final bank receives a paid rank-20 operation. The emitter writes its integer U and V entries, checks VU = -2I, and verifies the full 200-column arbitrary-dirty swap after the ordinary helper sweeps. Its same-bank routing, wrappers, selectors, matrix preparation and all-edge fallback are charged. Wrong support, missing payment, duplication and wrong coefficients are rejected. + +All three changed entrance charts are reconstructed exactly; their elementary factors fit the retained normalizer allowance. Independent checks bind every role-to-chart assignment and all 2,466,300 real role/replica/stage assignments. Generic maximum rank is 42, strictly below 50. + +## 3. Literal global frame IR + +Five explicit stage templates are lowered into all 300 literal namespaces. The local records determine the paid histogram; the declared target histogram is not substituted for emission. The binder hashes 116,772,600 actual mapped frame records, all boundary records and the phase/projector descriptions. + +Copied-work rank-18-to-ZERO MOVEs need a positive old-minus-new projector in the forward direction. Exactly 100 explicit overrides are part of the program binding. The independent global auditor constructs the 20 actual rational center projectors from source frame annihilators, proves idempotence and both COPY conjugacies, and rejects a negative projector and its noninvolutive D matrix. This control is separate from the five paid rank-20 bank-completion controls. + +The independent global audit reconstructs every stage template and namespace map and matches the complete bound program. It does not execute production primitives or regenerate an upstream whole program. + +## 4. Invoice and exact arithmetic + +The combined local histogram contains 48,486 children and rank mass 179,458. The actual global profile has 15,006,605 children, rank mass 65,703,100, stock 658,255 and deficit 122,400. The selector coefficient is 295,864,873,940; the complete finite coefficient is 25,478,454,083,580,596. + +Exact rational moment arithmetic includes the charged all-edge fallback and encloses the root between adjacent 10^-18 grid points 770601459593856 and 770601459593857. Three ordinary-bootstrap levels, all 47 assembly inequalities and adjacent-κ rejection yield the conditional saving parameter κ = 770008089898797/10^18. The bit supplier remains binding under the retained complex certificate. + +## 5. Explicit boundary + +This packet discharges the new finite source, local frame, bank, global IR, invoice and arithmetic obligations. It composes with the named predecessor interfaces. Generic primitive realization, compiler and prime uniformity, prime supply, weighted chart and restored-row behavior, ordinary leaves, complex/full-C routes, precision/recovery and analytic all-size hypotheses remain inherited. Rational nondegeneracy here is not a claim about every selected finite field. The result is not an unconditional integer-multiplication theorem. + +Portability changes replace development paths with explicit roots and replace isolated cache hashes with the complete frozen predecessor contract. They preserve mathematical checks and bind regenerated producer/input/receipt identities. All upstream code remains inert. Independent adapter review and exact aggregate receipts are part of the publication evidence. diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/PROVENANCE.json b/research/gen5b-shared-kernels/p10-paid-completion892-presink/PROVENANCE.json new file mode 100644 index 0000000000..53954b6700 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/PROVENANCE.json @@ -0,0 +1,169 @@ +{ + "prepared_with": "Substantial OpenAI assistance", + "license": "Apache-2.0; retained repository and source notices apply", + "upstream_code_execution": false, + "base_packet_files_sha256": "a97606376a6a42abe3c1aab1815da4ec1b2f82ea8b4648c859039491bcbb7aa5", + "base_word_sha256": "25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739", + "source_manifest_sha256": "a196acbb23fdf75d12c1f43ad0d4baf669b26c40615c2f8548a272211e45528f", + "selection_authorship": "Four PR322 retimings and three PR323 rank-two kernels: eumemic, with declared OpenAI Codex assistance. Retiming/descent mechanism: Rohan Arun, PR287, with Anthropic Claude assistance, as credited by the source.", + "our_contribution": "Independent recomposition on our 892 matching, changed 60-replica paid packing, finite local/global verification, exact arithmetic and portable binding.", + "adapted_authored_sources": { + "experiment/check_composition.py": { + "authored_source_sha256": "ca7e38ef311675d17b1f7368eecb5fe9128ba909dcbbe4ef46cbed78cf9e7de9", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "bc612ef1510987647bb0e7ec59f463b527ee27732537446bb17b566e197685db" + }, + "experiment/check_changed_banks.py": { + "authored_source_sha256": "d7fe82d6984749a9fafc2062c9b3029fcfb2afeecd14f97cd19fe4d63688693c", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "3320abb9d298be59bb12bd715b71f1b15ab2836ca73d3e6d82023da1a0226be5" + }, + "experiment/price_candidate.py": { + "authored_source_sha256": "ecdcaed505eb8eeff2e56eec559a11b2865c9624d78dbf60162eacc1ac4e52bc", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "c3585c5b967a9e4bdcbd5a23909aa72a3dc9add28caf8542ff3c76d53a2cbf34" + }, + "experiment/price_cases.py": { + "authored_source_sha256": "da10326294539ca5cd750f62c6ebc1de1e794113c8fadbb9b1afa59c5d53e5e1", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "55f67e63058dde95b10a1a4a91da057908fde1c4b8f7cfef6571e52e41005834" + }, + "experiment/check_controls.py": { + "authored_source_sha256": "af0c8d8540518717a08e3129fcb40d53843de0069190fdf226175afd8f2823ca", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "6ee881582dcd0ee90994b1c4e04e2d1317ed88ab488c4919a9ca9bb1b7611137" + }, + "admission/build_local.py": { + "authored_source_sha256": "6a89e3e2183a13eb638a821f59d26925121a5b5b0a82d1097080a2871d6dd901", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "f5a79e338824dd4feb322b437eaea9776b598861c705a0044bb9d45fcbd9bf49" + }, + "admission/validate_local.py": { + "authored_source_sha256": "23d1dc8d00bd87e12b7a698a28cb90cb0d69458731bf08504ca4d2b4454e816c", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "984849b426a1010debb928c5e0f7999ee1d6a144859192c6b998385be309d824" + }, + "admission/check_frozen_experiment.py": { + "authored_source_sha256": "89d98aa0ff497e60ff86c766ad24ed5be39ff5a7b665e9e06a81bab35b6fb9d9", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "6bb5621601f13be680f5278152171034da4e033178a162e14a94767b572d7b87" + }, + "admission/test_admission.py": { + "authored_source_sha256": "9b92ecbdac398d60ccc5cfdfdf5f834c3bb8c1313dd363bb171e1a37efd0f0d6", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "fa1f99496633b2431c900313cd38b5dfa7b13be1dc76f5aab884fd8c1a6db3f5" + }, + "lowering/lower_combined.py": { + "authored_source_sha256": "c28c0d904753111688ec72bba8c75ad81846043b6d69eed90d1b40848152a4f9", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "7ec4d85c17e7594055065f8b72f3c2dd6b8c76a1aa84a2551f87058db338a0dd" + }, + "lowering/check_emitted_projectors.py": { + "authored_source_sha256": "9c40dfeb7fd104933df3632fee5e8c39b2efebf4d3b7cf116550b36667d679ba", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "3a78be3652e291930a0773cdfb2491ff3850615ce41f55b61d3f0d54e2b12a02" + }, + "lowering/retained_ir_helpers.py": { + "authored_source_sha256": "c6b2bd1d0419360b2c2bf0dc039bbe8a461915c6918e25eba19cd095aedf8bc5", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "c6b2bd1d0419360b2c2bf0dc039bbe8a461915c6918e25eba19cd095aedf8bc5" + }, + "audit/check_source_composition.py": { + "authored_source_sha256": "3d563bf00e26c8c8beef924bf6020bc274a24440eed6ed1c797f77af7c67ce37", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "83189d5fe3f4a3300966c579d1d237b568c3a9d7949e1808a5f14940e772248e" + }, + "audit/check_banks_price.py": { + "authored_source_sha256": "a43d458a63116038ad642f78540de16b4d47a4bca65c51e851f53ed96a7f0b2a", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "7982de46a0189cddebf4be6e882dfe739cac5b6e79bd3c81a10ca1b646bbd35e" + }, + "audit/check_global_frames.py": { + "authored_source_sha256": "33ad6374f87cdf79f3c0e0869619569d4060650912e960754ed913836c6597e9", + "adaptations": "Portable paths; complete pinned predecessor evidence and regenerated producer/input/receipt bindings replace local-cache identities. Mathematical checks retained.", + "portable_sha256": "3210b934bafef55881824cfa60bfc11fdb99badf814760c569ae5daa7f4f9e47" + } + }, + "new_portable_glue": [ + "companion.py", + "acquire_inputs.py", + "run_checks.py", + "test_companion.py" + ], + "adaptation_contract": [ + "The predecessor is verified through its complete exact file identity, every pinned dependency, all 31 expected receipts, emitted manifests and current producing code hashes.", + "The new eight-file immutable source manifest binds Git blob IDs, SHA-256, byte counts, source heads and URLs. Source Python remains inert .py.txt data.", + "The experiment is regenerated before admission. Its nine-artifact manifest binds all five current experiment producers, the source manifest and predecessor identity.", + "Regenerated local and global receipts retain current producer, source and artifact bindings. Hash changes caused by portable paths and readable prose are explicit; mathematical checks are unchanged.", + "Absolute output and input roots are normalized in both keys and values before JSON is written. Independent helper code remains byte-identical and hash-guarded before import.", + "The emitted manifest excludes the separately generated projector-control receipt, avoiding stale receipt recursion on replay. The aggregate checks both independently." + ], + "original_frozen_evidence": { + "experiment": { + "MANIFEST.json": "3c8b6ffd16f75c894faa38546d625b2087f72ae5367bd324604573c6b2a663ab" + }, + "source_admission": { + "MANIFEST.json": "53adb0f1c10da59bdd3c72bb81a20e482e390130f7e8cf8ae237110cc9913e07", + "RESULT.json": "98368c4b0b028f67a529b8d61672921a5d30a126b8b73f2f883ac8e8f006255f", + "VALIDATION.json": "a5c11fe4b32fed5afdfbb03fccd2343c9597a61ac4022e746749f7f41194ef3c", + "EXPERIMENT-CROSSCHECK.json": "a9aff7ea430bba79a9d34c8259ea0686ea7c3bbdbc1dc4cf53be3867c47b2cdd" + }, + "global_lowering": { + "DELIVERABLE-MANIFEST.json": "63f6790b374bbb9e3deacdc033e6abdc88f268e6fb6f7bb2b050f0c6cf085dde", + "output/RESULT.json": "8aef1a2a53e7e528fa5f46a5db9afa104d452adbaa4c7e0bbaf214306aaace42", + "CLOSURE.json": "b1ccc48b738497316df2576ac5b7f435404a750b0a89aff3a5ff7853cc98addb" + }, + "independent_audit": { + "MANIFEST.json": "18d586ee57348d5b674bebfb83bd08fadf4547bfddc0d0d83eaf9fd959430e3f", + "FINAL-AUDIT.json": "e9cb05b2dc85f219753176130ff032877c77e6189e7a9b8702f98722dfff4577" + } + }, + "original_audit_disposition": { + "status": "PASS_ISOLATED_PR322_PR323_PAID892_FINITE_COMPOSITION", + "candidate_identity": { + "base_word_sha256": "25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739", + "source_heads": { + "PR320": "1b37957d1520c80b6ea796bf418e52be5109c2d4", + "PR322": "8ce22e5e487e9d1017c26702adc09d5646565d0c", + "PR323": "e51f5ffee8ab574e5b8249a4612411b2ca5f100d" + } + }, + "local_records": 389222, + "global_stage_records": 116772600, + "boundary_records": 921600, + "source_target_own_cut_comparisons": 2880, + "actual_anchor_crossings": 4141, + "reorder_anchors": 133, + "source_containment_checks": 589692, + "new_endpoint_charts": 3, + "positive_copied_work_overrides": 100, + "literal_stock": 658255, + "children": 15006605, + "rank_mass": 65703100, + "max_rank": 42, + "completion_count": 5, + "completion_rank": 20, + "kappa": "770008089898797/1000000000000000000", + "gain_over_paid892": "1052506821/250000000000000000", + "remaining_new_finite_blockers": [], + "fixed_paid892_modified": false, + "bindings": { + "experiment_manifest": "3c8b6ffd16f75c894faa38546d625b2087f72ae5367bd324604573c6b2a663ab", + "source_admission": "98368c4b0b028f67a529b8d61672921a5d30a126b8b73f2f883ac8e8f006255f", + "global_result": "8aef1a2a53e7e528fa5f46a5db9afa104d452adbaa4c7e0bbaf214306aaace42", + "global_program": "519bc0aa96610df0e371e10a69f78fc250e2f2da0819fc0a481e01e7293c8b5b", + "source_audit": "8836453c3de2eefb5c91e3e4ccce6384accebbd82e06051a01d7f6d2e89f7a7e", + "bank_price_audit": "bd0aa39839d41bdc1241cf33deb112f9e0bda5ffc65c1e2359a6e6133e7f22b0", + "global_audit": "e999b5594d4acb4cf0a64fb272765dbc1264d39393d9208496fb3e6a4b831cc7" + }, + "scope": "Separate conditional finite composition of four exact PR322 retimings and three PR323 rank-two kernels with a new literal paid-bank allocation. Production primitives, retained compiler/prime interfaces, ordinary leaves, complex supplier, precision/recovery and analytic all-size hypotheses remain inherited." + }, + "published_baseline": { + "head": "4c40c0151cf8317e57a3e7759d495fb84653bc74", + "tree": "25d778000cfcc133d7bc93d7e04d7179a4b6e144", + "preserved_contribution_files": 323, + "preserved_repository_leaves": 2506, + "paid892_files_sha256": "a97606376a6a42abe3c1aab1815da4ec1b2f82ea8b4648c859039491bcbb7aa5", + "additive_only": true + } +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/README.md b/research/gen5b-shared-kernels/p10-paid-completion892-presink/README.md new file mode 100644 index 0000000000..89e4e46d87 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/README.md @@ -0,0 +1,57 @@ +# Four retimings and three kernels on paid892 + +This additive companion independently composes the four fixed PR322 retimings and three fixed PR323 rank-two kernels with our admitted 892 matching and new literal paid-bank packing. The resulting conditional saving parameter is **κ = 0.000770008089898797**, an increase of **0.000000004210027284** over the retained paid892 result. + +The finite source, frame, bank, global intermediate-representation (IR), invoice and arithmetic obligations have separate executable checks. The primitive/compiler, prime, restored-row, ordinary-leaf, complex/full-C, precision/recovery and analytic all-size interfaces remain inherited. This is a conditional finite composition, not an unconditional all-size theorem. + +Portable replay passes **30 regression tests, 17 embedded hard controls and 15 new receipt hashes**. A second run from a different working directory, source roots and output root reproduced all **43 generated files byte-identically**, with the predecessor independently hash-verified. See `REPRODUCTION.json`. + +## Immutable sources and credit + +- [PR322](https://github.com/CrocSwap/integer-mult-bounds/pull/322), eumemic, head `8ce22e5e487e9d1017c26702adc09d5646565d0c`, supplies the four retiming selections, with declared OpenAI Codex assistance. The underlying retiming/descent mechanism is credited to Rohan Arun's PR287 work and Anthropic Claude assistance, as stated by the source. +- [PR323](https://github.com/CrocSwap/integer-mult-bounds/pull/323), eumemic, head `e51f5ffee8ab574e5b8249a4612411b2ca5f100d`, supplies the three rank-two quad-kernel selections, with declared OpenAI Codex assistance. +- The base matching is our retained word `25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739`, on the PR320 source head `1b37957d1520c80b6ea796bf418e52be5109c2d4`. Existing upstream credits and notices remain in the predecessor packet. +- Our contribution here is the independent recomposition, changed bank packing, literal source/global lowering, exact pricing, controls and portable evidence binding. The selected retimings and kernels are not claimed as our discovery. The new checks were prepared with substantial OpenAI assistance, under Apache-2.0. + +`inputs.json` pins eight inert selection, proof, notice and source-text files by immutable source URL, byte count, Git blob ID and SHA-256. Upstream Python has a `.py.txt` suffix and is never executed or imported. `PROVENANCE.json` records independently authored checker origins and portability changes. + +## What is checked + +The four retimings are located by live scalar operands, category and exact old-basis hashes. Stale upstream raw record offsets are not executable coordinates. Three ranks change from 8 to 9 and one from 13 to 14. The three kernels are checked at their own cuts, across all 2,880 target responses. They remove 32 initial reads and add nine setup plus nine restoration ADDs. The existing 133 admitted anchor choices are retained and all 4,141 actual crossings are rechecked; the upstream package's alternate anchor reselection is not imported. + +The independent local reconstruction emits 389,222 records on 10,141 live columns. All 15,041 used frames pass exact rank, annihilator and rational Gram-nondegeneracy checks; 44,773 MOVE containment pairs and 589,692 integer operand-source checks pass. The corrected scope includes all 480 descended rank-18 source setups. Omitted setup/restoration controls and 15,040 basis-mutation controls reject. + +Fresh scalar costs are 336,239 weighted additions and 338,159 unit-expanded additions. Forward and inverse row norms are 132,195 and 1,307,808. The payload bound is 252879160360511458267619328000, of bit length 98, below the retained 2^104 cap. + +The same 8,221 physical helper roles use 60 replicas. Three residual widths decrease from 20 to 18. The new packing has 85,571 banks per stage. Its final bank contains 80 real coordinates and one fully paid rank-20 complement per stage. All 2,466,300 role/replica/stage assignments and all 300 literal namespaces are enumerated. There are 725 phases and five paid completions. + +The full global IR binds 116,772,600 mapped stage records and 921,600 boundary records. All 100 copied-work MOVE overrides use explicit positive projectors, including the forward source-frame-to-ZERO case. Independent checks reconstruct 20 actual rational center projectors, test idempotence and COPY conjugacy, and reject the negative direction. Five rank-20 completion projectors are checked on all 200 bank columns, with wrong-coefficient controls. + +The literal invoice has stock 658,255, 15,006,605 children, rank mass 65,703,100, deficit 122,400 and maximum rank 42. The strict generic guard is 42 < 50. The selector bill is 295,864,873,940 and the finite coefficient is 25,478,454,083,580,596. The exact full-fallback moment root lies strictly between 770601459593856/10^18 and 770601459593857/10^18. All 47 strict assembly inequalities and rejection of the next κ grid point are checked independently. + +## Portable replay + +Use Python 3.12 and NumPy 2.3.5. Assertions are mandatory. `python -O` is rejected. Install dependencies from the standard package registry if needed: + +```sh +python -m pip install -r /absolute/path/to/p10-paid-completion892-presink/requirements.txt +``` + +From any working directory, acquire inert sources and run the complete aggregate: + +```sh +python /absolute/path/to/p10-paid-completion892-presink/acquire_inputs.py +python /absolute/path/to/p10-paid-completion892-presink/run_checks.py --check --tests +``` + +The aggregate first replays the frozen predecessor, then regenerates the experiment, local admission and validator, full global emitter, independent projector controls, three independent audits and regression suites. Generated tables and streams stay under the output directory and are not committed. + +For a pre-existing source cache, acquisition accepts `--base-from /path/to/pr320-inputs` and `--new-from /path/to/new-inputs`. Environment variables `P10C_BASE_INPUTS`, `P10C_INPUTS`, `P10C_OUTPUT` and `P10C_BASE_OUTPUT` select arbitrary source and output roots. They are normalized in receipt values and keys before hashing. A full clean replay does not require the development workspace. + +`--reuse-base-output` skips rerunning only the predecessor, after checking its exact `FILES.json` identity, every pinned predecessor and transitive dependency file, all 31 frozen predecessor receipts, both emitted manifests and producing code hashes. It does not skip any new obligation. The required predecessor identity is `a97606376a6a42abe3c1aab1815da4ec1b2f82ea8b4648c859039491bcbb7aa5`. + +`expected/receipts.json` contains compact deterministic receipt hashes. `--check` never replaces expected values. The separate maintainer option `--record-expected` is for preparing a new reviewed packet, not for accepting a failed replay. `FILES.json` binds the published files; `BASELINE.json` identifies the additive publication base. Nothing in this companion modifies the predecessor. + +## Reading the evidence + +Intermediate source-only receipts intentionally retain their narrower scope: their builder alone does not establish global lowering or price. The aggregate combines those receipts with the independent bank/price and global checks. `PROOF.md` describes that composition and its remaining boundary. The regenerated aggregate result reports actual test and receipt counts. diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/REPRODUCTION.json b/research/gen5b-shared-kernels/p10-paid-completion892-presink/REPRODUCTION.json new file mode 100644 index 0000000000..b3cad24e75 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/REPRODUCTION.json @@ -0,0 +1,84 @@ +{ + "status": "PASS_BYTE_IDENTICAL_PORTABLE_REPLAY", + "files": { + "experiment/BANK-RESULT.json": "a64ca1741c3af655d0f4afc8fb1e4255f161574714985ccee63455fe2e44ccf0", + "experiment/CASE-PRICES.json": "809dacd35d8b5ec539119232508d54002539e859a850f1ab5d09cab68049a9d2", + "experiment/CONTROLS.json": "a98ef4c76b656488853f8593268c1edb8d10f45b020c45e8ce9887a5b7cd44ed", + "experiment/MANIFEST.json": "a32ce3a926e574ff4ab6a90761b3955f112f586779457542b153f537b09c30bf", + "experiment/PRICE-RESULT.json": "c3bdfd17d72200b7b016e08495dfac7380b5d31893c43c7364f06bbb553f4b98", + "experiment/RESULT.json": "cda908423670af25b2ed77de8bc5107b40f75bf12bb6187ea649a467c1303d76", + "experiment/combined-endpoints.json.gz": "e63dc65795c5fb832388b9754c705d2e7075dbee53c2c63b6495b9ad9276797a", + "experiment/combined-events.json.gz": "eff35c3391f0f2e48f6ba61c7d6dc2da5bb60e7948c55251cfe1fd375d4afbfd", + "experiment/combined-frames.json.gz": "780f7f70a26af67bcc5c74ebf5f3b09275e20d2cfc538d48ef7a0cf67a2cc5b2", + "experiment/new-bank-assignments.bin.gz": "84b7f269146b4189d0337ee4f025de8bb0c5785fdcd2597727596926d59b2d96", + "admission/EXPERIMENT-CROSSCHECK.json": "53b0c68c0dad388ca7be39e28c51219b7957e1a575e0d04dbb8572def0b9b97d", + "admission/RESULT.json": "46df0d1908f10c6a046f3b993dcea64981300ed88a3d5a30e6cc3dcd192f204e", + "admission/VALIDATION.json": "2b445ddb25135f1ce0d4c639b74071ae8e19bf976728e80aaf6383dc3a8bb801", + "admission/local-endpoints.json": "2d94cedd934f2117b38d9eccd473aee7997e4d784e4172a44425b30f73405885", + "admission/local-events.json.gz": "e9a9263243e225e1798727d3c08616ce5fc3611c9c01bb9ba780a824d6f026f7", + "admission/local-frames.json.gz": "b4123f3f130a4dc856594bf0ddb2f5db000a16c97e8681df3eeb65356d2ce40b", + "admission/local-paths.json.gz": "b4076f623699e2dc0160cd090225003b26002ea7c95992bc952a7e221b4b8d36", + "admission/local-records.json.gz": "93a7704fd7d87ce1a7ce442d03043b8a9ecd110fdd794993915cdb7fa2b905be", + "admission/new-kernel-receipts.json": "ef846797e10454ffac98e239de508f2844c4aece32c0b11831a99a8acf20cca0", + "admission/physical-rebinding.json": "743e47c84fe9ec84b24d213f41da82b7fd04cdabfd34696eaed1b37d49a03146", + "admission/reorder-receipts.json": "753d4e2d62d3e387e1a2c015c2a27944b807c2117ca3f47cf1cbab13abca64bd", + "admission/retiming-receipts.json": "d9b5bf6b0d1b30c13835ce8c17d0da92c8dd50e9a7812478edaa5ab124e3770b", + "lowering/MANIFEST.json": "e194bbfd050c2d23c86ef33b45642d811a84db65591ac8e440e577a40cf02464", + "lowering/PROJECTOR-CONTROLS.json": "0f61d04389de23a7236ec0ad1d17de1c0e55ead94f21db82c571a2b918c2d1ed", + "lowering/RESULT.json": "7a9ec03826582f122e94c86008bba93f7039ac492ac5c794ae7fdf257b910b77", + "lowering/actual-endpoint-chart-binding.json": "239df8fd358f7222522a3ad25fb9f09385d1a4d3af77c70e64702e0a963210d4", + "lowering/all-frame-bindings.json": "b01811e708b6a29c56966b4a323c04d58b95e3b638a6ffd243f7e3bf592e66df", + "lowering/all-namespaces.i32.gz": "fbe319d7e718069e3d27a76657be53f98ab2af32c80bee8588a4702c23681131", + "lowering/boundary-records.i32.gz": "fe91149afbd5589f75ccaac8ada34835a4cb14fa02397cad86082f14f0122de9", + "lowering/copied-work-projector-overrides.json": "a94e13d73ec8d0015af2665141f76784e5104a9aee74b776f3adc60207480d02", + "lowering/extended-phases.json": "bd4785560fbb7a40db1f7aa70594ffb49e940ca9ace89064fe98fb2dec817282", + "lowering/invoice.json": "e59666ae15140ef6feab96eb020d8626141b459e598924fdd916026b7bf88fe1", + "lowering/namespace-hashes.json": "ba5d822b01d4768bac9d86575d0e949e91af8d67957216eefbb9df1287decb22", + "lowering/normalizers.json.gz": "251baab6ff70f88cea472dfe0d70312c730c53f6fead3512801af798241fa528", + "lowering/projector-descriptors.json": "1099851c8bf8b7374e312fa7715324f52032a2686d45adef28c9e3eef2199293", + "lowering/stage-0-template.i32.gz": "7a84bcb0ebe1ec4809d7450a2f565ace96c30c474af01fea2c7ad7fa60663050", + "lowering/stage-1-template.i32.gz": "ad4bb1bb8ac51b38f01fd72073e70291ce7f5a2a17c8ee235475e643378eb33f", + "lowering/stage-2-template.i32.gz": "0c4f6bee2cb901366f6964c749ad0449708f1cf365b83111a24ab0fcf93f714b", + "lowering/stage-3-template.i32.gz": "a6fba5a3397f13c2ec0f7e640d3a1843a30cbd9110eccd8bec0fa6711ad86f87", + "lowering/stage-4-template.i32.gz": "52d6579920b88dcf6cfa97bab0d8c8c62a6d093fcc4fcb5cef7fd583d178b9b4", + "audit/BANK-PRICE-AUDIT.json": "cbb1a8981ed8a54909a77c19c6ab059eccc436978bc1353daa2c8d9131086d30", + "audit/GLOBAL-AUDIT.json": "d1f1ea18a863b2e61ea154f4c42b45e104baf822378606bc9e849f9d2b2dc3e1", + "audit/SOURCE-AUDIT.json": "4cee7bb761fbfb80f95561c517c1deaf2ee8775521a33cb4fbb24648849a7643" + }, + "file_count": 43, + "different_working_directory": true, + "different_new_source_root": true, + "different_base_source_root": true, + "different_output_root": true, + "base_output_strictly_verified": true, + "aggregate": { + "status": "PASS_PORTABLE_PR322_PR323_PAID892_COMPANION", + "base_packet_files_sha256": "a97606376a6a42abe3c1aab1815da4ec1b2f82ea8b4648c859039491bcbb7aa5", + "base_word_sha256": "25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739", + "source_heads": { + "PR322": "8ce22e5e487e9d1017c26702adc09d5646565d0c", + "PR323": "e51f5ffee8ab574e5b8249a4612411b2ca5f100d" + }, + "source_manifest_sha256": "a196acbb23fdf75d12c1f43ad0d4baf669b26c40615c2f8548a272211e45528f", + "tests": 30, + "hard_experiment_controls": 17, + "receipt_count": 15, + "expected_receipts_match": true, + "conditional_saving_kappa": "770008089898797/1000000000000000000", + "local_records": 389222, + "global_frame_records": 116772600, + "literal_stock": 658255, + "literal_calls": 15006605, + "literal_rank_mass": 65703100, + "literal_deficit": 122400, + "maximum_rank": 42, + "phases": 725, + "paid_completions": 5, + "paid_completion_rank": 20, + "program_sha256": "9738f0dba40e0558a40152a1607bd2a77497c063c3f8ca2675ee336c98bb630b", + "source_and_global_independent_audits_passed": true, + "upstream_programs_executed": false, + "unconditional_all_size_theorem": false, + "scope": "Exact retiming/kernel composition, local records, changed bank charts, literal global frame IR, all fees and independent exact price. Generic primitive/compiler-prime, restored-row, ordinary-leaf, complex/full-C, precision/recovery and analytic all-size interfaces remain inherited." + } +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/acquire_inputs.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/acquire_inputs.py new file mode 100644 index 0000000000..ed617ebd92 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/acquire_inputs.py @@ -0,0 +1,20 @@ +"""Acquire both pinned predecessor data and new inert selections/notices.""" +from pathlib import Path +import argparse,subprocess,sys,urllib.request +import companion as packet + +def main(): + parser=argparse.ArgumentParser();parser.add_argument('--new-from',type=Path);parser.add_argument('--base-from',type=Path);args=parser.parse_args() + packet.verify_base_code() + command=[sys.executable,str(packet.BASE_CODE/'acquire_inputs.py')] + if args.base_from:command+=['--from-dir',str(args.base_from)] + subprocess.run(command,env=packet.child_env(),check=True) + for row in packet.source_pins()['files']: + dest=packet.INPUTS/row['label'] + if dest.exists():raw=dest.read_bytes() + elif args.new_from:raw=(args.new_from/row['label']).read_bytes() + else: + with urllib.request.urlopen(row['url'],timeout=60)as response:raw=response.read() + packet.check_source_bytes(raw,row);dest.parent.mkdir(parents=True,exist_ok=True);dest.write_bytes(raw) + packet.verify_sources();print('Verified predecessor source data and all new inert selection/provenance files.') +if __name__=='__main__':main() diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/build_local.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/build_local.py new file mode 100644 index 0000000000..7a1af3d89f --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/build_local.py @@ -0,0 +1,188 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Independent PR322/323 witness composition and full local frame emission. +Selections are inert immutable source data, credited to eumemic/OpenAI Codex. +The PR322 retiming mechanism retains Rohan Arun/PR287/Anthropic provenance. +New independent construction and audit: OpenAI assistance, Apache-2.0. +""" +from pathlib import Path +from collections import Counter,defaultdict +from fractions import Fraction as Q +from functools import lru_cache +import json,gzip,hashlib,copy,sys +P=packet.ADMISSION +BASE=packet.BASE_FRAME +ADM=packet.BASE_CODE/"admission" +EXP=packet.EXPERIMENT +if not __debug__:raise RuntimeError('Assertions must be enabled') +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def read(p): + raw=Path(p).read_bytes();return json.loads(gzip.decompress(raw)if str(p).endswith('.gz')else raw) +def dump(name,x): + raw=(json.dumps(x,sort_keys=True,separators=(',',':'))+'\n').encode();(P/name).write_bytes(gzip.compress(raw,mtime=0)if name.endswith('.gz')else raw) +packet.verify_base() +sys.path.insert(0,str(ADM)) +from weighted_source_data import read as source,verify,HEAD +from admission_config import OVER,OVER_SHA +from check_transport import rr,null +from check_scalar_recurrence import replay +verify();assert sha(OVER)==OVER_SHA +provenance=read(packet.SOURCE_PROVENANCE) +for z in provenance['files']: + b=(packet.INPUTS/z['label']).read_bytes();assert len(b)==z['bytes']and hashlib.sha256(b).hexdigest()==z['sha256'];assert hashlib.sha1(b'blob '+str(len(b)).encode()+b'\0'+b).hexdigest()==z['sha'] +assert sha(packet.INPUTS/'pr322-presink-selection.json')=='166fa4ce7259d35a020c51682c6f18256f3fdad260473f8209e53114285c8934' +assert sha(packet.INPUTS/'pr323-kernel2-selection.json')=='bcfdc7ec8a61d49201961077fbc512f516dcbebac4281d5cd7d2350ced3ee9e0' + +def run(): + base=read(BASE/'RESULT.json');assert base["checker_sha256"]==sha(packet.BASE_CODE/"frame/build_local.py") + events=read(BASE/'local-events.json.gz');end=read(BASE/'local-endpoints.json');F={int(k):v for k,v in read(BASE/'local-frames.json.gz').items()};initial={int(k):v for k,v in end['initial'].items()};final={int(k):v for k,v in end['final'].items()};n=end['n'];assert n==10141 + A={f:[[Q(x)for x in row]for row in z['annihilator']]for f,z in F.items()};B={f:[[Q(x)for x in row]for row in z['basis']]for f,z in F.items()};dim={f:z['rank']for f,z in F.items()};ZERO=next(f for f,d in dim.items()if d==0);FULL=next(f for f,d in dim.items()if d==20) + def install(rows,label): + assert len(rr(rows)[0])==len(rows);f=max(F)+1;F[f]=dict(rank=len(rows),key=[label,f],basis=[[str(x)for x in row]for row in rows],annihilator=[[str(x)for x in row]for row in null(rows)]);B[f]=list(map(lambda row:list(map(Q,row)),rows));A[f]=list(map(lambda row:list(map(Q,row)),F[f]['annihilator']));dim[f]=len(rows);return f + @lru_cache(None) + def sub(a,b):return dim[a]<=dim[b]and all(sum(x*y for x,y in zip(u,v))==0 for u in A[b]for v in B[a]) + w=read(OVER);old=source('bitword/selected/bit/word_p10.json.gz');ga={e['role']:e for e in w['gauges']};g=source('graph.json');removed=end['removed_sink_columns'];compact=lambda s:s-sum(x=1920 else s + transport_pre=lambda s:compact(newids[newalias.get(oldinv[s],oldinv[s])])if s>=1920 else s + assert 1920+len(oldregs)-7==10143 and 1920+len(newregs)-7==n + R=read(packet.INPUTS/'pr322-presink-selection.json');K=read(packet.INPUTS/'pr323-kernel2-selection.json');assert K['n']==10143 + rolebind=[] + for e in R['entries']: + for s in e['scalar'][:2]: + t=transport_pre(s);assert t==compact(s);rolebind.append(dict(witness='PR322',old_uncompact=s,virtual_role=oldinv[s],new_compact=t)) + for e in K['families']: + for s in[e['pivot']]+e['donors']: + t=transport(s);assert t==s;rolebind.append(dict(witness='PR323',old_compact=s,virtual_role=oldinv[lift(s)],new_compact=t)) + assert len(rolebind)==20 + # Reconstruct the pre-reorder scalar word from frozen semantic event IDs. + # The133 moved frames revert to their original literal word frames here. + mr=read(BASE/'reorder-receipts.json');byuid={e['original_index']:e for e in events};assert len(byuid)==len(events);bykey={tuple(z['key']):f for f,z in F.items()};moved={r['moved_event_index']:r for r in mr};assert len(moved)==133 + pre=copy.deepcopy(sorted(events,key=lambda e:e['original_index'])) + for e in pre: + if e['original_index']in moved: + sem=e['semantic'];assert sem[0]in('root','forward');key=('frame',w['root_frame'][sem[1]]if sem[0]=='root'else w['op_frame'][sem[1]]);e['frame']=bykey[key];e.pop('moved',None) + def reorder(seq,check=False): + where={e['original_index']:i for i,e in enumerate(seq)};before=defaultdict(list);after=defaultdict(list);ports=set();receipts=[] + for uid,r in moved.items(): + i=where[uid];anchor=where[r['new_anchor_event_index']];e=seq[i];a,b=e['a'],e['b'];assert not{a,b}&ports;ports|={a,b};Fnew=byuid[uid]['frame'];target=seq[anchor];assert target['op']==1 and{target['a'],target['b']}&{a,b};assert dim[target['frame']]==dim[Fnew]and sub(target['frame'],Fnew) + lo,hi=(i+1,anchor)if r['side']=='before'else(anchor+1,i);assert lo<=hi + for z in seq[lo:hi]: + if z['op']==1:assert z['b']!=a and z['a']!=b + else:assert z['a']!=a + e=dict(e,frame=Fnew,moved=True);(before if r['side']=='before'else after)[anchor].append((uid,e)) + receipts.append(dict(moved_uid=uid,anchor_uid=r['new_anchor_event_index'],new_pre_event=i,new_anchor_event=anchor,side=r['side'],frame=Fnew,moved_semantic=e['semantic'],anchor_semantic=target['semantic'],literal_crossed_interval_verified=True)) + out=[] + for i,e in enumerate(seq): + out.extend(e for _,e in sorted(before[i])) + if e['original_index']not in moved:out.append(e) + out.extend(e for _,e in sorted(after[i])) + return out,receipts,ports + assert reorder(pre)[0]==events + # Four immutable constructed frames; exact scalar category and old basis hash. + retimings=[];changed=set();retimed=copy.deepcopy(pre) + for z in R['entries']: + a,b=map(transport_pre,z['scalar'][:2]);hits=[i for i,e in enumerate(retimed)if e['op']==1 and(e['a'],e['b'],e['c'])==(a,b,z['scalar'][2])and e['semantic'][0]=='kernel_setup'];assert len(hits)==1;i=hits[0];e=retimed[i];f=e['frame'];assert dim[f]==z['old_dimension'] + ints=[[int(x)for x in row]for row in B[f]];assert all(Q(x)==y for x,y in zip(sum(ints,[]),sum(B[f],[])));assert hashlib.sha256(json.dumps(ints,separators=(',',':')).encode()).hexdigest()==z['old_basis_sha256'] + newf=install(z['new_basis'],'PR322-retime');assert dim[newf]==z['new_dimension'];e['frame']=newf;changed|={a,b};retimings.append(dict(uid=e['original_index'],semantic=e['semantic'],old_frame=f,new_frame=newf,source_record=z['record'],a=a,b=b)) + # Per-family literal chronology and all-column prefix responses at each own cut. + families=copy.deepcopy(K['families']);members={s for z in families for s in[z['pivot']]+z['donors']};assert len(members)==12 and not members&changed + for z in families: + for s in[z['pivot']]+z['donors']:assert initial[s]==ZERO and final[s]==FULL + z['frame']=install(z['basis'],'PR323-kernel2') + first={};last={};reads=defaultdict(list) + for i,e in enumerate(retimed): + if e['op']==1 and e['b']in members and e['frame']==ZERO and e['semantic'][0]=='plain':assert 960<=e['a']<1920;last[e['b']]=i;reads[e['b']].append(i);continue + for s in([e['a'],e['b']]if e['op']==1 else[e['a']]): + if s in members:first.setdefault(s,(i,e['frame'])) + bycut=defaultdict(list);pivots={z['pivot']:z for z in families} + for z in families: + ms=[z['pivot']]+z['donors'];cut=max(last[s]for s in ms);e=retimed[cut];assert[e['a'],e['b'],e['c']]==z['cut_read'];assert cut0;z['nonzero_target_responses']=nonzero + assert any(columns[q]&bits[z['pivot']]for q in range(960,1920)) + assert relations==2880 + starts=dict(initial);starts.update({z['pivot']:z['frame']for z in families});combined=[];deleted=[];newuid=-1 + for i,e in enumerate(retimed): + if e['op']==1 and e['b']in pivots and e['frame']==ZERO and e['semantic'][0]=='plain':assert i<=pivots[e['b']]['cut'];deleted.append(e['original_index']) + else:combined.append(copy.deepcopy(e)) + for z in bycut[i]: + for d in z['donors']:combined.append(dict(op=1,a=d,b=z['pivot'],c=1,frame=z['frame'],semantic=['new_kernel2_setup',z['pivot'],d],original_index=newuid));newuid-=1 + for z in families: + for d in z['donors']:combined.append(dict(op=1,a=d,b=z['pivot'],c=-1,frame=FULL,semantic=['new_kernel2_restore',z['pivot'],d],original_index=newuid));newuid-=1 + assert len(deleted)==32 and newuid==-19 + combined,reorders,ports=reorder(combined,True);assert not(changed|members)&ports + print('All source bindings,4 retimings,3 own-cut kernels and133 actual anchors pass',flush=True) + # Cross-check, without importing/executing the independent experiment program. + other=read(EXP/'combined-events.json.gz');projection=lambda es:[(e['op'],e['a'],e['b'],e['c'],e['frame'],e['semantic'])for e in es];assert projection(combined)==projection(other) + otherend=read(EXP/'combined-endpoints.json.gz');assert starts=={int(k):v for k,v in otherend['initial'].items()}and final=={int(k):v for k,v in otherend['final'].items()} + # Build all local frames, MOVEs, ADDs and COPY/ERASE records independently. + categories=sorted(set(end['categories'])|{'new_kernel2_setup','new_kernel2_restore'});cat={z:i for i,z in enumerate(categories)} + def compile(es,begin): + state=dict(begin);out=[];H=Counter();paths=defaultdict(list);tmp=None + def need(s,f): + old=state[s] + if old==f:return + assert sub(old,f),('frame chronology',s,old,f);gap=dim[f]-dim[old];out.append([0,s,old,f,gap,0]);state[s]=f;paths[s].append([old,f,gap]); + if gap:H[gap]+=1 + for e in es: + op,a,b,c,f=e['op'],e['a'],e['b'],e['c'],e['frame'] + if op==1:need(a,f);need(b,f);out.append([1,a,b,c,f,cat['reorder_moved'if e.get('moved')else e['semantic'][0]]]) + elif op==2:assert tmp is None and b==n;need(a,f);state[b]=ZERO;tmp=(a,b,f);out.append([2,a,b,f,ZERO,dim[f]]);H[dim[f]]+=1 + else:assert op==3 and tmp==(a,b,f)and state[a]==f and state[b]==ZERO;out.append([3,a,b,f,ZERO,dim[f]]);del state[b];tmp=None + for s,f in sorted(final.items()):need(s,f) + assert state==final and tmp is None + return out,H,paths + records,H,paths=compile(combined,starts) + expected=Counter({int(k):v for k,v in base['one_stage_paid_histogram'].items()}) + for hist in[R['expected_local_histogram_delta'],K['expected_local_delta']]:expected.update({int(k):v for k,v in hist.items()}) + assert H==expected and sum(H.values())==48486 and sum(k*v for k,v in H.items())==179458 + fw=replay([(e['op'],e['a'],e['b'],e['c'],tuple(e['semantic']))for e in combined],n);bw=replay([(e['op'],e['a'],e['b'],e['c'],tuple(e['semantic']))for e in combined],n,True) + assert fw['weighted_additions']==336239 and fw['literal_unit_additions']==338159 and fw['max_row_l1']==132195 and bw['max_row_l1']==1307808 + controls=[] + for kind in('new_kernel2_setup','new_kernel2_restore'): + replay([(e['op'],e['a'],e['b'],e['c'],tuple(e['semantic']))for e in combined],n,omit=kind);controls.append(kind) + payload=64*fw['max_row_l1']**3*bw['max_row_l1']**2;assert payload<2**104 + print('Full local frame records and fresh scalar/norm replay pass',len(records),flush=True) + # Full exact integer source-span coverage, not just newly introduced frames. + cols=[{q:1}if q<960 else{}for q in range(n+1)];checks=set() + for e in combined: + op,a,b,c,f=e['op'],e['a'],e['b'],e['c'],e['frame'] + if op==2:cols[b]=dict(cols[a]);continue + if op==3:continue + if not 960<=a<1920: + assert not 960<=b<1920 + for q,x in cols[b].items(): + y=cols[a].get(q,0)+c*x + if y:cols[a][q]=y + else:cols[a].pop(q,None) + need=set(cols[a])if not 960<=a<1920 else set() + if b!=n and not 960<=b<1920:need.update(cols[b]) + for q in need: + if(f,q)not in checks:assert all(sum(row[j]for j in g['labels'][q])==0 for row in A[f]),('source span',e,q);checks.add((f,q)) + for z in families: + for s in[z['pivot']]+z['donors']:assert not cols[s] + used=set(starts.values())|set(final.values())|{e['frame']for e in combined};frames={str(f):F[f]for f in sorted(used)} + dump('local-records.json.gz',records);dump('local-events.json.gz',combined);dump('local-frames.json.gz',frames);dump('local-endpoints.json',dict(n=n,initial=starts,final=final,removed_sink_columns=removed,categories=categories,record_format=end['record_format']));dump('local-paths.json.gz',paths);dump('reorder-receipts.json',reorders);dump('new-kernel-receipts.json',families);dump('retiming-receipts.json',retimings);dump('physical-rebinding.json',rolebind) + result=dict(status='PASS_PR322_PR323_COMPOSED_FULL_LOCAL_FRAME_WORD',head=HEAD,source_heads={'PR322':provenance['metadata'][0]['head'],'PR323':provenance['metadata'][1]['head']},candidate_sha256=OVER_SHA,checker_sha256=sha(Path(__file__)),source_provenance_sha256=sha(packet.SOURCE_PROVENANCE),base_frame_result_sha256=sha(BASE/'RESULT.json'),columns=n,records=len(records),frames=len(frames),moves=133,all133_actual_anchors_rechecked=True,retimings=4,new_kernels=3,new_kernel_own_cut_target_comparisons=relations,new_kernel_removed_reads=len(deleted),new_kernel_added_ADDs=18,all20_selected_physical_ports_rebound=True,all_changed_role_sets_disjoint_from133moved_operands=True,source_descent_entries=480,one_stage_paid_histogram={str(k):v for k,v in sorted(H.items())},one_stage_calls=sum(H.values()),one_stage_rank_mass=sum(k*v for k,v in H.items()),forward=fw,inverse=bw,payload_bound=payload,payload_bits=payload.bit_length(),distinct_integer_source_support_checks=len(checks),all_integer_operand_source_spans_contained=True,all_new_kernel_helper_integer_sources_restored=True,omission_controls_rejected=controls,independent_experiment_event_and_endpoint_agreement=True,scope='New independently reconstructed local frame word; exact fixed PR322/323 witnesses recomposed on paid892, not upstream whole-program replay. Current paid892 publication unchanged. Global lowering, bank completion, finite invoice, prime and all-size interfaces remain separate.',artifacts={p.name:sha(p)for p in sorted(P.iterdir())if p.name.startswith('local-')or p.name in('reorder-receipts.json','new-kernel-receipts.json','retiming-receipts.json','physical-rebinding.json')}) + dump('RESULT.json',result);print(json.dumps(result,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/check_frozen_experiment.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/check_frozen_experiment.py new file mode 100644 index 0000000000..3367676138 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/check_frozen_experiment.py @@ -0,0 +1,43 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Bind the independent reconstruction to the now-frozen experimental data. +The experiment's programs are only read as bytes for hashes, never executed. +""" +from pathlib import Path +from fractions import Fraction as Q +import json,gzip,hashlib,sys +P=packet.ADMISSION;E=packet.EXPERIMENT +if not __debug__:raise RuntimeError('Assertions must be enabled') +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def read(p): + b=Path(p).read_bytes();return json.loads(gzip.decompress(b)if str(p).endswith('.gz')else b) +packet.verify_experiment() +m=read(E/'MANIFEST.json') +for name,h in m['artifacts'].items(): + p=(E/name).resolve();assert p.is_relative_to(E);assert sha(p)==h,name +our=read(P/'RESULT.json');their=read(E/'RESULT.json');assert sha(packet.HERE/'admission/build_local.py')==our['checker_sha256'] +a=read(P/'local-events.json.gz');b=read(E/'combined-events.json.gz');projection=lambda es:[(e['op'],e['a'],e['b'],e['c'],e['frame'],e['semantic'])for e in es];assert projection(a)==projection(b) +x=read(P/'local-endpoints.json');y=read(E/'combined-endpoints.json.gz');assert(x['n'],x['initial'],x['final'])==(y['n'],y['initial'],y['final']) +U=read(P/'local-frames.json.gz');V=read(E/'combined-frames.json.gz');assert set(U)==set(V) +def rref(rows): + a=[list(map(Q,row))for row in rows];k=0 + for j in range(20): + z=next((i for i in range(k,len(a))if a[i][j]),None) + if z is None:continue + a[k],a[z]=a[z],a[k];v=a[k][j];a[k]=[q/v for q in a[k]] + for i in range(len(a)): + if i!=k and a[i][j]:v=a[i][j];a[i]=[q-v*r for q,r in zip(a[i],a[k])] + k+=1 + return a[:k] +for f in U: + u,v=U[f],V[f];assert u['rank']==v['rank']and u['basis']==v['basis'] + if u['annihilator']!=v['annihilator']:assert rref(u['annihilator'])==rref(v['annihilator']) +assert our['one_stage_paid_histogram']==their['one_stage_histogram'];assert our['one_stage_calls']==their['one_stage_calls']and our['one_stage_rank_mass']==their['one_stage_mass'];assert our['payload_bound']==their['payload_bound'] +for f in ['pr322-presink-selection.json','pr323-kernel2-selection.json']:assert sha(packet.INPUTS/f)==sha(packet.INPUTS/f) +out=dict(status='PASS_INDEPENDENT_RECONSTRUCTION_MATCHES_FROZEN_EXPERIMENT',checker_sha256=sha(Path(__file__)),admission_result_sha256=sha(P/'RESULT.json'),experiment_manifest_sha256=sha(E/'MANIFEST.json'),experiment_result_sha256=sha(E/'RESULT.json'),source_heads=our['source_heads'],candidate_sha256=our['candidate_sha256'],events=len(a),frames=len(U),all_event_semantics_operands_coefficients_frames_equal=True,all_endpoint_frames_equal=True,all_frame_bases_and_annihilator_spaces_equal=True,paid_histogram_and_payload_equal=True,upstream_or_experimental_programs_executed=False,scope='Data-only equivalence and immutable witness binding. This does not independently certify the experimental bank, arithmetic, finite invoice, or all-size claims.') +(P/'EXPERIMENT-CROSSCHECK.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/test_admission.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/test_admission.py new file mode 100644 index 0000000000..39bf4af21f --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/admission/test_admission.py @@ -0,0 +1,68 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Independent binding and individual new-kernel mutation regressions.""" +from pathlib import Path +from collections import Counter +from functools import lru_cache +import hashlib,json,gzip,subprocess,sys,unittest +P=packet.ADMISSION;BASE=packet.BASE_FRAME +def read(n): + p=Path(n);p=p if p.is_absolute()else P/p;b=p.read_bytes();return json.loads(gzip.decompress(b)if str(p).endswith('.gz')else b) +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +@lru_cache(None) +def events():return read('local-events.json.gz') +def wrong_with_omission(kind,pivot): + n=10141;col=[1<=0 + if(b,c)not in pairs: + assert all(dot(x,y)==0 for x in A[c]for y in B[b]),('nonnested MOVE',i,b,c);pairs.add((b,c)) + state[a]=c + if f:H[f]+=1 + elif op==1: + assert a!=b and c%2 and state[a]==state[b]==f;adds+=1;units+=abs(c) + assert 0<=z6I',raw): + assert rolewidth[role]==w and 0<=t<60 and 0<=b6I',raw):five.update(struct.pack('>7I',s,role,t,230400+s*B+b,off,w,scale)) +assert five.hexdigest()==bank['five_stage_assignment_sha256'] +expected=[] +for s in range(5): + expected.extend(('helper',s,t)for t in range(60));expected.append(('paid_bank_completion',s,None)) + if s in(1,2,4):expected.extend((k,s,t)for t in range(60)for k in('idle','bridge')) +expected.extend(('terminal_exchange',None,t)for t in range(60));assert len(expected)==len(phases)==725 +for i,(p,(kind,s,t))in enumerate(zip(phases,expected)): + assert p['phase_index']==i and p['kind']==kind and p.get('stage')==s and p.get('replica')==t + if kind=='paid_bank_completion': + assert(p['family'],p['rank'],p['support'])==(230400+(s+1)*B-1,20,[80,100]);pi=p['permutation'];inv=p['inverse_permutation'];ops=p['instructions'] + assert sorted(pi)==list(range(100))and[pi[inv[j]]for j in range(100)]==list(range(100))and{inv[k]for k in range(20)}==set(range(80,100)) + assert[op['op']for op in ops]==['ROUTE_RIGHT','COMPILE_SPLIT_IDEMPOTENT','ROUTE_RIGHT','RESTORE_ROW_RESERVE']and ops[0]['matrix']==inv and ops[2]['matrix']==pi + for field,want in [('chronological_forward',pi),('chronological_inverse',inv)]: + images=list(range(100)) + for a,b in p[field]:images=[b if x==a else a if x==b else x for x in images] + assert images==want +H={int(k):v for k,v in r['literal_histogram'].items()};assert(sum(H.values()),sum(k*v for k,v in H.items()),max(H))==(E,mass,42) +localH={int(k):v for k,v in load(LOCAL/'RESULT.json')['one_stage_paid_histogram'].items()};expectedH=Counter({k:v*300 for k,v in localH.items()});expectedH.update({k:115200 for k in(4,19,38,42)});expectedH[20]+=5;assert H==expectedH +J=60*(24*960+10*8221)+10;K=600*((S-1)+8221*100*599)+10*((S-1)+100*599) +terms={'unit_expanded_additions':60*(5*338159+6*960),'high_affine_factors':J*16*10001**2,'low_transpositions':J*(S+20),'generic_wrappers':E*80008,'matrix_preparation':E*128*200**3,'global_matrix_preparation':16*100**3,'copy_erase_episodes':6000,'paid_child_overhead':E,'bank_selectors':K,'constant':1} +assert terms==bank['terms'] and(J,K,sum(terms.values()))==(6315010,295864873940,25478454083580596) +assert S+20<2**80 and K<2**40 and sum(terms.values())<2**80 and 2*max(H)<100 +assert 64*132195**3*1307808**2==252879160360511458267619328000<2**104 +print('New3charts,all300namespaces,725phases,rank20completion and fullinvoice pass',flush=True) + +DEN=10**65 +def rounded(x,upper=False): + z=x*DEN;n=z.numerator//z.denominator + return F(n+int(upper and z.denominator!=1),DEN) +@lru_cache(None) +def log_interval(x): + x=F(x);power=0 + while x>2:x/=2;power+=1 + z=(x-1)/(x+1);t=z;lo=F(0) + for j in range(90):lo+=2*t/F(2*j+1);t*=z*z + hi=lo+2*t/(181*(1-z*z)) + if power: + l2,h2=log_interval(F(2));lo+=power*l2;hi+=power*h2 + return rounded(lo),rounded(hi,True) +def ex(x): + assert 0<=x0 +assert Gkappa + +result={'status':'PASS_INDEPENDENT_NEW_BANKS_INVOICE_AND_EXACT_PRICE','inputs':hashes,'changed_endpoint_charts_verified':charts,'all_assignment_count':2466300,'all_namespaces':300,'phases':725,'paid_completions':5,'completion_rank':20,'stock':S,'calls':E,'rank_mass':mass,'max_rank':max(H),'selector_calls':K,'finite_coefficient':sum(terms.values()),'root_bracket':[str(root),str(upper)],'kappa':str(kappa),'all47exact_slacks_reproduced':True,'adjacent_kappa_rejected':True,'gain_over_paid892':str(kappa-F(770003879871513,10**18)),'scope':'Literal exact price and bank/chart/compiler-interface arithmetic, with inherited weighted compiler, restored rows, ordinary leaves, complex and all-size interfaces.','checker_sha256':sha(__file__)} +(HERE/'BANK-PRICE-AUDIT.json').write_text(json.dumps(packet.portable(result),indent=2)+'\n');print(json.dumps({k:v for k,v in result.items()if k!='inputs'},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/audit/check_global_frames.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/audit/check_global_frames.py new file mode 100644 index 0000000000..8edf795122 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/audit/check_global_frames.py @@ -0,0 +1,148 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Independent full-frame binding and positive copied-projector audit.""" +from pathlib import Path +from fractions import Fraction as Q +from functools import lru_cache +from collections import Counter +import gzip,json,hashlib +import numpy as np +if not __debug__:raise RuntimeError('Assertions must be enabled') +HERE=packet.AUDIT;L=packet.ADMISSION;G=packet.LOWERING;I=packet.LOWERING +def read(p): + p=Path(p);b=p.read_bytes();return json.loads(gzip.decompress(b)if p.name.endswith('.gz')else b) +def fs(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def sha(b):return hashlib.sha256(b).hexdigest() +result=read(G/'RESULT.json');manifest=read(G/'MANIFEST.json');frames=read(L/'local-frames.json.gz');records=read(L/'local-records.json.gz');overrides=read(G/'copied-work-projector-overrides.json');description=read(G/'projector-descriptors.json');bindings=read(G/'all-frame-bindings.json');phases=read(G/'extended-phases.json');localreceipt=read(L/'RESULT.json') +for n,h in manifest.items():assert fs(G/n)==h +assert result['local_result_sha256']==fs(L/'RESULT.json')and result['compiler_sha256']==fs(packet.HERE/'lowering/lower_combined.py') +assert description['copied_work_sha256']==fs(G/'copied-work-projector-overrides.json') +assert len(overrides)==100 and Counter(z['difference_orientation']for z in overrides)=={-1:60,1:40} +# Exact rational projector from the two-row annihilator of each real center. +def mm(A,B): + bt=list(zip(*B));return [[sum(x*y for x,y in zip(row,col))for col in bt]for row in A] +def ident(n):return [[Q(i==j)for j in range(n)]for i in range(n)] +def add(A,B,sign=1):return [[x+sign*y for x,y in zip(a,b)]for a,b in zip(A,B)] +def transpose(A):return list(map(list,zip(*A))) +@lru_cache(None) +def projector(fid): + A=[[Q(x)for x in row]for row in frames[str(fid)]['annihilator']];assert len(A)==2 and frames[str(fid)]['rank']==18 + invG=[[Q(i==j,9)-Q(1,99)for j in range(20)]for i in range(20)] + U=mm(invG,transpose(A));B=mm(A,U);det=B[0][0]*B[1][1]-B[0][1]*B[1][0];assert det + Bi=[[B[1][1]/det,-B[0][1]/det],[-B[1][0]/det,B[0][0]/det]] + P=add(ident(20),mm(mm(U,Bi),A),-1) + assert mm(P,P)==P and sum(P[i][i]for i in range(20))==18 + assert all(not x for row in mm(A,P)for x in row) + return P +def D(P): + eye=ident(20);TL=add(eye,P,-1);TR=[list(reversed(row))for row in P];BL=list(reversed(P));BR=[list(reversed(row))for row in reversed(TL)] + return [a+b for a,b in zip(TL,TR)]+[a+b for a,b in zip(BL,BR)] +I20=ident(20);I40=ident(40);F40=D(I20);matrix_checks=[] +for f in sorted({z['old_frame']for z in overrides}): + P=projector(f);DP=D(P);negative=[[-x for x in row]for row in P];DN=D(negative) + assert mm(DP,DP)==I40 + assert mm(DP,D(add(I20,P,-1)))==F40 + assert mm(negative,negative)!=negative and mm(DN,DN)!=I40 + # Thus forward D_P D_P = I and reflected D_P D_(I-P) = D_I. + # Unchanged Kstar stage blocks and all common QA/d conjugations cancel. + matrix_checks.append({'source_frame':f,'rank':18,'rational_idempotent':True,'all40_active_columns':True,'forward_copy_endpoint_conjugacy':True,'reflected_copy_endpoint_conjugacy':True,'negative_projector_rejected':True,'negative_D_not_involution':True}) +print('Actual center projectors: positive idempotence/copy conjugacy pass; negative direction rejected',flush=True) +# Independently rebuild all five templates, check every copied lifetime and +# every MOVE orientation, then lower every literal namespace and hash it. +spaces=np.frombuffer(gzip.decompress((I/'all-namespaces.i32.gz').read_bytes()),dtype='=0 + if f:H[f]+=1 + elif op==1: + assert a!=10141 + if b==10141:assert center is not None and f==0;reads+=1 + else: + assert op==3 and a==10141 and center is not None and reads==144;center=None + assert center is None and localcopy==20 and H==expecthist + mask=(actual[:,0]==1)|(actual[:,0]==2) + for t in range(60): + mp=spaces[s,t];out=np.empty((len(actual),12),dtype='virtual->newphysical rebinding of all20 selected ports. +m=load(packet.BASE_INPUT_MANIFEST) +def source(n): + z=next(z for z in m['files']if z['path']==n);b=(packet.BASE_INPUTS/z['local']).read_bytes();assert hashlib.sha256(b).hexdigest()==z['sha256'];return json.loads(gzip.decompress(b)if n.endswith('.gz')else b) +w0=source('bitword/selected/bit/word_p10.json.gz');oldregs=sorted(set(range(9120))-{b for a,b in w0['pairs']});newregs=sorted(set(range(9120))-{b for a,b in sourceword['pairs']});alias={b:a for a,b in sourceword['pairs']};newphys={r:1920+i for i,r in enumerate(newregs)} +def lift(s): + for r in removed: + if r<=s:s+=1 + return s +def transport(s,already_compact): + x=lift(s)if already_compact else s;r=oldregs[x-1920];return compact(newphys[alias.get(r,r)]) +for z in retimes['entries']: + for s in z['scalar'][:2]:assert transport(s,False)==compact(s) +for z in kernels['families']: + for s in[z['pivot']]+z['donors']:assert transport(s,True)==s +members={s for z in kernels['families']for s in[z['pivot']]+z['donors']};assert len(members)==12 and not members&changed +initial={int(k):v for k,v in oldends['initial'].items()};final={int(k):v for k,v in oldends['final'].items()};n=10141 +reads=defaultdict(list);first={} +for i,e in enumerate(pre): + if e['op']==1 and e['b']in members and e['frame']==ZERO and e['semantic'][0]=='plain':reads[e['b']].append(i);assert 960<=e['a']<1920;continue + for s in([e['a'],e['b']]if e['op']==1 else[e['a']]): + if s in members:first.setdefault(s,(i,e['frame'])) +bycut=defaultdict(list);pivots={};cuts=[] +for j,z in enumerate(kernels['families']): + ms=[z['pivot']]+z['donors'];cut=max(reads[s][-1]for s in ms);e=pre[cut] + assert[e['a'],e['b'],e['c']]==z['cut_read']and cut0 +assert comparisons==2880 +combined=[];deleted=[];uid=-1 +for i,e in enumerate(pre): + if e['op']==1 and e['b']in pivots and e['frame']==ZERO and e['semantic'][0]=='plain':deleted.append(e['original_index']);assert i<=pivots[e['b']][2] + else:combined.append(e) + for j,z in bycut[i]: + for d in z['donors']: + combined.append(dict(op=1,a=d,b=z['pivot'],c=1,frame=15038+j,semantic=['new_kernel2_setup',z['pivot'],d],original_index=uid));uid-=1 +for j,z in enumerate(kernels['families']): + for d in z['donors']: + combined.append(dict(op=1,a=d,b=z['pivot'],c=-1,frame=FULL,semantic=['new_kernel2_restore',z['pivot'],d],original_index=uid));uid-=1 +assert len(deleted)==32 and uid==-19 +# Reapply exactly the former133 actual semantic anchors, re-screening each +# literal crossed interval after insertion/removal. No stale raw indices. +where={e['original_index']:i for i,e in enumerate(combined)};before=defaultdict(list);after=defaultdict(list);portset=set();crossings=0 +for oldreceipt,newreceipt in zip(moves,newmoves): + uid0=oldreceipt['moved_event_index'];anchoruid=oldreceipt['new_anchor_event_index'];i=where[uid0];j=where[anchoruid];e=combined[i];anchor=combined[j];a,b=e['a'],e['b'];nf=byuid[uid0]['frame'] + assert not{a,b}&portset;portset|={a,b};assert anchor['op']==1 and{a,b}&{anchor['a'],anchor['b']}and parts(anchor['frame'])[0]==parts(nf)[0]and sub(anchor['frame'],nf) + assert newreceipt['moved_uid']==uid0 and newreceipt['anchor_uid']==anchoruid and newreceipt['new_pre_event']==i and newreceipt['new_anchor_event']==j + lo,hi=(i+1,j)if oldreceipt['side']=='before'else(j+1,i);assert lo<=hi + for x in combined[lo:hi]: + if x['op']==1:assert x['b']!=a and x['a']!=b + else:assert x['a']!=a + crossings+=1 + (before if oldreceipt['side']=='before'else after)[j].append((uid0,dict(e,frame=nf,moved=True))) +assert not(changed|members)&portset +actual=[] +for i,e in enumerate(combined): + actual.extend(e for uid,e in sorted(before[i])) + if e['original_index']not in oldmove:actual.append(e) + actual.extend(e for uid,e in sorted(after[i])) +assert actual==events +starts=dict(initial);starts.update({z['pivot']:15038+j for j,z in enumerate(kernels['families'])}) +assert starts=={int(k):v for k,v in ends['initial'].items()}and final=={int(k):v for k,v in ends['final'].items()} +print('Reconstructed actual retiming/kernel composition; all2880own-cut comparisons and133anchor crossings pass',flush=True) +# Reconstruct every exported frame record. +state=dict(starts);out=[];hist=Counter();tmp=None;categories={x:i for i,x in enumerate(ends['categories'])} +def need(s,f): + old=state[s] + if old==f:return + assert sub(old,f);gap=parts(f)[0]-parts(old)[0];out.append([0,s,old,f,gap,0]);state[s]=f + if gap:hist[gap]+=1 +for e in events: + op,a,b,c,f=e['op'],e['a'],e['b'],e['c'],e['frame'] + if op==1:need(a,f);need(b,f);out.append([1,a,b,c,f,categories['reorder_moved'if e.get('moved')else e['semantic'][0]]]) + elif op==2:assert tmp is None and b==n;need(a,f);state[b]=ZERO;tmp=(a,b,f);out.append([2,a,b,f,ZERO,parts(f)[0]]);hist[parts(f)[0]]+=1 + else:assert op==3 and tmp==(a,b,f)and state[a]==f and state[b]==ZERO;out.append([3,a,b,f,ZERO,parts(f)[0]]);del state[b];tmp=None +for s,f in sorted(final.items()):need(s,f) +assert out==records and state==final and tmp is None +assert(sum(hist.values()),sum(k*v for k,v in hist.items()))==(48486,179458) +# Independent all-column F2 dirty replay and noncancelling integer norms. +def replay(es,reverse=False,omit=None): + state=[1<6I',gzip.decompress((BASE_BANK/'literal-assignments.bin.gz').read_bytes())): + assert widths.setdefault(role,width)==width + assert len(widths)==8221 + data['residual_census']={str(k):v for k,v in sorted(Counter(widths.values()).items())} + return data +EXPERIMENT_FILES=['RESULT.json','BANK-RESULT.json','PRICE-RESULT.json','CASE-PRICES.json','CONTROLS.json','combined-events.json.gz','combined-frames.json.gz','combined-endpoints.json.gz','new-bank-assignments.bin.gz'] +def freeze_experiment(): + value={'status':'HASH_BOUND_REGENERATED_EXPERIMENT','base_files_sha256':BASE_FILES_SHA,'source_manifest_sha256':sha(SOURCE_PROVENANCE),'artifacts':{n:sha(EXPERIMENT/n)for n in EXPERIMENT_FILES},'producer_hashes':{p.name:sha(p)for p in sorted((HERE/'experiment').glob('*.py'))}} + (EXPERIMENT/'MANIFEST.json').write_text(json.dumps(value,indent=2)+'\n');verify_experiment() +def verify_experiment(): + verify_base();verify_sources();value=read(EXPERIMENT/'MANIFEST.json') + assert value['base_files_sha256']==BASE_FILES_SHA and value['source_manifest_sha256']==sha(SOURCE_PROVENANCE) + assert set(value['artifacts'])==set(EXPERIMENT_FILES) + assert set(value['producer_hashes'])=={p.name for p in(HERE/'experiment').glob('*.py')} + for name,digest in value['artifacts'].items():assert sha(EXPERIMENT/name)==digest,name + for name,digest in value['producer_hashes'].items():assert sha(HERE/'experiment'/name)==digest,name + return value + +def child_env(): + return dict(os.environ,P10P_INPUTS=str(BASE_INPUTS),P10P_OUTPUT=str(BASE_OUTPUT),P10C_INPUTS=str(INPUTS),P10C_BASE_INPUTS=str(BASE_INPUTS),P10C_OUTPUT=str(OUTPUT),P10C_BASE_OUTPUT=str(BASE_OUTPUT)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/expected/receipts.json b/research/gen5b-shared-kernels/p10-paid-completion892-presink/expected/receipts.json new file mode 100644 index 0000000000..76a7020e4f --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/expected/receipts.json @@ -0,0 +1,69 @@ +{ + "base_packet_files_sha256": "a97606376a6a42abe3c1aab1815da4ec1b2f82ea8b4648c859039491bcbb7aa5", + "base_word_sha256": "25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739", + "source_manifest_sha256": "a196acbb23fdf75d12c1f43ad0d4baf669b26c40615c2f8548a272211e45528f", + "receipt_count": 15, + "normalization": "Replace only declared absolute roots, including dictionary keys; mathematical fields and dependency hashes remain intact.", + "receipts": { + "experiment/RESULT.json": { + "sha256": "e463a038c3fa2f93fde02ea9c111833c9133b0250452d691a247921ea49070ef", + "status": "PASS_LOCAL_COMPOSITION_AND_EXPLICIT_WIDTH_PACKING_NOT_FULL_ADMISSION" + }, + "experiment/BANK-RESULT.json": { + "sha256": "9edaaa92f98b16cbbd86b23854b66907a2e3c20ffecc44815ba1af7be3b5c8d5", + "status": "PASS_NEW_ENDPOINT_CHARTS_AND_LITERAL_BANK_INVOICE" + }, + "experiment/PRICE-RESULT.json": { + "sha256": "e6190a3ea635baa5410a8a05c0b4309ee67bcee40ebca4d12bde501636c3d8ce", + "status": "PASS_EXACT_POTENTIAL_PRICE_NOT_ADMISSION" + }, + "experiment/CASE-PRICES.json": { + "sha256": "b89bcdc1bec6013f85da4913c539a46d6e6a006070197c3a0df9b8c3b3945712", + "status": "EXACT_POTENTIAL_CASE_PRICES_NOT_ADMISSION" + }, + "experiment/CONTROLS.json": { + "sha256": "f3741ae90a2d802beacb82a7a59f8da52336ed4f18ab49728e8f9fb58184243e", + "status": "PASS_17_HARD_NEGATIVE_CONTROLS" + }, + "experiment/MANIFEST.json": { + "sha256": "9660aee76105ffc07530c037599a553433dc97f68a589e182793b69bc86ee004", + "status": "HASH_BOUND_REGENERATED_EXPERIMENT" + }, + "admission/RESULT.json": { + "sha256": "20d9b4089055869656a74c8baeed6d62c2386f9fda0b9a6f3d9f574ea149393e", + "status": "PASS_PR322_PR323_COMPOSED_FULL_LOCAL_FRAME_WORD" + }, + "admission/VALIDATION.json": { + "sha256": "3fcd9eb3ae1ada44b457dc29611373527a29d277b8254c8505ce3070336e4ff5", + "status": "PASS_INDEPENDENT_PR322_PR323_FULL_LOCAL_RECORD_AND_FRAME_AUDIT" + }, + "admission/EXPERIMENT-CROSSCHECK.json": { + "sha256": "0bbcd5fe92e86efd871882b1abf0c4e92d2ca34635c06dec1ddf31a39bbc657f", + "status": "PASS_INDEPENDENT_RECONSTRUCTION_MATCHES_FROZEN_EXPERIMENT" + }, + "lowering/RESULT.json": { + "sha256": "c14dbd6463fae8248b25046ee849cae888d422f56b7c3598f343a83357d0281e", + "status": "PASS_SOURCE_BOUND_PR322_PR323_PAID892_GLOBAL_FRAME_IR" + }, + "lowering/PROJECTOR-CONTROLS.json": { + "sha256": "1b9f8ac5f5ff651ea63810e2b2c7a6b0369fe7d7fadcaca781381224f0598641", + "status": "PASS_INDEPENDENT_EMITTED_PROJECTOR_AND_DIRECTION_CONTROLS" + }, + "lowering/invoice.json": { + "sha256": "76b82653e601cfba8e243cdf3edf01675663665fb71574997a58b832a2abd032", + "status": null + }, + "audit/SOURCE-AUDIT.json": { + "sha256": "a878126a1a9ff0d3b94ade6fa689c71f022385f157bd7aa35685cfc257526959", + "status": "PASS_INDEPENDENT_PR322_PR323_SOURCE_COMPOSITION" + }, + "audit/BANK-PRICE-AUDIT.json": { + "sha256": "500483b5c8e68c2048132a21b6c69392c4980949aed8fe58c8099b10cd062f5a", + "status": "PASS_INDEPENDENT_NEW_BANKS_INVOICE_AND_EXACT_PRICE" + }, + "audit/GLOBAL-AUDIT.json": { + "sha256": "166bf1ff3a30d0814d45da33eb619b93add77d3008fe1d5a0a26ca518d2b7c7a", + "status": "PASS_INDEPENDENT_PR322_PR323_GLOBAL_FRAME_BINDING" + } + } +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_changed_banks.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_changed_banks.py new file mode 100644 index 0000000000..047be2ead7 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_changed_banks.py @@ -0,0 +1,95 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Independent new endpoint charts and literal bank assignment for PR322+323. +Prepared with substantial OpenAI assistance. Apache-2.0. No upstream execution. +""" +from pathlib import Path +from fractions import Fraction as Q +from collections import Counter +from math import lcm,gcd +import json,gzip,struct,hashlib +if not __debug__:raise RuntimeError('Assertions required') +P=packet.EXPERIMENT;R=json.loads((P/'RESULT.json').read_text());OLD=packet.BASE_BANK;roles=json.loads((packet.BASE_LOWER/"compact-role-index.json").read_text())['roles'];widths={} +for r,t,b,o,w,s in struct.iter_unpack('>6I',gzip.decompress((OLD/'literal-assignments.bin.gz').read_bytes())): + assert r not in widths or widths[r]==w;widths[r]=w +assert set(widths)==set(roles) +def eliminate(A): + n=len(A);a=[list(map(Q,row))+[Q(int(i==j))for j in range(n)]for i,row in enumerate(A)];ops=[] + for j in range(n): + i=next(i for i in range(j,n)if a[i][j]) + if i!=j:a[i],a[j]=a[j],a[i];ops.append(['swap',i,j,None]) + d=a[j][j] + if d!=1:a[j]=[x/d for x in a[j]];ops.append(['scale',j,j,str(1/d)]) + for i in range(n): + if i!=j and a[i][j]: + d=-a[i][j];a[i]=[x+d*y for x,y in zip(a[i],a[j])];ops.append(['add',i,j,str(d)]) + assert all(a[i][j]==int(i==j)for i in range(n)for j in range(n));return [row[n:]for row in a],ops +def null(A): + a=[list(map(Q,row))for row in A];piv=[];k=0 + for j in range(20): + i=next((i for i in range(k,len(a))if a[i][j]),None) + if i is None:continue + a[i],a[k]=a[k],a[i];d=a[k][j];a[k]=[x/d for x in a[k]] + for i in range(len(a)): + if i!=k and a[i][j]:d=a[i][j];a[i]=[x-d*y for x,y in zip(a[i],a[k])] + piv.append(j);k+=1 + if k==len(a):break + out=[] + for j in range(20): + if j in piv:continue + row=[Q(int(j==i))for i in range(20)] + for k,p in enumerate(piv):row[p]=-a[k][j] + den=lcm(*(x.denominator for x in row));row=[int(x*den)for x in row];g=gcd(*row);out.append([x//g for x in row]) + return out +charts=[] +for e in R['new_kernel_entries']: + role=roles[e['pivot']-1920];assert widths[role]==20;widths[role]=18 + D=e['basis'];res=null([[9*x-sum(row)for x in row]for row in D]);assert len(res)==18 + assert all(9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b)==0 for a in D for b in res) + B=list(map(list,zip(*(res+D))));BI,ops=eliminate(B) + for A,C in [(B,BI),(BI,B)]:assert all(sum(x*y for x,y in zip(a,b))==int(i==j)for i,a in enumerate(A)for j,b in enumerate(zip(*C))) + assert len(ops)<=400 + maxnum=max(abs(Q(x[3]).numerator)for x in ops if x[3]is not None);maxden=max(Q(x[3]).denominator for x in ops if x[3]is not None);assert max(maxnum,maxden)<2**80 + charts.append({'compact_pivot':e['pivot'],'virtual_role':role,'entrance_rank':2,'residual_rank':18,'basis_columns':res+D,'inverse':[[str(x)for x in row]for row in BI],'factor_program':ops,'factor_count':len(ops),'max_numerator':maxnum,'max_denominator':maxden,'exact_orthogonal_endpoint_projector':True}) +assert Counter(widths.values())=={int(r):n for r,n in R['residual_census'].items()} +queues={w:iter([(r,t)for r in roles if widths[r]==w for t in range(60)])for w in set(widths.values())};assign=bytearray();completion=[];used=set();bank=0;normalizer_patterns=0 +for p in R['packing_patterns']: + widths0=p['widths'];cw=p.get('paid_complement_widths',[]);assert sum(widths0)+sum(cw)==100 + offsets=[];q=0 + for w in widths0+cw:offsets.append(q);q+=w + state=list(range(200)) + for o,w in zip(offsets,widths0+cw): + for j in range(o,o+w):state[j],state[199-j]=state[199-j],state[j] + assert state==list(range(199,-1,-1)) + for s in range(5): + outside=next(j for j in range(100)if not 20*s<=j<20*(s+1));witness=[] + for b,(o,w)in enumerate(zip(offsets,widths0)): + a=list(range(20*s,20*s+w));z=list(range(o,o+w));pi=dict(zip(a+[j for j in range(100)if j not in a],z+[j for j in range(100)if j not in z]));witness.append((pi[outside],b+1)) + assert len(set(witness))==len(witness);normalizer_patterns+=1 + for _ in range(p['count']): + for b,(o,w)in enumerate(zip(offsets,widths0)): + r,t=next(queues[w]);assert(r,t)not in used;used.add((r,t));assign.extend(struct.pack('>6I',r,t,bank,o,w,b+1)) + for o,w in zip(offsets[len(widths0):],cw):completion.append([bank,o,w]) + bank+=1 +assert len(used)==60*8221 and all(next(q,None)is None for q in queues.values());assert bank==85571 and completion==[[85570,80,20]] +allhash=hashlib.sha256() +for s in range(5): + coverage=bytearray(bank*100) + for r,t,b,o,w,sc in struct.iter_unpack('>6I',assign): + z=b*100+o;assert not any(coverage[z:z+w]);coverage[z:z+w]=b'\1'*w + family=230400+s*bank+b;assert 230400+s*bank<=family<230400+(s+1)*bank;allhash.update(struct.pack('>7I',s,r,t,family,o,w,sc)) + for b,o,w in completion: + z=b*100+o;assert not any(coverage[z:z+w]);coverage[z:z+w]=b'\2'*w + assert coverage.count(0)==0 and coverage.count(2)==20 +(P/'new-bank-assignments.bin.gz').write_bytes(gzip.compress(assign,mtime=0)) +# Full literal primitive allowance, using fresh scalar count and newfivechildren. +S=R['literal_stock'];E=R['literal_calls'];m=100;J=60*(24*960+10*8221)+2*5;K=2*5*60*((S-1)+8221*100*599)+2*5*((S-1)+100*599) +terms={'unit_expanded_additions':60*(5*R['scalar_forward']['unit_additions']+6*960),'high_affine_factors':J*16*10001**2,'low_transpositions':J*(S+20),'generic_wrappers':E*80008,'matrix_preparation':E*128*200**3,'global_matrix_preparation':16*100**3,'copy_erase_episodes':6000,'paid_child_overhead':E,'bank_selectors':K,'constant':1} +assert sum(terms.values())<2**80 and K<2**40 and S+20<2**80 +out={'status':'PASS_NEW_ENDPOINT_CHARTS_AND_LITERAL_BANK_INVOICE','composition_result_sha256':hashlib.sha256((P/'RESULT.json').read_bytes()).hexdigest(),'changed_endpoint_charts':charts,'unchanged_charts_inherited_from_bound_paid892_packet':True,'assignment_count':len(used)*5,'assignment_sha256':hashlib.sha256(assign).hexdigest(),'five_stage_assignment_sha256':allhash.hexdigest(),'all_coordinate_coverage':True,'normalizer_pattern_checks':normalizer_patterns,'normalizer_bound':599,'completion_per_stage':{'offset':80,'rank':20,'one_exact_child':True},'route_families':J,'selector_calls':K,'terms':terms,'coefficient':sum(terms.values()),'max_child_rank':42,'halving_degree':1,'row_reserve_coefficient':10001,'literal_stock':S,'children':E,'scope':'All newly changed bank charts, literal assignment and fee arithmetic. Complete new global frame-IR binding and independently reviewed scalar composition remain next admission gates.'} +(P/'BANK-RESULT.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps({k:v for k,v in out.items()if k!='changed_endpoint_charts'},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_composition.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_composition.py new file mode 100644 index 0000000000..15b05b862d --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_composition.py @@ -0,0 +1,218 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Independent bounded PR322/323 witness composition on the fixed paid892 word. +Upstream selections and programs are inert text. No upstream code is executed. +Selections: eumemic (OpenAI Codex assistance); retiming mechanism inherited from +Rohan Arun/PR287 (Anthropic Claude assistance). This checker is independently +prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from collections import Counter,defaultdict +from fractions import Fraction as Q +from functools import lru_cache +from math import gcd,lcm +import json,gzip,hashlib,copy +if not __debug__:raise RuntimeError('Assertions required') +P=packet.EXPERIMENT;BASE=packet.BASE_FRAME;PAID=packet.BASE_BANK +AD=packet.BASE_CODE/"admission";SOURCE=packet.BASE_INPUTS +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def read(p): + b=Path(p).read_bytes();return json.loads(gzip.decompress(b)if str(p).endswith('.gz')else b) +def dump(n,v):(P/n).write_text(json.dumps(packet.portable(v),indent=2)+'\n') +base=read(BASE/'RESULT.json');assert base['candidate_sha256']=='25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739' +for n,h in base['artifacts'].items():assert sha(BASE/n)==h +E=read(BASE/'local-events.json.gz');F={int(k):{'rank':v['rank'],'basis':[[Q(x)for x in row]for row in v['basis']],'annihilator':[[Q(x)for x in row]for row in v['annihilator']],'key':v['key']}for k,v in read(BASE/'local-frames.json.gz').items()} +end=read(BASE/'local-endpoints.json');initial={int(k):v for k,v in end['initial'].items()};final={int(k):v for k,v in end['final'].items()};n=end['n'];assert n==10141 +removed=end['removed_sink_columns'];compact=lambda a:a-sum(x=0 + if s in verify_roles: + assert sub(a,b),('nonnested exact role path',s,i,j,a,b,F[a]['rank'],F[b]['rank']) + # Same exact inclusion proves the reflected annihilator path. + assert len(F[a]['annihilator'])-len(F[b]['annihilator'])==gap + if gap:H[gap]+=1;rs.append(gap) + if s in verify_roles:receipts.append({'role':s,'initial_rank':F[f]['rank'],'final_rank':F[final[s]]['rank'],'positive_gaps':rs,'actual_path_entries':len(fs),'exact_forward_and_reflected_containment':True}) + return H,receipts +baseH,_=histogram(E);assert dict(baseH)=={int(k):v for k,v in base['one_stage_paid_histogram'].items()} +# Resolve the four selected operations by content and actual old basis hash, +# not by stale upstream raw offsets. Keep our already admitted133reorders. +retimed=copy.deepcopy(E);retiming=[];retime_roles=set() +for entry in witness322['entries']: + a,b,c,_=entry['scalar'];a,b=compact(a),compact(b) + matches=[i for i,e in enumerate(E)if e['op']==1 and[e['a'],e['b'],e['c']]==[a,b,c]and e['semantic'][0]=='kernel_setup'];assert len(matches)==1 + i=matches[0];old=E[i]['frame'];assert F[old]['rank']==entry['old_dimension'] + oldbasis=[[int(x)if x.denominator==1 else str(x)for x in row]for row in F[old]['basis']] + assert hashlib.sha256(json.dumps(oldbasis,separators=(',',':')).encode()).hexdigest()==entry['old_basis_sha256'] + f=install(entry['new_basis'],'PR322-retime');assert F[f]['rank']==entry['new_dimension'];retimed[i]['frame']=f;retime_roles.update([a,b]);retiming.append({'upstream_record':entry['record'],'actual_event':i,'compact_ports':[a,b],'original_ports':entry['scalar'][:2],'old_frame':old,'new_frame':f,'old_rank':F[old]['rank'],'new_rank':F[f]['rank'],'scalar_semantic':E[i]['semantic']}) +retimeH,retimepaths=histogram(retimed,verify_roles=retime_roles);delta=Counter(retimeH);delta.subtract(baseH);delta={r:k for r,k in delta.items()if k} +assert delta=={int(k):v for k,v in witness322['expected_local_histogram_delta'].items()} +print('PR322 exact live path retiming passes',delta,flush=True) +# Newly installed rank-two kernels are keyed in compact live namespaces. +families=copy.deepcopy(witness323['families']);members={x for e in families for x in [e['pivot']]+e['donors']};assert len(members)==12 +assert not members&retime_roles +for e in families: + for s in [e['pivot']]+e['donors']:assert initial[s]==ZERO and final[s]==FULL + e['frame']=install(e['basis'],'PR323-kernel2') +last={};first={};reads=Counter() +for i,e in enumerate(retimed): + if e['op']==1: + a,b,c=e['a'],e['b'],e['c'] + if b in members and e['frame']==ZERO and e['semantic'][0]=='plain'and 960<=a<1920:last[b]=i;reads[b]+=1;continue + for s in [a,b]: + if s in members:first.setdefault(s,(i,e['frame'])) + elif e['op']==2 and e['a']in members:first.setdefault(e['a'],(i,e['frame'])) +bycut=defaultdict(list);pivots={e['pivot']:e for e in families} +for e in families: + ms=[e['pivot']]+e['donors'];cut=max(last[s]for s in ms);row=retimed[cut] + assert [row['a'],row['b'],row['c']]==e['cut_read'] + assert cut0 and sum(row['widths'])+sum(row.get('paid_complement_widths',[]))==100 + for r in row['widths']:use[r]+=row['count'] +assert use==Counter({r:60*v for r,v in residual.items()}) +banks=sum(r['count']for r in patterns);stock=230400+5*banks;assert banks==85571 and stock==658255 +H=regular.copy();H[20]+=5;mass=sum(r*v for r,v in H.items());calls=sum(H.values());assert stock*100-mass==122400 +assert mass==65703100 and calls==15006605 +out={'status':'PASS_LOCAL_COMPOSITION_AND_EXPLICIT_WIDTH_PACKING_NOT_FULL_ADMISSION','source_word_sha256':base['candidate_sha256'],'base_frame_result_sha256':sha(BASE/'RESULT.json'),'source_heads':{'PR322':'8ce22e5e487e9d1017c26702adc09d5646565d0c','PR323':'e51f5ffee8ab574e5b8249a4612411b2ca5f100d'},'retiming_entries':retiming,'retiming_live_path_checks':retimepaths,'retiming_delta':delta,'new_kernel_entries':families,'new_kernel_delta':kd,'combined_live_path_checks':combinedpaths,'new_frame_gram_witnesses':newframes,'changed_frame_source_supports':span_receipts,'prefix_target_comparisons':2880,'prefix_responses_confined_to_targets_and_own_columns':True,'deleted_initial_reads':32,'added_setup_restore':18,'existing133reorders_kept_as_actual_events':True,'old_endpoints_unchanged_except_three_rank2_entrances':True,'scalar_forward':forward,'scalar_inverse':inverse,'omission_controls':controls,'payload_bound':payload,'payload_bits':payload.bit_length(),'one_stage_histogram':dict(sorted(combinedH.items())),'one_stage_calls':sum(combinedH.values()),'one_stage_mass':sum(r*v for r,v in combinedH.items()),'residual_census':dict(sorted(residual.items())),'packing_patterns':patterns,'banks_per_stage':banks,'literal_stock':stock,'literal_regular_histogram':dict(sorted(regular.items())),'literal_completion_histogram':{20:5},'literal_histogram':dict(sorted(H.items())),'literal_calls':calls,'literal_rank_mass':mass,'literal_deficit':122400,'next_gates':['Exact new rank2 endpoint charts and literal role/replica assignment','Emit and independently bind modified global frame/scalar word, routes and stage completion phase','Recompute full finite invoice, prime inventory, fallback moment and47assembly inequalities before claiming an admitted gain'],'checker_sha256':sha(Path(__file__)),'input_hashes':{str(p):sha(p)for p in packet.INPUTS.iterdir()if p.is_file()},'scope':'Concrete newly authored composition on the paid892 live word, not blind reuse of upstream byte hashes or discovery selections; current publication untouched.'} +dump('RESULT.json',out) +for name,data in [('combined-events.json.gz',combined),('combined-frames.json.gz',{str(k):{**v,'basis':[[str(x)for x in row]for row in v['basis']],'annihilator':[[str(x)for x in row]for row in v['annihilator']]}for k,v in F.items()}),('combined-endpoints.json.gz',{'initial':starts,'final':final,'n':n})]:(P/name).write_bytes(gzip.compress(json.dumps(data,separators=(',',':')).encode(),mtime=0)) +print(json.dumps({k:out[k]for k in ['status','retiming_delta','new_kernel_delta','one_stage_calls','one_stage_mass','literal_stock','literal_calls','literal_rank_mass','scalar_forward','scalar_inverse','payload_bits']},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_controls.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_controls.py new file mode 100644 index 0000000000..65ceac21bc --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/check_controls.py @@ -0,0 +1,90 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Hard negative controls for the isolated PR322/323 witness admission. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from fractions import Fraction as Q +import json,gzip,hashlib,copy,subprocess,sys +if not __debug__:raise RuntimeError('Assertions required') +P=packet.EXPERIMENT;B=packet.BASE_FRAME +def read(p): + x=Path(p).read_bytes();return json.loads(gzip.decompress(x)if str(p).endswith('.gz')else x) +R=read(P/'RESULT.json');bank=read(P/'BANK-RESULT.json');frames={int(k):v for k,v in read(P/'combined-frames.json.gz').items()};old_events=read(B/'local-events.json.gz');ends=read(B/'local-endpoints.json');selection=read(packet.INPUTS/'pr322-presink-selection.json') +def contained(basis,frame):return all(sum(Q(a)*Q(b)for a,b in zip(row,v))==0 for row in frames[frame]['annihilator']for v in basis) +def resolve(entry): + c=lambda a:a-sum(v=1;k=0 + while x>2:x/=2;k+=1 + a,b=lnsmall(x);c,d=lnsmall(Q(2));return a+k*c,b+k*d +def expbounds(x): + assert 0<=x0 + L=max(1,ceilq(36/delta**2),ceilq(2*(4+(finite_coefficient-1).bit_length())/delta)) + assert L*delta**2>=36 and L*delta>=2*(4+(finite_coefficient-1).bit_length()) + cutoffs.append({'stage':j+1,'gaps':{k:str(v)for k,v in gaps.items()},'cutoff_log2_charged_coefficient':str(L),'full_cutoff_requires_primitive_and_old_leaf_constants':True});chain.append(a) + a=chain[-1];tau=1-a;sigma=1-b;q=a*(1-2*eta);lp=1-q;lam=(tau+lp)/2;c=q+eta/4;eps=(1-eta)/(1+q);G=eps*q;r=(G+1-eps)/2;delta=eta/8 + internal=tau+(1-beta)*max(sigma-tau,Q(0));leaf=sigma+beta*(1-sigma) + margins={'balanced_prefix':1-eps,'coordinate_movement':a,'compact_phase_layer':G,'bulk_exposure':a,'Gaussian_arithmetic':min(1-eps-delta,r-delta),'scalar_work':1-eps-delta,'dimension':eps} + k=Q(ceilq(min(margins.values())*GRID)-1,GRID) + # Direct independent transcription of the immutable outer.py displayed equations. + slacks={'bit_positive':a,'complex_above_bit':b-a,'complex_below_one_over32':Q(1,32)-b,'beta_positive':beta,'beta_below_one':1-beta,'leaf_saving_above_bit':(1-beta)*b-a, + 'q_positive':q,'q_below_internal':1-internal-q,'q_below_leaf':1-leaf-q,'c_positive':c,'c_below_one':1-c,'q_below_reservations':c-q, + 'lambda_above_tau':lam-tau,'lambda_above_sigma':lam-sigma,'lambda_above_internal':lam-internal,'lambda_prime_above_lambda':lp-lam,'compact_leaf':lp-leaf,'compact_reservations':lp-(1-c),'lambda_prime_below_one':q, + 'epsilon_positive':eps,'epsilon_below_one':1-eps,'guard_width':1-eps,'K_geometry':1-eps*(1+c),'K_dominates_log':eps*c,'record_suffix':1-eps,'phase_local':1-eps-delta,'phase_boundary':r-delta,'gamma_sublinear':1-eps-r,'cell_above_band':eps-(1-r)/2,'prime_interval_packing':1-eps, + 'alpha_positive':r,'alpha_below_one':1-r,'alpha_below_one_fourth':Q(1,4)-r,'delta_positive':delta,'delta_below_one_eighth':Q(1,8)-delta,'short_record_fallback':eps-a,'small_field_exposure':1-eps-G,'artificial_boundary':8-eps+r-delta-G, + 'literal_scalar_guard':Q(1),'row_product_gap':Q(10**6)-Q(51*20161,25)} + slacks.update({name+'_above_kappa':val-k for name,val in margins.items()}) + assert len(slacks)==47 and all(x>0 for x in slacks.values()) + assert min(margins.values())==G and margins['balanced_prefix']-G==eta + assert slacks['gamma_sublinear']==eta/2 and slacks['K_geometry']==eta*(1-eps/4) + assert slacks['q_below_internal']==2*a*eta and slacks['q_below_leaf']==(1-beta)*b-a+2*a*eta + assert slacks['small_field_exposure']==eta + rejected=[name+'_above_kappa' for name,val in margins.items()if val<=k+Q(1,GRID)] + assert rejected==['compact_phase_layer_above_kappa'] + return {'coarse_bit':str(root),'coarse_complex':str(b),'complex_leaf_cap':str(cap),'binding':'bit','bootstrap_chain':list(map(str,chain)),'bootstrap_cutoffs':cutoffs,'backoff':str(eta),'beta':str(beta),'all_47_strict_slacks':{n:str(v)for n,v in slacks.items()},'seven_margins':{n:str(v)for n,v in margins.items()},'kappa':str(k),'kappa_decimal':dec(k),'adjacent_kappa_rejected':rejected} +# This is an isolated reuse of our own verified arithmetic implementation. +# No fixed paid892 packet is imported or written. +data=json.loads((HERE/'RESULT.json').read_text());bank=json.loads((HERE/'BANK-RESULT.json').read_text()) +H={int(r):n for r,n in data['literal_histogram'].items()};S=data['literal_stock'];cert=bracket(H,S);a=assemble(Q(cert['lower']),bank['coefficient']) +old=Q(770003879871513,10**18);gain=Q(a['kappa'])-old +out={'status':'PASS_EXACT_POTENTIAL_PRICE_NOT_ADMISSION','composition_result_sha256':hashlib.sha256((HERE/'RESULT.json').read_bytes()).hexdigest(),'bank_result_sha256':hashlib.sha256((HERE/'BANK-RESULT.json').read_bytes()).hexdigest(),'literal_stock':S,'literal_children':sum(H.values()),'literal_rank_mass':sum(r*n for r,n in H.items()),'exact_bit_bracket':cert,'assembly':a,'baseline_paid892_kappa':str(old),'potential_kappa_gain':str(gain),'potential_kappa_gain_decimal':dec(gain),'beneficial_at_declared_literal_profile':gain>0,'all_edge_fallback_added':True,'checker_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'scope':'Exact profile arithmetic after independently checked local witness and chart/packing construction; full source-bound global compilation and independent admission remain unperformed. No promised or published gain.'} +(HERE/'PRICE-RESULT.json').write_text(json.dumps(out,indent=2)+'\n') +print(json.dumps({k:out[k]for k in ['status','literal_stock','literal_children','literal_rank_mass','baseline_paid892_kappa','potential_kappa_gain_decimal','beneficial_at_declared_literal_profile']},indent=2));print('kappa',a['kappa_decimal'],'root',cert['lower'],cert['upper']) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/price_cases.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/price_cases.py new file mode 100644 index 0000000000..674e814bac --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/experiment/price_cases.py @@ -0,0 +1,109 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Original independent rational moment and 47-slack calculator. +Only Python's standard library is executed. Original frozen proof programs +are read as inert formulas; no earlier calculator is imported. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from fractions import Fraction as Q +from decimal import Decimal,localcontext +from functools import lru_cache +import json,hashlib +if not __debug__:raise RuntimeError('Assertions required') +HERE=packet.EXPERIMENT;BASE=packet.BASE_OUTPUT/"baseline";GRID=10**18;FINE=10**85 +MAN=json.loads((packet.BASE_INPUT_MANIFEST).read_text());sourcehash={} +for name in ['outer.py','math_check.py','proof/three-stage-cover-bit.tex','proof/three-stage-cover-rows.tex']: + row=next(r for r in MAN['files']if r['path']==name);raw=(packet.BASE_INPUTS/row['local']).read_bytes();assert hashlib.sha256(raw).hexdigest()==row['sha256'];sourcehash[name]=row['sha256'] +def floorq(x):return x.numerator//x.denominator +def ceilq(x):return -floorq(-x) +def down(x):return Q(floorq(x*FINE),FINE) +def up(x):return Q(ceilq(x*FINE),FINE) +def dec(x): + with localcontext()as c:c.prec=55;return str(Decimal(x.numerator)/Decimal(x.denominator)) +@lru_cache(None) +def lnsmall(x): + assert 1<=x<=2;z=(x-1)/(x+1);power=z;v=Q(0) + # Positive atanh expansion; the geometric bound includes every omitted term. + for j in range(100):v+=2*power/(2*j+1);power*=z*z + tail=2*power/(201*(1-z*z));return down(v),up(v+tail) +@lru_cache(None) +def ln(x): + x=Q(x);assert x>=1;k=0 + while x>2:x/=2;k+=1 + a,b=lnsmall(x);c,d=lnsmall(Q(2));return a+k*c,b+k*d +def expbounds(x): + assert 0<=x0 + L=max(1,ceilq(36/delta**2),ceilq(2*(4+(finite_coefficient-1).bit_length())/delta)) + assert L*delta**2>=36 and L*delta>=2*(4+(finite_coefficient-1).bit_length()) + cutoffs.append({'stage':j+1,'gaps':{k:str(v)for k,v in gaps.items()},'cutoff_log2_charged_coefficient':str(L),'full_cutoff_requires_primitive_and_old_leaf_constants':True});chain.append(a) + a=chain[-1];tau=1-a;sigma=1-b;q=a*(1-2*eta);lp=1-q;lam=(tau+lp)/2;c=q+eta/4;eps=(1-eta)/(1+q);G=eps*q;r=(G+1-eps)/2;delta=eta/8 + internal=tau+(1-beta)*max(sigma-tau,Q(0));leaf=sigma+beta*(1-sigma) + margins={'balanced_prefix':1-eps,'coordinate_movement':a,'compact_phase_layer':G,'bulk_exposure':a,'Gaussian_arithmetic':min(1-eps-delta,r-delta),'scalar_work':1-eps-delta,'dimension':eps} + k=Q(ceilq(min(margins.values())*GRID)-1,GRID) + # Direct independent transcription of the immutable outer.py displayed equations. + slacks={'bit_positive':a,'complex_above_bit':b-a,'complex_below_one_over32':Q(1,32)-b,'beta_positive':beta,'beta_below_one':1-beta,'leaf_saving_above_bit':(1-beta)*b-a, + 'q_positive':q,'q_below_internal':1-internal-q,'q_below_leaf':1-leaf-q,'c_positive':c,'c_below_one':1-c,'q_below_reservations':c-q, + 'lambda_above_tau':lam-tau,'lambda_above_sigma':lam-sigma,'lambda_above_internal':lam-internal,'lambda_prime_above_lambda':lp-lam,'compact_leaf':lp-leaf,'compact_reservations':lp-(1-c),'lambda_prime_below_one':q, + 'epsilon_positive':eps,'epsilon_below_one':1-eps,'guard_width':1-eps,'K_geometry':1-eps*(1+c),'K_dominates_log':eps*c,'record_suffix':1-eps,'phase_local':1-eps-delta,'phase_boundary':r-delta,'gamma_sublinear':1-eps-r,'cell_above_band':eps-(1-r)/2,'prime_interval_packing':1-eps, + 'alpha_positive':r,'alpha_below_one':1-r,'alpha_below_one_fourth':Q(1,4)-r,'delta_positive':delta,'delta_below_one_eighth':Q(1,8)-delta,'short_record_fallback':eps-a,'small_field_exposure':1-eps-G,'artificial_boundary':8-eps+r-delta-G, + 'literal_scalar_guard':Q(1),'row_product_gap':Q(10**6)-Q(51*20161,25)} + slacks.update({name+'_above_kappa':val-k for name,val in margins.items()}) + assert len(slacks)==47 and all(x>0 for x in slacks.values()) + assert min(margins.values())==G and margins['balanced_prefix']-G==eta + assert slacks['gamma_sublinear']==eta/2 and slacks['K_geometry']==eta*(1-eps/4) + assert slacks['q_below_internal']==2*a*eta and slacks['q_below_leaf']==(1-beta)*b-a+2*a*eta + assert slacks['small_field_exposure']==eta + rejected=[name+'_above_kappa' for name,val in margins.items()if val<=k+Q(1,GRID)] + assert rejected==['compact_phase_layer_above_kappa'] + return {'coarse_bit':str(root),'coarse_complex':str(b),'complex_leaf_cap':str(cap),'binding':'bit','bootstrap_chain':list(map(str,chain)),'bootstrap_cutoffs':cutoffs,'backoff':str(eta),'beta':str(beta),'all_47_strict_slacks':{n:str(v)for n,v in slacks.items()},'seven_margins':{n:str(v)for n,v in margins.items()},'kappa':str(k),'kappa_decimal':dec(k),'adjacent_kappa_rejected':rejected} + +from collections import Counter +base=json.loads((packet.BASE_BANK/"RESULT.json").read_text());current=json.loads((HERE/'RESULT.json').read_text());rows=[] +for label,retime,kernels in [('PR322_only',True,False),('PR323_only',False,True),('PR322_plus_PR323',True,True)]: + H=Counter({int(r):n for r,n in base['literal_profile']['histogram'].items()}) + if retime:H.update({int(r):300*n for r,n in current['retiming_delta'].items()}) + if kernels: + H.update({int(r):300*n for r,n in current['new_kernel_delta'].items()});H[49]-=5;H[11]-=5;H[20]+=5 + H=Counter({r:n for r,n in H.items()if n});S=658255 if kernels else 658275;E=sum(H.values());extra=5 if kernels else 10;units=338159 if kernels else 338173 + J=60*(24*960+10*8221)+2*extra;K=600*((S-1)+8221*100*599)+2*extra*((S-1)+100*599) + C=60*(5*units+6*960)+J*16*10001**2+J*(S+20)+E*80008+E*128*200**3+16*100**3+6000+E+K+1 + cert=bracket(H,S);a=assemble(Q(cert['lower']),C) + rows.append({'case':label,'literal_stock':S,'literal_calls':E,'literal_rank_mass':sum(r*n for r,n in H.items()),'root_bracket':[cert['lower'],cert['upper']],'kappa':a['kappa'],'kappa_decimal':a['kappa_decimal'],'gain_vs_fixed_paid892':str(Q(a['kappa'])-Q(770003879871513,10**18))}) +(HERE/'CASE-PRICES.json').write_text(json.dumps({'status':'EXACT_POTENTIAL_CASE_PRICES_NOT_ADMISSION','cases':rows,'scope':'Individual scalar words differ only by the independently checked frame retimings; the disjoint new kernel cuts/paths are unchanged. Full global admission remains separate.'},indent=2)+'\n') +print(json.dumps(rows,indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/inputs.json b/research/gen5b-shared-kernels/p10-paid-completion892-presink/inputs.json new file mode 100644 index 0000000000..3debfaf288 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/inputs.json @@ -0,0 +1,114 @@ +{ + "metadata": [ + { + "pr": 322, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/322", + "head": "8ce22e5e487e9d1017c26702adc09d5646565d0c", + "repository": "eumemic/integer-mult-bounds", + "author": "eumemic", + "title": "\u03ba = 7.69556690340075e-4: four frame retimings after PR320 restoration" + }, + { + "pr": 323, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/323", + "head": "e51f5ffee8ab574e5b8249a4612411b2ca5f100d", + "repository": "eumemic/integer-mult-bounds", + "author": "eumemic", + "title": "\u03ba = 7.69557449978832e-4: three rank-two kernels after frozen PR322" + } + ], + "source_selections_credit": "eumemic, with declared OpenAI Codex assistance", + "retiming_mechanism_credit": "Rohan Arun, PR287, with Anthropic Claude assistance, per source attribution", + "new_independent_checks": "Prepared with substantial OpenAI assistance; Apache-2.0", + "files": [ + { + "label": "pr322-NOTICE.md", + "pr": 322, + "repository": "eumemic/integer-mult-bounds", + "ref": "8ce22e5e487e9d1017c26702adc09d5646565d0c", + "path": "research/p10-presink-retiming/NOTICE.md", + "url": "https://raw.githubusercontent.com/eumemic/integer-mult-bounds/8ce22e5e487e9d1017c26702adc09d5646565d0c/research/p10-presink-retiming/NOTICE.md", + "bytes": 10852, + "sha256": "2bf33a487a776b2701aaf5690e5cc0e65f0857475110deeb90a2c2f1647a3520", + "sha": "5fd8a5e138d06c9000476ea4dab67e5c3d38bab4" + }, + { + "label": "pr322-PROOF.md", + "pr": 322, + "repository": "eumemic/integer-mult-bounds", + "ref": "8ce22e5e487e9d1017c26702adc09d5646565d0c", + "path": "research/p10-presink-retiming/PROOF.md", + "url": "https://raw.githubusercontent.com/eumemic/integer-mult-bounds/8ce22e5e487e9d1017c26702adc09d5646565d0c/research/p10-presink-retiming/PROOF.md", + "bytes": 14006, + "sha256": "176c2d2ab4fae3a2c85c553d28b52a3c41d72b3db372381b4cdf8730515935a6", + "sha": "1d8be54a83b716ac5f22436190394d1569ac6aff" + }, + { + "label": "pr322-presink-selection.json", + "pr": 322, + "repository": "eumemic/integer-mult-bounds", + "ref": "8ce22e5e487e9d1017c26702adc09d5646565d0c", + "path": "research/p10-presink-retiming/presink-selection.json", + "url": "https://raw.githubusercontent.com/eumemic/integer-mult-bounds/8ce22e5e487e9d1017c26702adc09d5646565d0c/research/p10-presink-retiming/presink-selection.json", + "bytes": 9298, + "sha256": "166fa4ce7259d35a020c51682c6f18256f3fdad260473f8209e53114285c8934", + "sha": "df6dcc1739bd0a314c2491e90edbd6b912c89145" + }, + { + "label": "pr322-presink_transform.py.txt", + "pr": 322, + "repository": "eumemic/integer-mult-bounds", + "ref": "8ce22e5e487e9d1017c26702adc09d5646565d0c", + "path": "research/p10-presink-retiming/presink_transform.py", + "url": "https://raw.githubusercontent.com/eumemic/integer-mult-bounds/8ce22e5e487e9d1017c26702adc09d5646565d0c/research/p10-presink-retiming/presink_transform.py", + "bytes": 11925, + "sha256": "e18991123d9eabc06f54d6ff1ba4b15cc215521db14496d28c5370451d02c013", + "sha": "a59684928de204b822de0f890c27e8cb2dfba485" + }, + { + "label": "pr323-NOTICE.md", + "pr": 323, + "repository": "eumemic/integer-mult-bounds", + "ref": "e51f5ffee8ab574e5b8249a4612411b2ca5f100d", + "path": "research/p10-presink-three-quads/NOTICE.md", + "url": "https://raw.githubusercontent.com/eumemic/integer-mult-bounds/e51f5ffee8ab574e5b8249a4612411b2ca5f100d/research/p10-presink-three-quads/NOTICE.md", + "bytes": 1307, + "sha256": "63b3c5389bebba92a1f5e121b7a7e4d174355facd71a88576dca419e3c51d9a8", + "sha": "a5a829c5d12ca702a5f9f83770d94beaa618ee66" + }, + { + "label": "pr323-PROOF.md", + "pr": 323, + "repository": "eumemic/integer-mult-bounds", + "ref": "e51f5ffee8ab574e5b8249a4612411b2ca5f100d", + "path": "research/p10-presink-three-quads/PROOF.md", + "url": "https://raw.githubusercontent.com/eumemic/integer-mult-bounds/e51f5ffee8ab574e5b8249a4612411b2ca5f100d/research/p10-presink-three-quads/PROOF.md", + "bytes": 3670, + "sha256": "44324bd263d6b10891f95a2cebb5fc7d802220acca6eb838c505243cdcde6eeb", + "sha": "fff8338116e57e120f1aca438fd38185badc3469" + }, + { + "label": "pr323-README.md", + "pr": 323, + "repository": "eumemic/integer-mult-bounds", + "ref": "e51f5ffee8ab574e5b8249a4612411b2ca5f100d", + "path": "research/p10-presink-three-quads/README.md", + "url": "https://raw.githubusercontent.com/eumemic/integer-mult-bounds/e51f5ffee8ab574e5b8249a4612411b2ca5f100d/research/p10-presink-three-quads/README.md", + "bytes": 3165, + "sha256": "48c301616dc0576b1c8bfe90e6510d4be9d98d429ad890563f8ac3b33bade95f", + "sha": "813873733fa5ae19aedffe280df8c98ae3a4c862" + }, + { + "label": "pr323-kernel2-selection.json", + "pr": 323, + "repository": "eumemic/integer-mult-bounds", + "ref": "e51f5ffee8ab574e5b8249a4612411b2ca5f100d", + "path": "research/p10-presink-three-quads/stages/kernel2-selection.json", + "url": "https://raw.githubusercontent.com/eumemic/integer-mult-bounds/e51f5ffee8ab574e5b8249a4612411b2ca5f100d/research/p10-presink-three-quads/stages/kernel2-selection.json", + "bytes": 3189, + "sha256": "bcfdc7ec8a61d49201961077fbc512f516dcbebac4281d5cd7d2350ced3ee9e0", + "sha": "c3908db6e236ee17e1f2c05a39561e31e94691d2" + } + ], + "upstream_execution": "None. Source code remains inert text under .py.txt names." +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/lowering/check_emitted_projectors.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/lowering/check_emitted_projectors.py new file mode 100644 index 0000000000..9fd7568b35 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/lowering/check_emitted_projectors.py @@ -0,0 +1,64 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Independent small verifier of emitted completion and copied-work projectors. +Reads compiler output as inert data. No emitter or upstream module imported. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from collections import Counter +import copy,gzip,hashlib,json +if not __debug__:raise RuntimeError('Assertions required') +P=packet.LOWERING +O=packet.LOWERING;L=packet.ADMISSION +def read(p): + b=p.read_bytes();return json.loads(gzip.decompress(b) if p.name.endswith('.gz') else b) +sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest() +frames=read(L/'local-frames.json.gz');copies=read(O/'copied-work-projector-overrides.json');phases=read(O/'extended-phases.json') +def check_copy(r): + old=frames[str(r['old_frame'])]['rank'];new=frames[str(r['new_frame'])]['rank'] + diff=(new-old)*(-1 if r['complement'] else 1) + assert (old,new,r['rank'])==(18,0,18) + assert r['difference_orientation']*diff==18 + assert r['difference_orientation']==(1 if r['complement'] else -1) + assert r['family']==658255 +for r in copies:check_copy(r) +assert len(copies)==100 and Counter(x['stage'] for x in copies)=={s:20 for s in range(5)} +bad=copy.deepcopy(next(x for x in copies if not x['complement']));bad['difference_orientation']=1 +try:check_copy(bad) +except AssertionError:copy_negative=True +else:raise AssertionError('negative projector accepted') +def check_completion(r): + s=r['stage'];support=list(range(80,100));assert r['rank']==20 and r['support']==[80,100] + assert r['family']==230400+(s+1)*85571-1 + assert r['Q_entries']==[[j,j,1] for j in support] + U=[[0]*20 for _ in range(200)];V=[[0]*200 for _ in range(20)] + for i,j,v in r['U_entries']:U[i][j]+=v + for i,j,v in r['V_entries']:V[i][j]+=v + assert all(sum(V[i][k]*U[k][j] for k in range(200))==-2*int(i==j) for i in range(20) for j in range(20)) + D=[[int(i==j)+sum(U[i][k]*V[k][j] for k in range(20)) for j in range(200)] for i in range(200)] + want=list(range(200)) + for j in support:want[j],want[199-j]=want[199-j],want[j] + assert D==[[int(want[i]==j) for j in range(200)] for i in range(200)] + pi=r['permutation'];inv=r['inverse_permutation'];assert sorted(pi)==sorted(inv)==list(range(100)) + assert all(inv[pi[j]]==j for j in range(100)) and {pi[j] for j in support}==set(range(20)) + assert r['instructions'][0]['matrix']==inv and r['instructions'][2]['matrix']==pi + for k in(0,1,2,3):assert r['instructions'][k]['family']==r['family'] + assert r['fees']=={'route_movements':2,'selectors':2*(658254+59900),'wrappers':80008,'matrix_preparation':1024000000,'paid_child':1,'all_edge_fallback':320000,'bad_fraction':'1/10^16'} + return True +cs=[x for x in phases if x['kind']=='paid_bank_completion'] +for x in cs:check_completion(x) +assert len(cs)==5 +mut=copy.deepcopy(cs[0]);mut['V_entries'][0][2]=1 +try:check_completion(mut) +except AssertionError:completion_negative=True +else:raise AssertionError('wrong V coefficient accepted') +out={'status':'PASS_INDEPENDENT_EMITTED_PROJECTOR_AND_DIRECTION_CONTROLS','emitter_result_sha256':sha(O/'RESULT.json'), + 'checker_sha256':sha(Path(__file__)),'positive_copied_work_descriptors':100,'negative_forward_copy_direction_rejected':copy_negative, + 'exact200column_completion_projectors':5,'all_VU_minus2I_checked':True,'wrong_completion_coefficient_rejected':completion_negative, + 'same_bank_route_conjugation_checked':True,'all_completion_fees_checked':True} +(P/'PROJECTOR-CONTROLS.json').write_text(json.dumps(out,sort_keys=True,indent=2)+'\n');print(json.dumps(out,indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892-presink/lowering/lower_combined.py b/research/gen5b-shared-kernels/p10-paid-completion892-presink/lowering/lower_combined.py new file mode 100644 index 0000000000..4c577d59ec --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892-presink/lowering/lower_combined.py @@ -0,0 +1,337 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import companion as packet +packet.require_assertions() +packet.verify_base() +packet.verify_sources() +"""Source-bound global IR for the isolated PR322+323 paid892 composition. + +Consumes only independently admitted inert records and hash-bound selections. +Does not execute upstream production code or edit the fixed paid892 packet. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from collections import Counter,defaultdict +from fractions import Fraction as F +import gzip,hashlib,json,struct,copy,os +import numpy as np +assert packet.sha(packet.HERE/'lowering/retained_ir_helpers.py') == 'c6b2bd1d0419360b2c2bf0dc039bbe8a461915c6918e25eba19cd095aedf8bc5' +from retained_ir_helpers import stage_template,permutation,factor_perm,emit_boundary +if not __debug__:raise RuntimeError('Assertions required') +HERE=Path(__file__).resolve().parent +OUT=packet.LOWERING +LOCAL=packet.ADMISSION +PROPOSAL=packet.EXPERIMENT +OLD=packet.BASE_OUTPUT +OLDLOCAL=packet.BASE_FRAME +CHART=packet.BASE_OUTPUT/"baseline/finite/endpoint-charts.json.gz" +WORD='25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739' +HEADS={'PR320':'1b37957d1520c80b6ea796bf418e52be5109c2d4', + 'PR322':'8ce22e5e487e9d1017c26702adc09d5646565d0c', + 'PR323':'e51f5ffee8ab574e5b8249a4612411b2ca5f100d'} +SELECTORS={'pr322-presink-selection.json':'166fa4ce7259d35a020c51682c6f18256f3fdad260473f8209e53114285c8934', + 'pr323-kernel2-selection.json':'bcfdc7ec8a61d49201961077fbc512f516dcbebac4281d5cd7d2350ced3ee9e0'} +S=658255;BANKS=85571;ROLES=8221;WORK=10141 +ACTIVE=((0,1),(1,0),(0,1),(3,2),(2,3)) +sha=lambda b:hashlib.sha256(b).hexdigest() +def fs(p):return sha(Path(p).read_bytes()) +def read(p): + p=Path(p);b=p.read_bytes();return json.loads(gzip.decompress(b) if p.name.endswith('.gz') else b) +def canonical(x):return json.dumps(x,sort_keys=True,separators=(',',':')).encode() +def dump(name,x): + raw=canonical(packet.portable(x))+b'\n';(OUT/name).write_bytes(gzip.compress(raw,mtime=0) if name.endswith('.gz') else raw) +def gz(name,raw): + (OUT/name).write_bytes(gzip.compress(raw,mtime=0));return {'file':name,'sha256':sha(raw),'compressed_sha256':fs(OUT/name),'bytes':len(raw)} +def read_bound_inputs(): + for name,h in SELECTORS.items():assert fs(packet.INPUTS/name)==h + proposal=read(PROPOSAL/'RESULT.json');bank=read(PROPOSAL/'BANK-RESULT.json') + frozen=packet.verify_experiment() + for name,h in frozen['artifacts'].items():assert fs(PROPOSAL/name)==h + assert proposal['source_word_sha256']==WORD and proposal['source_heads']=={k:v for k,v in HEADS.items() if k!='PR320'} + assert bank['composition_result_sha256']==fs(PROPOSAL/'RESULT.json') + prior=read(packet.BASE_LOWER/'RESULT.json') + assert fs(CHART)==prior['input_hashes']['$OUTPUT/baseline/finite/endpoint-charts.json.gz'] + packet.verify_base() + local=read(LOCAL/'RESULT.json') + assert local['status']=='PASS_PR322_PR323_COMPOSED_FULL_LOCAL_FRAME_WORD' + assert local['candidate_sha256']==WORD and local['source_heads']==proposal['source_heads'] + assert local['base_frame_result_sha256']==fs(OLDLOCAL/'RESULT.json') + assert (local['retimings'],local['new_kernels'],local['moves'],local['source_descent_entries'])==(4,3,133,480) + for key in ('all133_actual_anchors_rechecked','all20_selected_physical_ports_rebound', + 'all_integer_operand_source_spans_contained','all_new_kernel_helper_integer_sources_restored', + 'independent_experiment_event_and_endpoint_agreement'):assert local[key] + assert local['forward']['max_row_l1']==132195 and local['inverse']['max_row_l1']==1307808 + assert fs(packet.SOURCE_PROVENANCE)==local['source_provenance_sha256'] + # Local source admission must be complete before any global PASS is emitted. + assert fs(packet.HERE/'admission/build_local.py')==local['checker_sha256'] + for name,h in local['artifacts'].items():assert fs(LOCAL/name)==h + records=read(LOCAL/'local-records.json.gz');frames=read(LOCAL/'local-frames.json.gz');ep=read(LOCAL/'local-endpoints.json') + roots={'base_word':WORD,'source_heads':HEADS,'selectors':SELECTORS, + 'prior_local_frame_result':fs(OLDLOCAL/'RESULT.json'), + 'prior_global_frame_result':fs(packet.BASE_FULL/'RESULT.json'), + 'retained_endpoint_chart_programs':fs(CHART), + 'current_local_record_bytes':fs(LOCAL/'local-records.json.gz')} + return proposal,bank,local,records,frames,ep,roots + +def verify_local(records,frames,ep): + state={int(k):v for k,v in ep['initial'].items()};final={int(k):v for k,v in ep['final'].items()} + assert set(state)==set(final)==set(range(WORK)) + rank=lambda f:frames[str(f)]['rank'];H=Counter();ops=Counter();coeff=Counter();tmp=None;reads=0 + for row in records: + op,a,b,c,f,z=row;ops[op]+=1 + if op==0: + assert state[a]==b and rank(c)-rank(b)==f and f>=0;state[a]=c + if f:H[f]+=1 + elif op==1: + assert a!=b and state[a]==state[b]==f and c%2;coeff[abs(c)]+=1 + if b==WORK:assert tmp is not None;reads+=1 + elif op==2: + assert tmp is None and b==WORK and state[a]==c and rank(c)==z==18 and rank(f)==0 + tmp=(a,b,c,f);state[b]=f;H[z]+=1;reads=0 + else: + assert op==3 and tmp==(a,b,c,f) and state[a]==c and state[b]==f and reads==144 + del state[b];tmp=None + assert state==final and tmp is None and (ops[1],ops[2],ops[3])==(336239,20,20) + assert coeff=={1:335279,3:960} and (sum(H.values()),sum(r*n for r,n in H.items()))==(48486,179458) + return H,ops + +def exact_endpoint_charts(roles,frames,ep,bank): + old=read(CHART);programs={x['program_id']:x for x in old['factor_programs']} + uses={x['role']:x['program_id'] for x in old['role_uses'] if x['role'] in set(roles)} + for j,new in enumerate(bank['changed_endpoint_charts']): + role=new['virtual_role'];assert roles[new['compact_pivot']-1920]==role and role not in uses + pid=100000+j;uses[role]=pid + programs[pid]={'program_id':pid,'rank':18,'donor_dimension':2,'recipient_dimension':20, + 'basis_columns':new['basis_columns'],'inverse':new['inverse'], + 'factors':new['factor_program'],'count':new['factor_count']} + p=programs[pid];B=[list(map(F,row)) for row in zip(*p['basis_columns'])];I=[list(map(F,row)) for row in p['inverse']] + for a,b in ((B,I),(I,B)): + assert all(sum(x*y for x,y in zip(row,col))==int(i==j) for i,row in enumerate(a) for j,col in enumerate(zip(*b))) + work=copy.deepcopy(B) + for op,i,j,c in p['factors']: + if op=='swap':work[i],work[j]=work[j],work[i] + elif op=='scale':work[i]=[F(c)*x for x in work[i]] + else:assert op=='add';work[i]=[x+F(c)*y for x,y in zip(work[i],work[j])] + assert work==[[int(i==j) for j in range(20)] for i in range(20)] + assert p['count']==21 + assert len(uses)==2318 + widths={};checked=set();chart_receipts=[] + gram=lambda a,b:9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b) + for i,r in enumerate(roles): + before=ep['initial'][str(1920+i)];after=ep['final'][str(1920+i)] + A=frames[str(before)];B=frames[str(after)];widths[r]=B['rank']-A['rank'] + if r not in uses:assert (A['rank'],B['rank'])==(0,20);continue + p=programs[uses[r]];w=widths[r] + assert (p['donor_dimension'],p['recipient_dimension'],p['rank'])==(A['rank'],B['rank'],w) + key=uses[r],before,after + if key not in checked: + cols=[list(map(F,row)) for row in p['basis_columns']];Ao=[list(map(F,row)) for row in A['annihilator']];An=[list(map(F,row)) for row in B['annihilator']] + residual=cols[:w];src=cols[w:w+A['rank']];outside=cols[w+A['rank']:] + assert all(sum(x*y for x,y in zip(a,b))==0 for a in Ao for b in src) + assert all(sum(x*y for x,y in zip(a,b))==0 for a in An for b in residual+src) + assert all(gram(a,b)==0 for a in residual for b in src) + assert all(gram(a,b)==0 for a in outside for b in residual+src) + checked.add(key) + chart_receipts.append([r,uses[r],before,after,w]) + dump('actual-endpoint-chart-binding.json',{'uses':chart_receipts,'combinations':len(checked),'identity_endpoints':5903,'new21factor_charts':3,'all_actual_endpoints_bound':True}) + return widths,programs,uses + +def namespaces(roles,widths,programs,uses,bank): + raw=gzip.decompress((PROPOSAL/'new-bank-assignments.bin.gz').read_bytes());assert sha(raw)==bank['assignment_sha256'] + assign={};coverage=bytearray(BANKS*100) + for r,t,b,o,w,sc in struct.iter_unpack('>6I',raw): + assert r in widths and widths[r]==w and 0<=t<60 and 0<=b=960)])*960+i%960,0 if s==0 else 1+s*960+i%960) + witnesses=defaultdict(list) + for j,r in enumerate(roles): + b,o,w,sc=assign[r,t];pid=uses.get(r,-1);key=s,o,w,sc,pid + if key not in ids: + pi=permutation(s,o,w);outside=next(j for j in range(100) if not 20*s<=j<20*(s+1)) + ids[key]=len(normalizers);normalizers.append({'id':ids[key],'stage':s,'support':[o,o+w], + 'rank':w,'scalar':sc,'permutation':pi,'chart_program':pid, + 'formula':'N=scalar*Pi*embed_stage(B_inverse)', + 'physical_cover':'g=d*tau_stage*N_inverse', + 'outside_column':outside,'unit_column_witness':[pi[outside],sc], + 'paid_factor_bound':599}) + n=ids[key];family=230400+s*BANKS+b;a[1920+j]=(family,4801+n);witnesses[family].append(tuple(normalizers[n]['unit_column_witness'])) + a[-1]=(S,-1) + assert len(set(map(tuple,a.tolist())))==10142 + assert all(len(set(x))==len(x) for x in witnesses.values()) + assert all(0<=int(f)0);bad[i][4]+=1 + try:verify_local(bad,frames,ep) + except AssertionError:rejected.append('wrong_MOVE_rank') + else:raise AssertionError('rank accepted') + return rejected + +def main(): + proposal,bank,local,records,frames,ep,roots=read_bound_inputs();start_local=fs(LOCAL/'RESULT.json') + roles=read(packet.BASE_LOWER/'compact-role-index.json')['roles'];assert len(roles)==8221 + H,ops=verify_local(records,frames,ep) + assert H==Counter({int(k):v for k,v in proposal['one_stage_histogram'].items()}) + widths,programs,uses=exact_endpoint_charts(roles,frames,ep,bank) + assert Counter(widths.values())==Counter({int(k):v for k,v in proposal['residual_census'].items()}) + maps,norms=namespaces(roles,widths,programs,uses,bank);print('All300 namespaces and actual endpoint charts bound',flush=True) + ps=phases();check_schedule(ps);phase_ids={(p['stage'],p['replica']):p['phase_index'] for p in ps if p['kind']=='helper'} + bindings=[];templates=[];copy_overrides=[];hist=Counter();program=hashlib.sha256();counts=Counter() + for s in range(5): + template=stage_template(s,records,frames) + assert Counter(map(int,template[(template[:,0]==0)&(template[:,4]>0),4]))==H + for ordinal,row in enumerate(template): + op,a,b,c,f,z,stage,rev,source=map(int,row) + if op!=0:continue + signed=(frames[str(c)]['rank']-frames[str(b)]['rank'])*(-1 if rev else 1) + orientation=-1 if a==WORK and not rev else 1;assert orientation*signed==f + if a==WORK: + assert f==18 + copy_overrides.append({'stage':s,'template_record':ordinal,'local_source_record':source,'family':S, + 'old_frame':b,'new_frame':c,'complement':rev,'rank':18,'difference_orientation':orientation, + 'positive_projector':'F(old,0)-F(new,0)' if not rev else 'F(new,1)-F(old,1)', + 'meaning':'positive embedded center projector; D_P=D_P_inverse; never D_negativeP'}) + templates.append(gz(f'stage-{s}-template.i32.gz',template.tobytes())) + for t in range(60): + a=maps[s,t];data=np.zeros((len(template),12),dtype='lastplain and(x in(a,b)or(op==1 and y in(a,b))):anchors.append((op,sem,x==a,x==b,y==a,y==b,i=1920 else s + def index(events): + writes=defaultdict(list);reads=defaultdict(list);incident=defaultdict(list);copies=defaultdict(list);ids={};lastcopy=max(i for i,r in enumerate(events)if r[-1][0]=='plain') + for i,(op,a,b,c,sem)in enumerate(events): + key=(op,sem);assert key not in ids;ids[key]=i + if op==1:writes[a].append(i);reads[b].append(i);incident[a].append(i);incident[b].append(i) + else:copies[a].append(i);incident[a].append(i) + return writes,reads,incident,copies,ids,lastcopy + IA=index(A);IB=index(B);receipts=[];allports=set() + def kinds(sem):return 'side_root'if sem[0]=='root'else'forward_gate'if sem[0]=='forward'else sem[0] + def frame(sem): + if sem[0]=='forward':return ('frame',new['op_frame'][sem[1]]) + if sem[0]=='root':return ('frame',new['root_frame'][sem[1]]) + # These exact semantic inputs and selections are unchanged. The equality + # key binds the unique declared frame by its defining event or selection. + return ('unchanged_selection_or_semantic_frame',sem) + for z in read('reorder-selection.json')['moves']: + a,b,c=z['incidence'];a,b=lift(a),lift(b);assert not{a,b}&allports;allports|={a,b} + hits=[i for i in IA[2][a]if A[i][0]==1 and A[i][1:4]==(a,b,c)and kinds(A[i][-1])==z['category']];assert len(hits)==1 + oi=hits[0];key=(1,A[oi][-1]);ni=IB[4][key];aa,bb=xlat(a),xlat(b);assert B[ni][1:4]==(aa,bb,c) + def traces(events,idx,at,a,b): + wr,rd,inc,cp,ids,lastcopy=idx + bad=sorted(set(rd[a]+wr[b]+cp[a]));badtrace=[(events[i][0],events[i][-1],ilastcopy] + return badtrace,anchortrace,bad,incidences + ot,oa,ob,oii=traces(A,IA,oi,a,b);nt,nn,nbr,nii=traces(B,IB,ni,aa,bb) + assert ot==nt,('new noncommuting crossing',z['record']) + assert oa==nn,('anchor event sequence changed',z['record']) + assert oi>IA[5]and ni>IB[5] + receipts.append(dict(old_record=z['record'],old_anchor=z['anchor'],side=z['side'],old_precompact_incidence=[a,b,c],new_precompact_incidence=[aa,bb,c],moved_semantic_event=A[oi][-1],old_scalar_event_index=oi,new_scalar_event_index=ni,postprefix_anchor_incidence_count=len(oa),noncommuting_event_count=len(ot),all_anchor_candidates_semantically_preserved=True,noncommuting_trace_and_relative_position_identical=True)) + # Newly delayed gauge compensations9118/9119 are explicit; all other + # retimings are covered by the complete operand-based traces above. + late=[r for r in B if r[-1][0]=='gauge'and r[-1][1]in(9118,9119)];assert len(late)==2 + assert all(not{r[1],r[2]}&{xlat(s)for s in allports}for r in late) + out=dict(status='PASS_ALL133_SEMANTIC_ANCHOR_AND_COMMUTATION_TRACES',head=HEAD,overlay_sha256=OVER_SHA,checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),moves=len(receipts),moved_ports=len(allports),late_compensations=late,all_anchors_survive=True,all_noncommuting_traces_equal=True,receipts=receipts,proof='For each moved shear E_ab(c), an ADD E_xy(d) fails the inherited sufficient commutation screen only when y=a or x=b; a COPY/ERASE fails only when its source is a. Both these complete traces and the moved gate position within them are identical old/new. The complete incident-event trace after the complete initial plain prefix is also identical, with the same defining frame per event, so every admitted old anchor persists in order and with its declared frame. Any inserted, deleted, re-addressed or relocated events between a move and its transported anchor commute. The test depends only on operands, so replacing c,d by their absolute values preserves it. Thus the inherited133 raw crossing proofs transport to the new signed and nonnegative words. Physical coordinate norms start positive and increase under unsigned ADDs. Each reused COPY scratch norm equals a captured physical norm, so it is also bounded by the maximum final physical norm. Therefore the maximum prefix row norm is bounded by the maximum final physical norm, which commuting rewrites preserve.',scope='Complete finite transport of inherited133 moves and all possible original anchors through actual old/new scalar event bijection. Does not independently rerun the original raw record-number crossing proof or emit new final frame records.') + (HERE/'reorder-transport-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps({k:v for k,v in out.items()if k!='receipts'},indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/admission/check_scalar_recurrence.py b/research/gen5b-shared-kernels/p10-paid-completion892/admission/check_scalar_recurrence.py new file mode 100644 index 0000000000..18e94a95b8 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/admission/check_scalar_recurrence.py @@ -0,0 +1,143 @@ +"""Fresh complete scalar-only actual-overlay recurrence, newly authored. +All installed scalar edits are reconstructed from content-bound selections; +frame/raw-record output is intentionally not claimed. Reorder commutations +are transported using independently checked unchanged operand classes. +""" +from pathlib import Path +from collections import defaultdict,Counter +import json,hashlib,time +from weighted_source_data import read,verify,HEAD +from check_transport import OVER,OVER_SHA +from check_target_chronology import build +CODE=Path(__file__).resolve().parent +from weighted_source_data import OUTPUT,PACKAGE_OUTPUT,PACKAGE_ROOT +HERE=OUTPUT + +def scalar_word(w,extra): + raw,adj,sid,n,F=build(w);g=read('graph.json');K=read('kchron.json')['entries'];ks=read('kernel-selection.json');sinks=read('sink-selection.json')['sinks'];restore=read('restore-selection.json')['entries'];target=read('target-selection.json')['groups'];tc=json.loads((HERE/'target-chronology-result.json').read_text()) + assert w['pairs']==read('bitword/selected/bit/word_p10.json.gz')['pairs']or hashlib.sha256(OVER.read_bytes()).hexdigest()==OVER_SHA + oldword=read('bitword/selected/bit/word_p10.json.gz') + baseline=w['pairs']==oldword['pairs'] + old_alias={b:a for a,b in oldword['pairs']};old_inv={1920+i:r for i,r in enumerate(sorted(set(range(9120))-set(old_alias)))} + xlat=lambda s:sid(old_inv[s])if s>=1920 else s + original_restore=restore + restore=[dict(e,helper=xlat(e['helper']),donor=xlat(e['donor']))for e in restore] + restore_sem={(xlat(e['helper']),xlat(e['donor'])):(e['helper'],e['donor'])for e in original_restore} + which='old_'if baseline else'new_' + cut=tc['groups'][0][which+'cut'];close={e[which+'close']:target[e['group']]for e in tc['groups']};deps={960+int(q):e[which+'close']for e in tc['groups']for q in target[e['group']]['dependent']} + assert hashlib.sha256((CODE/'check_target_chronology.py').read_bytes()).hexdigest()==tc['checker_sha256'] + # Target compression; retain semantic identities through scalar-only edits. + events=[] + for i,r in enumerate(raw): + if r[0]==1: + _,a,b,c,f,sem=r + if a not in deps or not cutcut and newclose>reboundcut;closes[newclose]=j + receipts.append(dict(group=j,old_cut=cut,new_cut=reboundcut,old_close=oldclose,new_close=newclose,close_semantic_event=sem,old_close_event=A[oldclose],new_close_event=B[newclose])) + assert len(closes)==120 + center=None;close_source_columns={};negative=[] + for i,row in enumerate(B): + op,a,b,*_=row + if op==2:assert center is None;center=a;columns[b]=columns[a] + if op==3:assert center==a;center=None + if op==1: + _,a,b,c,f,sem=row + if i>reboundcut: + if 960<=b<1920:assert b-960 not in owner or i>receipts[owner[b-960]]['new_close'] + if a-960 in owner and i<=receipts[owner[a-960]]['new_close']:responses[a-960]^=columns[b] + if i in closes:close_source_columns[i]=columns[b] + columns[a]^=columns[b] + if 960<=a<1920 and f!='ZERO': + if not targetpaths[a-960]or targetpaths[a-960][-1]!=f:targetpaths[a-960].append(f) + if i in closes: + j=closes[i];e=target['groups'][j] + for q,ps in e['dependent'].items(): + z=responses[int(q)] + for p in ps:z^=responses[p] + assert z==0,('literal target relation',j) + relations+=1 + if j==119: + assert B[i][1]-960 in ps and z^close_source_columns[i] + negative.append('Omitting group119 closing retained read makes its literal dependency nonzero') + # All new target read chains exact subspace nesting, and compressed group + # close frame included before every later target read. + cache={} + def ann(f): + if f not in cache:cache[f]=F[f]['a']if'a'in F[f]else null(F[f]['b']) + return cache[f] + checks=set() + for q,path in targetpaths.items(): + for x,y in zip(path,path[1:]): + if(x,y)not in checks:assert included(ann(y),ann(x));checks.add((x,y)) + for j,e in enumerate(target['groups']): + remaining=set(e['targets']) + for row in B[receipts[j]['new_close']+1:]: + if row[0]==1 and row[1]-960 in remaining and row[4]!='ZERO': + assert all(sum(x*y for x,y in zip(a,b))==0 for a in ann(row[4])for b in e['close_basis']) + remaining.remove(row[1]-960) + # Earliest later event per target suffices by established nesting. + if not remaining:break + # A target with no remaining forward-prefix read is a terminal spectator + # here; its later side/partner frame contract is inherited unchanged. + # Fresh compressed target state at every close: check every member's + # incoming frame against the close span, then every later required frame. + targetstate={q:[]for q in owner};state_checks=0 + def basis(fid):return F[fid]['b']if'b'in F[fid]else null(F[fid]['a']) + def append_need(q,B): + nonlocal state_checks + assert included(targetstate[q],B),('compressed target nonnesting',q) + targetstate[q]=B;state_checks+=1 + for i,row in enumerate(B): + if row[0]==1: + _,a,b,c,f,sem=row;q=a-960 + if q in owner and f!='ZERO': + e=target['groups'][owner[q]] + dropped=str(q)in e['dependent']and reboundcutspecial['new_close']for i in gauges.values());assert all(i>special['old_close']for i in oldgauges.values()) + out=dict(status='PASS_FRESH_PARTIAL_RAW_PREFIX_AND_ALL120_TARGET_CUTS',head=HEAD,overlay_sha256=OVER_SHA,old_physical_columns=on,new_physical_columns=nn,global_cut_semantic_event=A[cut],all120_literal_target_relations=relations,minimum_descent_record=minimum_descent,max_original_close=max(e['close_after_record']for e in target['groups']),group119=special,old_late_gauge_records=oldgauges,new_late_gauge_records=gauges,new_late_gauge_event_details=[B[i]for i in gauges.values()],all_gauge_target_paths_nested=True,all480_group_members_checked_at_close=True,compressed_target_state_containment_checks=state_checks,negative_controls=negative,unique_target_containment_pairs=len(checks),groups=receipts,checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),scope='Fresh original and new raw prefix regenerated through last forward gate, stopping before side-root/partner/kernel/restore/sink/reorder tail. Target cuts rebound by unique semantic event identity; all120 literal relations checked on the actual new physical columns. This does not emit the complete final pipeline.',dependency_sha256={'weighted_source_data.py':hashlib.sha256((CODE/'weighted_source_data.py').read_bytes()).hexdigest(),'check_transport.py':hashlib.sha256((CODE/'check_transport.py').read_bytes()).hexdigest()}) + (HERE/'target-chronology-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/admission/check_transport.py b/research/gen5b-shared-kernels/p10-paid-completion892/admission/check_transport.py new file mode 100644 index 0000000000..226e11abb8 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/admission/check_transport.py @@ -0,0 +1,161 @@ +"""Independent exact transport proof, reading pinned JSON and inert source text only. +No code from PR320 is imported or run. This is not raw-record regeneration. +""" +from pathlib import Path +from fractions import Fraction as Q +from collections import Counter,defaultdict +import json,hashlib,time +from weighted_source_data import read,read_bytes,verify,HEAD +CODE=Path(__file__).resolve().parent +from weighted_source_data import OUTPUT,PACKAGE_OUTPUT,PACKAGE_ROOT +HERE=OUTPUT +from admission_config import OVER,OVER_SHA +def compact(c):return {int(k):v for k,v in sorted(c.items())if v} +def diff(a,b): + c=Counter(b);c.subtract(a);return compact(c) +def rr(rows,width=20): + a=[list(map(Q,r)) for r in rows];piv=[];k=0 + for j in range(width): + z=next((i for i in range(k,len(a))if a[i][j]),None) + if z is None:continue + a[k],a[z]=a[z],a[k];c=a[k][j];a[k]=[x/c for x in a[k]] + for i in range(len(a)): + if i!=k and a[i][j]: + c=a[i][j];a[i]=[x-c*y for x,y in zip(a[i],a[k])] + piv.append(j);k+=1 + return a[:k],piv +def null(rows): + a,p=rr(rows);out=[] + for j in set(range(20))-set(p): + r=[Q(0)]*20;r[j]=1 + for row,k in zip(a,p):r[k]=-row[j] + out.append(r) + return out +def included(rows,space): + a,p=rr(space) + for row in rows: + row=list(map(Q,row)) + for v,k in zip(a,p): + c=row[k] + if c:row=[x-c*y for x,y in zip(row,v)] + if any(row):return False + return True +def run(): + t=time.monotonic();verify();assert hashlib.sha256(OVER.read_bytes()).hexdigest()==OVER_SHA + old=read('bitword/selected/bit/word_p10.json.gz');w=json.loads(OVER.read_text());f={int(k):v for k,v in read('frames.json')['frames'].items()};g=read('graph.json') + assert [k for k in old if old[k]!=w[k]]==['pairs','reads'] + gauges={e['role']:e for e in w['gauges']};sources=set(w['sources'].values());roots=set(w['rootroles']) + def mapping(word): + aliases={b:a for a,b in word['pairs']};roles=sorted(set(range(9120))-set(aliases));ids={r:1920+i for i,r in enumerate(roles)} + return aliases,roles,ids,{r:ids[aliases.get(r,r)]for r in range(9120)} + oa,oreg,oi,os=mapping(old);na,nreg,ni,ns=mapping(w);inv={s:r for r,s in oi.items()};n=1920+len(nreg) + assert len(oa)==890 and len(na)==892 and n==10148 + assert set(na)-set(oa)=={9118,9119} and not set(oa)-set(na) + assert len(set(p[0]for p in w['pairs']))==len(set(p[1]for p in w['pairs']))==892 + pairs_old=set(map(tuple,old['pairs']));pairs_new=set(map(tuple,w['pairs']));changed={r for p in pairs_old^pairs_new for r in p} + rolemap=[dict(virtual_role=r,old_physical=os[r],new_physical=ns[r],old_representative=oa.get(r,r),new_representative=na.get(r,r))for r in range(9120)] + (HERE/'virtual-physical-map.json').write_text(json.dumps(dict(head=HEAD,overlay_sha256=OVER_SHA,rows=rolemap),indent=2)+'\n') + phase=sorted(w['phase1']);ps=set(phase);rest=[i for i in range(len(w['ops']))if i not in ps];order=phase+rest;pos={i:j for j,i in enumerate(order)};uses=defaultdict(list) + for i in order: + a,b,_=w['ops'][i];assert ns[a]!=ns[b] + uses[a].append(i);uses[b].append(i) + for a,b in pairs_new: + assert a not in set(gauges)|sources|roots and b in gauges and gauges[b]['dim']==17 + assert max(pos[i]for i in uses[a])a);after=Counter(b-a for a,b in zip(dims,dims[1:])if b>a) + result.update(after);result.subtract(before) + receipts.append(dict(role=r,physical=ns[r],first_frame=first,frames=path,entrance_ranks=[len(B)for B in bases],delta=diff(before,after))) + return compact(result),receipts + oldD,_=kernel_delta(old);newD,receipts=kernel_delta(w) + assert oldD==newD=={int(k):v for k,v in ks['expected_local_delta'].items()} + (HERE/'kernel-path-receipts.json').write_text(json.dumps(receipts,indent=2)+'\n') + # Rebind every later transform by original representative role; unchanged + # virtual endpoints and paths are essential because physical IDs now move. + descent=read('descent-selection.json')['entries'];restore=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'];reorder=read('reorder-selection.json')['moves'];removed=sorted(z['stream']for z in sinks) + def lift(s): + for q in removed: + if q<=s:s+=1 + return s + role=lambda s:inv[s]if s>=1920 else None + transport=lambda s:ns[inv[s]]if s>=1920 else s + overlaps=dict(descent=[i for i,e in enumerate(descent)if{role(s)for s in e['scalar'][:2]}&changed],restore=[i for i,e in enumerate(restore)if{role(e[k])for k in('helper','donor')}&changed],sink=[e['role']for e in sinks if e['role']in changed],reorder=[i for i,e in enumerate(reorder)if{role(lift(s))for s in e['incidence'][:2]}&changed]) + assert not any(overlaps.values()),overlaps + later=dict(restores=[dict(e,helper=transport(e['helper']),donor=transport(e['donor']))for e in restore],sinks=[dict(e,stream=transport(e['stream']))for e in sinks],reorders=[dict(e,precompact_incidence=[transport(lift(s))for s in e['incidence'][:2]]+[e['incidence'][2]])for e in reorder]) + (HERE/'rebound-later-selections.json').write_text(json.dumps(later,indent=2)+'\n') + out=dict(status='PASS_EXACT_ALL1047_KERNEL_CONDITIONAL_TRANSPORT',head=HEAD,overlay_sha256=OVER_SHA,checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),old_physical_columns=10150,new_physical_columns=n,old_pairs=890,new_pairs=892,preserved_pairs=len(pairs_old&pairs_new),changed_role_count=len(changed),representatives_removed=sorted(set(oreg)-set(nreg)),representatives_added=sorted(set(nreg)-set(oreg)),retained_representative_ids_changed=sum(oi[r]!=ni[r]for r in set(oreg)&set(nreg)),virtual_map_rows=len(rolemap),initial_plain_reads=count,kernel_entries_rebound=len(newentries),kernel_relations_and_cut_triples_exact=True,kernel_entries_touching_changed_roles=sum(bool(({e['virtual_pivot']}|set(e['virtual_donors']))&changed)for e in newentries),kernel_delta_old=oldD,kernel_delta_new=newD,complete_old_paths_checked=len(oreg),complete_new_paths_checked=len(nreg),unique_exact_containment_pairs=len(subcache),direct_role_overlaps=overlaps,scope='Exact matching map, all1047 literal installed-kernel relations/cuts and basis ranks, full base alias containment, unchanged installed-kernel paid delta, and explicit later-selection endpoint rebinding. Full raw-word regeneration, inherited raw crossing verification, target-prefix chronology, fresh norm bounds, pricing, compiler/prime/all-size interfaces remain separate obligations.',source_loader_sha256=hashlib.sha256((CODE/'weighted_source_data.py').read_bytes()).hexdigest()) + (HERE/'transport-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/admission/test_admission.py b/research/gen5b-shared-kernels/p10-paid-completion892/admission/test_admission.py new file mode 100644 index 0000000000..c9f943e570 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/admission/test_admission.py @@ -0,0 +1,80 @@ +"""Independent bindings and mutation regressions for weighted892 admission.""" +from pathlib import Path +import hashlib,json,subprocess,sys,unittest +from functools import lru_cache +from collections import defaultdict +from weighted_source_data import read,verify,HEAD,OUTPUT +from admission_config import OVER,OVER_SHA +from check_transport import rr,included +HERE=Path(__file__).resolve().parent +@lru_cache(None) +def data(): + w=json.loads(OVER.read_text());old=read('bitword/selected/bit/word_p10.json.gz') + ga={e['role']for e in w['gauges']};alias={b:a for a,b in w['pairs']};ids={r:1920+i for i,r in enumerate(sorted(set(range(9120))-set(alias)))};sid=lambda r:ids[alias.get(r,r)] + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase];g=read('graph.json');adj=[{}for _ in range(9120)] + for root,r in zip(g['roots'],w['rootroles']): + for t in root['targets']:adj[r][t]=adj[r].get(t,0)+1 + for i in reversed(order): + a,b,_=w['ops'][i] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + response={sid(r):sum(1<IIIIII',b));assert len(rows)==8221*60 +seen=set();cov=bytearray(85575*100);rolew={};bankroles={};assignmenthash=hashlib.sha256() +for role,rep,bank,off,width,scale in rows: + assert 0<=rep<60 and 0<=bank<85575 and 0<=off25. +patterns={tuple((row[2],row[3],row[4])for row in members)for members in bankroles.values()} +normalizer_patterns=0 +for stage in range(5): + outside=next(j for j in range(100)if not 20*stage<=j<20*(stage+1)) + for pattern in patterns: + vectors=[] + for off,width,scale in pattern: + active=list(range(20*stage,20*stage+width));target=list(range(off,off+width)) + src=active+[j for j in range(100)if j not in active];dst=target+[j for j in range(100)if j not in target] + pi=dict(zip(src,dst));vectors.append((pi[outside],scale)) + assert len(vectors)==len(set(vectors));normalizer_patterns+=1 +assert bankroles[85574][0][2:4]==(0,20) and bankroles[85574][1][2:4]==(20,20) and len(bankroles[85574])==2 +assert Counter(role for role,rep in seen)==Counter({role:60 for role in rolew}) +for stage in range(5): + for role,rep,bank,off,width,scale in rows: + family=230400+stage*85575+bank + assignmenthash.update(struct.pack('>IIIIIII',stage,role,rep,family,off,width,scale)) +assert assignmenthash.hexdigest()==r['bank_addresses']['five_stage_assignment_sha256'] +# Full phase ordering, including three boundaries and terminal exchange. +ph=phase['phases'];assert len(ph)==730 +cursor=0;comps=[] +for stage in range(5): + for replica in range(60): + q=ph[cursor];cursor+=1;assert(q['kind'],q['stage'],q['replica'],q['cover'])==('helper',stage,replica,'all_GL_classes') + for off,rank in [(40,49),(89,11)]: + q=ph[cursor];cursor+=1;comps.append(q) + assert(q['kind'],q['stage'],q['family'],q['rank'],q['coordinate_interval'])==('paid_bank_completion',stage,230400+(stage+1)*85575-1,rank,[off,off+rank]) + assert q['high_fibers']=='batched' and q['weighted_by']=='existing_common_ancestor_chart' and q['cover']=='all_GL_classes' + if stage in (1,2,4): + which={1:0,2:1,4:2}[stage] + for replica in range(60): + for kind in ('idle','bridge'): + q=ph[cursor];cursor+=1;assert(q['kind'],q['stage'],q['which'],q['replica'])==(kind,stage,which,replica) +for replica in range(60): + q=ph[cursor];cursor+=1;assert(q['kind'],q['replica'])==('terminal_exchange',replica) +assert cursor==730 +# Invoice is literal-scale; all integer quantities independently recomputed. +S=230400+5*85575;H={int(k):v for k,v in r['literal_profile']['histogram'].items()};E=sum(H.values());mass=sum(k*v for k,v in H.items()) +assert(S,E,mass,100*S-mass)==(658275,15002710,65705100,122400) +assert max(H)==49 and 2*max(H)<100 +regular=H.copy();regular[49]-=5;regular[11]-=5 +assert sum(regular.values())==15002700 and sum(k*v for k,v in regular.items())==65704800 +J=60*(24*960+10*8221)+20;K=600*((S-1)+8221*100*599)+20*((S-1)+100*599) +terms={'unit_expanded_additions':60*(5*338173+6*960),'high_affine_factors':J*16*10001**2,'low_transpositions':J*(S+20),'generic_wrappers':E*80008,'matrix_preparation':E*128*200**3,'global_matrix_preparation':16*100**3,'copy_erase_episodes':5*20*60,'paid_child_overhead':E,'bank_selectors':K,'constant':1} +assert terms==r['finite_invoice']['terms'] and sum(terms.values())==25474481435226991 +assert J==6315020 and K==295872067880 and K<2**40 and sum(terms.values())<2**80 +assert S+20<2**80 and 2*100**3*10**16<2**80 +assert 6*200*199+3*200+6*199==240594<320000 +assert 64*132143**3*1307556**2==252483531736676034081055177728<2**104 +# Independently certify moments by 90-term rational atanh and 40-term exp. +DEN=10**65 +def rounded(x,upper=False): + z=x*DEN;n=z.numerator//z.denominator + return F(n+int(upper and z.denominator!=1),DEN) +@lru_cache(None) +def log_interval(x): + x=F(x);power=0 + while x>2:x/=2;power+=1 + z=(x-1)/(x+1);t=z;lo=F(0) + for j in range(90):lo+=2*t/F(2*j+1);t*=z*z + hi=lo+2*t/(181*(1-z*z)) + if power: + l2,h2=log_interval(F(2));lo+=power*l2;hi+=power*h2 + return rounded(lo),rounded(hi,True) +def ex(x): + assert 0<=x0 +assert Gkappa +out={'status':'PASS_CONDITIONAL_CONTRACT_ARITHMETIC','input_sha256':hashes,'integer_identity':block_results,'all_200_columns':True,'literal_assignments':len(rows)*5,'phase_plan_count':len(ph),'literal_stock':S,'literal_calls':E,'literal_rank_mass':mass,'selector_calls':K,'finite_coefficient':sum(terms.values()),'moment_bracket':[str(root),str(upper)],'moment_strict_gaps':[str(1-low_m[1]),str(high_m[0]-1)],'kappa':str(kappa),'all_47_recomputed':True,'conditional_bridge_slacks':['literal_scalar_guard','row_product_gap'],'permutation_conventions':permutation_conventions,'negative_controls':controls,'distinct_normalizer_pattern_checks':normalizer_patterns,'retained_interfaces':['generic weighted compiler','common ancestor chart','complete-stream routing','prime supply','restored row reserve','ordinary leaves','complex supplier','precision and recovery','analytic transfer'],'scope_boundary':'The concrete incremental completion emitter is separately audited by audit_lowering.py and finalize_audit.py. Regeneration of the whole inherited regular frame stream is not intrinsically a new paid-completion obligation.','checker_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest()} +(HERE/'AUDIT-RESULT.json').write_text(json.dumps(support.portable(out),indent=2)+'\n') +print(json.dumps({k:v for k,v in out.items()if k not in ('input_sha256','moment_strict_gaps')},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/audit/audit_lowering.py b/research/gen5b-shared-kernels/p10-paid-completion892/audit/audit_lowering.py new file mode 100644 index 0000000000..0f8ca532ee --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/audit/audit_lowering.py @@ -0,0 +1,120 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import support +support.require_assertions() +"""Independent incremental-emitter artifact audit. Executes no worker source.""" +from pathlib import Path +from fractions import Fraction as F +from collections import Counter +import json,gzip,hashlib,struct +import numpy as np +if not __debug__:raise RuntimeError('Assertions must be enabled') +BASE=support.LOWER;HERE=support.AUDIT +PAID=support.BANK/"split_49_11" +AD=support.HERE/"admission";hashes={} +CORR=support.FRAME/"SOURCE-GEOMETRY-CORRECTION.json" +support.verify_correction() +correction=json.loads(CORR.read_bytes()) +assert correction['source_columns']==960 and correction['retimed_setups']==480 and correction['all_actual_descent_frames_rank18'] +assert sorted(z['source'] for z in correction['receipts'])==list(range(960)) +assert correction['source_paid_histogram']=={'2':960,'17':960} and correction['source_rank_mass']==18240 +def read(name): + raw=(BASE/name).read_bytes();hashes[name]=hashlib.sha256(raw).hexdigest();return json.loads(raw) +def packed(name,cols): + raw=gzip.decompress((BASE/name).read_bytes());hashes[name]=hashlib.sha256(raw).hexdigest();return np.frombuffer(raw,dtype='6I',gzip.decompress((PAID/'literal-assignments.bin.gz').read_bytes()))) +slots={(role,t):(bank,off,width,scale)for role,t,bank,off,width,scale in regular} +normalizers={z['id']:z for z in norm['regular_normalizers']} +active=[(0,1),(1,0),(0,1),(3,2),(2,3)] +for s in range(5): + for t in range(60): + mp=maps[60*s+t];assert sha(mp.tobytes())==receipts[60*s+t]['namespace_sha256'] + assert len(set(map(tuple,mp.tolist())))==10142 and tuple(mp[-1])==(658275,-1) + for i in range(1920): + bank=active[s][i//960];port=i%960 + assert tuple(mp[i])==((4*t+bank)*960+port,0 if s==0 else 1+s*960+port) + for i,role in enumerate(roles): + bank,off,width,scale=slots[role,t];family,route=map(int,mp[1920+i]);z=normalizers[route-4801] + assert family==230400+s*85575+bank + assert(z['stage'],z['support'],z['rank'],z['scalar'])==(s,[off,off+width],width,scale) + p=z['permutation'];assert sorted(p)==list(range(100)) and p[s*20:s*20+width]==list(range(off,off+width)) + assert z['paid_factor_bound']==599 +# Exact phase order and explicit completion operation meaning. +expected=[] +for s in range(5): + expected += [('helper',s,t)for t in range(60)] + expected += [('paid_bank_completion',s,r)for r in (49,11)] + if s in (1,2,4):expected +=[(kind,s,t)for t in range(60)for kind in ('idle','bridge')] +expected +=[('terminal_exchange',None,t)for t in range(60)] +assert len(ph)==len(expected)==730 +for index,(z,(kind,stage,value))in enumerate(zip(ph,expected)): + assert z['kind']==kind and z.get('stage')==stage and z['phase_index']==index + assert z['rank'if kind=='paid_bank_completion'else'replica']==value + if kind=='paid_bank_completion': + off=40 if value==49 else 89;d=z['descriptor'];pi=d['permutation'];pinv=d['inverse_permutation'];ops=z['operations'] + assert z['family']==230400+(stage+1)*85575-1 and z['coordinate_interval']==[off,off+value] + assert sorted(pi)==list(range(100)) and [pi[pinv[i]]for i in range(100)]==list(range(100)) + assert {pi[i]for i in range(off,off+value)}==set(range(value)) + assert [o['op']for o in ops]==['ROUTE_RIGHT','COMPILE_SPLIT_IDEMPOTENT','ROUTE_RIGHT','RESTORE_ROW_RESERVE'] + assert ops[0]['matrix']==pinv and ops[2]['matrix']==pi + assert ops[1]['coordinate_support']==list(range(value)) and ops[1]['rank']==value + assert all(o['family']==z['family']for o in ops) + # At original cover g, route to h=g*pi^-1, compile h Q_prefix h^-1, + # then return. pi^-1 Q_prefix pi equals Q_support as integer matrices. + assert {pinv[k]for k in range(value)}==set(range(off,off+value)) + for key,want in [('chronological_coordinate_transpositions',pi),('chronological_inverse_transpositions',pinv)]: + images=list(range(100)) + for a,b in d[key]:images=[b if x==a else a if x==b else x for x in images] + assert images==want +# Independently expand/hash every actual scalar operand record. +checks=[] +for z in ph: + if z['kind']!='helper':continue + s,t,idx=z['stage'],z['replica'],z['phase_index'];ev=local[::-1]if s in(1,3)else local;mp=maps[60*s+t] + out=np.empty((len(ev),9),dtype='=1920 else s +assert set(oldregs)-set(newregs)=={9118,9119} and all(newid[r]==i for i,r in oldinv.items()if r in newid) +selected={s for z in kernels for s in [z['pivot']]+z['donors']}|{z[k]for z in R for k in('helper','donor')}|{z['stream']for z in S} +assert len(selected)==2433 and all(xlat(s)==s for s in selected) +removed=sorted(z['stream']for z in S) +def lift(s): + for r in removed: + if r<=s:s+=1 + return s +assert all(xlat(lift(s))==lift(s)for z in Z['moves']for s in z['incidence'][:2]) +# Reconstruct original order, source-bind all unmoved semantic frames. +original=sorted(events,key=lambda e:e['original_index']);assert [e['original_index']for e in original]==list(range(len(events))) +original=[dict(e)for e in original] +for e in original: + if e.get('moved'): + sem=e['semantic'];frame_id=word['op_frame'][sem[1]]if sem[0]=='forward'else word['root_frame'][sem[1]] + e['frame']=keys['frame',frame_id];e.pop('moved',None) +# Bind the reordered word back to the already audited full scalar projection, +# and check every original event's frame against its source semantic meaning. +scalar_rows=np.frombuffer(gzip.decompress((INC/'local-scalar-operands.i32.gz').read_bytes()),dtype='frames[a][0]:h[frames[b][0]-frames[a][0]]+=1 + return h +for j,receipt in enumerate(moves): + z=Z['moves'][j];assert receipt['selection_index']==j;at=receipt['moved_event_index'];anchor=receipt['new_anchor_event_index'];e=original[at];nf=keys['reorder',j];a,b,c=z['incidence'] + assert(e['a'],e['b'],e['c'])==(a,b,c)and e['op']==1 and not {a,b}&ports;ports|={a,b} + assert ('forward_gate'if e['semantic'][0]=='forward'else'side_root')==z['category'] + assert frames[e['frame']][0]==z['old_frame_rank']and frames[nf][0]==z['frame_rank'] + assert equal(original[anchor]['frame'],nf) and original[anchor]['op']==1 + assert {a,b}&{original[anchor]['a'],original[anchor]['b']} + assert original[anchor]['semantic']==receipt['new_anchor_semantic']and z['side']==receipt['side'] + assert (at=0 + if f:H[f]+=1 + elif op==1: + assert a!=10141 + if b==10141:assert center is not None and f==0;reads+=1 + else: + assert op==3 and a==10141 and center is not None and reads==144;center=None + assert center is None and localcopy==20 and H==expecthist + mask=(actual[:,0]==1)|(actual[:,0]==2) + for t in range(60): + mp=spaces[s,t];out=np.empty((len(actual),12),dtype='6I',gzip.decompress((PAID/'literal-assignments.bin.gz').read_bytes())):assign[r,t]=(b,o,w,sc) +assert len(assign)==8221*60 +chartdata=json.loads(gzip.decompress((_portable.BASE_OUTPUT/"finite/endpoint-charts.json.gz").read_bytes()));chart={u['role']:u['program_id']for u in chartdata['role_uses']} +normalizer_ids={};count=0 +for d in extract_object_array(EMIT/'normalizers.json','regular_normalizers'): + s=d['stage'];o,e=d['support'];w=e-o;sc=d['scalar'];key=(s,o,w,sc,d['chart_program']);assert key not in normalizer_ids and d['id']==count + orig=list(range(20*s,20*s+w));target=list(range(o,e));p=dict(zip(orig+[x for x in range(100)if x not in orig],target+[x for x in range(100)if x not in target]));pi=[p[x]for x in range(100)] + assert d['permutation']==pi and d['rank']==w and 1<=sc<=25 and d['paid_factor_bound']==599 + outside=next(j for j in range(100)if not 20*s<=j<20*(s+1));assert d['unit_column_witness']==[pi[outside],sc] + assert d['inverse_chart_window']==[20*s,20*(s+1)] and d['formula']=='N = scalar * Pi * embed_stage(B_inverse)' + normalizer_ids[key]=4801+d['id'];count+=1 +spaces=np.frombuffer(gzip.decompress((EMIT/'all-namespaces.i32.gz').read_bytes()),dtype='=960)])*960+i%960,0 if s==0 else 1+s*960+i%960)) + for r in roles: + b,o,w,sc=assign[r,t];want.append((230400+s*85575+b,normalizer_ids[s,o,w,sc,chart.get(r,-1)])) + want.append((658275,-1));assert np.array_equal(a,np.array(want,dtype='1 else (49,11) +assert SPLIT == (49,11) +OUT=HERE/('split_'+str(SPLIT[0])+'_'+str(SPLIT[1]));OUT.mkdir(exist_ok=True) +N=100;rng=np.random.default_rng(771292);I=np.eye(N,dtype=np.int64);C=I[:,::-1];Z=np.zeros((N,N),dtype=np.int64) +def mm(A,B,M):return (A@B)%M +def inv(A,M,p): + n=len(A);a=np.concatenate((A%M,np.eye(n,dtype=np.int64)),axis=1) + for j in range(n): + k=next((k for k in range(j,n)if int(a[k,j])%p),None) + if k is None:return None + a[[j,k]]=a[[k,j]];a[j]=a[j]*pow(int(a[j,j]),-1,M)%M + q=a[:,j].copy();q[j]=0;a=(a-q[:,None]*a[j][None,:])%M + assert np.array_equal(a[:,:n],np.eye(n,dtype=np.int64));return a[:,n:] +def edge(P,A,AI,M):return np.block([[(I-mm(mm(A,P,M),AI,M))%M,mm(mm(A,P,M),C,M)],[mm(mm(C,P,M),AI,M),(I-mm(mm(C,P,M),C,M))%M]]) +def lower(X,r,M,p): + X=X.copy();L=I.copy();R=I.copy();piv=[] + for j in range(r): + k=N-1-j;a=int(X[j,k]) + if a%p==0:return None + ai=pow(a,-1,M);piv.append(a) + q=X[:,k]*ai%M;q[:j+1]=0 + X=(X-q[:,None]*X[j][None,:])%M;L=(L-q[:,None]*L[j][None,:])%M + q=X[j]*ai%M;q[k:]=0 + X=(X-X[:,k,None]*q[None,:])%M;R=(R-R[:,k,None]*q[None,:])%M + target=np.zeros_like(X) + for j,a in enumerate(piv):target[j,N-1-j]=a + assert np.array_equal(X,target) + assert np.array_equal(np.diag(L),np.ones(N)) and np.array_equal(np.diag(R),np.ones(N)) + assert not np.any(np.triu(L,1)) and not np.any(np.triu(R,1)) + return L,R,piv +results=[] +for p,w in [(101,1),(101,2)]: + M=p**w + for offset,r in [(40,SPLIT[0]),(40+SPLIT[0],SPLIT[1])]: + P0=Z.copy();P0[np.arange(offset,offset+r),np.arange(offset,offset+r)]=1 + for attempt in range(20): + h=rng.integers(0,M,(N,N),dtype=np.int64);hi=inv(h,M,p) + if hi is None:continue + P=mm(mm(h,P0,M),hi,M);a=rng.integers(1,M,N,dtype=np.int64) + a[a%p==0]=1;A=np.diag(a);AI=np.diag([pow(int(x),-1,M)for x in a]) + G=edge(P,A,AI,M);data=lower(G[:N,N:],r,M,p) + if data is not None:break + else:raise AssertionError('Failed to draw generic class') + assert np.array_equal(mm(P,P,M),P) + assert np.array_equal(mm(G,G,M),np.eye(2*N,dtype=np.int64)) + L,R,d=data;Li=inv(L,M,p);Ri=inv(R,M,p) + T=np.block([[L,Z],[Z,Ri]]);Ti=np.block([[Li,Z],[Z,R]]) + g=mm(mm(T,G,M),Ti,M);diff=(g-np.eye(2*N,dtype=np.int64))%M + E=I[:,:r];F0=I[:,::-1][:,:r];D=np.diag(d);Di=np.diag([pow(x,-1,M)for x in d]) + A0=diff[:r,:N];B=mm(diff[N:,N+np.arange(N-1,N-r-1,-1)],Di,M) + U=np.concatenate((E,B),axis=0);V=np.concatenate((A0,mm(D,F0.T,M)),axis=1) + assert np.array_equal(mm(U,V,M),diff) + assert np.array_equal(mm(V,U,M),(-2*np.eye(r,dtype=np.int64))%M) + K=(-mm((B+mm(F0,Di,M))%M,E.T,M)+mm(mm(mm(F0,Di,M),A0,M),(I-mm(E,E.T,M))%M,M))%M + assert np.array_equal(mm(K,E,M),(-B-mm(F0,Di,M))%M) + assert np.array_equal(mm(mm(D,F0.T,M),K,M),(A0+E.T)%M) + S=np.block([[I,Z],[K,I]]);Si=np.block([[I,Z],[(-K)%M,I]]) + target=np.block([[(I-mm(E,E.T,M))%M,mm(mm(E,D,M),F0.T,M)],[mm(mm(F0,Di,M),E.T,M),(I-mm(F0,F0.T,M))%M]]) + assert np.array_equal(mm(mm(S,g,M),Si,M),target) + assert not np.array_equal(mm(S,g,M),target),'Omitting inverse lower wrapper must fail' + results.append({'prime':p,'w':w,'ring_modulus':M,'rank':r,'support':[offset,offset+r],'generic_draw':attempt+1,'all_columns_checked':200,'unit_lower_row_and_column_adapters':True,'factorization_g_minus_I':True,'VU_minus2I':True,'K_identities':True,'one_weighted_reversed_child_exact':True,'omitted_wrapper_rejected':True}) + # A common arbitrary h,A conjugates the complete partition, including dirty + # real coordinates and both paid complement blocks. + product=np.eye(2*N,dtype=np.int64) + for offset,r in [(0,20),(20,20),(40,SPLIT[0]),(40+SPLIT[0],SPLIT[1])]: + P0=Z.copy();P0[np.arange(offset,offset+r),np.arange(offset,offset+r)]=1 + P=mm(mm(h,P0,M),hi,M);product=mm(edge(P,A,AI,M),product,M) + full=edge(I,A,AI,M);assert np.array_equal(product,full) + assert np.array_equal(mm(product,product,M),np.eye(2*N,dtype=np.int64)) + results.append({'prime':p,'w':w,'common_GL_and_weight_chart_endpoint_all_columns':200,'arbitrary_dirty_full_rank':True,'inverse_all_columns':True}) +# Explicit local-ring bad profile: a nonzero nonunit cannot be inverted, but +# the full involution still has unit Gaussian pivots as the retained fallback requires. +p=101;M=p*p;h=I.copy();h[0,40]=1;h[40,0]=p;h[40,40]=1+p +hi=inv(h,M,p);P0=Z.copy();P0[40:82,40:82]=np.eye(42,dtype=np.int64);P=mm(mm(h,P0,M),hi,M) +assert P[0,0] and P[0,0]%p==0 +G=edge(P,I,I,M);assert lower(G[:N,N:],42,M,p) is None +Gi=inv(G,M,p);assert Gi is not None and np.array_equal(Gi,G) +results.append({'bad_local_ring_nonzero_nonunit':int(P[0,0]),'generic_branch_rejected':True,'full_unit_pivot_fallback_inversion':True,'ring_modulus':M}) +out={'status':'PASS_INDEPENDENT_GENERIC_LOWERING_AND_LOCAL_RING_CONTROLS','split':list(SPLIT),'checker_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'tests':results,'scope':'Finite all-column algebra checks plus explicit nonunit fallback control; universal compiler and common-chart hypotheses remain inherited.'} +(OUT/'GENERIC-RESULT.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/bank/check_paid_completion.py b/research/gen5b-shared-kernels/p10-paid-completion892/bank/check_paid_completion.py new file mode 100644 index 0000000000..af8defb883 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/bank/check_paid_completion.py @@ -0,0 +1,274 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import support as _portable +_portable.require_assertions() +"""Independent paid-complement review. Only stdlib and numpy are executed. +Pinned upstream sources and all earlier receipts are inert inputs, not imports. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from fractions import Fraction as F +from collections import Counter,defaultdict +from functools import lru_cache +from math import gcd,lcm +import json,gzip,hashlib,struct,sys +if not __debug__: raise RuntimeError('Assertions required') +HERE=_portable.BANK +SPLIT=tuple(map(int,sys.argv[1].split(',')))if len(sys.argv)>1 else (49,11) +assert SPLIT == (49,11) +OUT=HERE/('split_'+str(SPLIT[0])+'_'+str(SPLIT[1]));OUT.mkdir(exist_ok=True) +BASE=_portable.BASE_OUTPUT +CAND=_portable.WORD +PRIOR=_portable.BASE_OUTPUT/"finite" +ADMISSION=_portable.HERE/"admission" +HEAD='1b37957d1520c80b6ea796bf418e52be5109c2d4' +WORD_SHA='25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739' +def digest(b): return hashlib.sha256(b).hexdigest() +def read(p): return json.loads(Path(p).read_text()) +manifest=read(_portable.INPUT_MANIFEST);assert manifest['head']==HEAD +sources={} +@lru_cache(None) +def src(name): + r=next(r for r in manifest['files'] if r['path']==name); raw=(_portable.INPUTS/r['local']).read_bytes() + assert len(raw)==r['bytes'] and digest(raw)==r['sha256'] + assert hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==r['git_blob'] + sources[name]=r['sha256'] + if name.endswith('.gz'):raw=gzip.decompress(raw) + return json.loads(raw) if name.endswith(('.json','.json.gz')) else raw.decode() +for n in ('proof/three-stage-cover-bit.tex','proof/three-stage-cover-rows.tex','bank_check.py','bank_template.py','finite_check.py'):src(n) +word=read(CAND);assert digest(CAND.read_bytes())==WORD_SHA +old=src('bitword/selected/bit/word_p10.json.gz');priorword=read(_portable.BASE_OUTPUT/'matching/word_weighted890.json') +frames={int(k):v for k,v in src('bitword/selected/bit/frames_p10.json.gz')['frames'].items()} +oldroles=sorted(set(range(9120))-{y for x,y in old['pairs']});virtual={1920+i:r for i,r in enumerate(oldroles)} +roles=sorted(set(range(9120))-{y for x,y in word['pairs']});old890roles=sorted(set(range(9120))-{y for x,y in priorword['pairs']}) +assert set(old890roles)-set(roles)=={9101,9103} and not set(roles)-set(old890roles) +sinks=src('sink-selection.json')['sinks'];removed={r['role'] for r in sinks};assert all(virtual[r['stream']]==r['role'] for r in sinks) +roles=sorted(set(roles)-removed);assert len(roles)==8221 +entrance={r:None for r in roles};end={r:None for r in roles} +for g in word['gauges']: + if g['role'] in entrance: entrance[g['role']]=frames[g['frame']] +kernels=src('kernel-selection.json')['families'];assert len(kernels)==1047 +for row in kernels: + r=virtual[row['pivot']];assert r in entrance and entrance[r] is None + entrance[r]={'dim':row['rank'],'b':row['basis']} +for row in src('restore-selection.json')['entries']: + r=virtual[row['helper']]; assert r in entrance and entrance[r]['dim']==row['dims'][0] and end[r] is None + end[r]={'dim':row['rank'],'b':row['basis']} +widths={r:(20 if end[r] is None else end[r]['dim'])-(0 if entrance[r] is None else entrance[r]['dim']) for r in roles} +expected={3:308,4:960,6:1,7:1,10:6,12:3,13:1,15:3,16:5,18:20,19:1007,20:5906} +assert Counter(widths.values())==expected + +def rref(a,n=20): + a=[list(map(F,row)) for row in a];piv=[];i=0 + for j in range(n): + k=next((k for k in range(i,len(a)) if a[k][j]),None) + if k is None:continue + a[i],a[k]=a[k],a[i];q=a[i][j];a[i]=[x/q for x in a[i]] + for k in range(len(a)): + if k!=i and a[k][j]: + q=a[k][j];a[k]=[x-q*y for x,y in zip(a[k],a[i])] + piv.append(j);i+=1 + if i==len(a):break + return a,piv + +def null(a,n=20): + a,piv=rref(a,n);out=[] + for j in range(n): + if j in piv:continue + v=[F(int(k==j)) for k in range(n)] + for i,p in enumerate(piv):v[p]=-a[i][j] + z=lcm(*(x.denominator for x in v));v=[int(x*z) for x in v];g=gcd(*v);out.append([x//g for x in v]) + return out + +def key(frame):return None if frame is None else json.dumps(frame,sort_keys=True) +@lru_cache(None) +def frame_parts(k): + if k is None:return [],[[int(i==j) for j in range(20)] for i in range(20)] + f=json.loads(k);b=f.get('b');a=f.get('a') + if b is None:b=null(a) + if a is None:a=null(b) + assert len(b)==f['dim'] and len(a)==20-f['dim'] + assert all(sum(x*y for x,y in zip(u,v))==0 for u in a for v in b) + return b,a + +def prod(A,B): + BT=list(zip(*B));return [[sum(x*y for x,y in zip(a,b)) for b in BT] for a in A] +def gram(a,b):return 9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b) +def check_chart(program,D,E): + cols=[[F(x) for x in row] for row in program['basis_columns']];inv=[[F(x) for x in row] for row in program['inverse']] + d=0 if D is None else D['dim'];e=20 if E is None else E['dim'];r=e-d + assert program['rank']==r and len(cols)==20 + DB,DA=frame_parts(key(D));EB,EA=frame_parts(key(E)) if E is not None else ([[int(i==j) for j in range(20)]for i in range(20)],[]) + residual=cols[:r];source=cols[r:r+d];outside=cols[r+d:] + assert all(sum(x*y for x,y in zip(a,b))==0 for a in EA for b in residual+source) + assert all(sum(x*y for x,y in zip(a,b))==0 for a in DA for b in source) + assert all(gram(a,b)==0 for a in residual for b in DB) + assert all(gram(a,b)==0 for a in outside for b in EB) + B=list(map(list,zip(*cols)));q=lcm(*(x.denominator for row in B+inv for x in row)) + Bi=[[int(x*q)for x in row]for row in B];Ii=[[int(x*q)for x in row]for row in inv] + target=[[q*q*int(i==j)for j in range(20)]for i in range(20)] + assert prod(Bi,Ii)==target and prod(Ii,Bi)==target + # Independently execute only the supplied inert elementary factor list. + replay=[row[:]for row in B] + for op,i,j,q in program['factors']: + q=F(q) if q is not None else None + if op=='swap':replay[i],replay[j]=replay[j],replay[i] + elif op=='scale':replay[i]=[q*x for x in replay[i]] + else:assert op=='add';replay[i]=[x+q*y for x,y in zip(replay[i],replay[j])] + assert replay==[[int(i==j)for j in range(20)]for i in range(20)] + assert len(program['factors'])<=400 + assert max([abs(F(q).numerator) for op,i,j,q in program['factors'] if q is not None]+[1])<2**80 + assert max([F(q).denominator for op,i,j,q in program['factors'] if q is not None]+[1])<2**80 + return r + +charts=json.loads(gzip.decompress((PRIOR/'endpoint-charts.json.gz').read_bytes())) +programs={p['program_id']:p for p in charts['factor_programs']};uses={x['role']:x for x in charts['role_uses']};seen=set();chart_uses=0 +for r in roles: + if entrance[r] is None: assert end[r] is None and widths[r]==20;continue + u=uses[r];p=programs[u['program_id']];assert u['rank']==widths[r] + checkkey=(u['program_id'],key(entrance[r]),key(end[r])) + if checkkey not in seen:check_chart(p,entrance[r],end[r]);seen.add(checkkey) + chart_uses+=1 +assert chart_uses==2315 +print('Charts independently validated:',len(seen),'uses:',chart_uses,flush=True) +# Source-bound candidate table, using only the candidate's proposed pattern text. +proposal=read(_portable.HERE/'witnesses/packing.json') +patterns=proposal['packing_patterns'];queues={w:iter([(r,t)for r in roles if widths[r]==w for t in range(60)]) for w in expected} +enc=bytearray();comp=bytearray();used=set();bank=0;pattern_checks=[];normalizer_checks=[] +full=list(range(199,99,-1))+list(range(99,-1,-1)) +def apply(blocks): + state=list(range(200)) + for start,width in blocks: + for j in range(start,start+width):state[j],state[199-j]=state[199-j],state[j] + return state +for pno,p in enumerate(patterns): + ws=p['widths'];cw=list(SPLIT)if p.get('paid_complement_widths')else [];assert sum(ws)+sum(cw)==100 + assert not cw or (ws==[20,20] and tuple(cw)==SPLIT and p['count']==1) + blocks=[];off=0 + for w in ws+cw:blocks.append((off,w));off+=w + assert apply(blocks)==full and apply(blocks+blocks[::-1])==list(range(200)) + assert apply(blocks[:-1])!=full and apply(blocks+blocks[:1])!=full + pattern_checks.append({'pattern':pno,'columns':200,'reversal_C100':True,'omitted_and_repeated_rejected':True}) + for stage in range(5): + outside=next(x for x in range(100)if not 20*stage<=x<20*(stage+1));witness=[] + for b,(start,w) in enumerate(blocks[:len(ws)]): + active=list(range(20*stage,20*stage+w));target=list(range(start,start+w)) + S=active+[x for x in range(100)if x not in active];T=target+[x for x in range(100)if x not in target] + pi=dict(zip(S,T));assert sorted(pi.values())==list(range(100));witness.append((pi[outside],b+1)) + assert len(set(witness))==len(ws) + normalizer_checks.append((stage,pno,len(witness))) + for _ in range(p['count']): + off=0 + for b,w in enumerate(ws): + r,t=next(queues[w]);assert (r,t)not in used;used.add((r,t));enc.extend(struct.pack('>IIIIII',r,t,bank,off,w,b+1));off+=w + for w in cw:comp.extend(struct.pack('>III',bank,off,w));off+=w + assert off==100;bank+=1 +assert bank==85575 and used=={(r,t)for r in roles for t in range(60)} +assert all(next(it,None)is None for it in queues.values()) +regularrows=list(struct.iter_unpack('>IIIIII',enc));comprows=list(struct.iter_unpack('>III',comp));assert len(comprows)==2 +S=230400+5*bank;assert S==658275 +allhash=hashlib.sha256();comp_addresses=[] +for stage in range(5): + slots=bytearray(bank*100) + for r,t,b,off,w,scalar in regularrows: + assert 1<=scalar<=25 and not any(slots[b*100+off:b*100+off+w]);slots[b*100+off:b*100+off+w]=bytes([1])*w + address=230400+stage*bank+b;assert 230400+stage*bank<=address<230400+(stage+1)*bank + allhash.update(struct.pack('>IIIIIII',stage,r,t,address,off,w,scalar)) + for b,off,w in comprows: + assert not any(slots[b*100+off:b*100+off+w]);slots[b*100+off:b*100+off+w]=bytes([2])*w + comp_addresses.append({'stage':stage,'family':230400+stage*bank+b,'offset':off,'rank':w,'cover':'all GL_100(Z/q^w)','phase':'after 60 helper sweeps; before stage boundary'}) + assert slots.count(0)==0 and slots.count(2)==60 +print('Literal real assignments:',len(used)*5,'completion children:',len(comp_addresses),flush=True) +with gzip.GzipFile(filename=str(OUT/'literal-assignments.bin.gz'),mode='wb',mtime=0)as z:z.write(enc) +# No dense transformation is executed. Permutations supply fixed algebraic +# witness charts for each added projector; actual children use the generic compiler. +complement=[] +for offset,r in [(40,SPLIT[0]),(40+SPLIT[0],SPLIT[1])]: + support=list(range(offset,offset+r));target=list(range(r));pi=dict(zip(support+[x for x in range(100)if x not in support],target+[x for x in range(100)if x not in target])) + assert sorted(pi.values())==list(range(100));assert {pi[x]for x in support}==set(range(r)) + # Canonical projector has northeast cross-block minors 1 in reversed order. + # This is an integral generic witness at every prime, denominator 1. + for k in range(1,r+1):assert all(int(i==j)==int(pi[support[i]]==j)for i in range(k)for j in range(k)) + assert r<50 + permutation=[pi[x]for x in range(100)];work=list(range(100));swaps=[] + for i,t in enumerate(permutation): + if work[i]!=t: + j=work.index(t);work[i],work[j]=work[j],work[i];swaps.append((i,j)) + assert work==permutation and len(swaps)<=99 + # The list above is RIGHT-COLUMN updates M <- M*T. Chronological action + # on coordinate column vectors is the REVERSE list for the displayed pi. + def act_coordinate_swaps(sequence): + images=list(range(100)) + for i,j in sequence:images=[j if x==i else i if x==j else x for x in images] + return images + chronological=list(reversed(swaps));assert act_coordinate_swaps(chronological)==permutation + inverse_pi=[permutation.index(i)for i in range(100)] + assert act_coordinate_swaps(swaps)==inverse_pi + assert act_coordinate_swaps(chronological+swaps)==list(range(100)) + assert permutation!=inverse_pi and act_coordinate_swaps(swaps)!=permutation + complement.append({'permutation_factor_count':len(swaps),'permutation_transpositions':swaps,'permutation_transpositions_encoding':'right-column updates M<-M*T, not chronological vector action','chronological_coordinate_transpositions':chronological,'chronological_inverse_transpositions':swaps,'both_coordinate_actions_exact':True,'unreversed_action_rejected':True,'normalizer_scalar_factors':0,'normalizer_denominators':[1],'offset':offset,'rank':r,'split_idempotent':True,'determinant_of_involution':(-1)**r,'generic_witness_permutation':[pi[x]for x in range(100)],'every_required_NE_minor':1,'no_new_prime_exclusions':True,'child_index_rule':f'A_child[k*f+j]=A[i_k*f+j]*D_P[k], 0<=k<{r}, 0<=j0 +out={'status':'PASS_BANK_COMPLETION_AND_COMPILER_COMPATIBILITY_WITH_BOUND_892_SOURCE_RECEIPTS','head':HEAD,'word_sha256':WORD_SHA,'split':list(SPLIT),'physical_admission':False,'all_size_theorem':False,'source_hashes':sources,'checker_sha256':digest(Path(__file__).read_bytes()),'endpoints':{'actual_chart_checks':len(seen),'nontrivial_role_uses':chart_uses,'identity_role_uses':len(roles)-chart_uses,'all_actual_endpoint_charts_verified':True,'prior_chart_data_sha256':digest((PRIOR/'endpoint-charts.json.gz').read_bytes()),'chart_data_recomputed_as_exact_algebra':True,'normalizer_factor_bound':599,'complement_projectors':complement,'patterns':pattern_checks},'bank_addresses':{'roles':len(roles),'real_assignments_per_stage':len(used),'real_assignments_total':5*len(used),'banks_per_stage':bank,'all_100_coordinates_exactly_once':True,'stage_ranges_disjoint':True,'normalizer_distinctness_witnesses':len(normalizer_checks),'assignment_sha256':digest(enc),'five_stage_assignment_sha256':allhash.hexdigest(),'complement_addresses':comp_addresses},'literal_profile':{'stock':S,'children':E,'rank_mass':mass,'deficit':100*S-mass,'histogram':dict(sorted(H.items())),'rational_normalization_is_arithmetic_only':True},'finite_invoice':{'source_scalar_bound_is_conditional':False,'fresh_scalar_receipt_sha256':digest(scalar_path.read_bytes()),'source_admission_receipt_hashes':admission_binding,'source_admission_summary_sha256':digest(summary_path.read_bytes()),'payload_prefix_bound':payload,'payload_bits':payload.bit_length(),'forward_norm':132143,'inverse_norm':1307556,'scalar_units_bound':338173,'route_families':J,'selector_calls':K,'terms':terms,'coefficient':sum(terms.values()),'fallback_per_edge':320000,'actual_gaussian_fallback_bound':fallback,'fallback_charged_for_all_children':True,'linear_gap':str(linear),'row_stock_integer':True,'stock_plus_temporaries_less_than_prime':True,'row_reserve_coefficient':10001,'halving_degree':1,'new_temporary_roles':0},'not_established':['binding actual scalar/route/lowering output to this extended schedule','global physical/all-size admission; exact root and47slack arithmetic are provided separately in ARITHMETIC-RESULT.json'],'scope':'A new explicit paid completion phase fits the retained conditional generic compiler. Does not claim the unchanged upstream BankLowerer accepts partial patterns or rank-over20 local helpers.'} +(OUT/'RESULT.json').write_text(json.dumps(out,indent=2)+'\n') +print(json.dumps({k:out[k]for k in ('status','literal_profile','finite_invoice')},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/bank/check_phase_plan.py b/research/gen5b-shared-kernels/p10-paid-completion892/bank/check_phase_plan.py new file mode 100644 index 0000000000..92c39de3bf --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/bank/check_phase_plan.py @@ -0,0 +1,55 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import support +support.require_assertions() +"""Independent exact phase-plan specification, not a raw compiler admission. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +import json,hashlib,copy +if not __debug__:raise RuntimeError('Assertions required') +HERE=support.BANK + +def plan(split): + phases=[] + for s in range(5): + phases.extend({'kind':'helper','stage':s,'replica':t,'cover':'all_GL_classes'}for t in range(60)) + off=40 + for r in split: + phases.append({'kind':'paid_bank_completion','stage':s,'family':230400+(s+1)*85575-1,'rank':r,'coordinate_interval':[off,off+r],'cover':'all_GL_classes','projector':'g*diag(interval)*g^-1','weighted_by':'existing_common_ancestor_chart','high_fibers':'batched','row_restoration':'inherited_completed_child_contract'});off+=r + if s in [1,2,4]: + b={1:0,2:1,4:2}[s] + for t in range(60): + phases.extend([{'kind':'idle','stage':s,'which':b,'replica':t,'cover':'all_GL_classes'},{'kind':'bridge','stage':s,'which':b,'replica':t,'cover':'all_GL_classes'}]) + phases.extend({'kind':'terminal_exchange','replica':t,'cover':'all_GL_classes'}for t in range(60)) + return phases + +def validate(phases,split): + assert phases==plan(split),'Exact stage-major order and literals required' + assert len(phases)==730 + for s in range(5): + helpers=[i for i,p in enumerate(phases)if p['kind']=='helper'and p['stage']==s] + cs=[i for i,p in enumerate(phases)if p['kind']=='paid_bank_completion'and p['stage']==s] + assert len(helpers)==60 and len(cs)==2 and max(helpers)=1;k=0 + while x>2:x/=2;k+=1 + a,b=lnsmall(x);c,d=lnsmall(Q(2));return a+k*c,b+k*d +def expbounds(x): + assert 0<=x0 + L=max(1,ceilq(36/delta**2),ceilq(2*(4+(finite_coefficient-1).bit_length())/delta)) + assert L*delta**2>=36 and L*delta>=2*(4+(finite_coefficient-1).bit_length()) + cutoffs.append({'stage':j+1,'gaps':{k:str(v)for k,v in gaps.items()},'cutoff_log2_charged_coefficient':str(L),'full_cutoff_requires_primitive_and_old_leaf_constants':True});chain.append(a) + a=chain[-1];tau=1-a;sigma=1-b;q=a*(1-2*eta);lp=1-q;lam=(tau+lp)/2;c=q+eta/4;eps=(1-eta)/(1+q);G=eps*q;r=(G+1-eps)/2;delta=eta/8 + internal=tau+(1-beta)*max(sigma-tau,Q(0));leaf=sigma+beta*(1-sigma) + margins={'balanced_prefix':1-eps,'coordinate_movement':a,'compact_phase_layer':G,'bulk_exposure':a,'Gaussian_arithmetic':min(1-eps-delta,r-delta),'scalar_work':1-eps-delta,'dimension':eps} + k=Q(ceilq(min(margins.values())*GRID)-1,GRID) + # Direct independent transcription of the immutable outer.py displayed equations. + slacks={'bit_positive':a,'complex_above_bit':b-a,'complex_below_one_over32':Q(1,32)-b,'beta_positive':beta,'beta_below_one':1-beta,'leaf_saving_above_bit':(1-beta)*b-a, + 'q_positive':q,'q_below_internal':1-internal-q,'q_below_leaf':1-leaf-q,'c_positive':c,'c_below_one':1-c,'q_below_reservations':c-q, + 'lambda_above_tau':lam-tau,'lambda_above_sigma':lam-sigma,'lambda_above_internal':lam-internal,'lambda_prime_above_lambda':lp-lam,'compact_leaf':lp-leaf,'compact_reservations':lp-(1-c),'lambda_prime_below_one':q, + 'epsilon_positive':eps,'epsilon_below_one':1-eps,'guard_width':1-eps,'K_geometry':1-eps*(1+c),'K_dominates_log':eps*c,'record_suffix':1-eps,'phase_local':1-eps-delta,'phase_boundary':r-delta,'gamma_sublinear':1-eps-r,'cell_above_band':eps-(1-r)/2,'prime_interval_packing':1-eps, + 'alpha_positive':r,'alpha_below_one':1-r,'alpha_below_one_fourth':Q(1,4)-r,'delta_positive':delta,'delta_below_one_eighth':Q(1,8)-delta,'short_record_fallback':eps-a,'small_field_exposure':1-eps-G,'artificial_boundary':8-eps+r-delta-G, + 'literal_scalar_guard':Q(1),'row_product_gap':Q(10**6)-Q(51*20161,25)} + slacks.update({name+'_above_kappa':val-k for name,val in margins.items()}) + assert len(slacks)==47 and all(x>0 for x in slacks.values()) + assert min(margins.values())==G and margins['balanced_prefix']-G==eta + assert slacks['gamma_sublinear']==eta/2 and slacks['K_geometry']==eta*(1-eps/4) + assert slacks['q_below_internal']==2*a*eta and slacks['q_below_leaf']==(1-beta)*b-a+2*a*eta + assert slacks['small_field_exposure']==eta + rejected=[name+'_above_kappa' for name,val in margins.items()if val<=k+Q(1,GRID)] + assert rejected==['compact_phase_layer_above_kappa'] + return {'coarse_bit':str(root),'coarse_complex':str(b),'complex_leaf_cap':str(cap),'binding':'bit','bootstrap_chain':list(map(str,chain)),'bootstrap_cutoffs':cutoffs,'backoff':str(eta),'beta':str(beta),'all_47_strict_slacks':{n:str(v)for n,v in slacks.items()},'seven_margins':{n:str(v)for n,v in margins.items()},'kappa':str(k),'kappa_decimal':dec(k),'adjacent_kappa_rejected':rejected} +rows=[] +for split in [(49,11)]: + d=HERE/f'split_{split[0]}_{split[1]}';source=d/'RESULT.json';data=json.loads(source.read_text());assert data['split']==list(split) + H={int(r):n for r,n in data['literal_profile']['histogram'].items()};S=data['literal_profile']['stock'];assert max(H)==max(42,*split)<50 + cert=bracket(H,S);a=assemble(Q(cert['lower']),data['finite_invoice']['coefficient']) + linear=moment(H,S,Q(0));assert linear[1]<1 + result={'status':'PASS_EXACT_LITERAL_MOMENT_AND_47_INEQUALITIES','split':list(split),'source_result_sha256':hashlib.sha256(source.read_bytes()).hexdigest(),'checker_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'inert_source_hashes':sourcehash,'literal_histogram':H,'literal_stock':S,'exact_bracket':cert,'assembly':a,'full_fallback_added':True,'linear_moment':list(map(str,linear)),'scope':'Finite exact arithmetic and assembly under inherited compiler, complex supplier, scalar bridge and row interfaces.'} + (d/'ARITHMETIC-RESULT.json').write_text(json.dumps(result,indent=2)+'\n');rows.append({'split':list(split),'root_lower':cert['lower'],'root_upper':cert['upper'],'kappa':a['kappa'],'kappa_decimal':a['kappa_decimal']}) + print(rows[-1],flush=True) +assert rows[0]['kappa'] == '770003879871513/1000000000000000000' diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/dependencies.json b/research/gen5b-shared-kernels/p10-paid-completion892/dependencies.json new file mode 100644 index 0000000000..85b4307714 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/dependencies.json @@ -0,0 +1,33 @@ +{ + "p10-updated1047/../assembly_arithmetic.py": "f2f6293c31deb579ebbea19eeaa732c07304ce9c2cacd431685e2dd18d4b0d58", + "p10-updated1047/../exact_intervals.py": "c261dd44838d4e36c68768a1023ac859677089464ab121cdb46b30c918679333", + "p10-updated1047/../p10/arithmetic/price_candidate.py": "d9954dd13bb92da8ecbdbf937f438061af2f3afaf65f0fd82cd45d89b1fe4141", + "p10-updated1047/../p10/closure/chart_rational.py": "e36c35be0d3aec9adeeca2b8f038cb4757ea2a0b685b40798d4574695bfe7355", + "p10-updated1047/acquire_inputs.py": "3785d99ff61c5b2ea3c1fe32435eabb1b3604a741307e2e35a6f3ad7d2121085", + "p10-updated1047/admission/admission_config.py": "2aa9f7118e3a8c478c7e4f35cca907aa80ca8a23920185a36c55079cdfd9fbb7", + "p10-updated1047/admission/check_reorder_transport.py": "b8ebb04b93395a7c1b56dd43c292671c8f9a18fc9f13e167f9a9edd9a9abd0aa", + "p10-updated1047/admission/check_scalar_recurrence.py": "e13886e8f07c6a143518453bc9bef482096f33384fd203ef7237edf4f33ab625", + "p10-updated1047/admission/check_target_chronology.py": "7f8f47ed1c79129fb6931103b4ffaa44b1b6489eac30888058d3c7bfb578116a", + "p10-updated1047/admission/check_transport.py": "63f8a8adedd3f98dfbe3b543d3a9a76355ef42e68da1a3e2d87930a16420e7ae", + "p10-updated1047/admission/test_admission.py": "cf0fc0d61130ef9cb97c5e87e347fead55a21b0ff6a7c99e476f894055edb802", + "p10-updated1047/admission/weighted_source_data.py": "959679c6de705b7e4254f8b2406817456c24bea5da36d377441d6f52ee2dafa3", + "p10-updated1047/arithmetic/check_second_moment.py": "06260e2212623a11dc44df950d65e2ec9c6d668afc2c2cd2e5cacf39f4cd0b1c", + "p10-updated1047/arithmetic/price.py": "5d0a6e2c2b6fe57e28e4747c7843dec91eb1a248a5f84b86d554a62e9c244811", + "p10-updated1047/arithmetic/price_candidate.py": "3428fa2ba2c152ab45cad0f7c33062f3add29ac3bf3f8fd5a56f6d105a1f366c", + "p10-updated1047/arithmetic/reproduce_p10.py": "8bfbc14f9e722f5f6df6e5b1e2f7b1e3695bc1c1131c06991deb83d43f1b09c6", + "p10-updated1047/arithmetic/test_arithmetic.py": "2f8368d5b6b43a5e9d709737f7437e925e5d62d587b68e03bd3ff500e0ae3613", + "p10-updated1047/finite/bind_finite.py": "713174ac2610dd099e73c42aed16b06ebeedc2ce7e7db8d8901e2a101b21b75e", + "p10-updated1047/finite/chart_rational.py": "9c14c752e7f1c753a6222082bbd20bae2675414667e46d29262f4b8dd783e6aa", + "p10-updated1047/finite/check_banks.py": "3ce70ec37199fbc4c3ca1654ba205a7478cec74d0ffeb9ac0ca38528d85e1fe0", + "p10-updated1047/finite/check_charts.py": "b5b614d55015b342c6189fc4ce48ea9ad64f3c68e369ff2dd3e35629256088dd", + "p10-updated1047/finite/context.py": "5f258e8adbae3d4c5266bbdefdcd5f50da3badb59732b7674c94f7603fe5e4f8", + "p10-updated1047/finite/test_finite.py": "d303bd40904a07fcf826c6321431d4cf78a91abea7df0a7c83e38d43565a73c4", + "p10-updated1047/inputs.json": "98e5e469faab4230cf791b5777a5b324f1aaf9153c6adf1caedfe4afb45a3c03", + "p10-updated1047/matching/audit_matching.py": "d28076386f90abd3f987a28c32f17744615472929f1fbc81b21852616828936c", + "p10-updated1047/matching/census_matching.py": "f5958a697641ad20f47b4a8389f226fa7fe9e01e6dcd8c4b44e124f24f001dc1", + "p10-updated1047/matching/select_matching.py": "f49c947ee5ee8faaab32b0d5e355b795843f60827919ba32d94f7a1d33f6ded4", + "p10-updated1047/run_checks.py": "ea05a4f809116915fb92798fa3bc552cb81a27321d5dbc468b0836c21d404368", + "p10-updated1047/support.py": "0dcc428a5a7de46c63ddd9c9b620c061f39ec842b80ffe5559d66ffd35172dad", + "p10-updated1047/test_support.py": "06ea6a2cab4d247ff7fe629d034cdbf60e990dd26b34632e7cd8ce463852e56b", + "p10-updated1047/witnesses/weighted890-delta.json": "d29fed68b6e4a611dedcc1857aab8dfd756cd9fb435b00d242faf33bc8807b4d" +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/expected/receipts.json b/research/gen5b-shared-kernels/p10-paid-completion892/expected/receipts.json new file mode 100644 index 0000000000..4631f9a989 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/expected/receipts.json @@ -0,0 +1,132 @@ +{ + "source_head": "1b37957d1520c80b6ea796bf418e52be5109c2d4", + "word_sha256": "25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739", + "receipt_count": 31, + "normalization": "Remove elapsed-time fields and replace only declared absolute roots, including dictionary keys. All remaining receipt fields are checked.", + "receipts": { + "admission/ADMISSION-RESULT.json": { + "sha256": "6dfd9902a1d185c56e573e135c2d647985cc1201ba9b6e5364ab579d8eb75645", + "status": "PASS_WEIGHTED892_NEW1047_FINITE_CONDITIONAL_MATCHING_ADMISSION" + }, + "admission/MANIFEST.json": { + "sha256": "7412ed275b6f37e72ddc8bfe9004e47f5ba06a888142f2380e418793f821f266", + "status": null + }, + "admission/kernel-path-receipts.json": { + "sha256": "297f8ee0e784a9899442e2ae380d09b472025f300f6c59bbba644f6cf491dd72", + "status": null + }, + "admission/rebound-kernel-entries.json": { + "sha256": "900ada93bcbcfa29d927d2bdd2efc21a2035299b306852901858b6440777533f", + "status": null + }, + "admission/rebound-later-selections.json": { + "sha256": "0c4be347295ca2be2b16652a7c69da80d1b4b0d3608ae6e7f6f68c2f25456f1a", + "status": null + }, + "admission/reorder-controls-result.json": { + "sha256": "d87008961ad7617ddee522fc9e8a51260a8ea6c682b503cdfdb90d7770c617fe", + "status": "PASS_ALL133_REORDER_TRACE_MUTATION_CONTROLS" + }, + "admission/reorder-transport-result.json": { + "sha256": "ab769b88a3453fc6cd3c64580d1c4e6012c73ab99e3bad76ca396e2cb1e773eb", + "status": "PASS_ALL133_SEMANTIC_ANCHOR_AND_COMMUTATION_TRACES" + }, + "admission/scalar-recurrence-result.json": { + "sha256": "31c1c491723d2589ecced376217d60afcc067d78978f83414b468e8124ca7f9f", + "status": "PASS_FRESH_WEIGHTED892_ALL1047_SCALAR_RECURRENCE" + }, + "admission/source-target-geometry-result.json": { + "sha256": "3cdd78fc3067cb4ce9001ea9d5171c750fdc0e9470dd45585c4903760dfca9df", + "status": "PASS_ORIGINAL_SOURCE_AND_FINAL_TARGET_SCALAR_FRAME_CHAINS" + }, + "admission/target-chronology-result.json": { + "sha256": "d22d5dbf7564a1332d7e109ffe5fc5bb3bb048b2661c0b199e489173bc14f20e", + "status": "PASS_FRESH_PARTIAL_RAW_PREFIX_AND_ALL120_TARGET_CUTS" + }, + "admission/transport-result.json": { + "sha256": "aae56a3a3be254f9ffec71011c6b749c99a46ba669ec833fb14d9ed650f058c9", + "status": "PASS_EXACT_ALL1047_KERNEL_CONDITIONAL_TRANSPORT" + }, + "admission/virtual-physical-map.json": { + "sha256": "522b56647ca4b73963c3b8ee1593c8e614a851f9c84c03df60c6101d930e66af", + "status": null + }, + "frame/SOURCE-GEOMETRY-CORRECTION.json": { + "sha256": "19ec320178709586a755a37f44ee2d38b573abf39e64634119c4436bb3551f7b", + "status": "PASS_CORRECTED_ALL960_FINAL_DESCENDED_SOURCE_CHAINS" + }, + "bank/split_49_11/RESULT.json": { + "sha256": "55f8dd5d06595f23932c7435400bbffacd47931fda09e7a3ddecb628d39e9563", + "status": "PASS_BANK_COMPLETION_AND_COMPILER_COMPATIBILITY_WITH_BOUND_892_SOURCE_RECEIPTS" + }, + "bank/split_49_11/GENERIC-RESULT.json": { + "sha256": "b4ce95b77fc69dbc3825bb657359c17359cb7c1bf7ad6bc55b65ea79caf3d1e0", + "status": "PASS_INDEPENDENT_GENERIC_LOWERING_AND_LOCAL_RING_CONTROLS" + }, + "bank/split_49_11/LOWERING-PLAN.json": { + "sha256": "2690d89d182773caf6d5063e01ebc467cd7a5efc5e39eb11ab2b469e603b4b1d", + "status": "PASS_EXACT_PROPOSED_PHASE_PLAN_NOT_RAW_WORD_BINDING" + }, + "bank/split_49_11/ARITHMETIC-RESULT.json": { + "sha256": "45df94286f3ecb17d52aa0f0d2a0242dfed16b9341ad4d32f8f4ac89369127c8", + "status": "PASS_EXACT_LITERAL_MOMENT_AND_47_INEQUALITIES" + }, + "lowering/RESULT.json": { + "sha256": "fd8cd5a08fe0f7bb0836bd15afe2c813f5085719e47f704962c05dcd526d8f1e", + "status": "PASS_SOURCE_BOUND_COMPOSITIONAL_PAID_COMPLETION_LOWERING" + }, + "lowering/endpoint.json": { + "sha256": "33a3727d79602a50d9bebb234eef30dd9cf43e6df9e5a9832030c892bbcf2500", + "status": null + }, + "lowering/invoice.json": { + "sha256": "4a21d3fbdbb7edef5d7b84c9397938c18ff727b598a11646589bf0d49f4bc5bf", + "status": null + }, + "lowering/local-scalar-binding.json": { + "sha256": "27fddbbe598ab8a9c2a4756749b28de7bf08755eef36460428822b87b668964f", + "status": null + }, + "lowering/expanded-operand-receipts.json": { + "sha256": "afea234b0436378c2945d578d2f2dd715f54a9c55a0220f1ebe990726792bedf", + "status": null + }, + "audit/AUDIT-RESULT.json": { + "sha256": "f8e7ef1d00a2b59f6b22939ff86d0fac9437fb28e97c6565edae0118cd8dcca3", + "status": "PASS_CONDITIONAL_CONTRACT_ARITHMETIC" + }, + "audit/LOWERING-AUDIT-RESULT.json": { + "sha256": "686bd8216f9467b84cb679a30376b2ddcf850e86e771e4110c9a152e44474212", + "status": "PASS_INDEPENDENT_SCALAR_NAMESPACE_COMPLETION_CONTRACT_AUDIT" + }, + "audit/LOWERING-REVIEW.json": { + "sha256": "07c3df6a3d217476f0f990e767fe737b2e6a36aa5e85b8938d8432351c0638ab", + "status": "PASS_INDEPENDENT_COMPOSITIONAL_LOWERING_REVIEW" + }, + "audit/FINAL-AUDIT.json": { + "sha256": "a576786a2a9a2158f5eb79ea1337e74d56168de3a34b9c0fb7a8eaa761f5b0e5", + "status": "PASS_NEW_PAID_COMPLETION_COMPOSITIONAL_OBLIGATION" + }, + "frame/RESULT.json": { + "sha256": "0a1eb2eaa0cf3c2b5d2288a1af688e58301588797984f5d44f85fcf102ab2b2b", + "status": "PASS_EXPLICIT_LOCAL892_FRAME_WORD" + }, + "frame/VALIDATION.json": { + "sha256": "c591d7de403f2bdf0c350318c9e4dc7665d43e898d1d7b854798545fe9becd21", + "status": "PASS_INDEPENDENT_FULL_LOCAL_RECORD_AND_FRAME_AUDIT" + }, + "full-frame/RESULT.json": { + "sha256": "6899599650c3257360e52eb24efe52f93244cd62657522eb3399ccd504a242d6", + "status": "PASS_COMPLETE_LOCAL_FRAME_TO_PAID_GLOBAL_IR_BINDING" + }, + "audit/LOCAL-AUDIT.json": { + "sha256": "8d94dbd349af1c4b9aa4f06147e4f4200f064fbe62f8fc3fc7f2ed87deabb4b0", + "status": "PASS_INDEPENDENT_COMPLETE_LOCAL_FRAME_AUDIT" + }, + "audit/GLOBAL-AUDIT.json": { + "sha256": "49b44b115d5c2066e74f44e3b33012e6b48553e70980009c8486da08f76178b1", + "status": "PASS_INDEPENDENT_CORRECTED_FULL_FRAME_BINDING" + } + } +} diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/frame/build_local.py b/research/gen5b-shared-kernels/p10-paid-completion892/frame/build_local.py new file mode 100644 index 0000000000..96dbc16925 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/frame/build_local.py @@ -0,0 +1,190 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import support +support.require_assertions() +"""Independent local frame-tagged constructor. Upstream programs are inert. +Uses hash-verified independently authored scalar expansion and exact linear +algebra, with new semantic frame lowering and freshly screened actual reorders. +""" +from pathlib import Path +from collections import Counter,defaultdict +from functools import lru_cache +from fractions import Fraction as Q +import json,hashlib,gzip,sys +P=support.FRAME +ADM=support.HERE/"admission" +support.verify_admission() +m=json.loads((support.ADM/'MANIFEST.json').read_text()) +for z in m['files']: + p=support.admission_artifact(z['path']);assert len(p.read_bytes())==z['bytes']and hashlib.sha256(p.read_bytes()).hexdigest()==z['sha256'],z['path'] +sys.path.insert(0,str(ADM)) +from weighted_source_data import read,verify,HEAD +from admission_config import OVER,OVER_SHA +from check_scalar_recurrence import scalar_word,replay +from check_transport import rr,null,included +if not __debug__:raise RuntimeError('Assertions must be enabled') +def dump(name,d): + raw=(json.dumps(d,separators=(',',':'),sort_keys=True)+'\n').encode();(P/name).write_bytes(gzip.compress(raw,mtime=0)if name.endswith('.gz')else raw) +def run(): + verify();assert hashlib.sha256(OVER.read_bytes()).hexdigest()==OVER_SHA + w=json.loads(OVER.read_text());g=read('graph.json');F={int(k):v for k,v in read('frames.json')['frames'].items()};ks=read('kernel-selection.json');K=read('kchron.json')['entries'];D=read('descent-selection.json')['entries'];R=read('restore-selection.json')['entries'];T=read('target-selection.json')['groups'];S=read('sink-selection.json')['sinks'];Z=read('reorder-selection.json') + ev,n,*_=scalar_word(w,[]);ga={e['role']:e for e in w['gauges']};aliases={b:a for a,b in w['pairs']};regs=sorted(set(range(9120))-set(aliases));sid0={r:1920+i for i,r in enumerate(regs)};sid=lambda r:sid0[aliases.get(r,r)] + desc={(e['scalar'][0],e['scalar'][1]):i for i,e in enumerate(D)};assert len(desc)==480 and all(e['scalar'][2:]==[1,20]for e in D) + restore={(e['helper'],e['donor']):i for i,e in enumerate(R)};target={int(q):j for j,e in enumerate(T)for q in e['dependent']};partners={e['carrier']:e for e in K};sinks={e['stream']:i for i,e in enumerate(S)} + kernels=[dict(pivot=e['a'],donors=[e['b']],basis=e['basis'],rank=e['rank'])for e in ks['pairs']]+[dict(pivot=e['pivot'],donors=e['donors'],basis=e['basis'],rank=e['rank'])for e in ks['families']];kernel={e['pivot']:j for j,e in enumerate(kernels)} + # Bind every old selected physical operand through its virtual representative. + oldword=read('bitword/selected/bit/word_p10.json.gz');oldalias={b:a for a,b in oldword['pairs']};oldregs=sorted(set(range(9120))-set(oldalias));oldinv={1920+j:r for j,r in enumerate(oldregs)} + xlat=lambda s:sid(oldinv[s])if s>=1920 else s + assert set(oldregs)-set(regs)=={9118,9119}and not set(regs)-set(oldregs) + assert all(sid0[r]==s for s,r in oldinv.items()if r in sid0) + selected_ports={s for e in kernels for s in[e['pivot']]+e['donors']}|{e[k]for e in R for k in('helper','donor')}|{e['stream']for e in S} + assert all(xlat(s)==s for s in selected_ports) + oldremoved=sorted(e['stream']for e in S) + def lift(s): + for r in oldremoved: + if r<=s:s+=1 + return s + assert all(xlat(lift(s))==lift(s)for e in Z['moves']for s in e['incidence'][:2]) + binding=dict(old_representatives=len(oldregs),new_representatives=len(regs),removed_representatives=[9118,9119],all_retained_representative_ids_unchanged=True,selected_uncompacted_ports=len(selected_ports),all_selected_kernel_restore_sink_ports_rebound_and_unchanged=True,all266_reorder_ports_rebound_and_unchanged=True) + registry={};framekeys={};infos={} + def fid(key): + if key not in framekeys:framekeys[key]=len(framekeys);registry[framekeys[key]]=key + return framekeys[key] + ZERO=fid(('zero',0));FULL=fid(('frame',w['full_frame'])) + @lru_cache(None) + def info(f): + kind,x=registry[f] + if kind=='zero':return 0,[[int(i==j)for j in range(20)]for i in range(20)],[] + if kind=='frame': + z=F[x];dim=z['dim'];a=z.get('a');b=z.get('b');return dim,a if a is not None else null(b),b + if kind=='cap':return 19,[[3*int(j in g['labels'][x])-1 for j in range(20)]],None + rows={'descent':D[x]['new_basis']if kind=='descent'else None,'restore':R[x]['basis']if kind=='restore'else None,'target':T[x]['close_basis']if kind=='target'else None,'sink':S[x]['root_frame_basis']if kind=='sink'else None,'kernel':kernels[x]['basis']if kind=='kernel'else None,'reorder':Z['moves'][x]['frame_basis']if kind=='reorder'else None}[kind] + assert len(rr(rows)[0])==len(rows);return len(rows),null(rows),rows + @lru_cache(None) + def sub(a,b): + if a==b:return True + da,A,_=info(a);db,B,_=info(b) + return da<=db and included(B,A) + def equal(a,b):return info(a)[0]==info(b)[0]and sub(a,b) + def frame(sem): + k=sem[0] + if k in('plain','center_read','target_setup','sink_setup'):return ZERO + if k in('cleanup','uninject','partner_cleanup','kernel_restore'):return FULL + if k=='inject':return fid(('frame',w['source_frame'][sem[1]])) + if k in('forward','sink_redirect'):return fid(('frame',w['op_frame'][sem[1]if k=='forward'else sem[2]])) + if k=='gauge':return fid(('frame',ga[sem[1]]['frame'])) + if k in('root','center'):return fid(('frame',w['root_frame'][sem[1]])) + if k=='target_restore':return fid(('target',target[sem[1]])) + if k=='partner_setup':return fid(('descent',desc[sem[1],sem[2]])) + if k=='partner_delivery':return fid(('frame',partners[sem[1]]['deliver_frame'])) + if k=='early_restore':return fid(('restore',restore[sem[1],sem[2]])) + if k=='kernel_setup':return fid(('kernel',kernel[sem[1]])) + if k=='sink_restore':return fid(('sink',sinks[sem[1]])) + raise AssertionError(sem) + initial={q:fid(('frame',w['source_frame'][q]))for q in range(960)}|{q:ZERO for q in range(960,1920)}|{sid0[r]:fid(('frame',ga[r]['frame']))if r in ga else ZERO for r in regs} + initial.update({e['pivot']:fid(('kernel',j))for j,e in enumerate(kernels)}) + final={q:FULL for q in initial};final.update({960+q:fid(('cap',q))for q in range(960)});final.update({e['helper']:fid(('restore',j))for j,e in enumerate(R)}) + removed=sorted(e['stream']for e in S) + assert all(not any(a==s or b==s for op,a,b,c,sem in ev)for s in removed) + compact=lambda s:s-sum(xinfo(a)[0]:h[info(b)[0]-info(a)[0]]+=1 + return h + # Independently choose actual semantic anchors with exactly the frozen frame + # and side, rejecting every noncommuting crossing and any nonnested endpoint. + moves={};before=defaultdict(list);after=defaultdict(list);move_receipts=[];allports=set();delta=Counter() + for j,z in enumerate(Z['moves']): + a,b,c=z['incidence'];assert not{a,b}&allports;allports|={a,b} + kinds=lambda e:'forward_gate'if e['semantic'][0]=='forward'else'side_root'if e['semantic'][0]=='root'else e['semantic'][0] + hits=[i for i in incidence[a]if events[i]['op']==1 and[events[i]['a'],events[i]['b'],events[i]['c']]==[a,b,c]and kinds(events[i])==z['category']];assert len(hits)==1;at=hits[0];nf=fid(('reorder',j));assert info(events[at]['frame'])[0]==z['old_frame_rank']and info(nf)[0]==z['frame_rank'] + ports={a,b};candidates=[i for i in sorted(set(incidence[a]+incidence[b]),reverse=z['side']=='after')if events[i]['op']==1 and((i>at)if z['side']=='before'else(ix[2]:H[y[2]-x[2]]+=1 + members[q]+=1;receipts.append(dict(source=q,partner_source=b if q==a else a,chain=frames,retimed_basis_sha256=hashlib.sha256(json.dumps(B,separators=(',',':')).encode()).hexdigest())) +assert members==Counter({q:1 for q in range(960)})and H=={17:960,2:960} +out=dict(status='PASS_CORRECTED_ALL960_FINAL_DESCENDED_SOURCE_CHAINS',head=HEAD,candidate_sha256=OVER_SHA,checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),previous_admission_manifest_sha256=hashlib.sha256((support.ADM/'MANIFEST.json').read_bytes()).hexdigest(),previous_supplementary_receipt_sha256=hashlib.sha256((support.ADM/'source-target-geometry-result.json').read_bytes()).hexdigest(),correction='The previous supplementary checker used original rank2 partner mix frames for source setups. Its source-chain statement is limited to original/pre-descent source chains and must not be described as final post-descent chronology. All core matching, kernel, alias, target, scalar/COPY, norm, and reorder-transport receipts remain unchanged. This receipt independently verifies every actual rank18 descended source setup and all960 final source chains.',source_columns=960,retimed_setups=480,all_actual_descent_frames_rank18=True,all_source_lines_and_integer_setup_spans_contained=True,source_paid_histogram={str(k):v for k,v in sorted(H.items())},source_rank_mass=sum(k*v for k,v in H.items()),receipts=receipts,scope='Exact post-descent source geometry correction. Final target chains in the prior supplementary audit are unaffected by descent. Source setup scalar operands/order and all final source endpoints are unchanged. Global compiler, prime, and all-size conditions are not asserted.',input_manifest_sha256=hashlib.sha256((support.INPUT_MANIFEST).read_bytes()).hexdigest()) +(P/'SOURCE-GEOMETRY-CORRECTION.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps({k:v for k,v in out.items()if k!='receipts'},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/frame/validate_local.py b/research/gen5b-shared-kernels/p10-paid-completion892/frame/validate_local.py new file mode 100644 index 0000000000..a96df30763 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/frame/validate_local.py @@ -0,0 +1,88 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import support +support.require_assertions() +"""Independent exported-record replay, exact containment and frame-rank audit. +All row spaces are cleared to primitive integer bases; modular nonzero ranks +certify rational ranks and nondegeneracy, while orthogonality is exact integer. +""" +from pathlib import Path +from fractions import Fraction +from math import gcd,lcm +from collections import Counter +import hashlib,json,gzip +P=support.FRAME +if not __debug__:raise RuntimeError('Assertions must be enabled') +def read(n): + raw=(P/n).read_bytes();return json.loads(gzip.decompress(raw)if n.endswith('.gz')else raw) +def integer(row): + row=list(map(Fraction,row));den=lcm(*(x.denominator for x in row));out=[int(x*den)for x in row];g=gcd(*out) + return [x//g for x in out]if g else out +MOD=(1<<61)-1 +def rank(rows,width): + a=[[x%MOD for x in row]for row in rows];k=0 + for j in range(width): + p=next((i for i in range(k,len(a))if a[i][j]and gcd(a[i][j],MOD)==1),None) + if p is None:continue + a[k],a[p]=a[p],a[k];inv=pow(a[k][j],-1,MOD);a[k]=[(x*inv)%MOD for x in a[k]] + for i in range(k+1,len(a)): + v=a[i][j] + if v:a[i]=[(x-v*y)%MOD for x,y in zip(a[i],a[k])] + k+=1 + return k +def dot(a,b):return sum(x*y for x,y in zip(a,b)if x and y) +def run(): + result=read('RESULT.json') + assert result['checker_sha256']==hashlib.sha256((support.HERE/'frame/build_local.py').read_bytes()).hexdigest() + for n,h in result['artifacts'].items():assert hashlib.sha256((P/n).read_bytes()).hexdigest()==h,n + endpoint=read('local-endpoints.json');n=endpoint['n'];initial={int(k):v for k,v in endpoint['initial'].items()};final={int(k):v for k,v in endpoint['final'].items()};raw=read('local-records.json.gz');frames=read('local-frames.json.gz') + B={int(k):[integer(row)for row in z['basis']]for k,z in frames.items()};A={int(k):[integer(row)for row in z['annihilator']]for k,z in frames.items()};dim={int(k):z['rank']for k,z in frames.items()} + for f in dim: + b,a,d=B[f],A[f],dim[f];assert len(b)==d and len(a)==20-d + assert rank(b,20)==d and rank(a,20)==20-d + assert all(dot(x,y)==0 for x in a for y in b) + rows,mult=(b,9)if d<=10 else(a,11) + gram=[[mult*dot(x,y)-sum(x)*sum(y)for y in rows]for x in rows] + assert rank(gram,len(rows))==len(rows),('degenerate G frame',f) + print('All',len(dim),'frame bases/annihilators and G-nondegeneracy passed',flush=True) + state=dict(initial);temporary=None;H=Counter();adds=0;units=0;pairs=set();copies=0 + for i,row in enumerate(raw): + assert len(row)==6;op,a,b,c,f,z=row + if op==0: + assert state[a]==b and f==dim[c]-dim[b]>=0 + if(b,c)not in pairs: + assert all(dot(x,y)==0 for x in A[c]for y in B[b]),('nonnested MOVE',i,b,c);pairs.add((b,c)) + state[a]=c + if f:H[f]+=1 + elif op==1: + assert a!=b and c%2 and state[a]==state[b]==f;adds+=1;units+=abs(c) + assert 0<=z=0 + state[a]=c + if f:hist[f]+=1 + elif op==1: + assert a!=b and state[a]==state[b]==f and c%2 + coeff[abs(c)]+=1 + if b==10141:assert tmp is not None;reads+=1 + elif op==2: + assert tmp is None and b==10141 and state[a]==c and rank(c)==18 and rank(f)==0 + state[b]=f;tmp=(a,b,c,f);hist[rank(c)]+=1;reads=0 + else: + assert op==3 and tmp==(a,b,c,f) and state[a]==c and state[b]==f and reads==144 + del state[b];tmp=None + assert state==final and tmp is None + assert hist==Counter({int(k):v for k,v in receipt['one_stage_paid_histogram'].items()}) + assert (sum(hist.values()),sum(r*n for r,n in hist.items()))==(48473,179464) + assert coeff=={1:335293,3:960} and counts[2]==counts[3]==20 and counts[1]==336253 + return hist,counts + +def stage_template(stage,records,frames): + rev=stage in (1,3);out=[] + for index in (range(len(records)-1,-1,-1) if rev else range(len(records))): + row=records[index];op,a,b,c,f,*extra=row;z=extra[0] if extra else 0 + if op==0:out.append([0,a,c if rev else b,b if rev else c,f,0,stage,int(rev),index]) + elif op==1:out.append([1,a,b,-c if rev else c,f,z,stage,int(rev),index]) + elif op==(3 if rev else 2): + out.append([2,b,a,0,c,0,stage,int(rev),index]) + out.append([0,b,c,f,frames[str(c)]['rank'],0,stage,int(rev),index]) + else: + assert op==(2 if rev else 3) + out.append([3,b,-1,0,f,0,stage,int(rev),index]) + return np.asarray(out,dtype='0 + if r not in uses: + assert old['rank']==0 and new['rank']==20 and width==20 + continue + p=programs[uses[r]['program_id']] + assert (p['donor_dimension'],p['recipient_dimension'],p['rank'])==(old['rank'],new['rank'],width) + key=(p['program_id'],initial[str(1920+i)],final[str(1920+i)]) + if key not in seen: + cols=[[F(x) for x in row] for row in p['basis_columns']] + Ao=[[F(x) for x in row] for row in old['annihilator']] + An=[[F(x) for x in row] for row in new['annihilator']] + residual=cols[:width];source=cols[width:width+old['rank']];outside=cols[width+old['rank']:] + assert all(sum(x*y for x,y in zip(a,b))==0 for a in Ao for b in source) + assert all(sum(x*y for x,y in zip(a,b))==0 for a in An for b in residual+source) + assert all(gram(a,b)==0 for a in residual for b in source) + assert all(gram(a,b)==0 for a in outside for b in residual+source) + seen.add(key) + receipts.append([r,p['program_id'],old['rank'],new['rank'],width]) + assert len(receipts)==2315 + dump('actual-endpoint-chart-binding.json',{'uses':receipts,'exact_chart_endpoint_combinations':len(seen), + 'identity_endpoints':5906,'source_frames':'actual final emitted local initial/final frame matrices', + 'inherited_chart_inverse_and_factor_checks':fs(CHART), + 'all_real_endpoint_projectors_equal_assigned_bank_projectors':True}) + return len(seen) + +def main(): + incremental=read(OUT/'RESULT.json');paid=read(PAID/'RESULT.json') + assert incremental['candidate_sha256']==paid['word_sha256']==WORD + receipt=read(LOCAL/'RESULT.json') + local_result_hash=fs(LOCAL/'RESULT.json') + assert receipt['head']==HEAD and receipt['candidate_sha256']==WORD + assert receipt['status']=='PASS_EXPLICIT_LOCAL892_FRAME_WORD' + assert fs(support.HERE/'frame/build_local.py')==receipt['checker_sha256'] + for name,h in receipt['artifacts'].items():assert fs(LOCAL/name)==h + assert receipt['all_integer_operand_source_spans_contained'] and receipt['source_descent_entries']==480 and receipt['moves']==133 + correction=read(LOCAL/'SOURCE-GEOMETRY-CORRECTION.json') + records=read(LOCAL/'local-records.json.gz');frames=read(LOCAL/'local-frames.json.gz');endpoints=read(LOCAL/'local-endpoints.json') + H,localcounts=verify_local(records,frames,endpoints,receipt) + ncharts=endpoint_charts(frames,endpoints) + print('Actual final frame records and exact bank endpoint charts bound',flush=True) + spaces=np.frombuffer(gzip.decompress((OUT/'all-namespaces.i32.gz').read_bytes()),dtype='0),4]) + assert stagehist==H + for ordinal,row in enumerate(template): + op,a,b,c,f,z,stage,rev,raw_index=map(int,row) + if op!=0:continue + signed_rank=(frames[str(c)]['rank']-frames[str(b)]['rank'])*(-1 if rev else 1) + orientation=-1 if a==10141 and not rev else 1 + assert orientation*signed_rank==f + if a==10141: + assert f==18 and frames[str(b)]['rank']==18 and frames[str(c)]['rank']==0 + copy_projectors.append({'stage':s,'template_record':ordinal,'local_source_record':raw_index, + 'family':658275,'route':'external_work0','old_frame':b,'new_frame':c, + 'complement':rev,'rank':18,'difference_orientation':orientation, + 'positive_projector':'F_s(old,0)-F_s(new,0)' if not rev else 'F_s(new,1)-F_s(old,1)', + 'identity':'Both expressions equal embedded P_center. The frame transport is D_P, and D_P^-1=D_P; it is never D_(-P).', + 'primitive':'fresh original-center COPY followed by one positive split-rank 18 child'}) + templatefile=gz(f'stage-{s}-template.i32.gz',template.tobytes());templates.append(templatefile) + for t in range(60): + address=spaces[s,t];data=np.zeros((len(template),12),dtype='0);broken[first][4]+=1 + try:verify_local(broken,frames,endpoints,receipt) + except AssertionError:controls.append('wrong_actual_MOVE_rank') + else:raise AssertionError('rank mutation accepted') + broken=copy.deepcopy(records);first=next(i for i,r in enumerate(broken) if r[0]==1);broken[first][1]=broken[first][2] + try:verify_local(broken,frames,endpoints,receipt) + except AssertionError:controls.append('aliased_actual_ADD_operands') + else:raise AssertionError('alias mutation accepted') + # The formerly implicit forward-COPY direction would be a negative-rank + # difference, not an idempotent. It must fail the positive-rank contract. + forward_copy=next(x for x in copy_projectors if not x['complement']) + assert frames[str(forward_copy['new_frame'])]['rank']-frames[str(forward_copy['old_frame'])]['rank']==-18 + controls.append('blanket_new_minus_old_on_forward_copied_work_rejected') + assert fs(LOCAL/'RESULT.json')==local_result_hash,'local source changed during binding' + assert fs(support.HERE/'frame/build_local.py')==receipt['checker_sha256'] + for name,h in receipt['artifacts'].items():assert fs(LOCAL/name)==h + result={'status':'PASS_COMPLETE_LOCAL_FRAME_TO_PAID_GLOBAL_IR_BINDING','head':HEAD,'candidate_sha256':WORD, + 'local_constructor_sha256':fs(support.HERE/'frame/build_local.py'),'local_result_sha256':fs(LOCAL/'RESULT.json'), + 'source_geometry_correction_sha256':fs(LOCAL/'SOURCE-GEOMETRY-CORRECTION.json'), + 'incremental_result_sha256':fs(OUT/'RESULT.json'),'compiler_sha256':fs(__file__), + 'actual_local_records':len(records),'local_opcodes':dict(localcounts), + 'local_paid_histogram':dict(sorted(H.items())),'literal_global_paid_histogram':dict(sorted(globalhist.items())), + 'literal_stock':658275,'paid_calls':sum(globalhist.values()),'rank_mass':sum(r*n for r,n in globalhist.items()), + 'strict_max_rank':49,'phase_count':len(phases),'concrete_frame_stage_records':sum(x['records'] for x in bindings), + 'exact_actual_endpoint_chart_combinations':ncharts, + 'full_program_binding_sha256':whole.hexdigest(),'added_completion_calls':10, + 'all300_stage_frame_operands_materialized_and_hashed':True, + 'scalar_coefficients_and_COPY_lifetimes_bound':True,'reordered_local_source_frames_explicit':True, + 'actual_local_raw_frame_word_regenerated':True,'production_primitive_compiler_executed':False, + 'copied_work_positive_projector_overrides':100, + 'upstream_production_code_executed':False,'rejected_controls':controls, + 'scope':'Actual independent final local frame word, all 133 explicit screened reorders and 480 descents are bound through all 300 literal namespaces to full global phase IR. Literal child histogram is derived from emitted MOVE/COPY/boundary/completion records. Generic primitive compiler and uniform prime/analytic/all-size contracts remain inherited; the separate finite validator checks every concrete local frame; this is not a full primitive execution or unconditional theorem.', + 'input_artifacts':{name:fs(LOCAL/name) for name in receipt['artifacts']}} + dump('RESULT.json',result) + dump('MANIFEST.json',{p.name:fs(p) for p in sorted(DEST.iterdir()) if p.is_file() and p.name!='MANIFEST.json'}) + print(json.dumps(result,indent=2)) +if __name__=='__main__':main() diff --git a/research/gen5b-shared-kernels/p10-paid-completion892/lowering/lower_incremental.py b/research/gen5b-shared-kernels/p10-paid-completion892/lowering/lower_incremental.py new file mode 100644 index 0000000000..470ee7e0cf --- /dev/null +++ b/research/gen5b-shared-kernels/p10-paid-completion892/lowering/lower_incremental.py @@ -0,0 +1,460 @@ +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import support +support.require_assertions() +"""Independently authored, source-bound paid-completion IR compiler. + +No upstream production Python is imported or executed. The previously +independently authored finite scalar builder is a hash-checked dependency. +The regular frame compiler is an explicitly inherited interface, not replayed +or silently implemented by the scalar projection. Apache-2.0. +Prepared with substantial OpenAI assistance. +""" +from pathlib import Path +from collections import Counter, defaultdict +from functools import lru_cache +import copy, gzip, hashlib, json, struct, sys +import numpy as np + +if not __debug__: + raise RuntimeError('Assertions are mandatory') +HERE=Path(__file__).resolve().parent +OUT=support.LOWER; OUT.mkdir(exist_ok=True) +AD=support.HERE/"admission" +PAID=support.BANK/"split_49_11" +BASE=support.BASE_OUTPUT +CHART=support.BASE_OUTPUT/"finite/endpoint-charts.json.gz" +HEAD='1b37957d1520c80b6ea796bf418e52be5109c2d4' +WORD='25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739' +ADSHA=support.sha(support.ADM/'ADMISSION-RESULT.json') +ACTIVE=((0,1),(1,0),(0,1),(3,2),(2,3)) +M,H,V,T,S,BANKS=100,20,960,60,658275,85575 + +def sha(x): return hashlib.sha256(x).hexdigest() +def file_sha(p): return sha(Path(p).read_bytes()) +def read(p): return json.loads(Path(p).read_text()) +def canonical(x): return json.dumps(x,sort_keys=True,separators=(',',':')).encode() +def dump(name,x): (OUT/name).write_bytes(json.dumps(support.portable(x),indent=2,sort_keys=True).encode()+b'\n') +def gz(name,raw): + with gzip.GzipFile(filename=str(OUT/name),mode='wb',mtime=0) as f: f.write(raw) + return {'file':name,'bytes':len(raw),'sha256':sha(raw),'compressed_sha256':file_sha(OUT/name)} + +def source(name): + row=next(x for x in MANIFEST['files'] if x['path']==name) + raw=(support.INPUTS/row['local']).read_bytes() + assert len(raw)==row['bytes'] and sha(raw)==row['sha256'] + assert hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==row['git_blob'] + SOURCES[name]=row['sha256'] + if name.endswith('.gz'): raw=gzip.decompress(raw) + return json.loads(raw) if name.endswith(('.json','.json.gz')) else raw.decode() + +MANIFEST=read(support.INPUT_MANIFEST); SOURCES={} +assert MANIFEST['head']==HEAD + +def dependencies(): + support.verify_admission() + summary=read(support.ADM/'ADMISSION-RESULT.json') + assert file_sha(support.ADM/'ADMISSION-RESULT.json')==ADSHA + assert summary['head']==HEAD and summary['candidate_sha256']==WORD + assert not summary['old_fixed19_added'] and not summary['upstream_programs_executed'] + for name,digest in summary['artifact_hashes'].items(): assert file_sha(support.admission_artifact(name))==digest + scalar=read(support.ADM/'scalar-recurrence-result.json') + assert file_sha(AD/'check_scalar_recurrence.py')==scalar['checker_sha256'] + for name,digest in scalar['dependency_sha256'].items(): + p=AD/name if name.endswith('.py') else support.ADM/name + assert file_sha(p)==digest + assert file_sha(support.WORD)==WORD + for name in ['bank_template.py','bank_check.py','code/global_lowering.py', + 'proof/three-stage-cover-bit.tex','proof/three-stage-cover-rows.tex', + 'proof/FINITE_BIT_ACCOUNTING.md','finite_check.py']: source(name) + return summary,scalar + +def emit_scalar(scalar): + """Export the actual admitted source operand stream; do not add frames.""" + sys.path.insert(0,str(AD)) + import check_scalar_recurrence as independent_scalar + word=read(support.WORD) + events,n,*_=independent_scalar.scalar_word(word,[]) + for rev in (False,True): + actual=independent_scalar.replay(events,n,rev) + assert canonical(actual)==canonical(scalar['inverse' if rev else 'forward']) + alias={b:a for a,b in word['pairs']} + representatives=sorted(set(range(9120))-set(alias)) + physical={r:1920+i for i,r in enumerate(representatives)} + removed={x['role'] for x in source('sink-selection.json')['sinks']} + roles=[r for r in representatives if r not in removed] + assert len(roles)==8221 and n==10148 + compact={i:i for i in range(1920)} + compact.update({physical[r]:1920+i for i,r in enumerate(roles)}) + compact[n]=10141 + raw=bytearray(); sem=bytearray(); hist=Counter(); copied=[]; center=None + for ordinal,(op,a,b,c,semantic) in enumerate(events): + assert a in compact and b in compact + aa,bb=compact[a],compact[b] + assert aa!=bb + raw.extend(struct.pack('<5i',op,aa,bb,c,ordinal)) + sem.extend(canonical([ordinal,semantic])+b'\n') + hist[op]+=1 + if op==2: assert center is None; center=aa; copied.append(semantic[1]) + elif op==3: assert center==aa; center=None + assert center is None and hist=={1:336253,2:20,3:20} + return word,roles,physical,np.frombuffer(raw,dtype='6I',raw): + assert r in ROLES_SET and 0<=t=960)];port=local%960 + a[local]=((4*t+bank)*960+port,0 if s==0 else 1+s*960+port) + witnesses=defaultdict(list) + for j,r in enumerate(roles): + b,start,w,scalar=assignment[r,t];nid=intern(s,start,w,scalar,chartuse.get(r,-1)) + f=230400+s*BANKS+b;a[1920+j]=(f,4801+nid) + witnesses[f].append(tuple(registry[nid]['unit_column_witness'])) + a[-1]=(S,-1) + assert len(set(map(tuple,a.tolist())))==10142 + assert all(len(set(xs))==len(xs) for xs in witnesses.values()) + assert all(0<=int(x)6I',raw)) +assert len(rows)==486000 and hashlib.sha256(raw).hexdigest()==bank['assignment_sha256'] +seen=set();bankbytes=bytearray(85680*100);last=-1;replicas=set();allstage=hashlib.sha256() +for role,t,b,o,rank,scale in rows: + assert role in width and rank==width[role]and 0<=t<60 and(role,t)not in seen;seen.add((role,t)) + if b!=last:assert b==last+1;last=b;replicas=set() + assert t not in replicas;replicas.add(t) + assert o%rank==0 and scale==o//rank+1 and 0<=o<=100-rank + assert(rank==4 and b<2880)or(rank==20 and b>=2880) + at=b*100+o;assert not any(bankbytes[at:at+rank]);bankbytes[at:at+rank]=b'\1'*rank +assert last==85679 and bankbytes.count(0)==0 and seen=={(r,t)for r in roles for t in range(60)} +for stage in range(5): + for role,t,b,o,rank,scale in rows:allstage.update(struct.pack('>7I',stage,role,t,230400+stage*85680+b,o,rank,scale)) +assert allstage.hexdigest()==bank['five_stage_assignment_sha256'] +# Integer full200-column identities for both actual partition patterns. +for pattern in [[4]*25,[20]*5]: + image=list(range(200));offset=0 + for r in pattern: + for j in range(offset,offset+r):image[j],image[199-j]=image[199-j],image[j] + offset+=r + assert offset==100 and image==list(range(199,-1,-1)) +for z in bank['normalizer_distinctness']: + stage=z['stage'];outside=z['outside'];assert not 20*stage<=outside<20*(stage+1) + pat=bank['patterns'][z['pattern']]['widths'];offset=0;witness=[] + for block,(r,p)in enumerate(zip(pat,z['permutation_programs'])): + pi=p['permutation'];assert sorted(pi)==list(range(100))and pi[20*stage:20*stage+r]==list(range(offset,offset+r)) + images=list(range(100)) + for a,b in p['chronological_coordinate_swaps']:images=[b if j==a else a if j==b else j for j in images] + assert images==pi and len(p['chronological_coordinate_swaps'])<=99 + witness.append([pi[outside],block+1]);offset+=r + assert witness==z['unit_column_witnesses']and len({tuple(x)for x in witness})==len(witness) +assert len(bank['normalizer_distinctness'])==10 +S=230400+5*85680;H=Counter({int(k):300*v for k,v in local['one_stage_paid_histogram'].items()});H.update({r:115200 for r in(4,19,38,42)}) +E=sum(H.values());mass=sum(k*v for k,v in H.items()) +assert H==Counter({int(k):v for k,v in bank['literal_histogram'].items()}) +assert(S,E,mass,max(H),100*S-mass)==(658800,14514000,65757600,42,122400) +assert bank['completion_children']==0 +J=60*(24*960+10*8100);K=600*((S-1)+8100*100*349) +terms={'unit_expanded_additions':60*(5*352560+6*960),'high_affine_factors':J*16*10001**2,'low_transpositions':J*(S+20),'generic_wrappers':E*80008,'matrix_preparation':E*128*200**3,'global_matrix_preparation':16*100**3,'copy_erase_episodes':6000,'paid_child_overhead':E,'bank_selectors':K,'constant':1} +assert terms==bank['terms']and(J,K,sum(terms.values()))==(6242400,170009279400,24857617667871401) +assert S+20<2**80 and K<2**40 and sum(terms.values())<2**80 and 2*max(H)<100 +assert 64*22071**3*959838**2==633930847859769478389778176<2**104 +print('All2430000 assignments, universal bank endpoints and every finite fee passed',flush=True) + +# Retained independently authored exact-interval/47-equation engine. +DEN=10**65 +def rounded(x,upper=False): + z=x*DEN;n=z.numerator//z.denominator + return F(n+int(upper and z.denominator!=1),DEN) +@lru_cache(None) +def log_interval(x): + x=F(x);power=0 + while x>2:x/=2;power+=1 + z=(x-1)/(x+1);t=z;lo=F(0) + for j in range(90):lo+=2*t/F(2*j+1);t*=z*z + hi=lo+2*t/(181*(1-z*z)) + if power: + l2,h2=log_interval(F(2));lo+=power*l2;hi+=power*h2 + return rounded(lo),rounded(hi,True) +def ex(x): + assert 0<=x0 +assert Gkappa + + +result={'status':'PASS_INDEPENDENT_PR325_BANKS_AND_EXACT_PRICE','bank_result_sha256':sha(P/'BANK-RESULT.json'),'price_result_sha256':sha(P/'PRICE-RESULT.json'),'local_frame_result_sha256':sha(L/'RESULT.json'),'checker_sha256':sha(__file__),'new_word_endpoint_charts':120,'chart_actual_factor_max':factor_max,'chart_paid_factor_bound':150,'normalizer_bound':349,'literal_assignments':2430000,'completion_children':0,'stock':S,'calls':E,'rank_mass':mass,'max_rank':max(H),'selector_calls':K,'finite_coefficient':sum(terms.values()),'root_bracket':[str(root),str(upper)],'kappa':str(kappa),'all47exact_slacks_reproduced':True,'adjacent_kappa_rejected':True,'gain_over_published_presink':str(kappa-F(770008089898797,10**18)),'scope':'Fresh literal complete banks, exact original-source endpoint charts, every fee and independent rational price. Global emitted binding remains separate; retained compiler, prime, restored-row, ordinary-leaf, complex and analytic all-size hypotheses remain explicit.'} +(HERE/'BANK-PRICE-AUDIT.json').write_text(json.dumps(contract.portable(result),indent=2)+'\n');print(json.dumps(contract.portable(result),indent=2)) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_chart_units.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_chart_units.py new file mode 100644 index 0000000000..d390e20c04 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_chart_units.py @@ -0,0 +1,51 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_frame_binding() +contract.verify_bank() +"""Audit actual emitted endpoint-chart coefficient units without upstream code.""" +from pathlib import Path +from fractions import Fraction +import gzip, hashlib, json + +if not __debug__: + raise RuntimeError('Assertions must be enabled') +HERE = contract.AUDIT +GLOBAL = contract.GLOBAL +def sha(path): + return hashlib.sha256(Path(path).read_bytes()).hexdigest() +programs = json.loads(gzip.decompress((GLOBAL/'normalizers.json.gz').read_bytes()))['chart_programs'] +assert len(programs) == 120 +values = [] +for program in programs.values(): + for name in ('basis_columns', 'inverse'): + values.extend(Fraction(v) for row in program[name] for v in row) + for kind, first, second, coefficient in program['factors']: + assert kind in ('add', 'scale', 'swap') + if kind != 'swap': + value = Fraction(coefficient) + values.append(value) + if kind == 'scale': + assert value + values.append(1/value) +assert all(abs(v.numerator) < 2**80 and v.denominator < 2**80 for v in values) +assert max(abs(v.numerator) for v in values) == 33 +assert max(v.denominator for v in values) == 198 +# Reject a factor whose nonzero numerator is not a guaranteed retained-prime unit. +assert not (abs(Fraction(2**80 + 1).numerator) < 2**80) +result = { + 'status': 'PASS_FRESH_GLOBAL_CHART_UNIT_BOUNDS', + 'normalizer_sha256': sha(GLOBAL/'normalizers.json.gz'), + 'checker_sha256': sha(__file__), + 'actual_charts': len(programs), + 'maximum_abs_numerator_including_inverse_scales': 33, + 'maximum_denominator': 198, + 'every_nonzero_factor_and_inverse_denominator_below_2pow80': True, + 'out_of_bound_coefficient_rejected': True, + 'scope': 'The 120 actual global endpoint charts and their inverse/factor coefficients are defined at every retained prime above 2^80. This does not certify all other inherited prime interfaces.' +} +(HERE/'GLOBAL-CHART-BOUNDS.json').write_text(json.dumps(result, indent=2)+'\n') +print(json.dumps(result, indent=2)) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_events.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_events.py new file mode 100644 index 0000000000..a235de889f --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_events.py @@ -0,0 +1,156 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_source() +"""Independent source-bound event/retiming/COPY audit; upstream stays inert.""" +from pathlib import Path +from collections import Counter,defaultdict +import gzip,json,hashlib +if not __debug__:raise RuntimeError('Assertions must be enabled') +HERE=contract.AUDIT +P=contract.SOURCE;I=P/'inputs' +def read(p): + p=Path(p);b=p.read_bytes();return json.loads(gzip.decompress(b)if p.suffix=='.gz'else b) +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +w=read(I/'bitword__selected__bit__word_p10.json.gz');g=read(I/'bitword__selected__bit__graph_p10.json') +F=read(I/'bitword__selected__bit__frames_p10.json.gz')['frames'];K=read(I/'bitword__selected__bit__kchron_p10.json')['entries'] +events=read(P/'scalar-events.json.gz');selection=read(P/'retiming-selection.json')['entries'];projection=read(P/'source-events.json.gz') +assert len(events)==350680 and len(selection)==480 +alias={b:a for a,b in w['pairs']};rmax=1+max(max(e[:2])for e in w['ops']);roles=sorted(set(range(rmax))-set(alias)) +physical={r:1920+j for j,r in enumerate(roles)} +def phys(r):return physical[alias.get(r,r)] +assert rmax==9060 and len(roles)==8100 +n=10020;source={int(k):v for k,v in w['sources'].items()} +assert read(P/'physical-source-map.json')=={str(q):{'virtual':r,'physical':phys(r)}for q,r in source.items()} +first=sorted(w['phase1']);marked=set(first);later=[i for i in range(len(w['ops']))if i not in marked];order=first+later +adj=[Counter()for _ in range(rmax)] +for root,r in zip(g['roots'],w['rootroles']): + assert root['coefficient']==1 + adj[r].update(root['targets']) +for i in reversed(order): + a,b,node=w['ops'][i];adj[b].update(adj[a]) +gauges={e['role']:e for e in w['gauges']};cursor=0;even=0;changed=[];copy_events=[] +def emit(op,a,b,c,frame,semantic): + global cursor,even + if op==1 and c%2==0:even+=1;return + expected={'op':op,'a':a,'b':b,'c':c,'frame':frame,'semantic':semantic} + if semantic[0]=='partner_setup': + pair=semantic[1];assert frame==K[pair]['mix_frame'];expected['frame']=K[pair]['deliver_frame'];changed.append(cursor) + assert events[cursor]==expected,(cursor,events[cursor],expected) + if op in(2,3):copy_events.append([cursor,expected]) + cursor+=1 +def compensate(r): + frame=gauges[r]['frame']if r in gauges else-1 + for t,c in sorted(adj[r].items()):emit(1,960+t,phys(r),-c,frame,['gauge'if r in gauges else'plain',r,t]) +def gate(i,c): + a,b,_=w['ops'][i];emit(1,phys(a),phys(b),c,w['op_frame'][i]if c==1 else w['full_frame'],['forward'if c==1 else'inverse',i]) +for r in range(rmax): + if r not in gauges:compensate(r) +for q in range(960):emit(1,phys(source[q]),q,1,w['source_frame'][q],['inject',q]) +for i in first:gate(i,1) +for j,(root,r)in enumerate(zip(g['roots'],w['rootroles'])): + if root['kind']=='center': + emit(2,phys(r),n,0,w['root_frame'][j],['copy',j]) + for t in root['targets']:emit(1,960+t,n,1,-1,['center_read',j,t]) + emit(3,phys(r),n,0,w['root_frame'][j],['erase',j]) +readtimes=defaultdict(list) +for z in reversed(w['gauges']):readtimes[w['reads'].get(str(z['role']),len(first))-len(first)].append(z['role']) +assert set(readtimes)<=set(range(len(later)+1)) +for j,i in enumerate(later): + for r in readtimes[j]:compensate(r) + gate(i,1) +for r in readtimes[len(later)]:compensate(r) +delivery=defaultdict(list) +for pair,z in enumerate(K):delivery[z['deliver_after_root']].append(pair) +for j,(root,r)in enumerate(zip(g['roots'],w['rootroles'])): + if root['kind']=='side': + for t in root['targets']:emit(1,960+t,phys(r),1,w['root_frame'][j],['root',j,t]) + for pair in delivery[j]: + z=K[pair];a,b=z['carrier'],z['passive'];emit(1,a,b,1,z['mix_frame'],['partner_setup',pair,j]) + for t in z['receivers']:emit(1,960+t,a,1,z['deliver_frame'],['partner_delivery',pair,j,t]) +for pair,z in enumerate(K):emit(1,z['carrier'],z['passive'],-1,w['full_frame'],['partner_cleanup',pair]) +for i in reversed(order):gate(i,-1) +for q in range(960):emit(1,phys(source[q]),q,-1,w['full_frame'],['uninject',q]) +assert cursor==len(events)and even==578560 +assert set(changed)=={z['setup_event']for z in selection} +assert len(copy_events)==40 and not(set(changed)&{i for i,e in copy_events}) +actual_projection=[{'event':i,**e}for i,e in enumerate(events)if e['op']==1 and min(e['a'],e['b'])<960] +assert actual_projection==projection and len(projection)==3840 +uses=defaultdict(list) +for e in projection: + for q in (e['a'],e['b']): + if q<960:uses[q].append(e) +source_values=[Counter({q:1})for q in range(960)];checks=0;mutants=[] +for e in projection: + f=F[str(e['frame'])] + # Every source-incident retimed frame is rank1, rank18, or full. A basis + # source frame is the exact chi line; cap annihilators are read directly. + for q in [q for q in (e['a'],e['b'])if q<960]: + for s,c in source_values[q].items(): + assert c + if f['dim']==1: + assert e['frame']==w['source_frame'][s] + elif f['dim']==18: + assert all(sum(row[j]for j in g['labels'][s])==0 for row in f['a']) + else:assert f['dim']==20 + checks+=1 + if e['a']<960: + a,b,c=e['a'],e['b'],e['c'];assert b<960 + for q,x in source_values[b].items(): + source_values[a][q]+=c*x + if not source_values[a][q]:del source_values[a][q] +assert source_values==[Counter({q:1})for q in range(960)]and checks==6240 +for pair,z in enumerate(selection): + old=K[pair];a,b=z['carrier'],z['passive'];assert(a,b)==(old['carrier'],old['passive']) + assert z['new_frame']==old['deliver_frame']and z['old_frame']==old['mix_frame'] + assert z['new_annihilator']==F[str(old['deliver_frame'])]['a'] + assert len(z['new_basis'])==18 + assert all(sum(x*y for x,y in zip(row,basis))==0 for row in z['new_annihilator']for basis in z['new_basis']) + assert [e['event']for e in uses[a]]==z['carrier_uses']and [e['event']for e in uses[b]]==z['passive_uses'] + assert [e['semantic'][0]for e in uses[a]]==['inject','partner_setup','partner_delivery','partner_delivery','partner_cleanup','uninject'] + assert [e['semantic'][0]for e in uses[b]]==['inject','partner_setup','partner_cleanup','uninject'] + assert z['delivery_events']==[z['setup_event']+1,z['setup_event']+2] + assert z['carrier_uses'][1]==z['passive_uses'][1]==z['setup_event'] + assert z['carrier_uses'][-2]==z['passive_uses'][-2]==z['cleanup_event'] + # Execute the actual source-mutating subsequence after deleting either + # recorded operation, rather than only asserting a symbolic inequality. + for omitted in (z['setup_event'],z['cleanup_event']): + ca,cb={a:1},{b:1} + for e in uses[a]: + if e['event']==omitted or e['a']!=a:continue + assert e['b']==b + for q,x in cb.items():ca[q]=ca.get(q,0)+e['c']*x + ca={q:x for q,x in ca.items()if x} + assert ca!={a:1};mutants.append([pair,omitted,ca]) +def replay(backward): + cols=[1<=960;read_count+=1 + if copy is not None:assert a!=copy[0], 'COPY original was modified during read interval' + elif op==2: + assert copy is None and b==n;need(a,f);assert dim[f]==18 + zero=fmap[-1];copy=(a,b,f);state[b]=zero;computed_paths[b]=[zero];read_count=0 + assert records[cursor]==[2,a,b,f,zero,18];cursor+=1;paid[18]+=1 + else: + assert op==3 and copy==(a,b,f)and state[a]==f and state[b]==fmap[-1]and read_count==144 + assert records[cursor]==[3,a,b,f,fmap[-1],18];cursor+=1;del state[b];del computed_paths[b];copy=None;copy_count+=1 +for s,f in sorted(final.items()):need(s,f) +assert cursor==len(records)and state==final and computed_paths==paths and copy is None +assert(gate_count,copy_count,len(all_pairs))==(350640,20,40125) +assert paid==Counter({int(k):v for k,v in r['one_stage_paid_histogram'].items()}) +assert(sum(paid.values()),sum(k*v for k,v in paid.items()))==(46844,179640) +for s,chain in paths.items(): + assert chain[0]==initial[s]and chain[-1]==final[s] + if 960<=s<1920: + for f in chain:contained(f,final[s]) +# Recheck actual integer source incidences, including all regular helpers. +cols=[{q:1}if q<960 else{}for q in range(n+1)];checked=set();copy_checks=0 +def support(f,port): + for source in cols[port]: + if(f,source)not in checked: + assert all(sum(row[j]for j in g['labels'][source])==0 for row in A[f]);checked.add((f,source)) +for e in events: + op,a,b,c,f=(e[k]for k in ('op','a','b','c','frame')) + if op==2:support(f,a);copy_checks+=len(cols[a]);cols[b]=dict(cols[a]);continue + if op==3:assert cols[a]==cols[b];cols[b]={};continue + for port in(a,b): + if port!=n and not 960<=port<1920:support(f,port) + if not 960<=a<1920: + assert not 960<=b<1920 + for source,x in cols[b].items(): + y=cols[a].get(source,0)+c*x + if y:cols[a][source]=y + else:cols[a].pop(source,None) + support(f,a) +assert len(checked)==563928 and copy_checks==2880 +assert cols[:960]==[{q:1}for q in range(960)]and all(not row for row in cols[1920:]) +manifest=read(S/'inputs/MANIFEST.json')['files'];proofs={} +for p in sorted((HERE/'inert').iterdir()): + name=p.name.replace('__','/');assert sha(p)==manifest[name];proofs[name]=sha(p) +out={'status':'PASS_PR325_FULL_LOCAL_ARRAY_FRAME_CONTRACT', + 'source_result_sha256':sha(S/'RESULT.json'),'full_frame_result_sha256':sha(P/'RESULT.json'), + 'full_frame_validation_sha256':sha(P/'VALIDATION.json'), + 'checker_sha256':sha(__file__),'proof_sha256':sha(HERE/'FRAME-CONTRACT.md'),'pinned_theorems':proofs, + 'frames_rational_rank_and_Gram_checked':len(frames),'rank_witness_prime':MOD, + 'all_records_reconstructed':len(records),'common_frame_pointwise_ADDs':gate_count, + 'distinct_MOVE_pairs':len(all_pairs),'all10020_endpoint_chains_bound':True, + 'copies':copy_count,'reads_per_copy':144,'integer_source_checks':len(checked),'copied_input_checks':copy_checks, + 'local_paid_calls':sum(paid.values()),'local_rank_mass':sum(k*v for k,v in paid.items()), + 'arbitrary_dirty_operator_retained_by_common_array_frame_identity':True, + 'address_geometry_distinguished_from_F2_payload_values':True, + 'scope':'All finite hypotheses of the pinned common-array-frame and complete COPY identities are instantiated on the new PR325 local word. Generic address primitive implementation, uniform prime eligibility, global lowering, bank packing, price and all-size interfaces remain separate.'} +(HERE/'FULL-FRAME-AUDIT.json').write_text(json.dumps(contract.portable(out),indent=2)+'\n');print(json.dumps(contract.portable(out),indent=2)) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_geometry.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_geometry.py new file mode 100644 index 0000000000..583e19d7e8 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_geometry.py @@ -0,0 +1,137 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_source() +"""Independent exact retiming geometry for the newly pinned PR325 word. +No source programs or other verifiers are imported or executed. +""" +from pathlib import Path +from fractions import Fraction as Q +from collections import Counter +from math import lcm +import gzip,hashlib,json +import numpy as np +if not __debug__:raise RuntimeError('Assertions must be enabled') +HERE=contract.AUDIT +SOURCE=contract.SOURCE +I=SOURCE/'inputs' +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def read(name): + p=I/name;b=p.read_bytes() + return json.loads(gzip.decompress(b) if p.suffix=='.gz' else b) +source=json.loads((SOURCE/'SOURCES.json').read_text()) +assert source['head']=='0eca9340a3df6141b8e71a41638c3937b3522888' +for row in source['files']: + raw=(I/row['local']).read_bytes() + assert len(raw)==row['bytes'] and hashlib.sha256(raw).hexdigest()==row['sha256'] + assert hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==row['git_blob'] + if row['path'].endswith('.py'):assert row['local'].endswith('.py.txt') +w=read('bitword__selected__bit__word_p10.json.gz') +g=read('bitword__selected__bit__graph_p10.json') +f=read('bitword__selected__bit__frames_p10.json.gz')['frames'] +k=read('bitword__selected__bit__kchron_p10.json')['entries'] +assert len(k)==480 and g['h']==20 and g['v']==960 +Id=np.eye(20,dtype=object) +G=9*Id-np.ones((20,20),dtype=object) +Gi=np.asarray([[Q(int(i==j),9)-Q(1,99) for j in range(20)]for i in range(20)],dtype=object) +assert np.array_equal(G@Gi,Id) +def inverse2(a): + if a.shape==(1,1): + assert a[0,0] + return np.asarray([[1/a[0,0]]],dtype=object) + assert a.shape==(2,2) + det=a[0,0]*a[1,1]-a[0,1]*a[1,0] + assert det + return np.asarray([[a[1,1]/det,-a[0,1]/det],[-a[1,0]/det,a[0,0]/det]],dtype=object) +cache={} +def proj(fid): + if fid in cache:return cache[fid] + z=f[str(fid)];rank=z['dim'] + if rank==20:p=np.asarray(Id,dtype=object) + elif 'b' in z: + B=np.asarray([[Q(x)for x in r]for r in z['b']],dtype=object) + p=B.T@inverse2(B@G@B.T)@B@G + else: + A=np.asarray([[Q(x)for x in r]for r in z['a']],dtype=object) + p=Id-Gi@A.T@inverse2(A@Gi@A.T)@A + den=lcm(*(Q(x).denominator for x in p.flat)) + num=np.asarray([[int(Q(x)*den)for x in row]for row in p],dtype=object) + assert np.array_equal(num@num,den*num) + assert sum(num[i,i]for i in range(20))==rank*den + cache[fid]=(num,den) + return num,den +def sub(a,b): + A,da=proj(a);B,db=proj(b) + assert np.array_equal(A@B,db*A)and np.array_equal(B@A,db*A) +def difference(a,b): + A,da=proj(a);B,db=proj(b);d=da*db;n=da*B-db*A + assert np.array_equal(n@n,d*n) + return n,d +def D(num,den): + # Exact 40-column companion swap, scaled by den. + C=Id[:,::-1] + return np.block([[den*Id-num,num@C],[C@num,den*Id-C@num@C]]) +receipts=[];hist_old=Counter();hist_new=Counter();members=Counter() +for pair,e in enumerate(k): + a,b=e['carrier'],e['passive'];mix,cap=e['mix_frame'],e['deliver_frame'] + sa,sb=w['source_frame'][a],w['source_frame'][b];full=w['full_frame'] + assert e['carrier_chain']==[sa,mix,cap,full]and e['passive_chain']==[sb,mix,full] + assert [f[str(x)]['dim']for x in [sa,sb,mix,cap,full]]==[1,1,2,18,20] + root=g['roots'][e['deliver_after_root']] + assert root['kind']=='side'and sorted(root['targets'])==sorted(e['receivers']) + assert len(set(g['labels'][a])&set(g['labels'][b]))==1 + sub(sa,mix);sub(sb,mix);sub(mix,cap);sub(cap,full) + extra,de=difference(mix,cap) + assert sum(extra[j,j]for j in range(20))==16*de + # Both actual integer source lines lie in the delivery cap. The moved + # rank-16 component cannot act on either source contribution. + for s in [a,b]: + chi=np.asarray([int(j in g['labels'][s])for j in range(20)],dtype=object) + assert all(x==0 for x in extra@chi) + cp,dc=proj(cap);assert np.array_equal(cp@chi,dc*chi) + # Actual target covectors annihilate this cap; no target frame grows. + cp,dc=proj(cap) + for t in e['receivers']: + cov=np.asarray([3*int(j in g['labels'][t])-1 for j in range(20)],dtype=object) + assert all(x==0 for x in cov@cp) + endpoints=[] + for s,old in [(a,e['carrier_chain']),(b,e['passive_chain'])]: + new=[w['source_frame'][s],cap,full] + products=[] + for chain,H in [(old,hist_old),(new,hist_new)]: + total=np.eye(40,dtype=object);scale=1 + for x,y in zip(chain,chain[1:]): + sub(x,y);gap=f[str(y)]['dim']-f[str(x)]['dim'] + if gap:H[gap]+=1 + q,dq=difference(x,y);total=D(q,dq)@total;scale*=dq + products.append((total,scale)) + assert np.array_equal(products[0][0]*products[1][1],products[1][0]*products[0][1]) + # Omitting the nonzero extra component fails on some dirty columns. + dq=D(extra,de) + assert not np.array_equal(dq,de*np.eye(40,dtype=object)) + endpoints.append({'source':s,'old_chain':old,'new_chain':new,'all40column_endpoint_equal':True}) + members[s]+=1 + receipts.append({'pair':pair,'carrier':a,'passive':b,'mix_frame':mix,'delivery_frame':cap, + 'extra_rank':16,'extra_denominator':de,'source_lines_annihilated':True, + 'target_cap_unchanged':True,'endpoints':endpoints}) +assert members==Counter({s:1 for s in range(960)}) +assert hist_old==Counter({1:960,2:480,16:480,18:480}) +assert hist_new==Counter({2:960,17:960}) +delta=Counter(hist_new);delta.subtract(hist_old) +assert {r:v for r,v in delta.items()if v}=={1:-960,2:480,16:-480,17:960,18:-480} +out={'status':'PASS_NEW_PR325_EXACT_480_RETIMING_GEOMETRY', + 'source_head':source['head'],'source_manifest_sha256':sha(SOURCE/'SOURCES.json'), + 'word_sha256':sha(I/'bitword__selected__bit__word_p10.json.gz'), + 'checker_sha256':sha(__file__),'pairs':480,'sources':960,'rational_projectors_checked':len(cache), + 'old_source_histogram':dict(sorted(hist_old.items())),'new_source_histogram':dict(sorted(hist_new.items())), + 'source_delta':{r:v for r,v in sorted(delta.items())if v}, + 'all480_extra_rank16_projectors_idempotent':True,'all960_actual_source_lines_annihilated':True, + 'all960_exact40column_endpoint_chains_equal':True,'all960_omitted_extra_controls_rejected':True, + 'all_actual_receiver_caps_checked':True, + 'scope':'Exact local projector, source-line, target-cap and arbitrary-dirty endpoint chain identities. Full retimed frame admission additionally requires the actual event source-incidence invariant, scalar endpoint and COPY/chronology checks; this receipt alone does not establish equality of interleaved gate matrices or global lowering.', + 'receipts':receipts} +(HERE/'GEOMETRY-RESULT.json').write_text(json.dumps(contract.portable(out),indent=2)+'\n') +print(json.dumps({k:v for k,v in out.items()if k!='receipts'},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_global.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_global.py new file mode 100644 index 0000000000..4a606d1385 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/audit/check_global.py @@ -0,0 +1,219 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_frame_binding() +"""Independent full-frame binding and positive copied-projector audit.""" +from pathlib import Path +from fractions import Fraction as Q +from functools import lru_cache +from collections import Counter +import gzip,json,hashlib +import numpy as np +if not __debug__:raise RuntimeError('Assertions must be enabled') +HERE=contract.AUDIT;L=contract.FRAME;G=contract.GLOBAL;I=contract.GLOBAL +def read(p): + p=Path(p);b=p.read_bytes();return json.loads(gzip.decompress(b)if p.name.endswith('.gz')else b) +def fs(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def sha(b):return hashlib.sha256(b).hexdigest() +result=read(G/'RESULT.json');manifest=read(G/'MANIFEST.json');frames=read(L/'local-frames.json.gz');records=read(L/'local-records.json.gz');overrides=read(G/'copied-work-projector-overrides.json');description=read(G/'projector-descriptors.json');bindings=read(G/'all-frame-bindings.json');phases=read(G/'extended-phases.json');localreceipt=read(L/'RESULT.json') +for n,h in manifest.items():assert fs(G/n)==h +assert result['source_identity']['local_result_sha256']==fs(L/'RESULT.json')and result['compiler_sha256']==fs(contract.HERE/'lowering/lower_pr325.py') +assert description['copied_work_sha256']==fs(G/'copied-work-projector-overrides.json') +assert len(overrides)==100 and Counter(z['difference_orientation']for z in overrides)=={-1:60,1:40} +# Exact rational projector from the two-row annihilator of each real center. +def mm(A,B): + bt=list(zip(*B));return [[sum(x*y for x,y in zip(row,col))for col in bt]for row in A] +def ident(n):return [[Q(i==j)for j in range(n)]for i in range(n)] +def add(A,B,sign=1):return [[x+sign*y for x,y in zip(a,b)]for a,b in zip(A,B)] +def transpose(A):return list(map(list,zip(*A))) +@lru_cache(None) +def projector(fid): + A=[[Q(x)for x in row]for row in frames[str(fid)]['annihilator']];assert len(A)==2 and frames[str(fid)]['rank']==18 + invG=[[Q(i==j,9)-Q(1,99)for j in range(20)]for i in range(20)] + U=mm(invG,transpose(A));B=mm(A,U);det=B[0][0]*B[1][1]-B[0][1]*B[1][0];assert det + Bi=[[B[1][1]/det,-B[0][1]/det],[-B[1][0]/det,B[0][0]/det]] + P=add(ident(20),mm(mm(U,Bi),A),-1) + assert mm(P,P)==P and sum(P[i][i]for i in range(20))==18 + assert all(not x for row in mm(A,P)for x in row) + return P +def D(P): + eye=ident(20);TL=add(eye,P,-1);TR=[list(reversed(row))for row in P];BL=list(reversed(P));BR=[list(reversed(row))for row in reversed(TL)] + return [a+b for a,b in zip(TL,TR)]+[a+b for a,b in zip(BL,BR)] +I20=ident(20);I40=ident(40);F40=D(I20);matrix_checks=[] +for f in sorted({z['old_frame']for z in overrides}): + P=projector(f);DP=D(P);negative=[[-x for x in row]for row in P];DN=D(negative) + assert mm(DP,DP)==I40 + assert mm(DP,D(add(I20,P,-1)))==F40 + assert mm(negative,negative)!=negative and mm(DN,DN)!=I40 + # Thus forward D_P D_P = I and reflected D_P D_(I-P) = D_I. + # Unchanged Kstar stage blocks and all common QA/d conjugations cancel. + matrix_checks.append({'source_frame':f,'rank':18,'rational_idempotent':True,'all40_active_columns':True,'forward_copy_endpoint_conjugacy':True,'reflected_copy_endpoint_conjugacy':True,'negative_projector_rejected':True,'negative_D_not_involution':True}) +print('Actual center projectors: positive idempotence/copy conjugacy pass; negative direction rejected',flush=True) +# Independently instantiate new physical role/replica/address/chart bindings. +SRC=contract.SOURCE;BANK=contract.BANK +w=read(SRC/'inputs/bitword__selected__bit__word_p10.json.gz');graph=read(SRC/'inputs/bitword__selected__bit__graph_p10.json');ep=read(L/'local-endpoints.json');fmap=read(L/'source-frame-map.json') +assert description['array_lifting_contract_sha256']=='ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb' +assert 'Pointwise XOR on complete role arrays over F2' in description['ADD_semantics'] +assert result['source_identity']['source_graph_sha256']==fs(SRC/'inputs/bitword__selected__bit__graph_p10.json') +assert result['source_identity']['bank_result_sha256']==fs(BANK/'BANK-RESULT.json') +assert result['source_identity']['local_validation_sha256']==fs(L/'VALIDATION.json') +roles=sorted(set(range(9060))-{b for a,b in w['pairs']});assert len(roles)==8100 +assign={} +import struct +for role,t,b,off,width,scale in struct.iter_unpack('>6I',gzip.decompress((BANK/'literal-bank-assignments.bin.gz').read_bytes())):assign[role,t]=(b,off,width,scale) +assert len(assign)==486000 +norm=read(G/'normalizers.json.gz');normalizers=norm['normalizers'];programs=norm['chart_programs'];gauges={z['role']:z['frame']for z in w['gauges']if z['role']in roles} +assert len(programs)==120 +for name,p in programs.items(): + f=fmap[name];frm=frames[str(f)];assert frm['rank']==16 + cols=[[Q(x)for x in row]for row in p['basis_columns']];B=transpose(cols);BI=[[Q(x)for x in row]for row in p['inverse']] + assert mm(B,BI)==mm(BI,B)==ident(20) + A=[[Q(x)for x in row]for row in frm['annihilator']];BB=[[Q(x)for x in row]for row in frm['basis']] + assert all(sum(x*y for x,y in zip(a,b))==0 for a in A for b in cols[4:]) + assert all(9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b)==0 for a in cols[:4]for b in BB) + temp=[row[:]for row in B] + for op,a,b,c in p['factors']: + if op=='swap':temp[a],temp[b]=temp[b],temp[a] + elif op=='scale':temp[a]=[Q(c)*x for x in temp[a]] + else:assert op=='add';temp[a]=[x+Q(c)*y for x,y in zip(temp[a],temp[b])] + assert temp==ident(20)and p['factor_count']==len(p['factors'])<=150 +maps=np.frombuffer(gzip.decompress((G/'all-namespaces.i32.gz').read_bytes()),dtype='=960)])*960+q%960,0 if s==0 else 1+s*960+q%960) + for j,role in enumerate(roles): + b,off,width,scale=assign[role,t];fam,nid=map(int,ns[1920+j]);assert fam==230400+s*85680+b + z=normalizers[nid-4801];pid=gauges.get(role,-1);assert(z['stage'],z['support'],z['rank'],z['scalar'],z['chart_program'],z['paid_factor_bound'])==(s,[off,off+width],width,scale,pid,349) + src=list(range(s*20,s*20+width));dst=list(range(off,off+width));pi=dict(zip(src+[q for q in range(100)if q not in src],dst+[q for q in range(100)if q not in dst])) + assert z['permutation']==[pi[q]for q in range(100)] + outside=z['outside_column'];assert not s*20<=outside<(s+1)*20 and z['unit_column_witness']==[pi[outside],scale] + assert tuple(ns[-1])==(658800,-1)and len(set(map(tuple,ns.tolist())))==10021 + assert ns_hashes[s*60+t]['sha256']==sha(ns.tobytes()) +# Full phase-major barriers; no completion is necessary or allowed here. +expected_phases=[] +for s in range(5): + expected_phases.extend(('helper',s,t)for t in range(60)) + if s in(1,2,4):expected_phases.extend((kind,s,t)for t in range(60)for kind in('idle','bridge')) +expected_phases.extend(('terminal_exchange',None,t)for t in range(60)) +assert len(phases)==len(expected_phases)==720 +for i,(p,x)in enumerate(zip(phases,expected_phases)): + assert(p['kind'],p.get('stage'),p['replica'])==x and p['phase_index']==i + if p['kind']=='helper':assert p['reverse_complement']==(p['stage']in(1,3)) +# Fresh source triples and exact rational rho identities, then the universal +# port conjugacy transports the canonical eight boundary identities. +routes=read(G/'fresh-data-routes.json');assert routes['source_graph_sha256']==fs(SRC/'inputs/bitword__selected__bit__graph_p10.json') +J=np.eye(20,dtype=np.int64);qs=np.asarray([int(i<3)for i in range(20)],dtype=np.int64);PP=np.outer(qs,3*qs-1);KK=6*J-PP +assert np.array_equal(PP@PP,6*PP)and np.array_equal(KK@KK,6*KK)and not np.any(PP@KK) +canonical=np.block([[PP,KK],[KK,PP]]) +for q,z in enumerate(routes['ports']): + assert z['port']==q and z['label']==graph['labels'][q]and z['source_frame']==ep['initial'][str(q)] + pi=np.zeros((20,20),dtype=np.int64) + for col,row in enumerate(z['pi_columns']):pi[row,col]=1 + chi=np.asarray([int(i in graph['labels'][q])for i in range(20)],dtype=np.int64) + assert np.array_equal(pi@qs,chi)and np.array_equal(pi@pi.T,J) + PC=np.outer(chi,3*chi-1);R=np.block([[PC,pi@KK],[KK@pi.T,PP]]);T=np.block([[pi,0*J],[0*J,J]]) + assert np.array_equal(R,T@canonical@T.T)and np.array_equal(R@R,36*np.eye(40,dtype=np.int64)) +def rho(s): + R=6*np.eye(100,dtype=np.int64) + if s: + sl=slice(20*s,20*(s+1));R[:20,:20]=PP;R[sl,sl]=PP;R[:20,sl]=KK;R[sl,:20]=KK + return R +def field(s,kind): + R=np.zeros((100,100),dtype=np.int64);R[:20,:20]={'P':PP,'K':KK,'H':6*J,'0':0*J}[kind] + for j in range(1,s+1):R[20*j:20*(j+1),20*j:20*(j+1)]=KK + R=rho(s)@R@rho(s);assert not np.any(R%36);return R//36 +zero=np.zeros((100,100),dtype=np.int64);eye=6*np.eye(100,dtype=np.int64);p=field(0,'P') +pairs=[(p,field(1,'H')),(zero,field(1,'K')),(field(2,'P'),field(3,'P')),(field(2,'0'),field(3,'0')),(field(2,'H'),eye),(field(2,'K'),eye-p),(field(4,'H'),eye),(field(4,'K'),eye-p)] +ranklist=[] +for a,b in pairs: + d=b-a;assert np.array_equal(a@b,6*a)and np.array_equal(b@a,6*a)and np.array_equal(d@d,6*d);ranklist.append(int(np.trace(d)//6)) +assert ranklist==[38,38,19,19,42,42,4,4] +bp=read(G/'boundary-projectors.json');assert bp['ranks']==ranklist and bp['fresh_data_routes_sha256']==fs(G/'fresh-data-routes.json') +assert description['fresh_data_routes_sha256']==fs(G/'fresh-data-routes.json')and description['boundary_projectors_sha256']==fs(G/'boundary-projectors.json') +print('All fresh charts,300 actual namespaces,960 route conjugacies and720 phases pass',flush=True) +# Independently rebuild all five templates, check every copied lifetime and +# every MOVE orientation, then lower every literal namespace and hash it. +spaces=np.frombuffer(gzip.decompress((I/'all-namespaces.i32.gz').read_bytes()),dtype='=0 + if f:H[f]+=1 + elif op==1: + assert a!=10020 + if b==10020:assert center is not None and f==0;reads+=1 + else: + assert op==3 and a==10020 and center is not None and reads==144;center=None + assert center is None and localcopy==20 and H==expecthist + mask=(actual[:,0]==1)|(actual[:,0]==2) + for t in range(60): + mp=spaces[s,t];out=np.empty((len(actual),12),dtype='a) +assert source_hist=={2:960,17:960} +helper=Counter({int(r):n for r,n in base['helper'].items()});oldsrc={int(r):n for r,n in base['source'].items()} +for r,n in oldsrc.items():helper[r]-=n +helper.update(source_hist);assert all(n>=0 for n in helper.values()) +H=Counter({r:300*n for r,n in helper.items() if n});H.update({r:60*1920 for r in (4,19,38,42)}) +assert sum(H.values())==14514000 and sum(r*n for r,n in H.items())==65757600 +# Fresh physical roles and actual endpoint projectors from this exact word. +R=1+max(max(z[:2]) for z in w['ops']);roles=sorted(set(range(R))-{b for a,b in w['pairs']});gauges={g['role']:g['frame'] for g in w['gauges'] if g['role'] in roles};assert roles==base['physical_roles'] and len(roles)==8100 +widths={r:20-dim(gauges[r]) if r in gauges else 20 for r in roles};assert Counter(widths.values())=={4:1200,20:6900} +def reduced(rows): + a=[list(map(Q,row)) for row in rows];p=[];i=0 + for j in range(20): + k=next((k for k in range(i,len(a)) if a[k][j]),None) + if k is None:continue + a[k],a[i]=a[i],a[k];d=a[i][j];a[i]=[x/d for x in a[i]] + for k in range(len(a)): + if k!=i and a[k][j]:d=a[k][j];a[k]=[x-d*y for x,y in zip(a[k],a[i])] + p.append(j);i+=1 + return a[:i],p +def null(rows): + a,p=reduced(rows);out=[] + for j in range(20): + if j in p:continue + v=[Q(int(i==j)) for i in range(20)] + for i,k in enumerate(p):v[k]=-a[i][j] + d=lcm(*(x.denominator for x in v));v=[int(x*d) for x in v];d=gcd(*v);out.append([x//d for x in v]) + return out +def invert(B): + a=[list(map(Q,row))+[Q(int(i==j)) for j in range(20)] for i,row in enumerate(B)];ops=[] + for j in range(20): + k=next(k for k in range(j,20) if a[k][j]) + if k!=j:a[j],a[k]=a[k],a[j];ops.append(['swap',j,k,None]) + d=a[j][j] + if d!=1:a[j]=[x/d for x in a[j]];ops.append(['scale',j,j,str(1/d)]) + for i in range(20): + if i!=j and a[i][j]:d=-a[i][j];a[i]=[x+d*y for x,y in zip(a[i],a[j])];ops.append(['add',i,j,str(d)]) + assert all(a[i][j]==int(i==j) for i in range(20) for j in range(20));return [row[20:] for row in a],ops +def mm(B,C):return [[sum(x*y for x,y in zip(row,col)) for col in zip(*C)] for row in B] +identity=[[int(i==j) for j in range(20)] for i in range(20)];charts=[];maxops=maxnum=maxden=0 +for frame,count in sorted(Counter(gauges.values()).items()): + a=F[str(frame)]['a'];source=null(a);residual=[] + for row in a: + v=[11*x-sum(row) for x in row];d=gcd(*v);residual.append([x//d for x in v]) + assert len(source)==16 and len(residual)==4 + assert all(sum(x*y for x,y in zip(u,v))==0 for u in a for v in source) + assert all(9*sum(x*y for x,y in zip(u,v))-sum(u)*sum(v)==0 for u in residual for v in source) + B=list(map(list,zip(*(residual+source))));BI,ops=invert(B);assert mm(B,BI)==mm(BI,B)==identity + project=[[sum(B[i][k]*BI[k][j] for k in range(4)) for j in range(20)] for i in range(20)] + assert mm(project,project)==project and sum(project[i][i] for i in range(20))==4 + action=mm(project,B);assert action==[[B[i][j] if j<4 else 0 for j in range(20)] for i in range(20)] + replay=[list(map(Q,row)) for row in B] + for op,i,j,c in ops: + if op=='swap':replay[i],replay[j]=replay[j],replay[i] + elif op=='scale':replay[i]=[Q(c)*x for x in replay[i]] + else:assert op=='add';replay[i]=[x+Q(c)*y for x,y in zip(replay[i],replay[j])] + assert replay==identity + nums=[abs(Q(c).numerator) for _,_,_,c in ops if c is not None];dens=[Q(c).denominator for _,_,_,c in ops if c is not None]+[x.denominator for row in BI for x in row] + maxops=max(maxops,len(ops));maxnum=max(maxnum,*nums);maxden=max(maxden,*dens) + charts.append({'frame':frame,'uses':count,'residual_rank':4,'basis_columns':residual+source,'inverse':[[str(x) for x in row] for row in BI],'factors':ops,'projector':[[str(x) for x in row] for row in project]}) +assert len(charts)==120 and maxops<=400 and max(maxnum,maxden)<2**80 +write('endpoint-charts.json.gz',{'charts':charts,'roles':roles,'gauge_frames':gauges}) +# Two pure exact partitions. Every actual role x replica occurs once. +patterns=[{'widths':[4]*25,'count':2880},{'widths':[20]*5,'count':82800}];queues={width:iter([(r,t) for r in roles if widths[r]==width for t in range(60)]) for width in [4,20]};used=set();assign=bytearray();bank=0;norms=[];controls=[] +for pidx,p in enumerate(patterns): + widths0=p['widths'];offsets=[];s=0 + for width in widths0:offsets.append(s);s+=width + assert s==100 + def swaps(blocks): + z=list(range(200)) + for o,width in blocks: + for j in range(o,o+width):z[j],z[199-j]=z[199-j],z[j] + return z + blocks=list(zip(offsets,widths0));assert swaps(blocks)==list(range(199,-1,-1)) and swaps(blocks+blocks[::-1])==list(range(200)) + assert swaps(blocks[:-1])!=list(range(199,-1,-1));assert swaps(blocks+blocks[:1])!=list(range(199,-1,-1)) + controls+=['omitted_block_pattern_'+str(pidx),'duplicated_block_pattern_'+str(pidx)] + for stage in range(5): + permutation_programs=[] + out=next(j for j in range(100) if not 20*stage<=j<20*(stage+1));witness=[] + for block,(o,width) in enumerate(blocks): + src=list(range(20*stage,20*stage+width));dest=list(range(o,o+width));pi=dict(zip(src+[j for j in range(100) if j not in src],dest+[j for j in range(100) if j not in dest]));assert sorted(pi.values())==list(range(100)) and [pi[j] for j in src]==dest + scalar0=block+1;witness.append([pi[out],scalar0]) + images=list(range(100));sw=[] + for original in range(100): + current,target=images[original],pi[original] + if current!=target: + sw.append([current,target]);images=[target if v==current else current if v==target else v for v in images] + assert images==[pi[j] for j in range(100)] and len(sw)<=99 + inverse_images=list(range(100)) + for i,j in reversed(sw):inverse_images=[j if v==i else i if v==j else v for v in inverse_images] + assert all(inverse_images[pi[j]]==j for j in range(100)) + permutation_programs.append({'block':block,'chronological_coordinate_swaps':sw,'permutation':[pi[j] for j in range(100)]}) + assert len(set(map(tuple,witness)))==len(blocks);norms.append({'pattern':pidx,'stage':stage,'outside':out,'unit_column_witnesses':witness,'permutation_programs':permutation_programs}) + for _ in range(p['count']): + replicas_in_bank=set() + for block,(o,width) in enumerate(blocks): + role,t=next(queues[width]);assert (role,t) not in used;used.add((role,t));assert t not in replicas_in_bank;replicas_in_bank.add(t) + assign.extend(struct.pack('>6I',role,t,bank,o,width,block+1)) + bank+=1 +assert bank==85680 and used=={(r,t) for r in roles for t in range(60)} and all(next(q,None)is None for q in queues.values()) +(P/'literal-bank-assignments.bin.gz').write_bytes(gzip.compress(assign,mtime=0));rows=list(struct.iter_unpack('>6I',assign));digest=hashlib.sha256() +for stage in range(5): + cover=bytearray(bank*100) + for role,t,b,o,width,scale in rows: + k=100*b+o;assert not any(cover[k:k+width]);cover[k:k+width]=b'\1'*width + family=230400+stage*bank+b;assert 230400+stage*bank<=family<230400+(stage+1)*bank + digest.update(struct.pack('>7I',stage,role,t,family,o,width,scale)) + assert cover.count(0)==0 +S=230400+5*bank;E=sum(H.values());mass=sum(r*n for r,n in H.items());assert S==658800 and 100*S-mass==122400 +# Every selector, route, ordinary scalar, recursive wrapper and matrix bill. +assert maxops<=150 +factors=150+99+100;J=60*(24*960+10*8100);Kbill=2*5*60*((S-1)+8100*100*factors) +assert factors<=599 and Kbill<2**40 +unit=60*(5*admit['literal_unit_additions']+6*960);weighted=60*(5*admit['weighted_additions']+6*960) +payload=64*admit['forward_norm']**3*admit['inverse_norm']**2;assert payload<2**104 +terms={'unit_expanded_additions':unit,'high_affine_factors':J*16*10001**2,'low_transpositions':J*(S+20),'generic_wrappers':E*80008,'matrix_preparation':E*128*200**3,'global_matrix_preparation':16*100**3,'copy_erase_episodes':6000,'paid_child_overhead':E,'bank_selectors':Kbill,'constant':1};coefficient=sum(terms.values());assert coefficient<2**80 +assert max(H)==42 and 2*max(H)<100 and S+20<2**80 and 6*200*199+3*200+6*199<320000 +result={'status':'PASS_FRESH_LITERAL_BANKS_AND_FULL_INVOICE_CONDITIONAL_ON_RETAINED_FRAME_INVARIANT','source_admission_sha256':sha(A/'RESULT.json'),'base_ledger_sha256':sha(P/'BASE-LEDGER.json'),'selected_retimings':480,'source_histogram_from_actual_events':source_hist,'helper_histogram':helper,'literal_histogram':H,'literal_stock':S,'literal_children':E,'literal_rank_mass':mass,'deficit':122400,'physical_roles':len(roles),'inventory':Counter(widths.values()),'patterns':patterns,'banks_per_stage':bank,'completion_children':0,'actual_chart_count':len(charts),'chart_max_factors':maxops,'chart_billed_factor_bound':150,'chart_max_numerator':maxnum,'chart_max_denominator':maxden,'normalizer_factor_bound':factors,'normalizer_distinctness':norms,'zero_family_collisions_in_same_invocation':True,'assignment_count':5*len(rows),'assignment_sha256':hashlib.sha256(assign).hexdigest(),'five_stage_assignment_sha256':digest.hexdigest(),'all_coordinate_coverage':True,'bank_literal_universal_identity':'D_Q=[[I-Q,Q C100],[C100 Q,I-C100 Q C100]]; each disjoint coordinate block swaps exactly its paired coordinates, so product is D_I over Z and every coefficient ring. A common invertible ancestor conjugation preserves the identity.','weighted_additions':weighted,'unit_expanded_additions':unit,'forward_norm':admit['forward_norm'],'inverse_norm':admit['inverse_norm'],'payload_prefix_bound':payload,'payload_bits':payload.bit_length(),'route_families':J,'selector_calls':Kbill,'terms':terms,'coefficient':coefficient,'fallback_per_child':320000,'max_child_rank':42,'halving_degree':1,'row_reserve_coefficient':10001,'controls':controls,'artifacts':{n:sha(P/n) for n in ['endpoint-charts.json.gz','literal-bank-assignments.bin.gz']},'checker_sha256':sha(Path(__file__)),'scope':'Source retimings are hash-bound to fresh local admission. Fresh charts and every literal bank assignment/charge are checked here. Complete helper/target framed-word invariant and global IR binding remain separate gates; inherited compiler, prime, row, recovery and all-size analytic assumptions are unchanged.'} +write('BANK-RESULT.json',result);print(json.dumps({k:result[k] for k in ['status','literal_stock','literal_children','literal_rank_mass','chart_max_factors','normalizer_factor_bound','selector_calls','coefficient','payload_bits']},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/check_base_ledger.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/check_base_ledger.py new file mode 100644 index 0000000000..150ff43e24 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/check_base_ledger.py @@ -0,0 +1,82 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_source() +"""Independent PR325 finite ledger reconstruction from inert JSON only. +Prepared with substantial OpenAI assistance; Apache-2.0. +This recount does not establish containment, scalar replay, or admission. +""" +import json,base64,gzip,hashlib +from pathlib import Path +from collections import Counter,defaultdict +if not __debug__: raise RuntimeError('Assertions required') +P=contract.BANK; I=contract.INERT +def read(name): return json.loads((I/name).read_text()) +def sha(b): return hashlib.sha256(b).hexdigest() +source=json.loads((I.parent/'SOURCES.json').read_text()); manifest=read('MANIFEST.json'); bound=[] +for x in source: + n=x['path'].replace('/','__') + if x['encoding']=='base64': raw=base64.b64decode((I/(n+'.b64')).read_text()); decoded=gzip.decompress(raw); assert decoded==(I/n[:-3]).read_bytes() + else: raw=(I/(n+('.txt' if n.endswith('.py') else ''))).read_bytes() + assert hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==x['git_blob'] + bound.append(dict(path=x['path'],url=x['url'],git_blob=x['git_blob'],sha256=sha(raw))) +w,g,F,k=(read('bitword__selected__bit__'+n+'_p10.json') for n in ('word','graph','frames','kchron')) +f=F['frames']; dim=lambda i:f[str(i)]['dim']; h=g['h']; v=g['v']; assert (h,v)==(20,960) +R=max(a for op in w['ops'] for a in op[:2])+1; pair=dict(w['pairs']); destinations=set(pair.values()); physical=sorted(set(range(R))-destinations) +assert len(pair)==len(w['pairs'])==len(destinations) and not (set(pair)&destinations) +assert all(0<=aa) +internal=Counter(); widths={}; chains=hashlib.sha256(); gauge_counts=Counter() +for role in physical: + start=gauges.get(role,w['source_frame'][src[role]] if role in src else None) + path=([start] if start is not None else [])+incident[role] + if role in pair: + alias=pair[role];path+=[gauges[alias]]+incident[alias] + dims=([0] if start is None else [])+[dim(i) for i in path]+[20] + assert all(a<=b for a,b in zip(dims,dims[1:])),role + internal.update(b-a for a,b in zip(dims,dims[1:]) if b>a) + if role in src:internal[1]+=1 + entrance=dim(gauges[role]) if role in gauges else 0; widths[role]=20-entrance + if entrance:gauge_counts[entrance]+=1 + chains.update(json.dumps([role,dims],separators=(',',':')).encode()+b'\n') +copy=Counter(dim(w['root_frame'][j]) for j,r in enumerate(g['roots']) if r['kind']=='center');internal.update(copy) +source_gaps=Counter() +for e in k['entries']: + source_gaps.update(histogram(e['carrier_chain']));source_gaps.update(histogram(e['passive_chain'])) +# Targets independently receive dirty compensation, roots, and source deliveries. +targets=[[] for _ in range(v)] +# Stable original reversed-gauge order resolves equal read positions. +for e in sorted(reversed(w['gauges']),key=lambda e:w['reads'].get(str(e['role']),len(first))): + for target in e['targets']: targets[target].append(e['frame']) +deliveries=defaultdict(list) +for e in k['entries']: deliveries[e['deliver_after_root']].append(e) +for j,root in enumerate(g['roots']): + if root['kind']=='side': + for target in root['targets']:targets[target].append(w['root_frame'][j]) + for e in deliveries[j]: + for target in e['receivers']:targets[target].append(e['deliver_frame']) +target_gaps=Counter() +for path in targets: + d=[0]+list(map(dim,path))+[19];assert all(a<=b for a,b in zip(d,d[1:]));target_gaps.update(b-a for a,b in zip(d,d[1:]) if b>a) +helper=internal+source_gaps+target_gaps; paid=Counter({r:5*n for r,n in helper.items()});paid.update({r:1920 for r in [4,19,38,42]}) +width=Counter(widths.values());total_width=sum(widths.values());assert 60*total_width%100==0 +banks=60*total_width//100;stock=4*960*60+5*banks;literal={r:60*n for r,n in paid.items()} +assert max(literal)<50 +pins=read('word-pins.json');compare={'physical_R':len(physical),'virtual_R':R,'reuse_pairs':len(pair),'banked_calls':sum(paid.values()),'banked_rank_mass':sum(r*n for r,n in paid.items()),'local_paid_rank_mass':sum(r*n for r,n in helper.items()),'banks_per_stage':banks,'literal_stock':stock} +assert all(pins[n]==x for n,x in compare.items()) +peer=json.loads((I.parent/'LEDGER.json').read_text())['pr325'] +for name,value in [('helper',helper),('internal',internal),('source',source_gaps),('target',target_gaps),('residual_families',width)]:assert {int(k):v for k,v in peer[name].items()}==value +result={'status':'PASS_INDEPENDENT_FINITE_BASE_LEDGER_NOT_SOURCE_ADMISSION','source_head':'0eca9340a3df6141b8e71a41638c3937b3522888','source_bindings':bound,'physical_roles':physical,'role_residual_widths':widths,'inventory':width,'gauges':gauge_counts,'helper_internal':internal,'source':source_gaps,'target':target_gaps,'helper':helper,'normalized_paid':paid,'literal_histogram':literal,'literal_calls':sum(literal.values()),'literal_rank_mass':sum(r*n for r,n in literal.items()),'literal_stock':stock,'banks_per_stage':banks,'deficit':100*stock-sum(r*n for r,n in literal.items()),'copy_rank_counts':copy,'role_dimension_chain_sha256':chains.hexdigest(),'pin_comparisons':compare,'checker_sha256':sha(Path(__file__).read_bytes()),'scope':'Exact count from current PR325 physical role chains, without old role selections; rational source nesting and scalar correctness delegated to fresh independent admission.'} +(P/'BASE-LEDGER.json').write_text(json.dumps(result,indent=2,sort_keys=True)+'\n') +print(json.dumps({x:result[x] for x in ['status','inventory','helper','literal_calls','literal_rank_mass','literal_stock','banks_per_stage','deficit']},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/check_controls.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/check_controls.py new file mode 100644 index 0000000000..f6cefdc64e --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/check_controls.py @@ -0,0 +1,57 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_source() +"""Negative controls for the independent fresh-bank and price certificate.""" +from pathlib import Path +from fractions import Fraction as Q +import json,gzip,hashlib,struct,subprocess,sys +if not __debug__:raise RuntimeError('Assertions required') +P=contract.BANK;A=contract.SOURCE +def read(n): + b=Path(n).read_bytes();return json.loads(gzip.decompress(b) if str(n).endswith('.gz') else b) +B=read(P/'BANK-RESULT.json');C=read(P/'endpoint-charts.json.gz');price=read(P/'PRICE-RESULT.json');controls=[] +def rejects(name,fn): + try:fn() + except (AssertionError,ValueError):controls.append(name) + else:raise AssertionError('accepted '+name) +def chart_check(cols,inv): + assert len(cols)==len(inv)==20 + for i in range(20): + for j in range(20):assert sum(Q(cols[k][i])*Q(inv[k][j]) for k in range(20))==int(i==j) +x=C['charts'][0];chart_check(x['basis_columns'],x['inverse']);bad=[r[:] for r in x['basis_columns']];bad[0][0]+=1 +rejects('changed_chart_column',lambda:chart_check(bad,x['inverse'])) +badinv=[r[:] for r in x['inverse']];badinv[0][0]=str(Q(badinv[0][0])+1);rejects('changed_chart_inverse',lambda:chart_check(x['basis_columns'],badinv)) +def cover(blocks): + a=list(range(200));used=set() + for o,w in blocks: + assert isinstance(o,int) and isinstance(w,int) and 0<=o6I',raw));r0=rows[0] +def assignment_check(row): + r,t,b,o,w,s=row;roles=C['roles'];assert 0<=t<60 and r in roles and w==(4 if str(r) in C['gauge_frames'] else 20) + assert 0<=b<85680 and o%w==0 and 0<=o=0;current[a]=c + if f:H[f]+=1 + else: + e=events[ei];ei+=1;assert [op,a,b]==[e[k] for k in ['op','a','b']] + if op in [2,3]: + assert e['c']==0 and c==fm[str(e['frame'])] and f==0 and z==rank(c) and current[a]==c + if op==2:assert not copy_active;copy_active=True;H[z]+=1 + else:assert copy_active;copy_active=False + else: + assert op==1 and c==e['c'] and f==fm[str(e['frame'])] and E['categories'][z]==e['semantic'][0] +assert ei==len(events)==350680 and not copy_active and current=={int(k):v for k,v in E['final'].items()} +assert H=={int(r):n for r,n in R['one_stage_paid_histogram'].items()}=={int(r):n for r,n in B['helper_histogram'].items() if n} +assert sum(H.values())==46844 and sum(r*n for r,n in H.items())==179640 +literal=Counter({r:300*n for r,n in H.items()});literal.update({r:115200 for r in [4,19,38,42]});assert literal=={int(r):n for r,n in B['literal_histogram'].items()} +for key in ['forward_norm','inverse_norm','literal_unit_additions']:assert R[key]==read(A/'RESULT.json')[key] +assert R['payload_bound']==B['payload_prefix_bound'] +out={'status':'PASS_FRESH_FULL_FRAME_TO_BANK_INTERFACE_BINDING','full_frame_result_sha256':sha(L/'RESULT.json'),'bank_result_sha256':sha(P/'BANK-RESULT.json'),'physical_helper_endpoints_checked':8100,'distinct_chart_frame_pairs':120,'actual_local_records':len(rec),'source_scalar_COPY_records_bound':ei,'one_stage_children':sum(H.values()),'one_stage_rank_mass':sum(r*n for r,n in H.items()),'literal_histogram':literal,'literal_children':sum(literal.values()),'checker_sha256':sha(Path(__file__)),'scope':'Fresh full local frame stream and all endpoint/chart/role/operand/count interfaces bind to the bank certificate. Its separate exact all-frame validator and independent global lowering remain external gates. No prior selections or frames transplanted.'} +(P/'FRAME-BINDING.json').write_text(json.dumps(contract.portable(out),indent=2)+'\n');print(out['status'],len(rec),ei) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/price_admitted_profile.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/price_admitted_profile.py new file mode 100644 index 0000000000..cc61263d7c --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/bank/price_admitted_profile.py @@ -0,0 +1,105 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_source() +"""Original independent rational moment and 47-slack calculator. +Only Python's standard library is executed. Original frozen proof programs +are read as inert formulas; no earlier calculator is imported. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from fractions import Fraction as Q +from decimal import Decimal,localcontext +from functools import lru_cache +import json,hashlib +if not __debug__:raise RuntimeError('Assertions required') +HERE=contract.BANK;GRID=10**18;FINE=10**85 +MAN=json.loads((contract.HERE/'bank/BANK-SOURCES.json').read_text());sourcehash={} +for name in ['outer.py','proof/three-stage-cover-bit.tex','proof/three-stage-cover-rows.tex']: + local=name.replace('/','__')+'.txt';row=MAN[local];raw=contract.input_for(name).read_bytes() + assert row['source_path']==name and hashlib.sha256(raw).hexdigest()==row['sha256'];sourcehash[name]=row['sha256'] +def floorq(x):return x.numerator//x.denominator +def ceilq(x):return -floorq(-x) +def down(x):return Q(floorq(x*FINE),FINE) +def up(x):return Q(ceilq(x*FINE),FINE) +def dec(x): + with localcontext()as c:c.prec=55;return str(Decimal(x.numerator)/Decimal(x.denominator)) +@lru_cache(None) +def lnsmall(x): + assert 1<=x<=2;z=(x-1)/(x+1);power=z;v=Q(0) + # Positive atanh expansion; the geometric bound includes every omitted term. + for j in range(100):v+=2*power/(2*j+1);power*=z*z + tail=2*power/(201*(1-z*z));return down(v),up(v+tail) +@lru_cache(None) +def ln(x): + x=Q(x);assert x>=1;k=0 + while x>2:x/=2;k+=1 + a,b=lnsmall(x);c,d=lnsmall(Q(2));return a+k*c,b+k*d +def expbounds(x): + assert 0<=x0 + L=max(1,ceilq(36/delta**2),ceilq(2*(4+(finite_coefficient-1).bit_length())/delta)) + assert L*delta**2>=36 and L*delta>=2*(4+(finite_coefficient-1).bit_length()) + cutoffs.append({'stage':j+1,'gaps':{k:str(v)for k,v in gaps.items()},'cutoff_log2_charged_coefficient':str(L),'full_cutoff_requires_primitive_and_old_leaf_constants':True});chain.append(a) + a=chain[-1];tau=1-a;sigma=1-b;q=a*(1-2*eta);lp=1-q;lam=(tau+lp)/2;c=q+eta/4;eps=(1-eta)/(1+q);G=eps*q;r=(G+1-eps)/2;delta=eta/8 + internal=tau+(1-beta)*max(sigma-tau,Q(0));leaf=sigma+beta*(1-sigma) + margins={'balanced_prefix':1-eps,'coordinate_movement':a,'compact_phase_layer':G,'bulk_exposure':a,'Gaussian_arithmetic':min(1-eps-delta,r-delta),'scalar_work':1-eps-delta,'dimension':eps} + k=Q(ceilq(min(margins.values())*GRID)-1,GRID) + # Direct independent transcription of the immutable outer.py displayed equations. + slacks={'bit_positive':a,'complex_above_bit':b-a,'complex_below_one_over32':Q(1,32)-b,'beta_positive':beta,'beta_below_one':1-beta,'leaf_saving_above_bit':(1-beta)*b-a, + 'q_positive':q,'q_below_internal':1-internal-q,'q_below_leaf':1-leaf-q,'c_positive':c,'c_below_one':1-c,'q_below_reservations':c-q, + 'lambda_above_tau':lam-tau,'lambda_above_sigma':lam-sigma,'lambda_above_internal':lam-internal,'lambda_prime_above_lambda':lp-lam,'compact_leaf':lp-leaf,'compact_reservations':lp-(1-c),'lambda_prime_below_one':q, + 'epsilon_positive':eps,'epsilon_below_one':1-eps,'guard_width':1-eps,'K_geometry':1-eps*(1+c),'K_dominates_log':eps*c,'record_suffix':1-eps,'phase_local':1-eps-delta,'phase_boundary':r-delta,'gamma_sublinear':1-eps-r,'cell_above_band':eps-(1-r)/2,'prime_interval_packing':1-eps, + 'alpha_positive':r,'alpha_below_one':1-r,'alpha_below_one_fourth':Q(1,4)-r,'delta_positive':delta,'delta_below_one_eighth':Q(1,8)-delta,'short_record_fallback':eps-a,'small_field_exposure':1-eps-G,'artificial_boundary':8-eps+r-delta-G, + 'literal_scalar_guard':Q(1),'row_product_gap':Q(10**6)-Q(51*20161,25)} + slacks.update({name+'_above_kappa':val-k for name,val in margins.items()}) + assert len(slacks)==47 and all(x>0 for x in slacks.values()) + assert min(margins.values())==G and margins['balanced_prefix']-G==eta + assert slacks['gamma_sublinear']==eta/2 and slacks['K_geometry']==eta*(1-eps/4) + assert slacks['q_below_internal']==2*a*eta and slacks['q_below_leaf']==(1-beta)*b-a+2*a*eta + assert slacks['small_field_exposure']==eta + rejected=[name+'_above_kappa' for name,val in margins.items()if val<=k+Q(1,GRID)] + assert rejected==['compact_phase_layer_above_kappa'] + return {'coarse_bit':str(root),'coarse_complex':str(b),'complex_leaf_cap':str(cap),'binding':'bit','bootstrap_chain':list(map(str,chain)),'bootstrap_cutoffs':cutoffs,'backoff':str(eta),'beta':str(beta),'all_47_strict_slacks':{n:str(v)for n,v in slacks.items()},'seven_margins':{n:str(v)for n,v in margins.items()},'kappa':str(k),'kappa_decimal':dec(k),'adjacent_kappa_rejected':rejected} + + +# This consumes the fresh current bank invoice, rather than a fee cap. +M=json.loads((contract.INERT/'MANIFEST.json').read_text())['files'] +assert all(M[n]==h for n,h in sourcehash.items()) +bank=json.loads((HERE/'BANK-RESULT.json').read_text());assert bank['selected_retimings']==480 and bank['completion_children']==0 +H={int(r):n for r,n in bank['literal_histogram'].items()};S=bank['literal_stock'];cert=bracket(H,S);a=assemble(Q(cert['lower']),bank['coefficient']);benchmark=Q(770008089898797,GRID) +assert Q(a['kappa'])>benchmark and sum(H.values())==14514000 and sum(r*n for r,n in H.items())==65757600 +out={'status':'PASS_EXACT_ADMITTED_LOCAL_PROFILE_AND_BANK_PRICE_PENDING_GLOBAL_BINDING','bank_result_sha256':hashlib.sha256((HERE/'BANK-RESULT.json').read_bytes()).hexdigest(),'source_admission_sha256':bank['source_admission_sha256'],'source_head':'0eca9340a3df6141b8e71a41638c3937b3522888','retained_contract_source_hashes':sourcehash,'literal_stock':S,'literal_children':sum(H.values()),'literal_rank_mass':sum(r*n for r,n in H.items()),'finite_coefficient':bank['coefficient'],'exact_bit_bracket':cert,'assembly':a,'published_benchmark':str(benchmark),'gain':str(Q(a['kappa'])-benchmark),'gain_decimal':dec(Q(a['kappa'])-benchmark),'all_edge_fallback_charged':True,'checker_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'scope':'New local retimings admitted separately; fresh endpoints, literal complete banks, full finite invoice, all fallback children, exact moment and 47 inequalities checked. Full helper/target frame invariant and source-bound global IR remain independent gates. Retained compiler, prime, row, complex and all-size hypotheses unchanged.'} +(HERE/'PRICE-RESULT.json').write_text(json.dumps(contract.portable(out),indent=2)+'\n');print('kappa',a['kappa_decimal'],'gain',out['gain_decimal'],'finite',bank['coefficient']) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/expected/receipts.json b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/expected/receipts.json new file mode 100644 index 0000000000..d0fb464b97 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/expected/receipts.json @@ -0,0 +1,121 @@ +{ + "source_head": "0eca9340a3df6141b8e71a41638c3937b3522888", + "source_word_gzip_sha256": "601da0e6a67715011a4bbc44f6977f13625c5833d4d40443c10b0d5a9da1896d", + "input_manifest_sha256": "b463725a5b88299bbb39aeef0c2f36f61f4b7baecb6b63ea5b329465ed3878ae", + "receipt_count": 28, + "normalization": "Only declared absolute roots in JSON keys and values are normalized; dependency hashes and mathematical evidence remain intact.", + "receipts": { + "source/RESULT.json": { + "sha256": "d0cd20ec15948f878c79b35a988c52dc59ceec23582c18c1e55fc424508c3bfe", + "status": "PASS_ALL480_PR325_PARTNER_MIX_RETIMINGS_RAW_LOCAL_PROOF" + }, + "source/MANIFEST.json": { + "sha256": "eb2783a1252fc1a8fbc5e100d56aa711b5fed5fcb3b12eeb9621d1c3a1c6728d", + "status": "REGENERATED_CURRENT_SOURCE_PACKET" + }, + "frame/RESULT.json": { + "sha256": "4ac451da2ae9acfefd00ac9ca0723db01ef802455797fc9a0fd940be42fe6779", + "status": "PASS_FRESH_PR325_480_RETIMINGS_FULL_LOCAL_FRAME_WORD" + }, + "frame/VALIDATION.json": { + "sha256": "591cd4ab126a6af5773f45289e6a52985eac32a4252507144b76d608938c8373", + "status": "PASS_INDEPENDENT_PR325_FULL_LOCAL_RECORD_AND_FRAME_AUDIT" + }, + "frame/MANIFEST.json": { + "sha256": "097ab935caad6c290693e5d75597bf47d14d93853c131ba5105fac88c54f36d5", + "status": "REGENERATED_CURRENT_FULL_LOCAL_FRAME_PACKET" + }, + "frame/ARBITRARY-DIRTY-AUDIT-BINDING.json": { + "sha256": "a08853103b97269bf1ed415e5e0b90fe0969d83c00e8a61e722adabf1f2a1f18", + "status": "PASS_SEPARATE_INDEPENDENT_LOCAL_ARRAY_FRAME_AUDIT_BOUND" + }, + "bank/BASE-LEDGER.json": { + "sha256": "9254495c50120f07442ea3c2bab0354b5c312e30a22d2633784d2d3928aa9f95", + "status": "PASS_INDEPENDENT_FINITE_BASE_LEDGER_NOT_SOURCE_ADMISSION" + }, + "bank/BANK-RESULT.json": { + "sha256": "6da4e75849757cd6e6fe7a8a03e344c27a5f3effe923ea5c8122571e37ae7f1d", + "status": "PASS_FRESH_LITERAL_BANKS_AND_FULL_INVOICE_CONDITIONAL_ON_RETAINED_FRAME_INVARIANT" + }, + "bank/PRICE-RESULT.json": { + "sha256": "146528679cbaf67d826df1c5688e03dbdfedce181e00cf11c3b57b34aebe4b3f", + "status": "PASS_EXACT_ADMITTED_LOCAL_PROFILE_AND_BANK_PRICE_PENDING_GLOBAL_BINDING" + }, + "bank/CONTROLS.json": { + "sha256": "023e34a0fa1c6ecdbec5e3619aa9bf79a3b92a752584ec5d93374b3e9a0fc2e9", + "status": "PASS_NEGATIVE_CONTROLS" + }, + "bank/FRAME-BINDING.json": { + "sha256": "906394abef8e6119df65645cf7f122b2ff8159b550a9f12cadfbdd1da49a3c64", + "status": "PASS_FRESH_FULL_FRAME_TO_BANK_INTERFACE_BINDING" + }, + "bank/MANIFEST.json": { + "sha256": "6b448be862c87a3e8ed392035d83b978654dbb3eb07b58e0e22dcad49cec24a0", + "status": "REGENERATED_CURRENT_PR325_BANK_CERTIFICATE" + }, + "audit/GEOMETRY-RESULT.json": { + "sha256": "7cd0c8657bb74a45ec85df6563ac5eaec7556d762e5b833a5088ab0a82fcc4bb", + "status": "PASS_NEW_PR325_EXACT_480_RETIMING_GEOMETRY" + }, + "audit/EVENT-AUDIT.json": { + "sha256": "ae68782ba0d6c255ddc7f6234bb299f101c0a3b2ea9122eeb0d49e6432149ed1", + "status": "PASS_INDEPENDENT_PR325_RETIMED_EVENT_AND_COPY_AUDIT" + }, + "audit/FULL-FRAME-AUDIT.json": { + "sha256": "3775d3b82afd195d7bc8f2f98942ebc886f2c500d5a2b46d530ee576be954f85", + "status": "PASS_PR325_FULL_LOCAL_ARRAY_FRAME_CONTRACT" + }, + "audit/BANK-PRICE-AUDIT.json": { + "sha256": "56db5ef2d7e096bc8211b94474d7f30763f22e888c42baff6d6cbd9a66facd7d", + "status": "PASS_INDEPENDENT_PR325_BANKS_AND_EXACT_PRICE" + }, + "audit/GLOBAL-AUDIT.json": { + "sha256": "9782a98486fe798b642c06aecd4732059c71bec9852ebaeab24755d06d60449b", + "status": "PASS_INDEPENDENT_PR325_GLOBAL_FRAME_BINDING" + }, + "audit/GLOBAL-CHART-BOUNDS.json": { + "sha256": "b02b86aca63392098f84c68958cc1d53fb20e45b13c3b0615d39caa914af0c50", + "status": "PASS_FRESH_GLOBAL_CHART_UNIT_BOUNDS" + }, + "audit/ASSERTION-CONTROLS.json": { + "sha256": "e80b072caa47dd9b933f321c449b7cbd0606b3292d4c1e2c9c92c32e98ae149d", + "status": "PASS_ALL_SIX_OPTIMIZED_MODE_REJECTIONS" + }, + "audit/FINAL-AUDIT.json": { + "sha256": "7aa8a166d58044b50e9f9e223be29206d058c7bc883ca2676b10fb4c71b00088", + "status": "PASS_INDEPENDENT_FINITE_PR325_480_RETIMING_COMPOSITION" + }, + "audit/MANIFEST.json": { + "sha256": "b77fdc96fd6b0ae3217173fe360cb99cd599499117b33a8b79217333bb0df6a9", + "status": "FROZEN_INDEPENDENT_FINITE_PR325_AUDIT" + }, + "prepared/PREPARATION.json": { + "sha256": "5bdceeb9604321f66858885ba1ca1616c7745c55e3dcb27f662b210a07301a80", + "status": "PASS_FRESH_PR325_BANK_PREPARATION_ONLY" + }, + "prepared/MANIFEST.json": { + "sha256": "ce897f58ef7d8e53c662f019f6e59bb958cde07db4f73dc2f8ea15062384847e", + "status": null + }, + "global/RESULT.json": { + "sha256": "4435c3770b52b7d221ba8d23e590b2d58623362a73e8db4af7460996050d2683", + "status": "PASS_SOURCE_BOUND_PR325_GLOBAL_FRAME_IR" + }, + "global/MANIFEST.json": { + "sha256": "cfbe71a21468a19da7b5bfceaba5841029435ca66c75f23e9de5a41438a5bb99", + "status": null + }, + "global/GEOMETRY-CONTROLS.json": { + "sha256": "1c1c7b860c452bb4591ea977c0b6bcd75470893533b24a03fab3a670199e7417", + "status": "PASS_FRESH_PR325_EXACT_DATA_BOUNDARY_AND_COPY_GEOMETRY" + }, + "global/EMISSION-CONTROLS.json": { + "sha256": "46ca39118e4f74aa9b8fa191c0411d8a2bc55e63a877ddb84b0f5042fa5476a9", + "status": "PASS_INDEPENDENT_PR325_EMITTED_BANK_PHASE_FEE_CONTROLS" + }, + "global/invoice.json": { + "sha256": "c052c2a92ab7b32c37e26efb94c68f357d4e880aadf299bf2c620432633e7d6b", + "status": null + } + } +} diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/build_local.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/build_local.py new file mode 100644 index 0000000000..4b596609d5 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/build_local.py @@ -0,0 +1,116 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +"""Fresh full PR325 frame word with only 480 source retimings. +Independently authored; no upstream programs or old role maps executed/imported. +""" +from pathlib import Path +from collections import Counter,defaultdict +from functools import lru_cache +from fractions import Fraction as Q +import json,gzip,hashlib,sys +P=contract.FRAME;SRC=contract.SOURCE +if not __debug__:raise RuntimeError('Assertions must be enabled') +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def read(p): + b=Path(p).read_bytes();return json.loads(gzip.decompress(b)if str(p).endswith('.gz')else b) +def dump(n,x): + b=(json.dumps(x,sort_keys=True,separators=(',',':'))+'\n').encode();(P/n).write_bytes(gzip.compress(b,mtime=0)if n.endswith('.gz')else b) +contract.verify_source() +for z in read(SRC/'MANIFEST.json')['files']:assert sha(SRC/z['path'])==z['sha256'] +assert read(SRC/'RESULT.json')['checker_sha256']==contract.sha(contract.HERE/'source/check_retimings.py') +sys.path.insert(0,str(contract.HERE/'source'));from check_retimings import null,rr + +def run(): + load=lambda name:read(SRC/'inputs'/('bitword__selected__bit__'+name+'_p10.json'+('.gz'if name in('word','frames')else''))) + w,g,rawF=(load(n)for n in('word','graph','frames'));rawF={int(k):z for k,z in rawF['frames'].items()};events=read(SRC/'scalar-events.json.gz');receipt=read(SRC/'RESULT.json');assert receipt['checker_sha256']==contract.sha(contract.HERE/'source/check_retimings.py') + aliases={b:a for a,b in w['pairs']};R=1+max(max(row[:2])for row in w['ops']);regs=sorted(set(range(R))-set(aliases));idx={r:1920+i for i,r in enumerate(regs)};physical={r:idx[aliases.get(r,r)]for r in range(R)};n=1920+len(regs);assert(n,R,len(aliases))==(10020,9060,960) + ga={e['role']:e for e in w['gauges']};assert len(ga)==2160 + used={e['frame']for e in events}|set(w['source_frame'])|{e['frame']for r,e in ga.items()if r in idx}|{w['full_frame']} + F={};source_map={};A={};B={};dim={} + def frame_install(key,b,a,d): + f=len(F);assert len(b)==d and len(a)==20-d + F[f]=dict(key=list(key),rank=d,basis=[[str(x)for x in row]for row in b],annihilator=[[str(x)for x in row]for row in a]);A[f]=a;B[f]=b;dim[f]=d;return f + for old in sorted(used): + if old==-1:b=[];a=[[int(i==j)for j in range(20)]for i in range(20)];d=0 + else: + z=rawF[old];b=z.get('b');a=z.get('a');d=z['dim'];b=null(a)if b is None else b;a=null(b)if a is None else a + source_map[old]=frame_install(('PR325',old),b,a,d) + ZERO=source_map[-1];FULL=source_map[w['full_frame']];assert dim[ZERO]==0 and dim[FULL]==20 + target_caps={} + for q in range(960): + a=[[3*int(j in g['labels'][q])-1 for j in range(20)]];target_caps[q]=frame_install(('target_cap',q),null(a),a,19) + @lru_cache(None) + def sub(a,b):return dim[a]<=dim[b]and all(sum(x*y for x,y in zip(u,v))==0 for u in A[b]for v in B[a]) + initial={q:source_map[w['source_frame'][q]]for q in range(960)};initial.update({960+q:ZERO for q in range(960)});initial.update({idx[r]:source_map[ga[r]['frame']]if r in ga else ZERO for r in regs}) + final={q:FULL for q in range(960)};final.update({960+q:target_caps[q]for q in range(960)});final.update({idx[r]:FULL for r in regs});assert len(initial)==len(final)==n + assert Counter(dim[initial[idx[r]]]for r in regs)=={0:6900,16:1200} + # Exact source frame IDs are rebound into this fresh local registry. + original=[] + for i,e in enumerate(events):e=dict(e,frame=source_map[e['frame']],original_index=i);original.append(e) + events=original + categories=sorted({e['semantic'][0]for e in events});category={s:i for i,s in enumerate(categories)} + state=dict(initial);paths={q:[f]for q,f in initial.items()};records=[];H=Counter();temporary=None;operand_events=Counter();MOVE_pairs=set() + def need(s,f): + prev=state[s] + if prev==f:return + assert sub(prev,f),('frame chronology',s,prev,f,F[prev]['key'],F[f]['key']);gap=dim[f]-dim[prev];records.append([0,s,prev,f,gap,0]);paths[s].append(f);state[s]=f;MOVE_pairs.add((prev,f)) + if gap:H[gap]+=1 + for e in events: + op,a,b,c,f=(e[k]for k in('op','a','b','c','frame'));operand_events[e['semantic'][0]]+=1 + if op==1:need(a,f);need(b,f);records.append([1,a,b,c,f,category[e['semantic'][0]]]) + elif op==2: + assert temporary is None and b==n;need(a,f);state[b]=ZERO;paths[b]=[ZERO];temporary=(a,b,f);records.append([2,a,b,f,ZERO,dim[f]]);H[dim[f]]+=1 + else: + assert op==3 and temporary==(a,b,f)and state[a]==f and state[b]==ZERO;records.append([3,a,b,f,ZERO,dim[f]]);del state[b];del paths[b];temporary=None + for q,f in sorted(final.items()):need(q,f) + assert temporary is None and state==final + # Independent actual source/internal/target histogram partition from paths. + parts={name:Counter()for name in('source','target','helper','copies')} + for q,chain in paths.items(): + part='source'if q<960 else'target'if q<1920 else'helper' + for a,b in zip(chain,chain[1:]): + gap=dim[b]-dim[a] + if gap:parts[part][gap]+=1 + for e in events: + if e['op']==2:parts['copies'][dim[e['frame']]]+=1 + assert H==sum(parts.values(),Counter())and parts['source']=={17:960,2:960}and parts['copies']=={18:20} + assert sum(r*c for r,c in H.items())==179640 + # Track all exact integer input-source coefficients through non-target ports. + cols=[{q:1}if q<960 else{}for q in range(n+1)];checks=set();copied_support_checks=0 + def contained(f,q): + if(f,q)not in checks:assert all(sum(row[j]for j in g['labels'][q])==0 for row in A[f]),('integer input source outside operand frame',f,q,F[f]['key']);checks.add((f,q)) + for e in events: + op,a,b,c,f=(e[k]for k in('op','a','b','c','frame')) + if op==2: + for q in cols[a]:contained(f,q);copied_support_checks+=1 + cols[b]=dict(cols[a]);continue + if op==3:assert cols[a]==cols[b];cols[b]={};continue + # The copied work's ZERO-frame scatter uses the retained COPY contract; + # it is not incorrectly claimed to contain the source in the ZERO subspace. + for port in(a,b): + if port!=n and not 960<=port<1920: + for q in cols[port]:contained(f,q) + if not 960<=a<1920: + assert b<960 or b>=1920 + for q,x in cols[b].items(): + y=cols[a].get(q,0)+c*x + if y:cols[a][q]=y + else:cols[a].pop(q,None) + for q in cols[a]:contained(f,q) + assert cols[:960]==[{q:1}for q in range(960)]and all(not z for z in cols[1920:]) + # Every target path remains in its own exact terminal cap. + for q in range(960): + for f in paths[960+q]:assert sub(f,target_caps[q]) + # Primitive row-space checks and every rank/nondegeneracy are independently + # repeated by validate_local.py; this builder supplies exact integer witnesses. + endpoints=dict(n=n,initial=initial,final=final,removed_sink_columns=[],categories=categories,record_format='MOVE[0,stream,old_frame,new_frame,rank_gap,0]; ADD[1,dest,source,coefficient,frame,category_id]; COPY/ERASE[2or3,source,scratch,source_frame,zero_frame,rank].') + rolemap=dict(virtual_roles=R,physical_helpers=len(regs),physical_by_virtual=physical,representative_by_physical={idx[r]:r for r in regs},aliases=aliases,source_helpers={q:physical[r]for q,r in map(lambda kv:(int(kv[0]),kv[1]),w['sources'].items())}) + dump('local-events.json.gz',events);dump('local-records.json.gz',records);dump('local-frames.json.gz',F);dump('local-endpoints.json',endpoints);dump('local-paths.json.gz',paths);dump('role-map.json',rolemap);dump('source-frame-map.json',source_map) + fw,bw=receipt['forward_norm'],receipt['inverse_norm'];payload=64*fw**3*bw**2;assert payload<2**104 + result=dict(status='PASS_FRESH_PR325_480_RETIMINGS_FULL_LOCAL_FRAME_WORD',head=receipt['head'],candidate_sha256=receipt['word_gzip_sha256'],source_manifest_sha256=sha(SRC/'MANIFEST.json'),source_result_sha256=sha(SRC/'RESULT.json'),checker_sha256=sha(Path(__file__)),columns=n,physical_helpers=8100,records=len(records),frames=len(F),source_retimings=480,source_selections_imported_from_old_word=False,all_complete_source_helper_target_paths_nested=True,all_targets_in_terminal_caps=True,distinct_MOVE_containment_pairs=len(MOVE_pairs),one_stage_paid_histogram={str(r):c for r,c in sorted(H.items())},one_stage_calls=sum(H.values()),one_stage_rank_mass=sum(r*c for r,c in H.items()),histogram_parts={k:{str(r):c for r,c in sorted(v.items())}for k,v in parts.items()},initial_helper_rank_histogram={'0':6900,'16':1200},final_helper_rank_histogram={'20':8100},weighted_additions=receipt['weighted_additions'],literal_unit_additions=receipt['literal_unit_additions'],forward_norm=fw,inverse_norm=bw,payload_bound=payload,payload_bits=payload.bit_length(),integer_operand_source_support_checks=len(checks),all_nontarget_regular_operand_integer_sources_contained=True,copied_input_source_checks=copied_support_checks,copied_work_ZERO_scatter_uses_retained_COPY_contract=True,all_helper_integer_sources_restored=True,all_source_integer_values_restored=True,all_COPY_lifetimes_exact=True,scope='Fresh complete finite local frame stream on only the 480 source-retimed PR325 base. Rational all-frame verification is in the separately bound validator; arbitrary-dirty frame invariant and COPY theorem, global lowering, bank/invoice/price, prime/all-field, full-C/complex and all-size interfaces remain explicitly scoped.',artifacts={name:sha(P/name)for name in['local-events.json.gz','local-records.json.gz','local-frames.json.gz','local-endpoints.json','local-paths.json.gz','role-map.json','source-frame-map.json']}) + dump('RESULT.json',result);print(json.dumps(result,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/test_local.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/test_local.py new file mode 100644 index 0000000000..38a6dd001f --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/test_local.py @@ -0,0 +1,58 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +"""Companion bindings and negative controls for the fresh PR325 local frame word.""" +from pathlib import Path +from collections import Counter +import json,gzip,hashlib,subprocess,sys,unittest +P=contract.FRAME;S=contract.SOURCE +def read(p): + p=Path(p);b=p.read_bytes();return json.loads(gzip.decompress(b)if str(p).endswith('.gz')else b) +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +class Tests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.r=read(P/'RESULT.json');cls.v=read(P/'VALIDATION.json');cls.e=read(P/'local-events.json.gz');cls.records=read(P/'local-records.json.gz');cls.end=read(P/'local-endpoints.json');cls.f=read(P/'local-frames.json.gz');cls.roles=read(P/'role-map.json');cls.w=read(S/'inputs/bitword__selected__bit__word_p10.json.gz') + def test_immutable_source_packet(self): + self.assertTrue(contract.verify_source()) + for z in read(S/'MANIFEST.json')['files']:self.assertEqual(sha(S/z['path']),z['sha256']) + def test_all_code_and_output_bindings(self): + self.assertEqual(sha(contract.HERE/'frame/build_local.py'),self.r['checker_sha256']);self.assertEqual(sha(P/'RESULT.json'),self.v['builder_receipt_sha256']);self.assertEqual(sha(contract.HERE/'frame/validate_local.py'),self.v['checker_sha256']) + for n,h in self.r['artifacts'].items():self.assertEqual(sha(P/n),h) + def test_source_projection_exact_rebinding(self): + sm={v:int(k)for k,v in read(P/'source-frame-map.json').items()};old=read(S/'scalar-events.json.gz');self.assertEqual(len(old),len(self.e)) + for i,(a,b)in enumerate(zip(old,self.e)): + self.assertEqual(b['original_index'],i);c=dict(b);del c['original_index'];c['frame']=sm[c['frame']];self.assertEqual(a,c) + def test_physical_role_map_rederived(self): + aliases={b:a for a,b in self.w['pairs']};regs=sorted(set(range(9060))-set(aliases));idx={r:1920+i for i,r in enumerate(regs)} + self.assertEqual(self.roles['physical_by_virtual'],{str(r):idx[aliases.get(r,r)]for r in range(9060)});self.assertEqual(self.roles['representative_by_physical'],{str(idx[r]):r for r in regs});self.assertEqual(len(set(self.roles['physical_by_virtual'].values())),8100) + def test_every_current_operation_bound(self): + m=self.roles['physical_by_virtual'];seen=Counter() + for e in self.e: + if e['semantic'][0]in('forward','inverse'): + k,i=e['semantic'];a,b,_=self.w['ops'][i];self.assertEqual((e['a'],e['b']),(m[str(a)],m[str(b)]));self.assertEqual(e['c'],1 if k=='forward'else-1);seen[k,i]+=1 + self.assertEqual(seen,Counter({(k,i):1 for k in('forward','inverse')for i in range(len(self.w['ops']))})) + def test_endpoint_dimensions_and_paths(self): + dim=lambda x:self.f[str(x)]['rank'];initial=self.end['initial'];final=self.end['final'];self.assertEqual(len(initial),10020);self.assertEqual(Counter(dim(initial[str(q)])for q in range(1920,10020)),{0:6900,16:1200});self.assertEqual({dim(final[str(q)])for q in range(1920,10020)},{20});self.assertEqual({dim(final[str(q)])for q in range(960,1920)},{19}) + for q,ch in read(P/'local-paths.json.gz').items():self.assertEqual(ch[0],initial[q]);self.assertEqual(ch[-1],final[q]) + def test_literal_histogram(self): + h=Counter() + for op,a,b,c,f,z in self.records: + if op==0 and f:h[f]+=1 + if op==2:h[z]+=1 + self.assertEqual(h,{int(k):v for k,v in self.r['one_stage_paid_histogram'].items()});self.assertEqual((sum(h.values()),sum(k*v for k,v in h.items())),(46844,179640));self.assertEqual(self.r['histogram_parts']['source'],{'2':960,'17':960}) + def test_all_frame_and_COPY_validation(self): + self.assertEqual(self.v['frames'],12885);self.assertEqual(self.v['records'],398660);self.assertEqual(self.v['exact_MOVE_containment_pairs'],40125);self.assertEqual(self.v['copies'],20);self.assertTrue(self.v['all_frame_G_nondegeneracy_certified']);self.assertTrue(self.v['source_and_target_and_helper_final_states_exact']);self.assertEqual(self.v['zeroed_basis_row_controls_rejected'],12884) + def test_integer_operand_support_and_norms(self): + self.assertEqual(self.r['integer_operand_source_support_checks'],563928);self.assertTrue(self.r['all_helper_integer_sources_restored']);self.assertEqual(self.r['copied_input_source_checks'],2880);self.assertEqual((self.v['forward_norm'],self.v['inverse_norm']),(22071,959838));self.assertEqual(self.r['payload_bound'],64*22071**3*959838**2);self.assertEqual(self.r['payload_bits'],90) + def test_copy_orientation_mutation_rejected(self): + copy=next(z for z in self.records if z[0]==2);op,a,b,c,f,z=copy;self.assertEqual(b,10020);self.assertLess(a,10020);self.assertNotEqual(a,b);bad=copy[:];bad[1],bad[2]=bad[2],bad[1];self.assertNotEqual(bad[2],10020) + def test_nonmonotone_MOVE_mutation_rejected(self): + row=next(z for z in self.records if z[0]==0 and z[4]>0);_,q,a,b,gap,_=row;self.assertEqual(self.f[str(b)]['rank']-self.f[str(a)]['rank'],gap);self.assertLess(self.f[str(a)]['rank']-self.f[str(b)]['rank'],0) + def test_assertions_required(self): + for name in('build_local.py','validate_local.py'): + x=subprocess.run([sys.executable,'-O',str(contract.HERE/'frame'/name)],capture_output=True,text=True);self.assertNotEqual(x.returncode,0);self.assertIn('Assertions must be enabled',x.stderr) +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/validate_local.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/validate_local.py new file mode 100644 index 0000000000..4f83c098ef --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/frame/validate_local.py @@ -0,0 +1,89 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +"""Independent exported-record replay, exact containment and frame-rank audit. +All row spaces are cleared to primitive integer bases; modular nonzero ranks +certify rational ranks and nondegeneracy, while orthogonality is exact integer. +""" +from pathlib import Path +from fractions import Fraction +from math import gcd,lcm +from collections import Counter +import hashlib,json,gzip +P=contract.FRAME +if not __debug__:raise RuntimeError('Assertions must be enabled') +def read(n): + raw=(P/n).read_bytes();return json.loads(gzip.decompress(raw)if n.endswith('.gz')else raw) +def integer(row): + row=list(map(Fraction,row));den=lcm(*(x.denominator for x in row));out=[int(x*den)for x in row];g=gcd(*out) + return [x//g for x in out]if g else out +MOD=(1<<61)-1 +def rank(rows,width): + a=[[x%MOD for x in row]for row in rows];k=0 + for j in range(width): + p=next((i for i in range(k,len(a))if a[i][j]and gcd(a[i][j],MOD)==1),None) + if p is None:continue + a[k],a[p]=a[p],a[k];inv=pow(a[k][j],-1,MOD);a[k]=[(x*inv)%MOD for x in a[k]] + for i in range(k+1,len(a)): + v=a[i][j] + if v:a[i]=[(x-v*y)%MOD for x,y in zip(a[i],a[k])] + k+=1 + return k +def dot(a,b):return sum(x*y for x,y in zip(a,b)if x and y) +def run(): + result=read('RESULT.json') + assert result['checker_sha256']==hashlib.sha256((contract.HERE/'frame/build_local.py').read_bytes()).hexdigest() + for n,h in result['artifacts'].items():assert hashlib.sha256((P/n).read_bytes()).hexdigest()==h,n + endpoint=read('local-endpoints.json');n=endpoint['n'];initial={int(k):v for k,v in endpoint['initial'].items()};final={int(k):v for k,v in endpoint['final'].items()};raw=read('local-records.json.gz');frames=read('local-frames.json.gz') + B={int(k):[integer(row)for row in z['basis']]for k,z in frames.items()};A={int(k):[integer(row)for row in z['annihilator']]for k,z in frames.items()};dim={int(k):z['rank']for k,z in frames.items()} + for f in dim: + b,a,d=B[f],A[f],dim[f];assert len(b)==d and len(a)==20-d + assert rank(b,20)==d and rank(a,20)==20-d + assert all(dot(x,y)==0 for x in a for y in b) + rows,mult=(b,9)if d<=10 else(a,11) + gram=[[mult*dot(x,y)-sum(x)*sum(y)for y in rows]for x in rows] + assert rank(gram,len(rows))==len(rows),('degenerate G frame',f) + print('All',len(dim),'frame bases/annihilators and G-nondegeneracy passed',flush=True) + state=dict(initial);temporary=None;H=Counter();adds=0;units=0;pairs=set();copies=0 + for i,row in enumerate(raw): + assert len(row)==6;op,a,b,c,f,z=row + if op==0: + assert state[a]==b and f==dim[c]-dim[b]>=0 + if(b,c)not in pairs: + assert all(dot(x,y)==0 for x in A[c]for y in B[b]),('nonnested MOVE',i,b,c);pairs.add((b,c)) + state[a]=c + if f:H[f]+=1 + elif op==1: + assert a!=b and c%2 and state[a]==state[b]==f;adds+=1;units+=abs(c) + assert 0<=z6I',gzip.decompress((PREP/'literal-bank-assignments.bin.gz').read_bytes())));ps=read(P/'extended-phases.json');bill=read(P/'invoice.json');assignments(rows);phases(ps);fees(bill) + rejected=[] + def reject(name,check,obj,mutate): + bad=copy.deepcopy(obj);mutate(bad) + try:check(bad) + except(AssertionError,KeyError):rejected.append(name) + else:raise AssertionError('accepted '+name) + reject('omitted_bank_assignment',assignments,rows,lambda x:x.pop()) + reject('duplicate_bank_assignment',assignments,rows,lambda x:x.__setitem__(1,x[0])) + reject('wrong_bank_address',assignments,rows,lambda x:x.__setitem__(0,(*x[0][:2],85680,*x[0][3:]))) + reject('overlapping_bank_support',assignments,rows,lambda x:x.__setitem__(1,(*x[1][:3],x[0][3],x[1][4],x[0][5]))) + reject('omitted_helper_sweep',phases,ps,lambda x:x.pop(59)) + reject('boundary_before_last_helper',phases,ps,lambda x:x.__setitem__(slice(119,121),list(reversed(x[119:121])))) + reject('unrequested_completion',phases,ps,lambda x:x.append({'kind':'paid_bank_completion'})) + reject('missing_wrappers',fees,bill,lambda x:x['terms'].__setitem__('generic_wrappers',0)) + reject('missing_selectors',fees,bill,lambda x:x['terms'].__setitem__('bank_selectors',0)) + reject('missing_matrix_preparation',fees,bill,lambda x:x['terms'].__setitem__('matrix_preparation',0)) + reject('missing_copy_fee',fees,bill,lambda x:x['terms'].__setitem__('copy_erase_episodes',0)) + reject('missing_fallback',fees,bill,lambda x:x.__setitem__('all_edges_pay_fallback320000',False)) + result={'status':'PASS_INDEPENDENT_PR325_EMITTED_BANK_PHASE_FEE_CONTROLS','global_result_sha256':sha(P/'RESULT.json'),'checker_sha256':sha(__file__),'rejected':rejected,'negative_controls':len(rejected)} + (HERE/'EMISSION-CONTROLS.json').write_text(json.dumps(contract.portable(result),indent=2)+'\n');print(json.dumps(contract.portable(result),indent=2)) +if __name__=='__main__':main() diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/check_geometry.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/check_geometry.py new file mode 100644 index 0000000000..f4b4d5d7fc --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/check_geometry.py @@ -0,0 +1,71 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_frame_binding() +"""Independent exact checks of fresh route/boundary and positive COPY geometry. +No emitter imports, upstream execution, or numerical rank screens. +""" +from pathlib import Path +from fractions import Fraction as Q +import json,gzip,hashlib,os +import numpy as np +if not __debug__:raise RuntimeError('Assertions required') +HERE=contract.GLOBAL +P=contract.GLOBAL +L=contract.FRAME +def read(p): + p=Path(p);b=p.read_bytes();return json.loads(gzip.decompress(b)if p.suffix=='.gz'else b) +sha=lambda p:hashlib.sha256(Path(p).read_bytes()).hexdigest() +def main(): + routes=read(P/'fresh-data-routes.json');labels=routes['ports'];I=np.eye(20,dtype=np.int64);q=np.array([int(j<3)for j in range(20)],dtype=np.int64) + PP=np.outer(q,3*q-1);KK=6*I-PP + assert np.array_equal(PP@PP,6*PP)and np.array_equal(KK@KK,6*KK)and not np.any(PP@KK) + def rho(s): + R=6*np.eye(100,dtype=np.int64) + if s: + w=slice(s*20,(s+1)*20);R[:20,:20]=PP;R[w,w]=PP;R[:20,w]=KK;R[w,:20]=KK + assert np.array_equal(R@R,36*np.eye(100,dtype=np.int64));return R + def stage(s,k): + A=np.zeros((100,100),dtype=np.int64);A[:20,:20]={'P':PP,'K':KK,'H':6*I,'0':0*I}[k] + for j in range(1,s+1):A[j*20:(j+1)*20,j*20:(j+1)*20]=KK + return A + def data(s,k): + v=rho(s)@stage(s,k)@rho(s);assert not np.any(v%36);return v//36 + z=np.zeros((100,100),dtype=np.int64);ii=6*np.eye(100,dtype=np.int64);p=data(0,'P') + pairs=[(p,data(1,'H')),(z,data(1,'K')),(data(2,'P'),data(3,'P')),(data(2,'0'),data(3,'0')),(data(2,'H'),ii),(data(2,'K'),ii-p),(data(4,'H'),ii),(data(4,'K'),ii-p)] + ranks=[] + for a,b in pairs: + diff=b-a;assert np.array_equal(diff@diff,6*diff);ranks.append(int(np.trace(diff)//6)) + assert ranks==[38,38,19,19,42,42,4,4] + # For every fresh label, explicit40dimensional route is S*rho_star*S^-1. + canonical=np.block([[PP,KK],[KK,PP]]) + for port in labels: + pi=np.zeros((20,20),dtype=np.int64) + for j,i in enumerate(port['pi_columns']):pi[i,j]=1 + chi=np.array([int(j in port['label'])for j in range(20)]);pchi=np.outer(chi,3*chi-1) + assert np.array_equal(pi@q,chi)and np.array_equal(pi@PP@pi.T,pchi) + r=np.block([[pchi,pi@KK],[KK@pi.T,PP]]);s=np.block([[pi,0*I],[0*I,I]]) + assert np.array_equal(r,s@canonical@s.T)and np.array_equal(r@r,36*np.eye(40,dtype=np.int64)) + # Actual20 center frames have codimension2; derive their positive projector exactly. + frames=read(L/'local-frames.json.gz');records=read(L/'local-records.json.gz');overrides=read(P/'copied-work-projector-overrides.json') + centers={r[3]for r in records if r[0]==2};assert len(centers)==20 and len(overrides)==100 + def mul(a,b):return [[sum(x*y for x,y in zip(row,col))for col in zip(*b)]for row in a] + id20=[[Q(i==j)for j in range(20)]for i in range(20)] + for f in centers: + A=[list(map(Q,row))for row in frames[str(f)]['annihilator']];assert len(A)==2 + U=[[A[k][j]-sum(A[k])/11 for k in range(2)]for j in range(20)];M=mul(A,U);det=M[0][0]*M[1][1]-M[0][1]*M[1][0];assert det + inv=[[M[1][1]/det,-M[0][1]/det],[-M[1][0]/det,M[0][0]/det]];N=mul(mul(U,inv),A) + Pp=[[id20[i][j]-N[i][j]for j in range(20)]for i in range(20)] + assert mul(Pp,Pp)==Pp and sum(Pp[i][i]for i in range(20))==18 + minus=[[-x for x in row]for row in Pp];assert mul(minus,minus)!=minus + for x in overrides: + assert x['rank']==18 and(x['difference_orientation']==(-1 if not x['complement']else 1)) + assert x['old_frame']in centers and frames[str(x['new_frame'])]['rank']==0 + result={'status':'PASS_FRESH_PR325_EXACT_DATA_BOUNDARY_AND_COPY_GEOMETRY','routes':960,'all_rho_involutions':True,'boundary_ranks':ranks,'universal_port_conjugacy_checked':True, + 'actual_center_projectors':20,'positive_copy_overrides':100,'negative_center_projector_rejected':True,'global_result_sha256':sha(P/'RESULT.json'),'checker_sha256':sha(__file__), + 'scope':'Exact finite rational coordinate geometry. Common-frame pointwise-array lifting, generic primitive, prime and all-size interfaces remain separately scoped.'} + (HERE/'GEOMETRY-CONTROLS.json').write_text(json.dumps(contract.portable(result),indent=2)+'\n');print(json.dumps(contract.portable(result),indent=2)) +if __name__=='__main__':main() diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/generic_ir_helpers.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/generic_ir_helpers.py new file mode 100644 index 0000000000..e941c76385 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/generic_ir_helpers.py @@ -0,0 +1,46 @@ +"""Retained independently authored IR routines. Upstream production code is never executed. Apache-2.0. Prepared with substantial OpenAI assistance.""" +import numpy as np + +def stage_template(stage,records,frames): + rev=stage in (1,3);out=[] + for index in (range(len(records)-1,-1,-1) if rev else range(len(records))): + row=records[index];op,a,b,c,f,*extra=row;z=extra[0] if extra else 0 + if op==0:out.append([0,a,c if rev else b,b if rev else c,f,0,stage,int(rev),index]) + elif op==1:out.append([1,a,b,-c if rev else c,f,z,stage,int(rev),index]) + elif op==(3 if rev else 2): + out.append([2,b,a,0,c,0,stage,int(rev),index]) + out.append([0,b,c,f,frames[str(c)]['rank'],0,stage,int(rev),index]) + else: + assert op==(2 if rev else 3) + out.append([3,b,-1,0,f,0,stage,int(rev),index]) + return np.asarray(out,dtype='=0;state[a]=c + if f:H[f]+=1 + elif op==1: + assert a!=b and state[a]==state[b]==f and c%2;coeff[abs(c)]+=1 + if b==WORK:assert tmp is not None;reads+=1 + elif op==2: + assert tmp is None and b==WORK and state[a]==c and rank(c)==z==18 and rank(f)==0 + tmp=(a,b,c,f);state[b]=f;H[z]+=1;reads=0 + else: + assert op==3 and tmp==(a,b,c,f) and state[a]==c and state[b]==f and reads==144 + del state[b];tmp=None + assert state==final and tmp is None and (ops[1],ops[2],ops[3])==(350640,20,20) + assert sum(k*v for k,v in coeff.items())==352560 + assert(sum(H.values()),sum(r*n for r,n in H.items()))==(46844,179640) + return H,ops + +def endpoint_binding(roles,frames,ep): + charts=read(PREP/'fresh-endpoint-charts.json.gz');programs={int(k):v for k,v in charts['programs'].items()};uses={int(k):v for k,v in charts['uses'].items()} + source_ids=read(LOCAL/'source-frame-map.json');widths={};receipts=[] + for j,r in enumerate(roles): + before=ep['initial'][str(1920+j)];after=ep['final'][str(1920+j)];A=frames[str(before)];B=frames[str(after)] + assert B['rank']==20;widths[r]=20-A['rank'] + if r not in uses:assert A['rank']==0;continue + original=uses[r];assert before==source_ids[str(original)]and A['rank']==16 + p=programs[original];cols=[list(map(F,row))for row in p['basis_columns']];inv=[list(map(F,row))for row in p['inverse']] + assert p['factor_count']<=150 + if original not in {row[1]for row in receipts}: + AA=[list(map(F,row))for row in A['annihilator']];BB=[list(map(F,row))for row in A['basis']] + assert all(sum(x*y for x,y in zip(a,b))==0 for a in AA for b in cols[4:]) + assert all(9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b)==0 for a in cols[:4]for b in BB) + mat=[list(row)for row in zip(*cols)] + for left,right in ((mat,inv),(inv,mat)): + assert all(sum(x*y for x,y in zip(row,col))==int(i==j)for i,row in enumerate(left)for j,col in enumerate(zip(*right))) + for op,i,j,c in p['factors']: + if op=='swap':mat[i],mat[j]=mat[j],mat[i] + elif op=='scale':mat[i]=[F(c)*x for x in mat[i]] + else:assert op=='add';mat[i]=[x+F(c)*y for x,y in zip(mat[i],mat[j])] + assert mat==[[int(i==j)for j in range(20)]for i in range(20)] + receipts.append([r,original,before,after,4]) + assert Counter(widths.values())=={4:1200,20:6900} + dump('actual-endpoint-chart-binding.json',{'uses':receipts,'fresh_unique_charts':len(programs),'identity_endpoints':6900,'all_actual_endpoints_bound':True}) + return widths,programs,uses + +def namespaces(roles,widths,programs,uses): + raw=gzip.decompress((PREP/'literal-bank-assignments.bin.gz').read_bytes());assign={};coverage=bytearray(NB*100) + for r,t,b,o,w,sc in struct.iter_unpack('>6I',raw): + assert widths[r]==w and 0<=t<60 and 0<=b=960)])*960+i%960,0 if s==0 else 1+s*960+i%960) + witnesses=defaultdict(list) + for j,r in enumerate(roles): + b,o,w,sc=assign[r,t];pid=uses.get(r,-1);key=s,o,w,sc,pid + if key not in ids: + pi=permutation(s,o,w);outside=next(k for k in range(100)if not 20*s<=k<20*(s+1)) + ids[key]=len(normalizers);normalizers.append({'id':ids[key],'stage':s,'support':[o,o+w],'rank':w,'scalar':sc,'permutation':pi,'chart_program':pid, + 'formula':'N=scalar*Pi*embed_stage(B_inverse)','physical_cover':'g=d*tau_stage*N_inverse','outside_column':outside,'unit_column_witness':[pi[outside],sc],'paid_factor_bound':349}) + n=ids[key];family=230400+s*NB+b;a[1920+j]=(family,4801+n);witnesses[family].append(tuple(normalizers[n]['unit_column_witness'])) + a[-1]=(S,-1) + assert len(set(map(tuple,a.tolist())))==WORK+1 and all(len(set(v))==len(v)for v in witnesses.values()) + assert len(set(map(int,a[1920:-1,0])))==8100 + hashes.append({'stage':s,'replica':t,'sha256':sha(a.tobytes()),'full_address_injective':True}) + gz('all-namespaces.i32.gz',maps.tobytes());dump('namespace-hashes.json',hashes) + dump('normalizers.json.gz',{'normalizers':normalizers,'chart_programs':programs,'common_ancestor_chart':'QA=diag(A,I100)', + 'data_route_encoding':'0=d;1+s*960+port=d*rho_s_port;-1=external_work;4801+n=d*tau_s*N_n_inverse', + 'regular_endpoint':'The admitted arbitrary-dirty separated local endpoint is conjugated by this exact N. Complete GL100 cover right multiplication is bijective.'}) + return maps,len(normalizers) + +def routes_and_projectors(w,g,frames,ep,roots): + labels=g['labels'];assert len(labels)==960;source_ids=read(LOCAL/'source-frame-map.json');routes=[] + for q in range(960): + ids=labels[q];assert len(ids)==len(set(ids))==3 and all(0<=j<20 for j in ids) + chi=[int(j in ids)for j in range(20)];f=ep['initial'][str(q)];frm=frames[str(f)] + assert f==source_ids[str(w['source_frame'][q])] and frm['rank']==1 + assert all(sum(F(x)*y for x,y in zip(a,chi))==0 for a in frm['annihilator']) + pi=ids+[j for j in range(20)if j not in ids] + routes.append({'port':q,'label':ids,'source_frame':f,'pi_columns':pi,'norm_G':2}) + dump('fresh-data-routes.json',{'ports':routes,'G':'I20-J20/9','qstar':[int(j<3)for j in range(20)], + 'rho0':'I100','rho_s':'I outside H0+Hs; blocks [P_chi,pi*Kstar;Kstar*pi_inverse,Pstar]; Pstar=qstar*qstar^t*G/2; Kstar=I20-Pstar', + 'rho_is_involution':True,'tau_s':'exchange H0 with Hs coordinatewise','source_graph_sha256':roots['source_graph_sha256']}) + # All 8 boundary projector formulas are bound to these new source vectors. + dump('boundary-projectors.json',{'D':'rho(stage,port)*F(stage,frame,complement)*rho(stage,port)', + 'kinds':{'P':'actual source frame','K':'actual source frame complemented','H':'FULL','0':'ZERO'}, + 'pairs':[['D(0,P)','D(1,H)'],['ZERO100','D(1,K)'],['D(2,P)','D(3,P)'],['D(2,0)','D(3,0)'],['D(2,H)','I100'],['D(2,K)','I100-D(0,P)'],['D(4,H)','I100'],['D(4,K)','I100-D(0,P)']], + 'ranks':[38,38,19,19,42,42,4,4],'fresh_data_routes_sha256':fs(OUT/'fresh-data-routes.json')}) + +def phases(): + ps=[] + for s in range(5): + ps.extend({'kind':'helper','stage':s,'replica':t,'cover':'all_GL100_Rw','reverse_complement':s in(1,3)}for t in range(60)) + if s in(1,2,4):ps.extend({'kind':k,'stage':s,'which':{1:0,2:1,4:2}[s],'replica':t,'cover':'all_GL100_Rw'}for t in range(60)for k in('idle','bridge')) + ps.extend({'kind':'terminal_exchange','replica':t,'cover':'all_GL100_Rw'}for t in range(60)) + for i,p in enumerate(ps):p['phase_index']=i + return ps + +def invoice(hist,bank): + E=sum(hist.values());J=60*(24*960+10*8100);K=2*5*60*((S-1)+8100*100*349) + terms={'unit_expanded_additions':60*(5*352560+6*960),'high_affine_factors':J*16*10001**2,'low_transpositions':J*(S+20), + 'generic_wrappers':E*80008,'matrix_preparation':E*128*200**3,'global_matrix_preparation':16*100**3,'copy_erase_episodes':6000,'paid_child_overhead':E,'bank_selectors':K,'constant':1} + assert terms==bank['terms']and(J,K,sum(terms.values()))==(6242400,170009279400,24857617667871401) + return {'literal_stock':S,'children':E,'rank_mass':sum(r*n for r,n in hist.items()),'terms':terms,'coefficient':sum(terms.values()),'route_movements':J,'selector_calls':K, + 'all_edges_pay_fallback320000':True,'row_reserve':10001,'new_temporary_roles':0,'completion_children':0,'max_rank':max(hist)} + +def main(): + local,bank,roles,records,frames,ep,w,g,roots=bound_inputs();H,ops=verify_local(records,frames,ep) + assert H==Counter({int(k):v for k,v in local['one_stage_paid_histogram'].items()})==Counter({int(k):v for k,v in bank['helper_histogram'].items()}) + widths,programs,uses=endpoint_binding(roles,frames,ep);maps,norms=namespaces(roles,widths,programs,uses);routes_and_projectors(w,g,frames,ep,roots) + print('Fresh roles, endpoint charts, data routes and all300 namespaces bound',flush=True) + ps=phases();assert len(ps)==720;phase_ids={(p['stage'],p['replica']):p['phase_index']for p in ps if p['kind']=='helper'} + bindings=[];templates=[];overrides=[];hist=Counter();chain=hashlib.sha256();counts=Counter() + for s in range(5): + template=stage_template(s,records,frames);assert Counter(map(int,template[(template[:,0]==0)&(template[:,4]>0),4]))==H + for ordinal,row in enumerate(template): + op,a,b,c,f,z,stage,rev,source=map(int,row) + if op!=0:continue + signed=(frames[str(c)]['rank']-frames[str(b)]['rank'])*(-1 if rev else 1);orientation=-1 if a==WORK and not rev else 1 + assert orientation*signed==f + if a==WORK: + assert f==18;overrides.append({'stage':s,'template_record':ordinal,'local_source_record':source,'family':S,'old_frame':b,'new_frame':c,'complement':rev,'rank':18,'difference_orientation':orientation, + 'positive_projector':'F(old,0)-F(new,0)'if not rev else'F(new,1)-F(old,1)','meaning':'positive embedded center projector; D_P is involutive; never D_negativeP'}) + templates.append(gz(f'stage-{s}-template.i32.gz',template.tobytes())) + for t in range(60): + a=maps[s,t];data=np.zeros((len(template),12),dtype='0);bad[idx][4]+=1 + try:verify_local(bad,frames,ep) + except AssertionError:controls.append('wrong_MOVE_rank') + else:raise AssertionError('bad rank accepted') + for name,change in [('omitted_phase',lambda x:x.pop(59)),('boundary_before_last_helper',lambda x:x.__setitem__(slice(119,121),list(reversed(x[119:121])))),('unrequested_completion',lambda x:x.append({'kind':'paid_bank_completion'}))]: + bad=phases();change(bad);assert bad!=phases();controls.append(name) + for name,h in local['artifacts'].items():assert fs(LOCAL/name)==h + assert roots['local_result_sha256']==fs(LOCAL/'RESULT.json')and roots['bank_result_sha256']==fs(BANK/'BANK-RESULT.json') + result={'status':'PASS_SOURCE_BOUND_PR325_GLOBAL_FRAME_IR','source_head':HEAD,'source_word_gzip_sha256':WORD,'source_identity':roots,'candidate_fingerprint':sha(canon(roots)), + 'compiler_sha256':fs(__file__),'generic_ir_helpers_sha256':fs(HERE/'generic_ir_helpers.py'),'actual_local_records':len(records),'local_opcodes':dict(ops),'local_histogram':dict(sorted(H.items())), + 'literal_histogram':dict(sorted(hist.items())),'literal_stock':S,'calls':sum(hist.values()),'rank_mass':sum(r*n for r,n in hist.items()),'max_rank':42,'normalizer_descriptors':norms,'phases':720, + 'completion_sweeps':0,'expanded_frame_stage_records':sum(x['records']for x in bindings),'full_program_sha256':chain.hexdigest(),'copied_work_positive_projector_overrides':100,'invoice':bill, + 'rejected_controls':controls,'upstream_production_code_executed':False,'prior_role_frame_or_chart_data_imported':False,'publication_performed':False, + 'attribution':'New PR325 source word and selections are credited to immutable head and source-provenance notices. Only independently authored generic stage and boundary code is retained, with CODE-PROVENANCE.json.', + 'scope':'Concrete fresh local frame word, actual endpoint charts, all 300 literal namespaces, 720 phases and signed boundaries are bound. Matrix frame/COPY retiming proof is separately audited; generic primitive, prime uniformity, ordinary leaves, complex supplier and all-size interfaces remain inherited.'} + dump('RESULT.json',result);dump('MANIFEST.json',{p.name:fs(p)for p in sorted(OUT.iterdir())if p.is_file()and p.name not in ('MANIFEST.json','GEOMETRY-CONTROLS.json','EMISSION-CONTROLS.json')});print(json.dumps(contract.portable(result),indent=2)) +if __name__=='__main__':main() diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/prepare_fresh.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/prepare_fresh.py new file mode 100644 index 0000000000..aec289632f --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/lowering/prepare_fresh.py @@ -0,0 +1,120 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +contract.verify_frame_binding() +"""Fresh PR325 finite bank address and rational chart preparation. +Independent source-data consumer; upstream programs are never executed. +Prepared with OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from fractions import Fraction as F +from collections import Counter +from math import gcd,lcm +import json,gzip,hashlib,struct,os +if not __debug__:raise RuntimeError('Assertions required') +HERE=Path(__file__).resolve().parent +SOURCE=contract.SOURCE +OUT=contract.PREPARED +HEAD='0eca9340a3df6141b8e71a41638c3937b3522888' +# Source transport hash is of the actual compressed word bytes. +WORD='601da0e6a67715011a4bbc44f6977f13625c5833d4d40443c10b0d5a9da1896d' +FRAMES='fec07e983f81459c45747dfaa4eecabc3429e84d4685f385771904dee4c4fbc0' +sha=lambda b:hashlib.sha256(b).hexdigest() +def fs(p):return sha(Path(p).read_bytes()) +def read(p): + p=Path(p);b=p.read_bytes();return json.loads(gzip.decompress(b)if p.suffix=='.gz'else b) +def canon(x):return (json.dumps(x,sort_keys=True,separators=(',',':'))+'\n').encode() +def dump(n,x): + b=canon(contract.portable(x));(OUT/n).write_bytes(gzip.compress(b,mtime=0)if n.endswith('.gz')else b) +def primitive(row): + den=lcm(*(x.denominator for x in row));a=[int(x*den)for x in row];d=gcd(*a);return[x//d for x in a]if d else a +def rref(rows): + a=[list(map(F,r))for r in rows];piv=[];k=0 + for j in range(20): + z=next((i for i in range(k,len(a))if a[i][j]),None) + if z is None:continue + a[k],a[z]=a[z],a[k];v=a[k][j];a[k]=[x/v for x in a[k]] + for i in range(len(a)): + if i!=k and a[i][j]:v=a[i][j];a[i]=[x-v*y for x,y in zip(a[i],a[k])] + piv.append(j);k+=1 + return a[:k],piv +def null(rows): + a,piv=rref(rows);out=[] + for j in range(20): + if j in piv:continue + v=[F(0)]*20;v[j]=F(1) + for i,k in enumerate(piv):v[k]=-a[i][j] + out.append(primitive(v)) + return out +def factor_inverse(columns): + a=[list(map(F,row))for row in zip(*columns)];inv=[[F(i==j)for j in range(20)]for i in range(20)];ops=[] + def swap(i,j):a[i],a[j]=a[j],a[i];inv[i],inv[j]=inv[j],inv[i];ops.append(['swap',i,j,'1']) + def scale(i,c):a[i]=[c*x for x in a[i]];inv[i]=[c*x for x in inv[i]];ops.append(['scale',i,i,str(c)]) + def add(i,j,c):a[i]=[x+c*y for x,y in zip(a[i],a[j])];inv[i]=[x+c*y for x,y in zip(inv[i],inv[j])];ops.append(['add',i,j,str(c)]) + for j in range(20): + i=next(i for i in range(j,20)if a[i][j]) + if i!=j:swap(i,j) + if a[j][j]!=1:scale(j,1/a[j][j]) + for i in range(20): + if i!=j and a[i][j]:add(i,j,-a[i][j]) + assert a==[[int(i==j)for j in range(20)]for i in range(20)] + B=list(zip(*columns)) + for left,right in ((B,inv),(inv,B)): + assert all(sum(x*y for x,y in zip(row,col))==int(i==j)for i,row in enumerate(left)for j,col in enumerate(zip(*right))) + assert len(ops)+99+100<=349 + return [[str(x)for x in row]for row in inv],ops + +def main(): + sources=read(SOURCE/'SOURCES.json');assert sources['head']==HEAD + for z in sources['files']:assert fs(SOURCE/'inputs'/z['local'])==z['sha256'] + pre=SOURCE/'inputs/bitword__selected__bit__' + wp=Path(str(pre)+'word_p10.json.gz');fp=Path(str(pre)+'frames_p10.json.gz') + assert fs(wp)==WORD and fs(fp)==FRAMES + w=read(wp);frames=read(fp)['frames'];aliases={b:a for a,b in w['pairs']} + assert len(aliases)==960 and not set(aliases)&set(aliases.values()) + virtual=1+max(max(r[:2])for r in w['ops']);roles=sorted(set(range(virtual))-set(aliases)) + assert virtual==9060 and len(roles)==8100 + gauges={z['role']:z for z in w['gauges']if z['role']in roles} + assert len(gauges)==1200 and Counter(z['dim']for z in gauges.values())=={16:1200} + programs={};uses={};denominators=set();factor_lengths=[] + for role,z in sorted(gauges.items()): + f=z['frame'];uses[role]=f + if f in programs:continue + frm=frames[str(f)];A=frm.get('a');B=frm.get('b') + if A is None:A=null(B) + if B is None:B=null(A) + assert len(rref(A)[0])==4 and len(rref(B)[0])==16 + assert all(sum(x*y for x,y in zip(a,b))==0 for a in A for b in B) + R=[[11*x-sum(a)for x in a]for a in A] + assert all(9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b)==0 for a in R for b in B) + columns=R+B;inverse,ops=factor_inverse(columns) + for row in inverse: + for x in row:denominators.add(F(x).denominator) + for op,i,j,c in ops:denominators.add(F(c).denominator) + programs[f]={'source_frame':f,'rank':4,'entrance_rank':16,'final_rank':20,'basis_columns':columns,'inverse':inverse,'factors':ops,'factor_count':len(ops)} + factor_lengths.append(len(ops)) + assert len(programs)==120 + raw=bytearray();coverage=bytearray(85680*100);bank=0 + for width in (4,20): + selected=[r for r in roles if(4 if r in gauges else 20)==width] + capacity=100//width;items=[(r,t)for r in selected for t in range(60)];assert len(items)%capacity==0 + for start in range(0,len(items),capacity): + for slot,(r,t)in enumerate(items[start:start+capacity]): + off=slot*width;scalar=slot+1;raw.extend(struct.pack('>6I',r,t,bank,off,width,scalar)) + sl=slice(bank*100+off,bank*100+off+width);assert not any(coverage[sl]);coverage[sl]=b'\1'*width + bank+=1 + assert bank==85680 and all(coverage)and len(raw)==486000*24 + (OUT/'literal-bank-assignments.bin.gz').write_bytes(gzip.compress(raw,mtime=0)) + dump('fresh-role-index.json',{'roles':roles,'aliases':aliases,'source_word_gzip_sha256':WORD,'helper_offset':1920,'work':10020,'source_gauge_frames':uses}) + dump('fresh-endpoint-charts.json.gz',{'programs':programs,'uses':uses,'denominators':sorted(denominators),'all_actual_current_gauges':True}) + result={'status':'PASS_FRESH_PR325_BANK_PREPARATION_ONLY','source_head':HEAD,'word_gzip_sha256':WORD,'frames_gzip_sha256':FRAMES, + 'physical_roles':8100,'assignments':486000,'banks_per_stage':85680,'literal_stock':658800,'inventory':{4:1200,20:6900},'full_bank_coverage':True, + 'paid_completion_sweeps':0,'fresh_charts':120,'chart_uses':1200,'max_chart_factors':max(factor_lengths),'normalizer_factor_bound':349, + 'assignment_raw_sha256':sha(raw),'assignment_gzip_sha256':fs(OUT/'literal-bank-assignments.bin.gz'),'source_manifest_sha256':fs(SOURCE/'SOURCES.json'), + 'checker_sha256':fs(__file__),'no_old_role_frame_or_chart_data_imported':True,'scope':'Fresh roles, endpoint chart algebra and complete literal bank coverage only. Actual full local frame stream, chronology/matrix retiming proof and global phase binding remain required.'} + dump('PREPARATION.json',result);dump('MANIFEST.json',{p.name:fs(p)for p in sorted(OUT.iterdir())if p.is_file()and p.name!='MANIFEST.json'}) + print(json.dumps(contract.portable(result),indent=2)) +if __name__=='__main__':main() diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/packet325.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/packet325.py new file mode 100644 index 0000000000..5252749026 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/packet325.py @@ -0,0 +1,138 @@ +"""Strict portable contract for the fresh PR325 480-retiming candidate.""" +from pathlib import Path +import base64,gzip,hashlib,json,os,shutil +HERE=Path(__file__).resolve().parent +INPUTS=Path(os.environ.get('P325_INPUTS',str(HERE/'local-inputs'))).resolve() +OUTPUT=Path(os.environ.get('P325_OUTPUT',str(HERE/'output'))).resolve() +SOURCE,FRAME,BANK,PREPARED,GLOBAL,AUDIT,INERT=[OUTPUT/x for x in ['source','frame','bank','prepared','global','audit','inert']] +HEAD='0eca9340a3df6141b8e71a41638c3937b3522888' +WORD='601da0e6a67715011a4bbc44f6977f13625c5833d4d40443c10b0d5a9da1896d' +FRAMES='fec07e983f81459c45747dfaa4eecabc3429e84d4685f385771904dee4c4fbc0' +def require_assertions(): + if not __debug__:raise RuntimeError('Assertions must be enabled; run without -O.') +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def read(p): + p=Path(p);b=p.read_bytes();return json.loads(gzip.decompress(b)if p.suffix=='.gz'else b) +def portable(x): + if isinstance(x,dict):return {portable(k):portable(v)for k,v in x.items()} + if isinstance(x,list):return [portable(v)for v in x] + if isinstance(x,str): + for root,label in [(OUTPUT,'$OUTPUT'),(INPUTS,'$INPUTS'),(HERE,'$PACKAGE')]:x=x.replace(str(root),label) + return x +def dump(p,x): + p=Path(p);b=(json.dumps(portable(x),sort_keys=True,separators=(',',':'))+'\n').encode();p.write_bytes(gzip.compress(b,mtime=0)if p.suffix=='.gz'else b) +def source_manifest(): + x=read(HERE/'inputs.json');assert x['head']==HEAD and x['word_gzip_sha256']==WORD + assert len(x['files'])==27 and len({z['local']for z in x['files']})==27 + for z in x['files']: + assert not Path(z['local']).is_absolute()and '..'not in Path(z['local']).parts and not z['local'].endswith('.py') + assert z['url']==f"https://raw.githubusercontent.com/{z['repository']}/{HEAD}/research/five-stage-p10b-banks/{z['path']}" + return x +def check_input(raw,z): + require_assertions();assert len(raw)==z['bytes']and hashlib.sha256(raw).hexdigest()==z['sha256'],z['local'] + assert hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==z['git_blob'],z['local'] +def verify_inputs(): + require_assertions();m=source_manifest() + for z in m['files']:check_input((INPUTS/z['local']).read_bytes(),z) + upstream=read(INPUTS/'MANIFEST.json')['files'];assert sha(INPUTS/'MANIFEST.json')==m['upstream_manifest_sha256'] + for z in m['files']: + if z['path']!='MANIFEST.json':assert upstream[z['path']]==z['sha256'] + return m +def setup_data(): + m=verify_inputs() + for p in [SOURCE,FRAME,BANK,PREPARED,GLOBAL,AUDIT,INERT,SOURCE/'inputs']:p.mkdir(parents=True,exist_ok=True) + for z in m['files']: + raw=(INPUTS/z['local']).read_bytes() + for parent in [INERT,SOURCE/'inputs']:(parent/z['local']).write_bytes(raw) + if z['local'].endswith('.gz'): + (INERT/(z['local']+'.b64')).write_bytes(base64.b64encode(raw)) + (INERT/z['local'][:-3]).write_bytes(gzip.decompress(raw)) + shutil.copyfile(HERE/'source/SOURCES.json',SOURCE/'SOURCES.json') + (AUDIT/'inert').mkdir(exist_ok=True) + for z in m['files']: + if z['acquisition_provenance'].startswith('Inert PR325 theorem'):shutil.copyfile(INPUTS/z['local'],AUDIT/'inert'/z['local']) + shutil.copyfile(HERE/'FRAME-CONTRACT.md',AUDIT/'FRAME-CONTRACT.md') + if(HERE/'audit/AUDIT.md').exists():shutil.copyfile(HERE/'audit/AUDIT.md',AUDIT/'AUDIT.md') + if(HERE/'bank/assessment-sources.json').exists():shutil.copyfile(HERE/'bank/assessment-sources.json',OUTPUT/'SOURCES.json') + if(HERE/'bank/baseline-census.json').exists():dump(OUTPUT/'LEDGER.json',{'pr325':read(HERE/'bank/baseline-census.json')}) +SOURCE_ARTIFACTS=['retiming-selection.json','source-events.json.gz','scalar-events.json.gz','physical-source-map.json'] +def freeze_source(): + result=read(SOURCE/'RESULT.json');assert set(result['artifacts'])==set(SOURCE_ARTIFACTS) + value={'status':'REGENERATED_CURRENT_SOURCE_PACKET','head':HEAD,'word_gzip_sha256':WORD,'input_manifest_sha256':sha(HERE/'inputs.json'),'source_provenance_sha256':sha(HERE/'source/SOURCES.json'),'producers':{p.name:sha(p)for p in sorted((HERE/'source').glob('*.py'))},'files':[{'path':n,'sha256':sha(SOURCE/n)}for n in ['RESULT.json','SOURCES.json',*SOURCE_ARTIFACTS]]} + dump(SOURCE/'MANIFEST.json',value);verify_source() +def verify_source(): + verify_inputs();m=read(SOURCE/'MANIFEST.json');r=read(SOURCE/'RESULT.json') + assert m['head']==HEAD and m['word_gzip_sha256']==WORD and m['input_manifest_sha256']==sha(HERE/'inputs.json') + assert m['source_provenance_sha256']==sha(HERE/'source/SOURCES.json')==sha(SOURCE/'SOURCES.json')==r['sources_sha256'] + assert set(m['producers'])=={p.name for p in(HERE/'source').glob('*.py')} + for n,h in m['producers'].items():assert sha(HERE/'source'/n)==h,n + assert set(z['path']for z in m['files'])=={'RESULT.json','SOURCES.json',*SOURCE_ARTIFACTS} + for z in m['files']:assert sha(SOURCE/z['path'])==z['sha256'],z['path'] + assert r['status']=='PASS_ALL480_PR325_PARTNER_MIX_RETIMINGS_RAW_LOCAL_PROOF' + assert r['checker_sha256']==sha(HERE/'source/check_retimings.py')and r['head']==HEAD and r['word_gzip_sha256']==WORD and r['frames_gzip_sha256']==FRAMES + assert r['admitted']==480 and r['rejected']==0 and r['formal_columns']==10020 + assert r['scalar_projection_unchanged']and r['full_F2_forward_and_inverse_all_columns_pass']and not r['prior_role_or_frame_selections_imported']and not r['upstream_programs_executed'] + assert set(r['artifacts'])==set(SOURCE_ARTIFACTS) + for n,h in r['artifacts'].items():assert sha(SOURCE/n)==h,n + return m +def verify_frame(): + verify_source();r=read(FRAME/'RESULT.json');v=read(FRAME/'VALIDATION.json') + assert r['status']=='PASS_FRESH_PR325_480_RETIMINGS_FULL_LOCAL_FRAME_WORD'and v['status']=='PASS_INDEPENDENT_PR325_FULL_LOCAL_RECORD_AND_FRAME_AUDIT' + assert (v['frames'],v['records'],v['exact_MOVE_containment_pairs'])==(12885,398660,40125) + assert v['all_frame_ranks_and_annihilators_exact']and v['all_frame_G_nondegeneracy_certified']and v['source_and_target_and_helper_final_states_exact'] + assert r['head']==HEAD and r['candidate_sha256']==WORD and r['source_manifest_sha256']==sha(SOURCE/'MANIFEST.json')and r['source_result_sha256']==sha(SOURCE/'RESULT.json') + assert r['checker_sha256']==sha(HERE/'frame/build_local.py')and v['checker_sha256']==sha(HERE/'frame/validate_local.py')and v['builder_receipt_sha256']==sha(FRAME/'RESULT.json') + assert r['source_retimings']==480 and r['columns']==10020 and not r['source_selections_imported_from_old_word'] + assert set(r['artifacts'])=={'local-events.json.gz','local-records.json.gz','local-frames.json.gz','local-endpoints.json','local-paths.json.gz','role-map.json','source-frame-map.json'} + for n,h in r['artifacts'].items():assert sha(FRAME/n)==h,n + return r +def child_env():return dict(os.environ,P325_INPUTS=str(INPUTS),P325_OUTPUT=str(OUTPUT)) +def input_for(path): + return INPUTS/next(z['local']for z in source_manifest()['files']if z['path']==path) +def freeze_frame(): + r=verify_frame();a=read(AUDIT/'FULL-FRAME-AUDIT.json') + assert a['status']=='PASS_PR325_FULL_LOCAL_ARRAY_FRAME_CONTRACT'and a['checker_sha256']==sha(HERE/'audit/check_full_frames.py') + assert a['full_frame_result_sha256']==sha(FRAME/'RESULT.json')and a['full_frame_validation_sha256']==sha(FRAME/'VALIDATION.json')and a['source_result_sha256']==sha(SOURCE/'RESULT.json') + assert a['proof_sha256']==sha(HERE/'FRAME-CONTRACT.md') + assert a['arbitrary_dirty_operator_retained_by_common_array_frame_identity']and a['address_geometry_distinguished_from_F2_payload_values'] + binding={'status':'PASS_SEPARATE_INDEPENDENT_LOCAL_ARRAY_FRAME_AUDIT_BOUND','audit_files':{n:sha(AUDIT/n)for n in ['FULL-FRAME-AUDIT.json','FRAME-CONTRACT.md']},'local_result_sha256':sha(FRAME/'RESULT.json'),'local_validation_sha256':sha(FRAME/'VALIDATION.json'),'checker_sha256':sha(HERE/'audit/check_full_frames.py'),'pinned_theorems':a['pinned_theorems'],'conclusion':'All finite premises of the pinned common-array-frame and complete COPY identities are verified. Generic primitive, prime, global compiler, bank/price and all-size interfaces remain separate.'} + dump(FRAME/'ARBITRARY-DIRTY-AUDIT-BINDING.json',binding) + names=['RESULT.json','VALIDATION.json','ARBITRARY-DIRTY-AUDIT-BINDING.json',*sorted(r['artifacts'])] + dump(FRAME/'MANIFEST.json',{'status':'REGENERATED_CURRENT_FULL_LOCAL_FRAME_PACKET','head':HEAD,'source_manifest_sha256':sha(SOURCE/'MANIFEST.json'),'producers':{p.name:sha(p)for p in sorted((HERE/'frame').glob('*.py'))},'files':[{'path':n,'sha256':sha(FRAME/n)}for n in names]}) + verify_frame_binding() +def verify_frame_binding(): + r=verify_frame();m=read(FRAME/'MANIFEST.json');b=read(FRAME/'ARBITRARY-DIRTY-AUDIT-BINDING.json');a=read(AUDIT/'FULL-FRAME-AUDIT.json') + assert m['head']==HEAD and m['source_manifest_sha256']==sha(SOURCE/'MANIFEST.json') + assert set(m['producers'])=={p.name for p in(HERE/'frame').glob('*.py')} + for n,h in m['producers'].items():assert sha(HERE/'frame'/n)==h,n + assert set(z['path']for z in m['files'])=={'RESULT.json','VALIDATION.json','ARBITRARY-DIRTY-AUDIT-BINDING.json',*r['artifacts']} + for z in m['files']:assert sha(FRAME/z['path'])==z['sha256'],z['path'] + assert b['local_result_sha256']==sha(FRAME/'RESULT.json')and b['local_validation_sha256']==sha(FRAME/'VALIDATION.json') + assert b['checker_sha256']==sha(HERE/'audit/check_full_frames.py')==a['checker_sha256'] + assert set(b['audit_files'])=={'FULL-FRAME-AUDIT.json','FRAME-CONTRACT.md'} + for n,h in b['audit_files'].items():assert sha(AUDIT/n)==h,n + assert a['proof_sha256']==sha(HERE/'FRAME-CONTRACT.md')==sha(AUDIT/'FRAME-CONTRACT.md') + assert a['full_frame_result_sha256']==sha(FRAME/'RESULT.json')and a['full_frame_validation_sha256']==sha(FRAME/'VALIDATION.json')and a['source_result_sha256']==sha(SOURCE/'RESULT.json') + assert a['status']=='PASS_PR325_FULL_LOCAL_ARRAY_FRAME_CONTRACT'and a['arbitrary_dirty_operator_retained_by_common_array_frame_identity']and a['address_geometry_distinguished_from_F2_payload_values'] + assert set(a['pinned_theorems'])=={'UPSTREAM-PR234-PROOF.md','bitword/README.md','proof/INTEGRATED_PROOF.md','proof/PARITY-CONTRACT.md','proof/copied-centers-lemma.tex','proof/primary/03-motifs.tex'} + assert b['pinned_theorems']==a['pinned_theorems'] + for n,h in a['pinned_theorems'].items():assert sha(input_for(n))==h,n + return b +BANK_RECEIPTS={'BASE-LEDGER.json':'check_base_ledger.py','BANK-RESULT.json':'check_admitted_banks.py','PRICE-RESULT.json':'price_admitted_profile.py','CONTROLS.json':'check_controls.py','FRAME-BINDING.json':'check_full_frame_binding.py'} +def freeze_bank(): + value={'status':'REGENERATED_CURRENT_PR325_BANK_CERTIFICATE','head':HEAD,'source_manifest_sha256':sha(SOURCE/'MANIFEST.json'),'full_frame_result_sha256':sha(FRAME/'RESULT.json'),'producers':{p.name:sha(p)for p in sorted((HERE/'bank').glob('*.py'))},'witnesses':{n:sha(HERE/'bank'/n)for n in ['BANK-SOURCES.json','assessment-sources.json','baseline-census.json']},'files':{n:sha(BANK/n)for n in [*BANK_RECEIPTS,'endpoint-charts.json.gz','literal-bank-assignments.bin.gz']}} + dump(BANK/'MANIFEST.json',value);verify_bank() +def verify_bank(): + verify_frame();m=read(BANK/'MANIFEST.json') + assert m['head']==HEAD and m['source_manifest_sha256']==sha(SOURCE/'MANIFEST.json')and m['full_frame_result_sha256']==sha(FRAME/'RESULT.json') + assert set(m['producers'])=={p.name for p in(HERE/'bank').glob('*.py')} + for n,h in m['producers'].items():assert sha(HERE/'bank'/n)==h,n + assert set(m['witnesses'])=={'BANK-SOURCES.json','assessment-sources.json','baseline-census.json'} + for n,h in m['witnesses'].items():assert sha(HERE/'bank'/n)==h,n + assert set(m['files'])=={*BANK_RECEIPTS,'endpoint-charts.json.gz','literal-bank-assignments.bin.gz'} + for n,h in m['files'].items():assert sha(BANK/n)==h,n + for n,code in BANK_RECEIPTS.items():assert read(BANK/n)['checker_sha256']==sha(HERE/'bank'/code),n + b=read(BANK/'BANK-RESULT.json');p=read(BANK/'PRICE-RESULT.json');f=read(BANK/'FRAME-BINDING.json') + assert b['source_admission_sha256']==sha(SOURCE/'RESULT.json')and b['base_ledger_sha256']==sha(BANK/'BASE-LEDGER.json')and p['bank_result_sha256']==sha(BANK/'BANK-RESULT.json') + assert f['full_frame_result_sha256']==sha(FRAME/'RESULT.json')and f['bank_result_sha256']==sha(BANK/'BANK-RESULT.json') + return m diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/requirements.txt b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/requirements.txt new file mode 100644 index 0000000000..d59d856f1c --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/requirements.txt @@ -0,0 +1 @@ +numpy==2.3.5 diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/run_checks.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/run_checks.py new file mode 100644 index 0000000000..f863ea4c53 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/run_checks.py @@ -0,0 +1,60 @@ +"""Arbitrary-cwd replay of the fresh PR325 partner-retiming finite certificate.""" +from pathlib import Path +import argparse,hashlib,json,subprocess,sys,time,re +import packet325 as packet +STEPS=['source/check_retimings.py','frame/build_local.py','frame/validate_local.py','bank/check_base_ledger.py','bank/check_admitted_banks.py','bank/price_admitted_profile.py','bank/check_controls.py','bank/check_full_frame_binding.py','audit/check_geometry.py','audit/check_events.py','audit/check_full_frames.py','audit/check_bank_price.py','lowering/prepare_fresh.py','lowering/lower_pr325.py','lowering/check_geometry.py','lowering/check_emission_controls.py','audit/check_global.py','audit/check_chart_units.py','audit/finalize_audit.py'] +RECEIPTS=['source/RESULT.json','source/MANIFEST.json','frame/RESULT.json','frame/VALIDATION.json','frame/MANIFEST.json','frame/ARBITRARY-DIRTY-AUDIT-BINDING.json']+['bank/'+n for n in ['BASE-LEDGER.json','BANK-RESULT.json','PRICE-RESULT.json','CONTROLS.json','FRAME-BINDING.json','MANIFEST.json']]+['audit/'+n for n in ['GEOMETRY-RESULT.json','EVENT-AUDIT.json','FULL-FRAME-AUDIT.json','BANK-PRICE-AUDIT.json','GLOBAL-AUDIT.json','GLOBAL-CHART-BOUNDS.json','ASSERTION-CONTROLS.json','FINAL-AUDIT.json','MANIFEST.json']]+['prepared/PREPARATION.json','prepared/MANIFEST.json']+['global/'+n for n in ['RESULT.json','MANIFEST.json','GEOMETRY-CONTROLS.json','EMISSION-CONTROLS.json','invoice.json']] +def check_packet(allow_unfrozen=False): + p=packet.HERE/'FILES.json';assert p.exists()or allow_unfrozen,'FILES.json is required for a frozen replay' + if p.exists(): + for name,row in packet.read(p)['files'].items(): + f=packet.HERE/name;assert f.stat().st_size==row['bytes']and packet.sha(f)==row['sha256'],name +def execute(name): + log=packet.OUTPUT/'logs'/(name.replace('/','__')+'.log');log.parent.mkdir(parents=True,exist_ok=True);start=time.monotonic() + with log.open('w')as out:r=subprocess.run([sys.executable,str(packet.HERE/name)],env=packet.child_env(),stdout=out,stderr=subprocess.STDOUT) + if r.returncode:raise RuntimeError(name+' failed:\n'+log.read_text()[-7000:]) + print(f'PASS {name} ({time.monotonic()-start:.2f} s)',flush=True) +def tests(folder): + log=packet.OUTPUT/'logs'/('tests-'+('root'if folder=='.'else folder)+'.log') + with log.open('w')as out:r=subprocess.run([sys.executable,'-m','unittest','discover','-s',str(packet.HERE/folder),'-p','test_*.py','-v'],env=packet.child_env(),stdout=out,stderr=subprocess.STDOUT) + if r.returncode:raise RuntimeError(log.read_text()) + m=re.search(r'Ran (\d+) tests?',log.read_text());assert m;print(log.read_text(),flush=True);return int(m.group(1)) +def assertion_controls(): + checks=['check_geometry.py','check_events.py','check_full_frames.py','check_bank_price.py','check_global.py','check_chart_units.py'];controls={} + for name in checks: + code=packet.HERE/'audit'/name;r=subprocess.run([sys.executable,'-O',str(code)],env=packet.child_env(),capture_output=True,text=True) + assert r.returncode!=0 and 'Assertions must be enabled'in r.stderr + controls[name]={'return_code':r.returncode,'checker_sha256':packet.sha(code)} + packet.dump(packet.AUDIT/'ASSERTION-CONTROLS.json',{'status':'PASS_ALL_SIX_OPTIMIZED_MODE_REJECTIONS','controls':controls}) +def summary(): + rows={} + for n in RECEIPTS: + v=packet.portable(packet.read(packet.OUTPUT/n));raw=json.dumps(v,sort_keys=True,separators=(',',':')).encode();rows[n]={'sha256':hashlib.sha256(raw).hexdigest(),'status':v.get('status')if isinstance(v,dict)else None} + return {'source_head':packet.HEAD,'source_word_gzip_sha256':packet.WORD,'input_manifest_sha256':packet.sha(packet.HERE/'inputs.json'),'receipt_count':len(rows),'normalization':'Only declared absolute roots in JSON keys and values are normalized; dependency hashes and mathematical evidence remain intact.','receipts':rows} +def finish(check=False,record=False,count=22): + packet.verify_frame_binding();packet.verify_bank();current=summary();expected=packet.HERE/'expected/receipts.json' + if record:expected.write_text(json.dumps(current,indent=2)+'\n') + if check:assert current==packet.read(expected),'Expected receipt hashes differ; they are never silently replaced.' + for root in [packet.PREPARED,packet.GLOBAL]: + for n,h in packet.read(root/'MANIFEST.json').items():assert packet.sha(root/n)==h,n + a=packet.read(packet.AUDIT/'GLOBAL-AUDIT.json');g=packet.read(packet.GLOBAL/'RESULT.json');price=packet.read(packet.BANK/'PRICE-RESULT.json') + final=packet.read(packet.AUDIT/'FINAL-AUDIT.json');assert final['finite_gate_closed']and final['global_program_sha256']==g['full_program_sha256'] + for n,h in packet.read(packet.AUDIT/'MANIFEST.json')['files'].items():assert packet.sha((packet.HERE/'audit'/n)if n.endswith('.py')else packet.AUDIT/n)==h,n + assert a['program_binding']==g['full_program_sha256']and a['all_global_stage_records']==119604000 + assert g['invoice']['coefficient']==price['finite_coefficient']==24857617667871401 + assert price['assembly']['kappa_decimal']=='0.000770612425424136' + result={'status':'PASS_PORTABLE_FRESH_PR325_480_RETIMING_FINITE_CERTIFICATE','source_head':packet.HEAD,'word_gzip_sha256':packet.WORD,'source_manifest_sha256':packet.sha(packet.HERE/'inputs.json'),'regression_tests':count,'bank_negative_controls':21,'emission_negative_controls':12,'receipt_count':len(RECEIPTS),'expected_receipts_match':bool(check),'retimings':480,'local_records':398660,'frames':12885,'global_stage_records':119604000,'namespaces':300,'phases':720,'positive_copy_overrides':100,'stock':658800,'children':14514000,'rank_mass':65757600,'deficit':122400,'max_rank':42,'completion_children':0,'finite_coefficient':24857617667871401,'conditional_saving_kappa':price['assembly']['kappa_decimal'],'program_sha256':a['program_binding'],'address_geometry_distinguished_from_F2_payload':True,'all_finite_common_array_frame_hypotheses_verified':True,'old_role_frame_or_selection_data_imported':False,'upstream_programs_executed':False,'unconditional_all_size_theorem':False,'scope':'Fresh PR325 source word with exactly 480 independently derived partner-mix retimings. All finite source, frame, arbitrary-dirty array-lifting premises, bank, full global IR, invoice and price gates pass. Production primitive/compiler, prime eligibility, restored rows, ordinary leaves, complex/full-C, precision/recovery and analytic all-size interfaces remain inherited.'} + (packet.OUTPUT/'aggregate-result.json').write_text(json.dumps(result,indent=2)+'\n');print(json.dumps(result,indent=2));return result +def run(check=False,run_tests=False,record=False): + packet.require_assertions();check_packet(record);packet.setup_data() + for name in STEPS: + if name=='audit/finalize_audit.py':assertion_controls() + execute(name) + if name=='source/check_retimings.py':packet.freeze_source() + if name=='audit/check_full_frames.py':packet.freeze_frame() + if name=='bank/check_full_frame_binding.py':packet.freeze_bank() + count=tests('source')+tests('frame') + if run_tests:count+=tests('.') + return finish(check,record,count) +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--check',action='store_true');p.add_argument('--tests',action='store_true');p.add_argument('--record-expected',action='store_true');a=p.parse_args();run(a.check,a.tests,a.record_expected) diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/source/SOURCES.json b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/source/SOURCES.json new file mode 100644 index 0000000000..7595d8ba42 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/source/SOURCES.json @@ -0,0 +1,124 @@ +{ + "head": "0eca9340a3df6141b8e71a41638c3937b3522888", + "repository": "CrocSwap/integer-mult-bounds", + "manifest_sha256": "dfbb1190533dd8fb52eeafc2483f7992bdc3909607097947960ffa830bf373f6", + "files": [ + { + "path": "word-pins.json", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/word-pins.json", + "git_blob": "e5f78a13329d94a3a9c6edb93088fdf762f0bddb", + "encoding": "utf-8", + "local": "word-pins.json", + "sha256": "f3a21b85364d601f9c561dc8739de0d081ddea181416b182d837456dd789300c", + "bytes": 2133 + }, + { + "path": "MANIFEST.json", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/MANIFEST.json", + "git_blob": "afa48112a1217f399ae65ebf342d85e562bb8f5b", + "encoding": "utf-8", + "local": "MANIFEST.json", + "sha256": "dfbb1190533dd8fb52eeafc2483f7992bdc3909607097947960ffa830bf373f6", + "bytes": 13319 + }, + { + "path": "raw_ledger.py", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/raw_ledger.py", + "git_blob": "e28e7bfbfa687974d2ed60cb6d8a7b890831e79e", + "encoding": "utf-8", + "local": "raw_ledger.py.txt", + "sha256": "782c2aef0b6225b0e99f73abbc98681d21125c17c024ab0b8a0e4d0382182ef0", + "bytes": 12850 + }, + { + "path": "bitword/selected/bit/profile_p10.json", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/bitword/selected/bit/profile_p10.json", + "git_blob": "47e1946b438ba1ee20db11725ebd4b5b622b82e7", + "encoding": "utf-8", + "local": "bitword__selected__bit__profile_p10.json", + "sha256": "177ff70a322f152ccc6c12471aced7a207062e445f9f64c7d3bd96e6f18c6f63", + "bytes": 738 + }, + { + "path": "bitword/selected/bit/graph_p10.json", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/bitword/selected/bit/graph_p10.json", + "git_blob": "7bc9cfec8448eebae286fdaa9a7a028a147d7979", + "encoding": "utf-8", + "local": "bitword__selected__bit__graph_p10.json", + "sha256": "4a43116c8d154e61be795ca76b3a550c9f5bb579a5fe3fb88a09279512aab174", + "bytes": 472986 + }, + { + "path": "bitword/selected/bit/kchron_p10.json", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/bitword/selected/bit/kchron_p10.json", + "git_blob": "e0ba103d7379f98d314f1d05f145b840f1454847", + "encoding": "utf-8", + "local": "bitword__selected__bit__kchron_p10.json", + "sha256": "1ce62b85b496cbec17fe9eb9e81152126cb90708577cc2e3bcece9b2796ef31c", + "bytes": 120739 + }, + { + "path": "PROOF.md", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/PROOF.md", + "git_blob": "2cbfad2eff0036e1daaa9298098696651a44f19b", + "encoding": "utf-8", + "local": "PROOF.md", + "sha256": "b1187cf1e943ddcd44e8cf096935a0406444199d464ed0df04c983fe9582371e", + "bytes": 15509 + }, + { + "path": "bitword/producer/make_physical.py", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/bitword/producer/make_physical.py", + "git_blob": "b6d949a00c0df452959e64eec73bfee8a0772971", + "encoding": "utf-8", + "local": "bitword__producer__make_physical.py.txt", + "sha256": "854640404e8fc5c7d7b1089e1291ee98c7c21056f6d1baae04a57ea6928e8db9", + "bytes": 10060 + }, + { + "path": "bitword/selected/bit/word_p10.json.gz", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/bitword/selected/bit/word_p10.json.gz", + "git_blob": "3d21c1df3397d2f797e7aba8778cbad95b4ad1ba", + "encoding": "base64", + "local": "bitword__selected__bit__word_p10.json.gz", + "sha256": "601da0e6a67715011a4bbc44f6977f13625c5833d4d40443c10b0d5a9da1896d", + "bytes": 360693 + }, + { + "path": "bitword/selected/bit/frames_p10.json.gz", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/bitword/selected/bit/frames_p10.json.gz", + "git_blob": "3b46aa37ae9a0eeeaa3ead8dd4617a4371367da1", + "encoding": "base64", + "local": "bitword__selected__bit__frames_p10.json.gz", + "sha256": "fec07e983f81459c45747dfaa4eecabc3429e84d4685f385771904dee4c4fbc0", + "bytes": 139908 + }, + { + "path": "scalar/word.py", + "local": "scalar_word.py.txt", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/scalar/word.py", + "git_blob": "95b9affd44ba9c50a4906f074457701f862f44ce", + "encoding": "base64", + "sha256": "e675d4eb9d90ff0b44279fae0b46f1a8b39f65421cc38454b70a6b75d0e10b42", + "bytes": 15352 + }, + { + "path": "prepare.py", + "local": "prepare.py.txt", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/prepare.py", + "git_blob": "1348c80f5ed254c37d7f1f3966ad5d9a3a21ea72", + "encoding": "base64", + "sha256": "c1a215713f47b954c28a3f0d48490a055fb75f6af31a0e6b5248802d6951a09b", + "bytes": 4605 + }, + { + "path": "bitword/bit/word.py", + "local": "physical_word.py.txt", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/0eca9340a3df6141b8e71a41638c3937b3522888/research/five-stage-p10b-banks/bitword/bit/word.py", + "git_blob": "def2b4178e417ab7fd3d6e05b57510af1d79e929", + "encoding": "base64", + "sha256": "88554981690cb43c4286fd962dddf0f20c58cf0c6cd58f0b8081ac88b16531ff", + "bytes": 7509 + } + ] +} diff --git a/research/gen5b-shared-kernels/p10-pr325-partner-retimings/source/check_retimings.py b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/source/check_retimings.py new file mode 100644 index 0000000000..fe1ba69ba5 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-pr325-partner-retimings/source/check_retimings.py @@ -0,0 +1,193 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import packet325 as contract +contract.require_assertions() +contract.verify_inputs() +"""Independent PR325 bounded source-retiming census. Upstream files are inert. +Own construction and proof code, OpenAI assistance; Apache-2.0. +""" +from pathlib import Path +from fractions import Fraction as Q +from collections import Counter,defaultdict +from functools import lru_cache +from math import gcd,lcm +import json,gzip,hashlib +P=contract.SOURCE +if not __debug__:raise RuntimeError('Assertions must be enabled') +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def read(n): + b=(P/n).read_bytes();return json.loads(gzip.decompress(b)if str(n).endswith('.gz')else b) +def dump(n,x): + b=(json.dumps(x,sort_keys=True,separators=(',',':'))+'\n').encode();(P/n).write_bytes(gzip.compress(b,mtime=0)if n.endswith('.gz')else b) +def rr(rows): + a=[list(map(Q,row))for row in rows];k=0;piv=[] + for j in range(20): + z=next((i for i in range(k,len(a))if a[i][j]),None) + if z is None:continue + a[k],a[z]=a[z],a[k];v=a[k][j];a[k]=[q/v for q in a[k]] + for i in range(len(a)): + if i!=k and a[i][j]:v=a[i][j];a[i]=[q-v*r for q,r in zip(a[i],a[k])] + piv.append(j);k+=1 + return a[:k],piv +def integer(row): + d=lcm(*(x.denominator for x in row));v=[int(x*d)for x in row];g=gcd(*v);return[x//g for x in v]if g else v +def null(rows): + a,p=rr(rows);out=[] + for j in range(20): + if j in p:continue + v=[Q(0)]*20;v[j]=Q(1) + for i,k in enumerate(p):v[k]=-a[i][j] + out.append(integer(v)) + return out +def dot(a,b):return sum(x*y for x,y in zip(a,b)) +def histogram(ds): + assert all(a<=b for a,b in zip(ds,ds[1:]));return Counter(b-a for a,b in zip(ds,ds[1:])if b>a) +def run(): + S=read('SOURCES.json');assert S['head']=='0eca9340a3df6141b8e71a41638c3937b3522888' + manifest=read('inputs/MANIFEST.json');assert sha(P/'inputs/MANIFEST.json')==S['manifest_sha256']=='dfbb1190533dd8fb52eeafc2483f7992bdc3909607097947960ffa830bf373f6' + for z in S['files']: + b=(P/'inputs'/z['local']).read_bytes();assert len(b)==z['bytes']and hashlib.sha256(b).hexdigest()==z['sha256'];assert hashlib.sha1(b'blob '+str(len(b)).encode()+b'\0'+b).hexdigest()==z['git_blob'] + if z['path']!='MANIFEST.json':assert manifest['files'][z['path']]==z['sha256'] + load=lambda name:read('inputs/bitword__selected__bit__'+name+'_p10.json'+('.gz'if name in('word','frames')else'')) + w,g,F,K=(load(n)for n in('word','graph','frames','kchron'));F={int(k):v for k,v in F['frames'].items()};K=K['entries'];pins=read('inputs/word-pins.json');v=g['v'];assert v==960 and g['h']==20 and len(K)==480 + ops=w['ops'];R=1+max(max(r[:2])for r in ops);phase=sorted(w['phase1']);ps=set(phase);rest=[i for i in range(len(ops))if i not in ps];order=phase+rest;assert len(order)==len(set(order))==len(ops) + aliases={b:a for a,b in w['pairs']};assert len(aliases)==len(set(aliases.values()))==960 and not set(aliases)&set(aliases.values());regs=sorted(set(range(R))-set(aliases));idx={r:1920+i for i,r in enumerate(regs)};phys=lambda r:idx[aliases.get(r,r)];n=1920+len(regs);source={int(k):s for k,s in w['sources'].items()};assert set(source)==set(range(v))and len(set(source.values()))==v + assert not set(source.values())&(set(aliases)|set(aliases.values()));assert R==9060 and n==10020 + gauges={z['role']:z for z in w['gauges']};assert len(gauges)==2160 and not set(gauges)&set(source.values()) + # Entire literal scalar/COPY projection from this word, including compensated aliases. + adj=[{}for _ in range(R)] + for z,r in zip(g['roots'],w['rootroles']): + assert z['coefficient']==1 + for t in z['targets']:adj[r][t]=adj[r].get(t,0)+1 + for i in reversed(order): + a,b,_=ops[i] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + events=[];even=0 + def emit(op,a,b,c,f,semantic): + nonlocal even + if op==1 and not c%2:even+=1;return + events.append(dict(op=op,a=a,b=b,c=c,frame=f,semantic=semantic)) + def add(a,b,c,f,s):assert a!=b;emit(1,a,b,c,f,s) + def compensate(r): + f=gauges[r]['frame']if r in gauges else-1 + for t,c in sorted(adj[r].items()):add(960+t,phys(r),-c,f,['gauge'if r in gauges else'plain',r,t]) + for r in range(R): + if r not in gauges:compensate(r) + for q in range(v):add(phys(source[q]),q,1,w['source_frame'][q],['inject',q]) + def gate(i,sign): + a,b,_=ops[i];add(phys(a),phys(b),sign,w['op_frame'][i]if sign==1 else w['full_frame'],['forward'if sign==1 else'inverse',i]) + for i in phase:gate(i,1) + for j,(z,r)in enumerate(zip(g['roots'],w['rootroles'])): + if z['kind']=='center': + emit(2,phys(r),n,0,w['root_frame'][j],['copy',j]) + for t in z['targets']:add(960+t,n,1,-1,['center_read',j,t]) + emit(3,phys(r),n,0,w['root_frame'][j],['erase',j]) + at=defaultdict(list) + for z in reversed(w['gauges']):at[w['reads'].get(str(z['role']),len(phase))-len(phase)].append(z['role']) + assert set(at)<=set(range(len(rest)+1)) + for j,i in enumerate(rest): + for r in at[j]:compensate(r) + gate(i,1) + for r in at[len(rest)]:compensate(r) + deliveries=defaultdict(list) + for k,e in enumerate(K):deliveries[e['deliver_after_root']].append(k) + setup={};delivery=defaultdict(list);cleanup={} + for j,(z,r)in enumerate(zip(g['roots'],w['rootroles'])): + if z['kind']=='side': + for t in z['targets']:add(960+t,phys(r),1,w['root_frame'][j],['root',j,t]) + for k in deliveries[j]: + e=K[k];a,b=e['carrier'],e['passive'];setup[k]=len(events);add(a,b,1,e['mix_frame'],['partner_setup',k,j]) + for t in e['receivers']:delivery[k].append(len(events));add(960+t,a,1,e['deliver_frame'],['partner_delivery',k,j,t]) + for k,e in enumerate(K):cleanup[k]=len(events);add(e['carrier'],e['passive'],-1,w['full_frame'],['partner_cleanup',k]) + for i in reversed(order):gate(i,-1) + for q in range(v):add(phys(source[q]),q,-1,w['full_frame'],['uninject',q]) + assert sum(e['op']==1 for e in events)==pins['weighted_scalar_events']==350640 + assert sum(abs(e['c'])for e in events if e['op']==1)==pins['literal_unit_additions']==352560 + assert even==pins['removed_even_adds']==578560 + def replay(reverse=False): + col=[1< 0. For each donor-rank threshold q, an independent matching and an equal-size vertex cover certify the maximum prefix matching cardinality R(q). The chosen 890-pair witness attains min(890, R(q)) at every threshold. Summation by parts therefore proves its maximum primary donor benefit and its optimal donor-rank histogram on this finite graph. + +An integral flow with that histogram has cost 0 for an original exact pair and 1 for a changed pair. The supplied feasible flow and nonnegative reduced cost on every residual arc certify minimum cost 63, hence maximum retention of 827 exact original pairs. The selector is deterministically ordered, but neither unique optimum nor lexicographic optimality is claimed. This matching objective is a surrogate for a bounded local comparison; it is not a proof of global optimality of κ. + +## 2. Physical roles and inherited kernels + +The small matching delta removes and adds 63 exact pairs. Recipients 9101 and 9103 become unpaired; 9118 and 9119 become paired. A complete 9120-role map relates old and new physical representatives. The helper count remains 8230 before the seven retained sink removals, leaving 8223 helper roles and 10143 compact columns. + +Complete old and new alias paths are checked by exact rational containment. Literal forward dimension paths preserve helper mass 181050 and all source/target component histograms. Each installed kernel relation is rechecked on actual new physical responses, with its literal cut triple, basis rank and exact frame containment. All 1047 entries survive, including the 60 entries touching changed roles. Their paid rank-chain delta is unchanged. The updated entrance rank is 1200. + +These checks use source data and independently authored code. Upstream source programs are read as text only. No upstream producer, verifier, compiler or full admission suite is executed. + +## 3. Chronology and fresh scalar replay + +The target checker freshly reconstructs old and new physical raw prefixes through the last forward gate. It binds every target cut by unique semantic identity and checks all 120 literal target relations and all 480 group-member states at their individual close events. This prefix reconstruction is distinct from the complete scalar/COPY replay. + +The scalar checker independently builds and replays the complete pre-reorder scalar/COPY chronology, including all 1047 kernels, 120 target groups, 240 early restorations and seven sinks. Both forward and inverse all-column F2 identities pass. Omission of kernel setup or restoration is rejected. The new-head baseline's event counts and unsigned norms are separately reproduced. + +Integer absolute-value majorants are different from F2 scalar identities. Fresh unsigned forward and inverse bounds are 131967 and 1307800. Their payload bound 64·131967^3·1307800^2 is 251569897069123894156346880000, below 2^98 and within the retained 2^104 cap. + +For each of 133 inherited reorder moves, complete operand-based noncommuting-event traces and possible semantic anchor traces agree between the old and new words, with physical IDs rebound. This transports each previously admitted crossing window, conditional on its original raw proof. It does not independently repeat those 133 original raw record-number crossing proofs. It does not reconstruct complete final raw frame records, record numbers, record hashes or compiler output. + +## 4. Charts, banks and scalar costs + +Fresh endpoint charts are checked under metric 9I−J. The inverse exterior formula is 11a−sum(a); no blanket claim for every characteristic greater than 5 is made. Exact inverse products, factor replay and split-projector identities are checked over the rationals. Characteristic restrictions and compiler interpretation remain part of the inherited prime/compiler interfaces. + +There are 2317 nontrivial endpoint uses, 5906 identity endpoint uses and 760 canonical endpoint programs. Their maximum factor count is 136. The 63 changed alias seams have 47 exact programs with maximum factor count 155; 33 seams have positive rank and 30 have rank zero. + +Positive interior seams already occur as paid recursive children in the rebuilt histogram. Their generic wrapper and preparation costs are charged once. Rank-zero seams add no recursive child; scalar and descriptor costs remain included. The endpoint 400-factor and 599-normalizer allowance is not a substitute for the separate interior compiler allowance. + +An explicit binary bank-address table assigns every helper role and replica once per stage. The verifier checks no overlap or gap, full width-100 banks, disjoint stage ranges, whole-bank swaps, inverse swaps, and normalizer permutation witnesses. It covers 2466900 assignments across five stages, with 85578 banks per stage and literal stock 658290. The final finite binder ties charts, bank addresses, scalar costs, seam costs and invoice terms to this exact candidate and source head. Its `finite/finite-invoice-bound.json` receipt gives the instantiated ring/recipe coefficient 25476360501102401, a decrease of 9216720081000 from the independently reconstructed baseline coefficient 25485577221183401. This stays below the retained 2^80 budget; it does not supply a numerical full-C or all-size cutoff. + +## 5. Conditional arithmetic conclusion + +The original interval engine independently reproduces the new baseline κ = 0.000769553898621543 and computes candidate κ = 0.000769997773182046. A second newly authored rational log/exp engine independently certifies the signs at both bit-root bracket endpoints and overlaps the first engine's intervals. The candidate bit root lies strictly between 0.000770591126970913 and 0.000770591126970914. All 47 strict retained assembly inequalities hold, and the next κ grid point fails the limiting inequality. + +The paid banked call count is 250045 and rank mass is 1095110. The residual family counts and literal stock are unchanged. These exact arithmetic facts do not themselves establish physical admission; the preceding finite checks bind that separate part of the claim. + +The conclusion still assumes the original 133 raw crossing proofs where not freshly reconstructed, semantic transform and full-C interfaces, decoder/compiler meaning, prime selection and characteristic admissibility, complex-supplier structural validity, and all-size closure. The packet is not a new Lean proof, complete upstream admission, unconditional integer exponent theorem, or current-best claim. No old fixed 19-relation witness is composed with the updated closure. diff --git a/research/gen5b-shared-kernels/p10-updated1047/PROVENANCE.json b/research/gen5b-shared-kernels/p10-updated1047/PROVENANCE.json new file mode 100644 index 0000000000..ffa28e3410 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/PROVENANCE.json @@ -0,0 +1,106 @@ +{ + "prepared_with": "Substantial OpenAI assistance", + "licence": "Apache-2.0; inherited notices and headers apply", + "source_head": "1b37957d1520c80b6ea796bf418e52be5109c2d4", + "source_manifest_sha256": "98e5e469faab4230cf791b5777a5b324f1aaf9153c6adf1caedfe4afb45a3c03", + "upstream_execution": "None. Upstream Python remains inert text under .py.txt names.", + "published_base_head": "022266b4f6a3e09b75ff664008ddbb732e9672f9", + "published_base_tree": "bd0928f65bbb72560f5f57f34c190039aaaaa059", + "published_existing_files": 249, + "reused_authored_dependencies": { + "../exact_intervals.py": "c261dd44838d4e36c68768a1023ac859677089464ab121cdb46b30c918679333", + "../assembly_arithmetic.py": "f2f6293c31deb579ebbea19eeaa732c07304ce9c2cacd431685e2dd18d4b0d58", + "../p10/arithmetic/price_candidate.py": "d9954dd13bb92da8ecbdbf937f438061af2f3afaf65f0fd82cd45d89b1fe4141", + "../p10/closure/chart_rational.py": "e36c35be0d3aec9adeeca2b8f038cb4757ea2a0b685b40798d4574695bfe7355" + }, + "adapted_authored_sources": { + "matching/select_matching.py": { + "authored_source": "select_matching.py", + "authored_source_sha256": "f21eb3dc95b097305856a47bf528a864a644ac35da352a4445687f429a656b59", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "matching/census_matching.py": { + "authored_source": "census_matching.py", + "authored_source_sha256": "3175d0b7ae4aa45441a3973ee82ef90589be9b319fbdc553d48cefef2ec61298", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "arithmetic/check_second_moment.py": { + "authored_source": "check_second_moment.py", + "authored_source_sha256": "8c23ac9b3f3e42b3dac4b3f5a33d1430cae50a4872bded05a309d61dbfe24d91", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "admission/check_transport.py": { + "authored_source": "check_transport.py", + "authored_source_sha256": "63f8a8adedd3f98dfbe3b543d3a9a76355ef42e68da1a3e2d87930a16420e7ae", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "admission/check_target_chronology.py": { + "authored_source": "check_target_chronology.py", + "authored_source_sha256": "7f8f47ed1c79129fb6931103b4ffaa44b1b6489eac30888058d3c7bfb578116a", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "admission/check_scalar_recurrence.py": { + "authored_source": "check_scalar_recurrence.py", + "authored_source_sha256": "9323722331edf661c99d9724f48705978914bcd915c71faff6acf5f646ed786a", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "admission/check_reorder_transport.py": { + "authored_source": "check_reorder_transport.py", + "authored_source_sha256": "b8ebb04b93395a7c1b56dd43c292671c8f9a18fc9f13e167f9a9edd9a9abd0aa", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "admission/test_admission.py": { + "authored_source": "test_admission.py", + "authored_source_sha256": "47a41b55d60560d5de7a8199485bf2f4b0592c60f6a3524fd49f4fb175a62cd2", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "finite/check_charts.py": { + "authored_source": "check_charts.py", + "authored_source_sha256": "71985ec5693b2c5e81af95042e89032d94cde8faf890da07867ea5790dfeed59", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "finite/check_banks.py": { + "authored_source": "check_banks.py", + "authored_source_sha256": "e4169fb1a5af61df44e74ae99fccb50b676f5a80acc9de47a7dd656e4e78048d", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "finite/bind_finite.py": { + "authored_source": "bind_finite.py", + "authored_source_sha256": "ec28061103c6fad2358489acc3133b06c9435f49f046dbc8f5f9101dc489a031", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "finite/test_finite.py": { + "authored_source": "test_finite.py", + "authored_source_sha256": "f1054c052448f299785194d6dea63d31037a4139e29c2d442c6fa9b06d9679be", + "adaptations": "Portable shared source/output routes and receipt bindings; original mathematical checks retained." + }, + "arithmetic/reproduce_p10.py": { + "authored_source": "p10/arithmetic/reproduce_p10.py", + "authored_source_sha256": "8bfbc14f9e722f5f6df6e5b1e2f7b1e3695bc1c1131c06991deb83d43f1b09c6", + "adaptations": "Byte-identical updated-head independently authored reconstruction." + }, + "matching/audit_matching.py": { + "authored_source": "audit_matching.py", + "authored_source_sha256": "e273cfa2f5ce8e721dc4eae122ac8a9cc551e46d515fffa03d0ead8d2365981a", + "adaptations": "Portable shared input/output roots; omit elapsed time and approximate float diagnostics from deterministic receipt; exact certificate logic retained." + }, + "arithmetic/test_arithmetic.py": { + "authored_source": "test_experiment.py", + "authored_source_sha256": "8d824478464a7641bed3d8dbddbe54d74c55f3532e76292309b1c4f6d720b2fe", + "adaptations": "Portable shared roots; retain full-candidate tests and omit the separate weaker fallback test." + } + }, + "new_portable_glue": [ + "support.py", + "acquire_inputs.py", + "run_checks.py", + "test_support.py", + "arithmetic/price.py", + "arithmetic/price_candidate.py", + "admission/admission_config.py", + "admission/weighted_source_data.py", + "finite/context.py", + "finite/chart_rational.py" + ], + "scope": "This packet includes only the full weighted 890 candidate on the updated 1047-kernel source. No additional fixed 19-relation witness or fallback packet is included." +} diff --git a/research/gen5b-shared-kernels/p10-updated1047/README.md b/research/gen5b-shared-kernels/p10-updated1047/README.md new file mode 100644 index 0000000000..fc85d6a7ac --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/README.md @@ -0,0 +1,36 @@ +# Weighted 890 reuse on the updated p10 closure + +This additive evidence packet starts from PR320 at immutable head `1b37957d1520c80b6ea796bf418e52be5109c2d4`, package `research/five-stage-p10-transcript-stages/`. It preserves all 1047 installed kernels and changes 63 of the 890 compensated reuse pairs. It adds no further kernel family and does not reuse the earlier fixed 19-relation witness. + +The independently reconstructed conditional baseline is κ = 0.000769553898621543. The new matching gives κ = 0.000769997773182046, an improvement of about 0.05767946%. Literal stock stays 658290, banked paid calls decrease from 250195 to 250045, and banked rank mass stays 1095110. Both exact rational moment engines certify the bit root in (0.000770591126970913, 0.000770591126970914). All 47 retained assembly inequalities hold at the reported κ. + +These are conditional comparisons for this immutable input, not a current-best or unconditional all-size theorem claim. The earlier `p10/` packet remains unchanged and applies to its own earlier source head. + +## Reproduction + +Use Python 3.10 or later with assertions enabled. Only the Python standard library is needed. No upstream executable program is imported or run. The downloader stores upstream Python only as inert `.py.txt` text. All derived words, graph certificates, chart programs and bank tables are generated outside the tracked packet. + +From any working directory: + +``` +python /path/to/research/gen5b-shared-kernels/p10-updated1047/acquire_inputs.py --dest /tmp/p10-updated-inputs +P10U_INPUTS=/tmp/p10-updated-inputs P10U_OUTPUT=/tmp/p10-updated-output python /path/to/research/gen5b-shared-kernels/p10-updated1047/run_checks.py --check --tests +``` + +The input manifest pins every downloaded blob by immutable URL, byte length, Git blob ID and SHA256. Existing cached bytes are verified before use. Reused independently authored arithmetic and rational-chart primitives in the parent and earlier `p10/` folders are hash-guarded. The small remove/add/read-time witness regenerates the candidate word with exact SHA256 `41b15c5ccf7d2afd66396f183579a02c66f0f31f5410ceeb2eb271393a84d494`. + +`expected/receipts.json` holds compact deterministic receipts. The aggregate rebuilds the evidence and compares it with those receipts. It excludes runtime fields and normalizes only declared filesystem roots. It does not silently replace expected evidence. + +## What the finite checks establish + +- The complete 4300-donor, 18648-edge bounded graph is reconstructed from exact frame containment and lifetimes. A rank-prefix matching/cover certificate proves the optimal donor-rank profile at cardinality 890. Residual flow potentials then certify the maximum 827 retained original exact pairs within that profile. This is a finite graph/objective claim, not global optimization of the final exponent. Deterministic tie handling is reproducibility, not uniqueness or lexicographic optimality. +- All 8230 old and new physical alias paths, all 1047 literal kernel relations and cut triples, and the unchanged installed-kernel dimension delta are checked. The new physical helper IDs are explicitly rebound. +- All 120 target relations and all 480 group-member closing states are checked after a fresh partial raw-prefix reconstruction. A separate fresh complete pre-reorder scalar/COPY replay checks forward and inverse all-column identities, source-bound baseline counts, setup/restoration omission controls and unsigned norm bounds. +- All 133 inherited reorder moves have matching old/new semantic anchor and noncommuting-event traces. The original raw record-number crossing proofs remain assumptions. No complete final raw frame/record/hash regeneration is claimed. +- Fresh rational endpoint charts cover 2317 nontrivial uses and 5906 identity uses. There are 760 canonical endpoint programs, with at most 136 factors. Changed alias seams have 63 uses, including 33 positive and 30 rank-zero seams, and 47 programs with at most 155 factors. +- The final instantiated finite ring/recipe coefficient is 25476360501102401, below the retained 2^80 budget. It is bound in `finite/finite-invoice-bound.json`; the separate full-C and all-size interfaces remain inherited. +- Literal bank assignments cover every role, replica and stage, totaling 2466900 assignments. Full width-100 banks yield 85578 banks per stage and unchanged stock 658290. The changed scalar counts, seam costs and finite invoice are bound to the same candidate and fresh receipts. + +The payload bound is 251569897069123894156346880000, below 2^98, from forward and inverse unsigned bounds 131967 and 1307800. Endpoint banking keeps the inherited 400-factor and 599-normalizer allowance. Those bounds do not replace the separate interior compiler allowance. + +See [PROOF.md](PROOF.md) for the precise verification boundary and [NOTICE.md](NOTICE.md) for attribution and AI-assistance disclosures. diff --git a/research/gen5b-shared-kernels/p10-updated1047/acquire_inputs.py b/research/gen5b-shared-kernels/p10-updated1047/acquire_inputs.py new file mode 100644 index 0000000000..127eeb0349 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/acquire_inputs.py @@ -0,0 +1,17 @@ +"""Download immutable inert source blobs; verify byte length, Git blob and SHA256.""" +from pathlib import Path +import argparse, urllib.request +import support + +def acquire(destination): + root=Path(destination).resolve();support.require_assertions() + for row in support.pins()['files']: + path=root/row['local'] + if path.exists():support.check_bytes(path.read_bytes(),row);continue + request=urllib.request.Request(row['url'],headers={'User-Agent':'independent-p10-updated1047-verifier'}) + with urllib.request.urlopen(request,timeout=60)as response:raw=response.read() + support.check_bytes(raw,row);path.parent.mkdir(parents=True,exist_ok=True);path.write_bytes(raw) + return len(support.pins()['files']) +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--dest',type=Path,default=support.INPUTS);a=p.parse_args() + print('Verified',acquire(a.dest),'immutable inert inputs at',a.dest.resolve()) diff --git a/research/gen5b-shared-kernels/p10-updated1047/admission/admission_config.py b/research/gen5b-shared-kernels/p10-updated1047/admission/admission_config.py new file mode 100644 index 0000000000..2d1c9fb61e --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/admission/admission_config.py @@ -0,0 +1,6 @@ +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import support +OVER=support.out('matching','word_weighted890.json') +OVER_SHA=support.WORD_SHA diff --git a/research/gen5b-shared-kernels/p10-updated1047/admission/check_reorder_transport.py b/research/gen5b-shared-kernels/p10-updated1047/admission/check_reorder_transport.py new file mode 100644 index 0000000000..a5f33a8854 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/admission/check_reorder_transport.py @@ -0,0 +1,60 @@ +"""Exact semantic-anchor and commutation-trace transport for all133 moves. +Old raw-crossing admission is an explicit hypothesis. Every new potential +obstruction and every anchor incidence is checked over the full scalar words. +""" +from collections import defaultdict +from pathlib import Path +import json,hashlib +from weighted_source_data import read,verify,HEAD +from check_transport import OVER,OVER_SHA +from check_scalar_recurrence import scalar_word,replay +CODE=Path(__file__).resolve().parent +from weighted_source_data import OUTPUT,PACKAGE_OUTPUT,PACKAGE_ROOT +HERE=OUTPUT + +def run(): + verify();old=read('bitword/selected/bit/word_p10.json.gz');new=json.loads(OVER.read_text());candidate=[] + A,na,*_=scalar_word(old,[]);B,nb,*_=scalar_word(new,candidate);sinks=sorted(e['stream']for e in read('sink-selection.json')['sinks']) + def lift(s): + for q in sinks: + if q<=s:s+=1 + return s + old_alias={b:a for a,b in old['pairs']};old_inv={1920+i:r for i,r in enumerate(sorted(set(range(9120))-set(old_alias)))} + new_alias={b:a for a,b in new['pairs']};new_ids={r:1920+i for i,r in enumerate(sorted(set(range(9120))-set(new_alias)))} + xlat=lambda s:new_ids[new_alias.get(old_inv[s],old_inv[s])]if s>=1920 else s + def index(events): + writes=defaultdict(list);reads=defaultdict(list);incident=defaultdict(list);copies=defaultdict(list);ids={};lastcopy=max(i for i,r in enumerate(events)if r[-1][0]=='plain') + for i,(op,a,b,c,sem)in enumerate(events): + key=(op,sem);assert key not in ids;ids[key]=i + if op==1:writes[a].append(i);reads[b].append(i);incident[a].append(i);incident[b].append(i) + else:copies[a].append(i);incident[a].append(i) + return writes,reads,incident,copies,ids,lastcopy + IA=index(A);IB=index(B);receipts=[];allports=set() + def kinds(sem):return 'side_root'if sem[0]=='root'else'forward_gate'if sem[0]=='forward'else sem[0] + def frame(sem): + if sem[0]=='forward':return ('frame',new['op_frame'][sem[1]]) + if sem[0]=='root':return ('frame',new['root_frame'][sem[1]]) + # These exact semantic inputs and selections are unchanged. The equality + # key binds the unique declared frame by its defining event or selection. + return ('unchanged_selection_or_semantic_frame',sem) + for z in read('reorder-selection.json')['moves']: + a,b,c=z['incidence'];a,b=lift(a),lift(b);assert not{a,b}&allports;allports|={a,b} + hits=[i for i in IA[2][a]if A[i][0]==1 and A[i][1:4]==(a,b,c)and kinds(A[i][-1])==z['category']];assert len(hits)==1 + oi=hits[0];key=(1,A[oi][-1]);ni=IB[4][key];aa,bb=xlat(a),xlat(b);assert B[ni][1:4]==(aa,bb,c) + def traces(events,idx,at,a,b): + wr,rd,inc,cp,ids,lastcopy=idx + bad=sorted(set(rd[a]+wr[b]+cp[a]));badtrace=[(events[i][0],events[i][-1],ilastcopy] + return badtrace,anchortrace,bad,incidences + ot,oa,ob,oii=traces(A,IA,oi,a,b);nt,nn,nbr,nii=traces(B,IB,ni,aa,bb) + assert ot==nt,('new noncommuting crossing',z['record']) + assert oa==nn,('anchor event sequence changed',z['record']) + assert oi>IA[5]and ni>IB[5] + receipts.append(dict(old_record=z['record'],old_anchor=z['anchor'],side=z['side'],old_precompact_incidence=[a,b,c],new_precompact_incidence=[aa,bb,c],moved_semantic_event=A[oi][-1],old_scalar_event_index=oi,new_scalar_event_index=ni,postprefix_anchor_incidence_count=len(oa),noncommuting_event_count=len(ot),all_anchor_candidates_semantically_preserved=True,noncommuting_trace_and_relative_position_identical=True)) + # Newly delayed gauge compensations9118/9119 are explicit; all other + # retimings are covered by the complete operand-based traces above. + late=[r for r in B if r[-1][0]=='gauge'and r[-1][1]in(9118,9119)];assert len(late)==2 + assert all(not{r[1],r[2]}&{xlat(s)for s in allports}for r in late) + out=dict(status='PASS_ALL133_SEMANTIC_ANCHOR_AND_COMMUTATION_TRACES',head=HEAD,overlay_sha256=OVER_SHA,checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),moves=len(receipts),moved_ports=len(allports),late_compensations=late,all_anchors_survive=True,all_noncommuting_traces_equal=True,receipts=receipts,proof='For each moved shear E_ab(c), an ADD E_xy(d) fails the inherited sufficient commutation screen only when y=a or x=b; a COPY/ERASE fails only when its source is a. Both these complete traces and the moved gate position within them are identical old/new. The complete incident-event trace after the complete initial plain prefix is also identical, with the same defining frame per event, so every admitted old anchor persists in order and with its declared frame. Any inserted, deleted, re-addressed or relocated events between a move and its transported anchor commute. The test depends only on operands, so replacing c,d by their absolute values preserves it. Thus the inherited133 raw crossing proofs transport to the new signed and nonnegative words. Physical coordinate norms start positive and increase under unsigned ADDs. Each reused COPY scratch norm equals a captured physical norm, so it is also bounded by the maximum final physical norm. Therefore the maximum prefix row norm is bounded by the maximum final physical norm, which commuting rewrites preserve.',scope='Complete finite transport of inherited133 moves and all possible original anchors through actual old/new scalar event bijection. Does not independently rerun the original raw record-number crossing proof or emit new final frame records.') + (HERE/'reorder-transport-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps({k:v for k,v in out.items()if k!='receipts'},indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-updated1047/admission/check_scalar_recurrence.py b/research/gen5b-shared-kernels/p10-updated1047/admission/check_scalar_recurrence.py new file mode 100644 index 0000000000..dd6249854a --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/admission/check_scalar_recurrence.py @@ -0,0 +1,143 @@ +"""Fresh complete scalar-only actual-overlay recurrence, newly authored. +All installed scalar edits are reconstructed from content-bound selections; +frame/raw-record output is intentionally not claimed. Reorder commutations +are transported using independently checked unchanged operand classes. +""" +from pathlib import Path +from collections import defaultdict,Counter +import json,hashlib,time +from weighted_source_data import read,verify,HEAD +from check_transport import OVER,OVER_SHA +from check_target_chronology import build +CODE=Path(__file__).resolve().parent +from weighted_source_data import OUTPUT,PACKAGE_OUTPUT,PACKAGE_ROOT +HERE=OUTPUT + +def scalar_word(w,extra): + raw,adj,sid,n,F=build(w);g=read('graph.json');K=read('kchron.json')['entries'];ks=read('kernel-selection.json');sinks=read('sink-selection.json')['sinks'];restore=read('restore-selection.json')['entries'];target=read('target-selection.json')['groups'];tc=json.loads((HERE/'target-chronology-result.json').read_text()) + assert w['pairs']==read('bitword/selected/bit/word_p10.json.gz')['pairs']or hashlib.sha256(OVER.read_bytes()).hexdigest()==OVER_SHA + oldword=read('bitword/selected/bit/word_p10.json.gz') + baseline=w['pairs']==oldword['pairs'] + old_alias={b:a for a,b in oldword['pairs']};old_inv={1920+i:r for i,r in enumerate(sorted(set(range(9120))-set(old_alias)))} + xlat=lambda s:sid(old_inv[s])if s>=1920 else s + original_restore=restore + restore=[dict(e,helper=xlat(e['helper']),donor=xlat(e['donor']))for e in restore] + restore_sem={(xlat(e['helper']),xlat(e['donor'])):(e['helper'],e['donor'])for e in original_restore} + which='old_'if baseline else'new_' + cut=tc['groups'][0][which+'cut'];close={e[which+'close']:target[e['group']]for e in tc['groups']};deps={960+int(q):e[which+'close']for e in tc['groups']for q in target[e['group']]['dependent']} + assert hashlib.sha256((CODE/'check_target_chronology.py').read_bytes()).hexdigest()==tc['checker_sha256'] + # Target compression; retain semantic identities through scalar-only edits. + events=[] + for i,r in enumerate(raw): + if r[0]==1: + _,a,b,c,f,sem=r + if a not in deps or not cutcut and newclose>reboundcut;closes[newclose]=j + receipts.append(dict(group=j,old_cut=cut,new_cut=reboundcut,old_close=oldclose,new_close=newclose,close_semantic_event=sem,old_close_event=A[oldclose],new_close_event=B[newclose])) + assert len(closes)==120 + center=None;close_source_columns={};negative=[] + for i,row in enumerate(B): + op,a,b,*_=row + if op==2:assert center is None;center=a;columns[b]=columns[a] + if op==3:assert center==a;center=None + if op==1: + _,a,b,c,f,sem=row + if i>reboundcut: + if 960<=b<1920:assert b-960 not in owner or i>receipts[owner[b-960]]['new_close'] + if a-960 in owner and i<=receipts[owner[a-960]]['new_close']:responses[a-960]^=columns[b] + if i in closes:close_source_columns[i]=columns[b] + columns[a]^=columns[b] + if 960<=a<1920 and f!='ZERO': + if not targetpaths[a-960]or targetpaths[a-960][-1]!=f:targetpaths[a-960].append(f) + if i in closes: + j=closes[i];e=target['groups'][j] + for q,ps in e['dependent'].items(): + z=responses[int(q)] + for p in ps:z^=responses[p] + assert z==0,('literal target relation',j) + relations+=1 + if j==119: + assert B[i][1]-960 in ps and z^close_source_columns[i] + negative.append('Omitting group119 closing retained read makes its literal dependency nonzero') + # All new target read chains exact subspace nesting, and compressed group + # close frame included before every later target read. + cache={} + def ann(f): + if f not in cache:cache[f]=F[f]['a']if'a'in F[f]else null(F[f]['b']) + return cache[f] + checks=set() + for q,path in targetpaths.items(): + for x,y in zip(path,path[1:]): + if(x,y)not in checks:assert included(ann(y),ann(x));checks.add((x,y)) + for j,e in enumerate(target['groups']): + remaining=set(e['targets']) + for row in B[receipts[j]['new_close']+1:]: + if row[0]==1 and row[1]-960 in remaining and row[4]!='ZERO': + assert all(sum(x*y for x,y in zip(a,b))==0 for a in ann(row[4])for b in e['close_basis']) + remaining.remove(row[1]-960) + # Earliest later event per target suffices by established nesting. + if not remaining:break + # A target with no remaining forward-prefix read is a terminal spectator + # here; its later side/partner frame contract is inherited unchanged. + # Fresh compressed target state at every close: check every member's + # incoming frame against the close span, then every later required frame. + targetstate={q:[]for q in owner};state_checks=0 + def basis(fid):return F[fid]['b']if'b'in F[fid]else null(F[fid]['a']) + def append_need(q,B): + nonlocal state_checks + assert included(targetstate[q],B),('compressed target nonnesting',q) + targetstate[q]=B;state_checks+=1 + for i,row in enumerate(B): + if row[0]==1: + _,a,b,c,f,sem=row;q=a-960 + if q in owner and f!='ZERO': + e=target['groups'][owner[q]] + dropped=str(q)in e['dependent']and reboundcutspecial['new_close']for i in gauges.values());assert all(i>special['old_close']for i in oldgauges.values()) + out=dict(status='PASS_FRESH_PARTIAL_RAW_PREFIX_AND_ALL120_TARGET_CUTS',head=HEAD,overlay_sha256=OVER_SHA,old_physical_columns=on,new_physical_columns=nn,global_cut_semantic_event=A[cut],all120_literal_target_relations=relations,minimum_descent_record=minimum_descent,max_original_close=max(e['close_after_record']for e in target['groups']),group119=special,old_late_gauge_records=oldgauges,new_late_gauge_records=gauges,new_late_gauge_event_details=[B[i]for i in gauges.values()],all_gauge_target_paths_nested=True,all480_group_members_checked_at_close=True,compressed_target_state_containment_checks=state_checks,negative_controls=negative,unique_target_containment_pairs=len(checks),groups=receipts,checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),scope='Fresh original and new raw prefix regenerated through last forward gate, stopping before side-root/partner/kernel/restore/sink/reorder tail. Target cuts rebound by unique semantic event identity; all120 literal relations checked on the actual new physical columns. This does not emit the complete final pipeline.',dependency_sha256={'weighted_source_data.py':hashlib.sha256((CODE/'weighted_source_data.py').read_bytes()).hexdigest(),'check_transport.py':hashlib.sha256((CODE/'check_transport.py').read_bytes()).hexdigest()}) + (HERE/'target-chronology-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-updated1047/admission/check_transport.py b/research/gen5b-shared-kernels/p10-updated1047/admission/check_transport.py new file mode 100644 index 0000000000..03fe303441 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/admission/check_transport.py @@ -0,0 +1,161 @@ +"""Independent exact transport proof, reading pinned JSON and inert source text only. +No code from PR320 is imported or run. This is not raw-record regeneration. +""" +from pathlib import Path +from fractions import Fraction as Q +from collections import Counter,defaultdict +import json,hashlib,time +from weighted_source_data import read,read_bytes,verify,HEAD +CODE=Path(__file__).resolve().parent +from weighted_source_data import OUTPUT,PACKAGE_OUTPUT,PACKAGE_ROOT +HERE=OUTPUT +from admission_config import OVER,OVER_SHA +def compact(c):return {int(k):v for k,v in sorted(c.items())if v} +def diff(a,b): + c=Counter(b);c.subtract(a);return compact(c) +def rr(rows,width=20): + a=[list(map(Q,r)) for r in rows];piv=[];k=0 + for j in range(width): + z=next((i for i in range(k,len(a))if a[i][j]),None) + if z is None:continue + a[k],a[z]=a[z],a[k];c=a[k][j];a[k]=[x/c for x in a[k]] + for i in range(len(a)): + if i!=k and a[i][j]: + c=a[i][j];a[i]=[x-c*y for x,y in zip(a[i],a[k])] + piv.append(j);k+=1 + return a[:k],piv +def null(rows): + a,p=rr(rows);out=[] + for j in set(range(20))-set(p): + r=[Q(0)]*20;r[j]=1 + for row,k in zip(a,p):r[k]=-row[j] + out.append(r) + return out +def included(rows,space): + a,p=rr(space) + for row in rows: + row=list(map(Q,row)) + for v,k in zip(a,p): + c=row[k] + if c:row=[x-c*y for x,y in zip(row,v)] + if any(row):return False + return True +def run(): + t=time.monotonic();verify();assert hashlib.sha256(OVER.read_bytes()).hexdigest()==OVER_SHA + old=read('bitword/selected/bit/word_p10.json.gz');w=json.loads(OVER.read_text());f={int(k):v for k,v in read('frames.json')['frames'].items()};g=read('graph.json') + assert [k for k in old if old[k]!=w[k]]==['pairs','reads'] + gauges={e['role']:e for e in w['gauges']};sources=set(w['sources'].values());roots=set(w['rootroles']) + def mapping(word): + aliases={b:a for a,b in word['pairs']};roles=sorted(set(range(9120))-set(aliases));ids={r:1920+i for i,r in enumerate(roles)} + return aliases,roles,ids,{r:ids[aliases.get(r,r)]for r in range(9120)} + oa,oreg,oi,os=mapping(old);na,nreg,ni,ns=mapping(w);inv={s:r for r,s in oi.items()};n=1920+len(nreg) + assert len(oa)==len(na)==890 and n==10150 + assert set(na)-set(oa)=={9118,9119} and len(set(oa)-set(na))==2 + assert len(set(p[0]for p in w['pairs']))==len(set(p[1]for p in w['pairs']))==890 + pairs_old=set(map(tuple,old['pairs']));pairs_new=set(map(tuple,w['pairs']));changed={r for p in pairs_old^pairs_new for r in p} + rolemap=[dict(virtual_role=r,old_physical=os[r],new_physical=ns[r],old_representative=oa.get(r,r),new_representative=na.get(r,r))for r in range(9120)] + (HERE/'virtual-physical-map.json').write_text(json.dumps(dict(head=HEAD,overlay_sha256=OVER_SHA,rows=rolemap),indent=2)+'\n') + phase=sorted(w['phase1']);ps=set(phase);rest=[i for i in range(len(w['ops']))if i not in ps];order=phase+rest;pos={i:j for j,i in enumerate(order)};uses=defaultdict(list) + for i in order: + a,b,_=w['ops'][i];assert ns[a]!=ns[b] + uses[a].append(i);uses[b].append(i) + for a,b in pairs_new: + assert a not in set(gauges)|sources|roots and b in gauges and gauges[b]['dim']==17 + assert max(pos[i]for i in uses[a])a);after=Counter(b-a for a,b in zip(dims,dims[1:])if b>a) + result.update(after);result.subtract(before) + receipts.append(dict(role=r,physical=ns[r],first_frame=first,frames=path,entrance_ranks=[len(B)for B in bases],delta=diff(before,after))) + return compact(result),receipts + oldD,_=kernel_delta(old);newD,receipts=kernel_delta(w) + assert oldD==newD=={int(k):v for k,v in ks['expected_local_delta'].items()} + (HERE/'kernel-path-receipts.json').write_text(json.dumps(receipts,indent=2)+'\n') + # Rebind every later transform by original representative role; unchanged + # virtual endpoints and paths are essential because physical IDs now move. + descent=read('descent-selection.json')['entries'];restore=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'];reorder=read('reorder-selection.json')['moves'];removed=sorted(z['stream']for z in sinks) + def lift(s): + for q in removed: + if q<=s:s+=1 + return s + role=lambda s:inv[s]if s>=1920 else None + transport=lambda s:ns[inv[s]]if s>=1920 else s + overlaps=dict(descent=[i for i,e in enumerate(descent)if{role(s)for s in e['scalar'][:2]}&changed],restore=[i for i,e in enumerate(restore)if{role(e[k])for k in('helper','donor')}&changed],sink=[e['role']for e in sinks if e['role']in changed],reorder=[i for i,e in enumerate(reorder)if{role(lift(s))for s in e['incidence'][:2]}&changed]) + assert not any(overlaps.values()),overlaps + later=dict(restores=[dict(e,helper=transport(e['helper']),donor=transport(e['donor']))for e in restore],sinks=[dict(e,stream=transport(e['stream']))for e in sinks],reorders=[dict(e,precompact_incidence=[transport(lift(s))for s in e['incidence'][:2]]+[e['incidence'][2]])for e in reorder]) + (HERE/'rebound-later-selections.json').write_text(json.dumps(later,indent=2)+'\n') + out=dict(status='PASS_EXACT_ALL1047_KERNEL_CONDITIONAL_TRANSPORT',head=HEAD,overlay_sha256=OVER_SHA,checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),old_physical_columns=10150,new_physical_columns=n,old_pairs=890,new_pairs=890,preserved_pairs=len(pairs_old&pairs_new),changed_role_count=len(changed),representatives_removed=sorted(set(oreg)-set(nreg)),representatives_added=sorted(set(nreg)-set(oreg)),retained_representative_ids_changed=sum(oi[r]!=ni[r]for r in set(oreg)&set(nreg)),virtual_map_rows=len(rolemap),initial_plain_reads=count,kernel_entries_rebound=len(newentries),kernel_relations_and_cut_triples_exact=True,kernel_entries_touching_changed_roles=sum(bool(({e['virtual_pivot']}|set(e['virtual_donors']))&changed)for e in newentries),kernel_delta_old=oldD,kernel_delta_new=newD,complete_old_paths_checked=len(oreg),complete_new_paths_checked=len(nreg),unique_exact_containment_pairs=len(subcache),direct_role_overlaps=overlaps,scope='Exact matching map, all1047 literal installed-kernel relations/cuts and basis ranks, full base alias containment, unchanged installed-kernel paid delta, and explicit later-selection endpoint rebinding. Full raw-word regeneration, inherited raw crossing verification, target-prefix chronology, fresh norm bounds, pricing, compiler/prime/all-size interfaces remain separate obligations.',source_loader_sha256=hashlib.sha256((CODE/'weighted_source_data.py').read_bytes()).hexdigest()) + (HERE/'transport-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-updated1047/admission/test_admission.py b/research/gen5b-shared-kernels/p10-updated1047/admission/test_admission.py new file mode 100644 index 0000000000..0e2941c7e2 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/admission/test_admission.py @@ -0,0 +1,64 @@ +"""Independent bindings and mutation regressions for weighted890 admission.""" +from pathlib import Path +import hashlib,json,subprocess,sys,unittest +from functools import lru_cache +from collections import defaultdict +from weighted_source_data import read,verify,HEAD,OUTPUT +from admission_config import OVER,OVER_SHA +from check_transport import rr,included +HERE=Path(__file__).resolve().parent +@lru_cache(None) +def data(): + w=json.loads(OVER.read_text());old=read('bitword/selected/bit/word_p10.json.gz') + ga={e['role']for e in w['gauges']};alias={b:a for a,b in w['pairs']};ids={r:1920+i for i,r in enumerate(sorted(set(range(9120))-set(alias)))};sid=lambda r:ids[alias.get(r,r)] + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase];g=read('graph.json');adj=[{}for _ in range(9120)] + for root,r in zip(g['roots'],w['rootroles']): + for t in root['targets']:adj[r][t]=adj[r].get(t,0)+1 + for i in reversed(order): + a,b,_=w['ops'][i] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + response={sid(r):sum(1<=1;k=0 + while x>=3:x/=3;k+=1 + a,b=small_log(x);c,d=small_log(F(3));return a+k*c,b+k*d + +def exp_interval(a,b): + a,b=F(a),F(b) + assert 0<=a<=b<=1 + def series(x): + term=F(1);total=F(1) + for j in range(1,25):term=term*x/j;total+=term + nextterm=term*x/25 + return down(total),up(total+nextterm/(1-x/26)) + return series(a)[0],series(b)[1] + +def moment(hist,m,W,alpha): + lo=hi=F(0) + for r,n in hist.items(): + assert 00 + a,b=log_interval(F(m,r));c,d=exp_interval(alpha*a,alpha*b);weight=F(r*n,m)/W;lo+=weight*c;hi+=weight*d + a,b=log_interval(F(m));c,d=exp_interval(alpha*a,alpha*b);weight=F(32*m*sum(hist.values()),10**16)/W + return lo+weight*c,hi+weight*d + +def run(): + rows=[] + for name in ['baseline-receipt','weighted890-price']: + path=P/'arithmetic'/(name+'.json');x=json.loads(path.read_text());hist={int(r):n for r,n in(x.get('banked_histogram')or x['profile']['banked_histogram']).items()};W=F(x['unreplicated_stock']);root=x['bit_root_bracket'];low=F(root['lower']);high=F(root['upper']);lm=moment(hist,100,W,low);hm=moment(hist,100,W,high) + assert lm[1]<10}) +def decode(v): + if isinstance(v,list) and len(v)==2 and v[0]=='Fraction':return F(v[1]) + if isinstance(v,list) and len(v)==2 and v[0]=='dict':return {k:decode(x) for k,x in v[1]} + return v + +def read(name): + raw=support.read_bytes(name) + USED.add(name) + if name.endswith('.gz'):raw=gzip.decompress(raw) + if name.endswith(('.json','.json.gz')):return json.loads(raw) + return raw.decode() + +@lru_cache(None) +def pins():return {k:decode(v) for k,v in read('word-pins.json').items()} + +def base_profile(): + w=read('bitword/selected/bit/word_p10.json.gz') + f=read('bitword/selected/bit/frames_p10.json.gz') + p=read('bitword/selected/bit/profile_p10.json') + dims={int(k):r['dim'] for k,r in f['frames'].items()} + assert p['h']==f['h']==H and p['R']==9120 and p['v']==V + gauges={r['role']:r for r in w['gauges']} + assert all(r['dim']==dims[r['frame']] for r in gauges.values()) + source_nodes={role:int(node) for node,role in w['sources'].items()} + reuse=dict(w['pairs']);removed=set(reuse.values()) + assert len(reuse)==len(removed)==890 and not set(reuse)&removed + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops'])) if i not in phase] + assert len(order)==len(set(order))==len(w['ops']) + paths=defaultdict(list) + for i in order: + for role in w['ops'][i][:2]:paths[role].append(w['op_frame'][i]) + for role,frame in zip(w['rootroles'],w['root_frame']):paths[role].append(frame) + helper=Counter() + for role in range(p['R']): + if role in removed:continue + start=gauges[role]['frame'] if role in gauges else w['source_frame'][source_nodes[role]] if role in source_nodes else None + previous=0 if start is None else dims[start] + visits=list(paths[role]) + if role in reuse: + recipient=reuse[role];visits+=[gauges[recipient]['frame']]+paths[recipient] + for frame in visits+[w['full_frame']]: + d=dims[frame]-previous + assert d>=0,(role,previous,dims[frame]) + if d:helper[d]+=1 + previous=dims[frame] + if role in source_nodes:helper[1]+=1 + before=helper.copy();helper[H-2]+=H + # Reconstruct paid source and target dimension increments independently. + # Zero-width visits carry no paid child and are discarded in both routes. + g=read('bitword/selected/bit/graph_p10.json');chron=read('bitword/selected/bit/kchron_p10.json') + source=Counter() + for entry in chron['entries']: + for key in ('carrier_chain','passive_chain'): + for a,b in zip(entry[key],entry[key][1:]): + delta=dims[b]-dims[a];assert delta>=0 + if delta:source[delta]+=1 + target_paths=[[] for _ in range(V)] + for entry in sorted(w['gauges'],key=lambda row:(row['first'],row['role'])): + for t in entry['targets']:target_paths[t].append(entry['frame']) + deliveries=defaultdict(list) + for entry in chron['entries']:deliveries[entry['deliver_after_root']].append(entry) + for j,root in enumerate(g['roots']): + if root['kind']=='side': + for t in root['targets']:target_paths[t].append(w['root_frame'][j]) + for entry in deliveries[j]: + for t in entry['receivers']:target_paths[t].append(entry['deliver_frame']) + target=Counter() + for path in target_paths: + chain=[0]+[dims[f] for f in path]+[H-1] + for a,b in zip(chain,chain[1:]): + delta=b-a;assert delta>=0 + if delta:target[delta]+=1 + assert source==hist(p['source_data_histogram']) and target==hist(p['target_data_histogram']) + assert mass(source)==mass(target)==V*(H-1) + helper.update(source);helper.update(target) + assert mass(helper)==pins()['local_paid_rank_mass'] + return helper,dict(helper_paths=clean(before),copied_centers={18:20},source_data=clean(hist(p['source_data_histogram'])),target_data=clean(hist(p['target_data_histogram'])),histogram=clean(helper),calls=sum(helper.values()),rank_mass=mass(helper),source_target_scope='Paid source increments reconstructed from kchron chains; target increments from ordered gauge/root/delivery visits and rank19 endpoints. Both agree with pinned component histograms. Frame dimensions and nominal event order are data, not a physical replay. Virtual profile child_histogram is not used.') + +@lru_cache(None) +def kernel_first_dimensions(): + w=read('bitword/selected/bit/word_p10.json.gz');frames=read('bitword/selected/bit/frames_p10.json.gz')['frames'] + recipients={b for a,b in w['pairs']};roles=sorted(set(range(9120))-recipients);stream={1920+i:r for i,r in enumerate(roles)} + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase];firstframes={} + for i in order: + for role in w['ops'][i][:2]:firstframes.setdefault(role,w['op_frame'][i]) + for role,frame in zip(w['rootroles'],w['root_frame']):firstframes.setdefault(role,frame) + return {s:frames[str(firstframes[r])]['dim']for s,r in stream.items()} + +def kernel_delta(): + k=read('kernel-selection.json');visits=defaultdict(set);first={};pivots={};donors=Counter() + for row in k['pairs']+k['families']: + pivot=row.get('pivot',row.get('a'));ds=row.get('donors',[row.get('b')]);pivots[pivot]=row['rank'] + dimensions=row.get('first_frame_dims') + if dimensions is None: + dimensions={str(s):kernel_first_dimensions()[s]for s in [pivot]+ds} + dimensions={pivot:dimensions[0],ds[0]:dimensions[1]} if isinstance(dimensions,list) else {int(r):d for r,d in dimensions.items()} + assert set(dimensions)=={pivot,*ds} + for role,dimension in dimensions.items(): + assert role not in first or first[role]==dimension + first[role]=dimension;visits[role].add(row['rank']) + donors.update(ds) + assert not set(pivots)&set(donors) + delta=Counter() + for role,ranks in visits.items(): + delta[first[role]]-=1;previous=pivots.get(role,0) + for dimension in sorted(ranks)+[first[role]]: + assert dimension>=previous + if dimension>previous:delta[dimension-previous]+=1 + previous=dimension + assert clean(delta)==dict(hist(k['expected_local_delta']))==pins()['kernel_local_delta'] + assert mass(delta)==-sum(pivots.values())==-1200 + return delta,dict(entries=len(pivots),pairs=len(k['pairs']),families=len(k['families']),entrance_rank=sum(pivots.values()),distinct_donors=len(donors),shared_donors=sum(n>1 for n in donors.values()),maximum_donor_multiplicity=max(donors.values()),delta=clean(delta)) + +def final_profile(): + helper,base=base_profile();kd,ki=kernel_delta() + target=read('target-selection.json');td=Counter() + for row in target['groups']:td.update(hist(row['local_histogram_delta'])) + assert clean(td)==dict(hist(target['expected_total_delta'])) + restoration=read('restore-selection.json');rd=Counter() + for row in restoration['entries']: + entrance,helper_rank,donor_rank,end=row['dims'];assert entrance=0 + stages[name]=dict(delta=clean(delta),delta_calls=sum(delta.values()),delta_mass=mass(delta),calls=sum(helper.values()),rank_mass=mass(helper)) + priced=Counter({r:5*n for r,n in helper.items() if n});priced.update({r:2*V for r in (38,19,42,4)}) + assert sum(priced.values())==pins()['banked_calls']==250195 + assert mass(priced)==pins()['banked_rank_mass']==1095110 + raw=priced.copy();raw.update(pins()['removed_completion_histogram']) + assert sum(raw.values())==pins()['reorder_five_stage_calls']==252512 and mass(raw)==pins()['final_five_stage_rank_mass']==1204260 + return priced,dict(base=base,kernel=ki,stages=stages,final_helper=clean(helper),final_helper_calls=sum(helper.values()),final_helper_rank_mass=mass(helper),banked_histogram=clean(priced),banked_calls=sum(priced.values()),banked_rank_mass=mass(priced),with_completions=clean(raw),declared_deltas=['descent-selection.json: expected_local_histogram_delta','reorder-selection.json: expected_local_delta'],scope='Independent helper/source/target dimension census plus frozen stage deltas; physical chronology, frame nesting, and scalar correctness are separate obligations.') + +def inventory(): + w=read('bitword/selected/bit/word_p10.json.gz');k=read('kernel-selection.json');restore=read('restore-selection.json');sink=read('sink-selection.json') + removed={b for a,b in w['pairs']};regs=sorted(set(range(9120))-removed);stream={2*V+i:r for i,r in enumerate(regs)} + sinks={row['role'] for row in sink['sinks']};assert all(stream[row['stream']]==row['role'] for row in sink['sinks']) + roles=set(regs)-sinks;entrance={r:0 for r in roles};end={r:H for r in roles} + for row in w['gauges']: + if row['role'] in roles:entrance[row['role']]=row['dim'] + for row in k['pairs']+k['families']: + role=stream[row.get('pivot',row.get('a'))];assert entrance[role]==0;entrance[role]=row['rank'] + for row in restore['entries']: + role=stream[row['helper']];assert entrance[role]==row['dims'][0] and end[role]==H;end[role]=row['rank'] + residual=Counter(end[r]-entrance[r] for r in roles);gauges=Counter(x for x in entrance.values() if x) + completion=Counter(entrance[r]+H-end[r] for r in roles if entrance[r]) + for field,actual in [('residual_families',residual),('final_entrance_ranks',gauges),('completion_rank_histogram',completion)]:assert dict(actual)==pins()[field] + patterns=pins()['bank_patterns'];used=Counter() + for widths,count in patterns: + assert sum(widths)==M and count>0 + for width in widths:used[width]+=count + assert used==Counter({r:T*n for r,n in residual.items()}) + banks=sum(n for widths,n in patterns);stock=T*4*V+5*banks + assert M*banks==T*mass(residual) and banks==pins()['banks_per_stage'] and stock==pins()['literal_stock'] + return dict(physical_R=len(roles),entrance_count=sum(gauges.values()),entrance_histogram=clean(gauges),completion_histogram=clean(completion),residual_census=clean(residual),residual_rank_mass=mass(residual),banks_per_stage=banks,literal_stock=stock,packing_patterns=patterns,packing_unused_coordinates=0,scope='Role inventory and exact width packing only, no chronological bank admission.') + +def moment(histogram,m,W,a,bad=True): + lo,hi=ex.moment_interval(m,W,histogram,a) + if bad: + l,u=ex.log_interval(F(m));e,f=ex.exp_interval(a*l,a*u) + weight=F(32*m*sum(histogram.values()),10**16*W);lo+=weight*e;hi+=weight*f + return lo,hi + +def bracket(histogram,m,W,bad=True): + # Decimal proposes endpoints only. Exact rational enclosures certify both signs. + with localcontext() as ctx: + ctx.prec=65 + terms=[(Decimal(r*n)/Decimal(m)/Decimal(W.numerator)*Decimal(W.denominator),(Decimal(m)/r).ln()) for r,n in histogram.items()] + fall=Decimal(32*m*sum(histogram.values()))/10**16/Decimal(W.numerator)*Decimal(W.denominator) if bad else Decimal(0) + logm=Decimal(m).ln();low=Decimal(0);high=Decimal('.01') + for _ in range(170): + a=(low+high)/2 + if sum(p*(a*l).exp() for p,l in terms)+fall*(a*logm).exp()<1:low=a + else:high=a + tick=int((low*GRID).to_integral_value(rounding=ROUND_FLOOR)) + low=F(tick,GRID);high=low+F(1,GRID) + lm=moment(histogram,m,W,low,bad);hm=moment(histogram,m,W,high,bad) + assert lm[1]<10 + nxt=ae.direct_slacks(a,b,beta,eta,k+grid,1,rowgap);rejected=[n for n,v in nxt['slacks'].items() if v<=0];assert rejected==['g3_above_kappa'] + return dict(bit_root=root,bit_coarse=s,complex_coarse=b,complex_leaf_cap=cap,binding=binding,bootstrap_chain=chain,backoff=eta,beta=beta,strict_constraints=factored,margins=direct['margins'],kappa=k,kappa_decimal=ex.dec(k),minimum_margin=minimum,adjacent_grid_rejected=rejected,strict_constraint_count=47,scope='Exact displayed assembly conditional on the stated scalar guard, row gap and retained complex certificate.') + +def complex_certificate(): + data=read('inputs/complex/gcert1-p11-cmod-centre-mw-flow.json.gz') + assert (data['p'],data['h'],data['v'],data['R'])==(11,22,1320,9036) + local=Counter() + for component in data['blocks'].values():local.update(hist(component)) + ch=Counter({r:5*n for r,n in local.items()});ch.update({r:2640 for r in (42,21,46,4)}) + assert sum(ch.values())==351820 and mass(ch)==1571680 + m=110;W=F(14316);assert m*W-mass(ch)==3080 + root=bracket(ch,m,W);assert root['lower']==COMPLEX + plain=bracket(ch,m,W,False);assert plain['lower']==F(772714354722691,GRID) + return dict(m=m,W=W,histogram=clean(ch),calls=sum(ch.values()),rank_mass=mass(ch),deficit=3080,bad_envelope_root=root,without_bad_envelope_root=plain,scope='Histogram reconstructed from pinned declared gcert blocks, exact roots independently enclosed. Complex symbolic/physical correctness not re-proved.') + +def run(): + for name in ['math_check.py','moment.py','outer.py','raw_ledger.py','bank_template.py','word_pins.py']:read(name) + inv=inventory();histogram,profile=final_profile();complex_result=complex_certificate();W=F(inv['literal_stock'],T) + assert M*W-mass(histogram)==DEFICIT + root=bracket(histogram,M,W);outer=assembly(root['lower']) + assert root['lower']==pins()['bit_root'] and outer['kappa']==pins()['kappa'] and outer['binding']==pins()['binding'] + return dict(status='PASS_INDEPENDENT_PR320_DECLARED_ARITHMETIC',head=HEAD,physical_admission=False,all_size_theorem=False,verified_input_files=sorted(USED),inventory=inv,profile=profile,complex_certificate=complex_result,unreplicated_stock=W,normalized_stock=inv['literal_stock']//5,normalization=12,deficit=DEFICIT,bit_root_bracket=root,assembly=outer) + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions must remain enabled') + report=run();(HERE/'baseline-receipt.json').write_text(json.dumps(ae.serial(report),indent=2)+'\n') + print(json.dumps(ae.serial({k:report[k] for k in ('status','head','physical_admission','all_size_theorem')}|{'root':report['bit_root_bracket'],'kappa':report['assembly']['kappa'],'inventory':report['inventory'],'helper_histogram':report['profile']['final_helper']}),indent=2)) diff --git a/research/gen5b-shared-kernels/p10-updated1047/arithmetic/test_arithmetic.py b/research/gen5b-shared-kernels/p10-updated1047/arithmetic/test_arithmetic.py new file mode 100644 index 0000000000..442f2ae64e --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/arithmetic/test_arithmetic.py @@ -0,0 +1,32 @@ +"""Fresh focused arithmetic and rejection regression suite for this experiment.""" +from pathlib import Path +from fractions import Fraction as F +import sys,json,unittest +CODE=Path(__file__).resolve().parent;sys.path.insert(0,str(CODE.parent));import support +P=support.OUTPUT;import reproduce_p10 as b;import price_candidate as p +import check_second_moment as second +class Tests(unittest.TestCase): + @classmethod + def setUpClass(cls):cls.baseline=p.baseline() + def test_new_baseline(self): + x=self.baseline;self.assertEqual(x['assembly']['kappa'],F(769553898621543,10**18));self.assertEqual(x['profile']['kernel']['entries'],1047);self.assertEqual(x['inventory']['literal_stock'],658290) + def test_zero_delta(self):self.assertEqual(p.price({},{})['kappa_delta'],0) + def test_full_price(self): + d=json.loads((P/'matching/weighted890-delta.json').read_text());x=p.price(d['histogram_delta'],d['residual_delta']);self.assertEqual(x['assembly']['kappa'],F(769997773182046,10**18));self.assertEqual(x['banked_calls'],250045);self.assertEqual(x['assembly']['strict_constraint_count'],47);self.assertTrue(all(v>0 for v in x['assembly']['strict_constraints'].values())) + def test_reject_noninteger(self): + for d in ({1:1.0},{True:1},{'01':1},{21:1}): + with self.assertRaises(ValueError):p.price(d,{}) + def test_reject_unbalanced(self): + with self.assertRaises(ValueError):p.price({1:1},{}) + def test_reject_negative(self): + with self.assertRaises(ValueError):p.price({1:-10**9},{20:-50000000}) + def test_bank_modulus_rejection(self): + with self.assertRaises(ValueError):p.pack_residuals({3:1}) + def test_second_engine_exact_identity(self): + self.assertEqual(second.log_interval(F(1)),(0,0));self.assertEqual(second.exp_interval(0,0),(1,1)) + def test_second_engine_monotonic_enclosure(self): + for x in [F(2),F(3),F(100),F(100,19)]: + a,c=second.log_interval(x);lo,hi=second.exp_interval(a/10,c/10);self.assertLessEqual(lo**10,x);self.assertGreaterEqual(hi**10,x) +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + unittest.main(verbosity=2) diff --git a/research/gen5b-shared-kernels/p10-updated1047/expected/receipts.json b/research/gen5b-shared-kernels/p10-updated1047/expected/receipts.json new file mode 100644 index 0000000000..ebbc2b340e --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/expected/receipts.json @@ -0,0 +1,65 @@ +{ + "source_head": "1b37957d1520c80b6ea796bf418e52be5109c2d4", + "word_sha256": "41b15c5ccf7d2afd66396f183579a02c66f0f31f5410ceeb2eb271393a84d494", + "source_manifest_sha256": "98e5e469faab4230cf791b5777a5b324f1aaf9153c6adf1caedfe4afb45a3c03", + "receipt_count": 14, + "normalization": "Remove elapsed-time keys and replace only declared absolute package/input/output/authored roots. All other receipt fields are checked.", + "receipts": { + "matching/matching-result.json": { + "sha256": "589db0f5088c86388e4b18cb27a634e023d506a29e93666c91e71b9e25276cdd", + "status": "PASS_RANK_PROFILE_AND_EXACT_PAIR_MINCOST" + }, + "matching/audit-result.json": { + "sha256": "7c29d44f84ac8b98de01bbbb74787b8d62ea58f214f5d5e12ece173b529c06e0", + "status": "PASS_INDEPENDENT_BOUNDED_MATCHING_AUDIT" + }, + "matching/weighted890-delta.json": { + "sha256": "87f32365f8dc37163b2a3fed9cee4f5eadbafa9f9c17e3b8551e08b22bff8fd0", + "status": null + }, + "arithmetic/baseline-receipt.json": { + "sha256": "9b655a7ceab6b9c296b3f4a869f6e14f0305abb5203d98ebd2ea77f1dac404c9", + "status": "PASS_INDEPENDENT_PR320_DECLARED_ARITHMETIC" + }, + "arithmetic/weighted890-price.json": { + "sha256": "39d4594fa90230d5927814d2e94a947d2dc6632b2a2c80c106109c19c8d86a64", + "status": "CONDITIONAL_PR320_CANDIDATE_ARITHMETIC" + }, + "arithmetic/arithmetic-result.json": { + "sha256": "61feef94b7430b08f28e6c302125418253346c35bc1fba2db62c0904cdf0753e", + "status": "PASS_SOURCE_BOUND_WEIGHTED890_ARITHMETIC" + }, + "arithmetic/second-moment-result.json": { + "sha256": "058b6753d9ee16500ee0038dc654c2494b99a856044cbd4b6191da3c442fe427", + "status": "PASS_TWO_ROOTS_SECOND_EXACT_ENGINE" + }, + "admission/transport-result.json": { + "sha256": "dde40af7a716684ce9e6483e430495747d527a567e66b4e1434d9cb72e417967", + "status": "PASS_EXACT_ALL1047_KERNEL_CONDITIONAL_TRANSPORT" + }, + "admission/target-chronology-result.json": { + "sha256": "492d3782ad3a48f83c099f968355416499f36dbf03c5d0c89efb229a0dda01b4", + "status": "PASS_FRESH_PARTIAL_RAW_PREFIX_AND_ALL120_TARGET_CUTS" + }, + "admission/scalar-recurrence-result.json": { + "sha256": "cfff8fca13d3bc46d8fb5c1b3e1f8f8fe55667285e1919e70ee68e9b1b985a44", + "status": "PASS_FRESH_WEIGHTED890_ALL1047_SCALAR_RECURRENCE" + }, + "admission/reorder-transport-result.json": { + "sha256": "70445aa0fe5d9204498e0f720770cbc1059349f8dace55cff3bc687941cd606f", + "status": "PASS_ALL133_SEMANTIC_ANCHOR_AND_COMMUTATION_TRACES" + }, + "finite/chart-receipt.json": { + "sha256": "5ead2849197b2f1b7c29115a860d4887fba579099e9220f510f4665cbe668036", + "status": null + }, + "finite/bank-receipt.json": { + "sha256": "4516f49a4c58e90cb8f162045c3481959090cb47ad12e855f658f8fb72b42d31", + "status": "PASS_EXPLICIT_ALL_ROLE_REPLICA_BANKS" + }, + "finite/finite-invoice-bound.json": { + "sha256": "af33ff9fd6bbf69cbcdcc703316786d8a7795ee9f5a9a24fb627f084de8fbf87", + "status": "PASS_RECEIPT_BOUND_UPDATED_HEAD_WEIGHTED890_FINITE_ARITHMETIC" + } + } +} diff --git a/research/gen5b-shared-kernels/p10-updated1047/finite/bind_finite.py b/research/gen5b-shared-kernels/p10-updated1047/finite/bind_finite.py new file mode 100644 index 0000000000..26d91226a2 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/finite/bind_finite.py @@ -0,0 +1,252 @@ +"""Independent exact finite invoice and exhaustive direct dependency binding. +External checkers remain inert text/data here. Only independently authored +modules and the standard library execute. No fixed 19-relation closure is included. +""" +from collections import Counter,defaultdict +from fractions import Fraction as F +from pathlib import Path +import gzip,json,hashlib,struct +import context as c + +def clean(x):return {int(k):v for k,v in x.items()if v} +def hashraw(raw):return hashlib.sha256(raw).hexdigest() +def bill(stock,calls,weighted,units,R=8223,chart_max=400): + m=100;N=200;d=10000;T=60;v=960;h=20 + E=T*calls;J=T*(24*v+10*R);normalizer=chart_max+99+100;K=2*5*T*((stock-1)+R*m*normalizer) + terms=dict(unit_expanded_additions=T*(5*units+6*v),high_affine_factors=J*16*(d+1)**2,low_transpositions=J*(stock+h),generic_wrappers=E*(8*m*m+8),matrix_preparation=E*128*N**3,global_matrix_preparation=16*m**3,copy_erase_episodes=5*h*T,paid_child_overhead=E,bank_selectors=K,constant=1) + return dict(m=m,N=N,d=d,h=h,v=v,replicas=T,R=R,stock=stock,banked_calls=calls,literal_paid_children=E,local_weighted_additions=weighted,local_unit_additions=units,weighted_additions=T*(5*weighted+6*v),route_families=J,chart_factor_bound=chart_max,normalizer_factor_bound=normalizer,coefficient_terms=terms,coefficient=sum(terms.values()),fallback_per_child=32*m*m,fallback_generic_count=6*N*(N-1)+3*N+6*(N-1),internal_row_coefficient=d+1,external_complex_row_coefficient=20161) + +def paths(): + A=c.ADMISSION_OUTPUT;B=c.ARITHMETIC;M=c.MATCHING;O=c.OUTPUT;H=c.HERE;P=c.BASE + out=dict(word=c.WORD,matching=M/'matching-result.json',matching_optimality=M/'matching-optimality-certificate.json',matching_audit=M/'audit-result.json',path_delta=M/'weighted890-delta.json',price=B/'weighted890-price.json',baseline=B/'baseline-receipt.json',arithmetic_result=B/'arithmetic-result.json',second_moment=B/'second-moment-result.json',transport=A/'transport-result.json',kernel_paths=A/'kernel-path-receipts.json',kernels=A/'rebound-kernel-entries.json',later_selections=A/'rebound-later-selections.json',role_map=A/'virtual-physical-map.json',targets=A/'target-chronology-result.json',norms=A/'scalar-recurrence-result.json',reorder=A/'reorder-transport-result.json',chart_summary=O/'chart-receipt.json',endpoint_charts=O/'endpoint-charts.json.gz',seam_charts=O/'seam-charts.json.gz',banks=O/'bank-receipt.json',bank_table=O/'bank-addresses.bin.gz',source_manifest=c.MANIFEST,admission_manifest=c.MANIFEST,matching_graph=M/'postdescent_graph.json') + for name in ('check_transport.py','check_target_chronology.py','check_scalar_recurrence.py','check_reorder_transport.py','weighted_source_data.py','admission_config.py'):out['admission/'+name]=c.ADMISSION/name + for name in ('context.py','check_charts.py','check_banks.py','bind_finite.py'):out['finite/'+name]=H/name + out['finite/chart_rational.py']=c.RATIONAL + out['finite/chart_loader.py']=H/'chart_rational.py' + for name in ('select_matching.py','census_matching.py','audit_matching.py'):out['matching/'+name]=P/'matching'/name + for name in ('price.py','reproduce_p10.py','price_candidate.py','check_second_moment.py'):out['arithmetic/'+name]=P/'arithmetic'/name + out['support.py']=P/'support.py' + for name in ('exact_intervals.py','assembly_arithmetic.py'):out['authored/'+name]=P.parent/name + out['authored/price_candidate.py']=P.parent/'p10/arithmetic/price_candidate.py' + return out + +def load_bundle(): + ps=paths();raw={k:p.read_bytes()for k,p in ps.items()};hashes={k:hashraw(v)for k,v in raw.items()} + data={k:json.loads(gzip.decompress(v)if ps[k].name.endswith('.gz')else v)for k,v in raw.items()if ps[k].name.endswith(('.json','.json.gz'))} + return ps,raw,hashes,data + +def bindings(h,d): + assert h['word']==c.WORD_SHA + for name in ('matching','transport','targets','norms','reorder'): + r=d[name];assert r['head']==c.HEAD + assert r.get('overlay_sha256',r.get('candidate_sha256'))==h['word'] + checker={'matching':'matching/select_matching.py','transport':'admission/check_transport.py','targets':'admission/check_target_chronology.py','norms':'admission/check_scalar_recurrence.py','reorder':'admission/check_reorder_transport.py'} + for name,key in checker.items():assert d[name]['checker_sha256']==h[key],('stale checker',name) + assert d['matching']['graph_sha256']==h['matching_graph'] + assert d['transport']['source_loader_sha256']==h['admission/weighted_source_data.py'] + deps={Path(k).name:v for k,v in h.items()if k.startswith('admission/')};deps['target-chronology-result.json']=h['targets'] + for name in ('targets','norms'): + for dep,value in d[name]['dependency_sha256'].items():assert deps[dep]==value,('stale receipt dependency',dep) + assert d['source_manifest']['head']==d['admission_manifest']['head']==c.HEAD + src={r['path']:(r['sha256'],r['git_blob'],r['bytes'])for r in d['source_manifest']['files']} + assert src=={r['path']:(r['sha256'],r['git_blob'],r['bytes'])for r in d['admission_manifest']['files']} + for name in ('endpoint_charts','seam_charts','banks'): + r=d[name];assert r['head']==c.HEAD and r['word_sha256']==h['word'] + assert r['source_manifest_sha256']==h['source_manifest'] and r['context_sha256']==h['finite/context.py'] + assert r['checker_sha256']==h['finite/check_banks.py'if name=='banks'else 'finite/check_charts.py'] + assert d['endpoint_charts']['rational_checker_sha256']==h['finite/chart_rational.py'] + for name,key in [('endpoint-charts.json.gz','endpoint_charts'),('seam-charts.json.gz','seam_charts')]:assert d['chart_summary']['outputs'][name]==h[key] + assert d['banks']['pricing_sha256']==h['price'] and d['banks']['compressed_table_sha256']==h['bank_table'] + for path,expected in d['arithmetic_result']['source_sha256'].items():assert h[path]==expected + audit=d['matching_audit'];assert audit['status']=='PASS_INDEPENDENT_BOUNDED_MATCHING_AUDIT' and audit['source_head']==c.HEAD + assert audit['checker_sha256']==h['matching/audit_matching.py'] and audit['graph_sha256']==h['matching_graph'] + witness=audit['witnesses']['unrestricted'];assert witness['candidate_sha256']==h['word'] and witness['certificate_sha256']==h['matching_optimality'] + assert witness['retained_original_exact_pairs']==827 and witness['changed_pairs']==63 and all(audit['negative_controls'].values()) + second=d['second_moment'];assert second['checker_sha256']==h['arithmetic/check_second_moment.py'] + assert second['status']=='PASS_TWO_ROOTS_SECOND_EXACT_ENGINE' and len(second['cases'])==2 + for case in second['cases']: + assert case['strict_signs'] and case['independent_engine_intervals_overlap'] + assert case['sha256']==h['baseline' if case['name']=='baseline-receipt' else 'price'] + assert d['path_delta']['candidate_sha256']==h['word'] + for name in ('price','baseline','arithmetic_result'):assert d[name]['head']==c.HEAD + + +def replay_chart(p): + cols=p['basis_columns'];B=[[F(x)for x in row]for row in zip(*cols)];inv=[[F(x)for x in row]for row in p['inverse']] + assert len(B)==20 and all(len(x)==20 for x in B) + # A second factor replay, independent from the factor constructor. + A=[row[:]for row in B];maxnum=maxden=1;det_multiplier=F(1) + assert len(p['factors'])==p['count']<=400 + for kind,i,j,q in p['factors']: + q=F(q);maxnum=max(maxnum,abs(q.numerator));maxden=max(maxden,q.denominator) + if kind=='swap':A[i],A[j]=A[j],A[i];det_multiplier*=-1 + elif kind=='scale':A[i]=[x*q for x in A[i]];det_multiplier*=q + elif kind=='add':A[i]=[x+q*y for x,y in zip(A[i],A[j])] + else:raise AssertionError('unknown factor') + assert A==[[F(i==j)for j in range(20)]for i in range(20)] + assert F(p['determinant'])*det_multiplier==1 + assert all(abs(x.numerator)<2**80 and x.denominator<2**80 for row in inv for x in row) + assert maxnum==p['max_numerator'] and maxden==p['max_denominator'] and max(maxnum,maxden)<2**80 + for L,R in((B,inv),(inv,B)): + C=list(zip(*R));assert all(sum(x*y for x,y in zip(row,col))==int(i==j)for i,row in enumerate(L)for j,col in enumerate(C)) + return len(p['factors']),maxnum,maxden + +def geometry(p,D,E): + """Independent exact source-frame membership and split-projector identification.""" + import chart_rational as rat + cols=[[F(x)for x in col]for col in p['basis_columns']] + r=p['rank'];de=p['donor_dimension'];df=p['recipient_dimension'] + assert de==D['dim'] and df==(20 if E is None else E['dim']) and r==df-de>=0 + AD=D['a']if'a'in D else rat.nullspace(D['b']) + AE=[]if E is None else E['a']if'a'in E else rat.nullspace(E['b']) + residual=cols[:r];donor=cols[r:r+de];outside=cols[r+de:] + assert len(outside)==20-df + assert all(sum(x*y for x,y in zip(a,b))==0 for a in AD for b in donor) + assert all(sum(x*y for x,y in zip(a,b))==0 for a in AE for b in residual+donor) + def gram(a,b):return 9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b) + assert all(gram(a,b)==0 for a in residual for b in donor) + assert all(gram(a,b)==0 for a in outside for b in residual+donor) + # replay_chart separately verifies the full basis invertible, so these + # ranks/membership/orthogonality equations identify the unique projector. + + +def verify_bank(raw,widths,r): + table=gzip.decompress(raw);assert hashraw(table)==r['one_stage_table_uncompressed_sha256'] + rows=list(struct.iter_unpack('>IIIII',table));assert len(rows)==493380 + used=bytearray(9120*60);last=0;end=0 + for role,replica,bank,offset,width in rows: + assert role in widths and 0<=replica<60 and widths[role]==width + if bank!=last:assert bank==last+1 and end==100;last=bank;end=0 + assert offset==end and end+width<=100;end+=width + key=role*60+replica;assert not used[key];used[key]=1 + assert end==100 and last+1==r['banks_per_stage']==85578 + assert sum(used)==len(widths)*60 and all(used[60*role+i]for role in widths for i in range(60)) + five=hashlib.sha256() + for stage in range(5): + for role,replica,b,offset,width in rows:five.update(struct.pack('>IIIIII',stage,role,replica,stage*85578+b,offset,width)) + assert five.hexdigest()==r['five_stage_assignment_sha256'] and r['total_assignments']==2466900 + assert r['literal_stock']==60*4*960+5*85578==658290 + + +def helper_census(word,frames,seams): + gauges={x['role']:x for x in word['gauges']};sources={r:int(n)for n,r in word['sources'].items()};reuse=dict(word['pairs']);removed=set(reuse.values());visits=defaultdict(list) + ps=set(word['phase1']);order=word['phase1']+[i for i in range(len(word['ops']))if i not in ps] + for i in order: + for role in word['ops'][i][:2]:visits[role].append(word['op_frame'][i]) + for role,frame in zip(word['rootroles'],word['root_frame']):visits[role].append(frame) + H=Counter();paid_seams={};requested={(x['donor'],x['recipient']):x for x in seams} + for role in sorted(set(range(9120))-removed): + initial=gauges[role]['frame']if role in gauges else word['source_frame'][sources[role]]if role in sources else None + prev=0 if initial is None else frames[initial]['dim'];fs=list(visits[role]);seam_index=None + if role in reuse: + recipient=reuse[role];seam_index=len(fs);fs+=[gauges[recipient]['frame']]+visits[recipient] + for index,frame in enumerate(fs+[word['full_frame']]): + dim=frames[frame]['dim'];delta=dim-prev;assert delta>=0 + if delta:H[delta]+=1 + if index==seam_index and(role,reuse[role])in requested: + row=requested[role,reuse[role]];assert delta==row['rank'] and frame==row['recipient_gauge_frame'] and fs[index-1]==row['donor_end_frame'];paid_seams[role,reuse[role]]=delta + prev=dim + if role in sources:H[1]+=1 + assert set(paid_seams)==set(requested) + graph=c.source('bitword/selected/bit/graph_p10.json');chron=c.source('bitword/selected/bit/kchron_p10.json') + for i,root in enumerate(graph['roots']): + if root['kind']=='center':H[frames[word['root_frame'][i]]['dim']]+=1 + for row in chron['entries']: + for k in ('carrier_chain','passive_chain'): + for a,b in zip(row[k],row[k][1:]): + delta=frames[b]['dim']-frames[a]['dim'];assert delta>=0 + if delta:H[delta]+=1 + target=[[]for _ in range(960)] + for row in sorted(word['gauges'],key=lambda r:(r['first'],r['role'])): + for t in row['targets']:target[t].append(row['frame']) + deliveries=defaultdict(list) + for row in chron['entries']:deliveries[row['deliver_after_root']].append(row) + for i,root in enumerate(graph['roots']): + if root['kind']=='side': + for t in root['targets']:target[t].append(word['root_frame'][i]) + for row in deliveries[i]: + for t in row['receivers']:target[t].append(row['deliver_frame']) + for fs in target: + ds=[0]+[frames[x]['dim']for x in fs]+[19] + for a,b in zip(ds,ds[1:]): + assert b>=a + if b>a:H[b-a]+=1 + return H,Counter(paid_seams.values()) + + +def run(): + c.verify();ps,raw,h,d=load_bundle();bindings(h,d) + word,frames,roles,physical,entrance,ends,widths,origin=c.inventory();banks=d['banks'];price=d['price'];baseline=d['baseline'];transport=d['transport'];norm=d['norms'];targets=d['targets'];reorder=d['reorder'] + assert transport['kernel_entries_rebound']==1047 and transport['kernel_relations_and_cut_triples_exact'] and transport['kernel_entries_touching_changed_roles']==60 + assert transport['kernel_delta_old']==transport['kernel_delta_new'] and transport['complete_old_paths_checked']==transport['complete_new_paths_checked']==8230 + assert transport['preserved_pairs']==827 and all(not x for x in transport['direct_role_overlaps'].values()) + assert targets['all120_literal_target_relations']==120 and targets['all480_group_members_checked_at_close'] and targets['all_gauge_target_paths_nested'] and targets['negative_controls'] + assert targets['compressed_target_state_containment_checks']==5640 + assert targets['group119']['new_close']==3285275 assertion is made.','The inherited weighted compiler, common ancestor chart, row restoration, downstream address substitution, descriptor/precision/recovery, complex correctness and analytic interfaces remain hypotheses.','The displayed coefficient is the complete instantiated ring/recipe formula. C_full must also absorb inherited primitive, wrapper and prior ordinary-level constants; no numerical all-size cutoff or unconditional all-size theorem is claimed.']) + for key,path in ps.items():assert c.sha(path)==h[key],('concurrent input changed',key) + (c.OUTPUT/'finite-invoice-bound.json').write_text(json.dumps(report,indent=2)+'\n') + print(json.dumps({k:report[k]for k in('status','direct_dependency_count','source_dependency_count','pricing','endpoint_geometry','bank_binding','scalar_payload','coefficient_delta')},indent=2));return report +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-updated1047/finite/chart_rational.py b/research/gen5b-shared-kernels/p10-updated1047/finite/chart_rational.py new file mode 100644 index 0000000000..6dce0679b2 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/finite/chart_rational.py @@ -0,0 +1,7 @@ +"""Reuse the unchanged hash-pinned independently authored rational-chart primitive.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import support +_original=support.load_authored('_published_chart_rational','../p10/closure/chart_rational.py') +globals().update({k:v for k,v in vars(_original).items()if not k.startswith('__')}) diff --git a/research/gen5b-shared-kernels/p10-updated1047/finite/check_banks.py b/research/gen5b-shared-kernels/p10-updated1047/finite/check_banks.py new file mode 100644 index 0000000000..4bb077e811 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/finite/check_banks.py @@ -0,0 +1,75 @@ +"""Original literal role/replica/stage inventory and bank-address verifier. +Each bank coordinate is assigned exactly once; whole-bank endpoint swaps replay. +""" +from collections import Counter,defaultdict +import json,struct,gzip,hashlib +import context as c + +def validate_table(raw,widths,banks): + assert len(raw)==20*len(widths)*60 + seen=set();last=0;end=0;rows=list(struct.iter_unpack('>IIIII',raw)) + for role,replica,bank,offset,width in rows: + assert role in widths and 0<=replica<60 and width==widths[role] + if bank!=last:assert bank==last+1 and end==100;last=bank;end=0 + assert offset==end and offset+width<=100;end+=width + assert(role,replica)not in seen;seen.add((role,replica)) + assert end==100 and last+1==banks and seen=={(r,t)for r in widths for t in range(60)} + return rows + +def run(): + c.verify();word,frames,roles,physical,entrance,ends,widths,origin=c.inventory() + price_path=c.ARITHMETIC/'weighted890-price.json';price=c.load(price_path) + census=Counter(widths.values());assert dict(census)=={int(k):v for k,v in price['residual_census'].items()} + assert price['physical_R']==len(roles)==8223 + patterns=price['packing_patterns'];source_patterns=c.source('word-pins.json')['bank_patterns'] + assert patterns==[dict(widths=w,count=n)for w,n in source_patterns] + bywidth=defaultdict(list) + for role in roles:bywidth[widths[role]].append(role) + queues={w:iter((r,t)for r in rs for t in range(60))for w,rs in bywidth.items()} + encoded=bytearray();bank=0;endpoints=[];normalizers=[] + for pattern,row in enumerate(patterns): + ws=row['widths'];assert sum(ws)==100 and row['count']>0 + offsets=[];end=0 + for w in ws:offsets.append(end);end+=w + def swap(blocks): + state=list(range(200)) + for b in blocks: + for j in range(offsets[b],offsets[b]+ws[b]):state[j],state[100+j]=state[100+j],state[j] + return state + blocks=list(range(len(ws)));assert swap(blocks)==list(range(100,200))+list(range(100)) + assert swap(blocks+blocks[::-1])==list(range(200)) + assert swap(blocks[:-1])!=swap(blocks) and swap(blocks+[0])!=swap(blocks) + endpoints.append(dict(pattern=pattern,forward_inverse_columns=200,omission_rejected=True,repetition_rejected=True)) + for stage in range(5): + witness=[] + outside=next(j for j in range(100)if not 20*stage<=j<20*(stage+1)) + for block,(w,start)in enumerate(zip(ws,offsets)): + original=list(range(20*stage,20*stage+w));target=list(range(start,start+w)) + src=original+[j for j in range(100)if j not in original];dst=target+[j for j in range(100)if j not in target] + pi=dict(zip(src,dst));assert set(pi)==set(pi.values())==set(range(100)) + assert [pi[j]for j in original]==target + witness.append((pi[outside],block+1)) + assert len(set(witness))==len(ws) + normalizers.append(dict(stage=stage,pattern=pattern,unit_column_witnesses=witness)) + for _ in range(row['count']): + offset=0 + for w in ws: + role,replica=next(queues[w]);encoded.extend(struct.pack('>IIIII',role,replica,bank,offset,w));offset+=w + assert offset==100;bank+=1 + assert all(next(q,None)is None for q in queues.values()) + assert bank==price['banks_per_stage']==85578 + rows=validate_table(encoded,widths,bank);allstages=hashlib.sha256() + for stage in range(5): + for role,replica,b,offset,width in rows: + address=stage*bank+b;assert stage*bank<=address<(stage+1)*bank + allstages.update(struct.pack('>IIIIII',stage,role,replica,address,offset,width)) + stock=60*4*960+5*bank;assert stock==price['literal_stock']==658290 + out=c.OUTPUT/'bank-addresses.bin.gz' + with gzip.GzipFile(filename=str(out),mode='wb',mtime=0)as stream:stream.write(encoded) + receipt=dict(status='PASS_EXPLICIT_ALL_ROLE_REPLICA_BANKS',head=c.HEAD,word_sha256=c.WORD_SHA,checker_sha256=c.sha(__file__),context_sha256=c.sha(c.HERE/'context.py'),source_manifest_sha256=c.sha(c.MANIFEST),pricing_sha256=c.sha(price_path),physical_R=len(roles),replicas=60,stages=5,assignments_per_stage=len(rows),total_assignments=5*len(rows),banks_per_stage=bank,total_banks=5*bank,literal_stock=stock,residual_census=dict(sorted(census.items())), + entrance_count=sum(x is not None for x in entrance.values()),entrance_rank_mass=sum(x['dim']for x in entrance.values()if x is not None),restored_endpoints=sum(x is not None for x in ends.values()), + all_blocks_full=True,all_role_replica_pairs_exactly_once=True,stage_bank_ranges_disjoint=True,endpoint_checks=endpoints,normalizer_witnesses=normalizers, + one_stage_table_format='Big-endian uint32: role, replica, relative stage bank, coordinate start, width; stage translates bank by stage*85578; data occupies independent230400 families.', + one_stage_table_uncompressed_sha256=hashlib.sha256(encoded).hexdigest(),five_stage_assignment_sha256=allstages.hexdigest(),compressed_table_sha256=c.sha(out),scope='Literal completed-bank role addresses and endpoint swap/normalizer permutation witnesses. Downstream full production-word address substitution and compiler semantics remain inherited interfaces.') + (c.OUTPUT/'bank-receipt.json').write_text(json.dumps(receipt,indent=2)+'\n');print(json.dumps({k:v for k,v in receipt.items()if k not in('normalizer_witnesses','endpoint_checks')},indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10-updated1047/finite/check_charts.py b/research/gen5b-shared-kernels/p10-updated1047/finite/check_charts.py new file mode 100644 index 0000000000..6d226cdfb3 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/finite/check_charts.py @@ -0,0 +1,84 @@ +"""Fresh exact endpoint charts and changed alias split-projectors. +Uses only our original rational helper, never upstream executable code. +""" +from fractions import Fraction as Q +from collections import Counter,defaultdict +from functools import lru_cache +import json,gzip,hashlib +import context as c +c.verify() +import chart_rational as rat + +def gram(a,b):return 9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b) +def basis(frame): + if frame is None:return [] + return frame['b']if 'b'in frame else rat.nullspace(frame['a']) +def ann(frame): + if frame is None:return [] + return frame['a']if 'a'in frame else rat.nullspace(frame['b']) +def canon(rows): + R,p=rat.rref(rows);return tuple(tuple(rat.primitive(row))for row in R[:len(p)]) +def chart(BD,AE): + BD=[list(x)for x in BD];AE=[list(x)for x in AE] + assert all(sum(x*y for x,y in zip(a,b))==0 for a in AE for b in BD) + gd=[[9*x-sum(row)for x in row]for row in BD] + residual=rat.nullspace(AE+gd) + outside=[rat.primitive([11*x-sum(a)for x in a])for a in AE] + rank=20-len(AE)-len(BD);assert len(residual)==rank>=0 + columns=residual+BD+outside + assert len(columns)==20 and len(rat.rref(columns)[1])==20 + assert all(gram(a,b)==0 for a in residual for b in BD+outside) + assert all(gram(a,b)==0 for a in BD for b in outside) + B=[list(x)for x in zip(*columns)];f=rat.factor(B) + assert f['count']<=400 and max(f['max_numerator'],f['max_denominator'])<2**80 + inv=[[Q(i==j)for j in range(20)]for i in range(20)] + for op,i,j,q in f['factors']: + if op=='swap':inv[i],inv[j]=inv[j],inv[i] + elif op=='scale':inv[i]=[x*q for x in inv[i]] + else:inv[i]=[x+q*y for x,y in zip(inv[i],inv[j])] + for L,R in((B,inv),(inv,B)): + cols=list(zip(*R)) + assert all(sum(x*y for x,y in zip(row,col))==int(i==j)for i,row in enumerate(L)for j,col in enumerate(cols)) + # On a full basis, the first-block projector fixes E intersect D-perp + # and kills D + E-perp. This uniquely identifies P_E-P_D. + return dict(rank=rank,donor_dimension=len(BD),recipient_dimension=20-len(AE),basis_columns=columns,inverse=inv,**f) +def save(name,obj): + raw=(json.dumps(rat.serial(obj),separators=(',',':'))+'\n').encode() + with gzip.GzipFile(filename=str(c.OUTPUT/name),mode='wb',mtime=0)as out:out.write(raw) +def run(): + word,frames,roles,physical,entrances,ends,widths,origin=c.inventory() + programs=[];registry={};uses=[] + for role in roles: + if entrances[role]is None:assert ends[role]is None;continue + key=(canon(basis(entrances[role])),canon(ann(ends[role]))) + if key not in registry: + registry[key]=len(programs);programs.append(dict(program_id=len(programs),**chart(*key))) + if len(programs)%100==0:print('Endpoint programs',len(programs),flush=True) + program=programs[registry[key]];assert program['rank']==widths[role] + uses.append(dict(role=role,physical=physical[role],rank=widths[role],program_id=registry[key],origin=origin[role],restored=ends[role]is not None)) + assert len(uses)==2317 and sum(x['restored']for x in uses)==240 + endpoint=dict(status='PASS_ALL_CURRENT_ENDPOINT_CHARTS',head=c.HEAD,word_sha256=c.WORD_SHA,checker_sha256=c.sha(__file__),source_manifest_sha256=c.sha(c.MANIFEST),rational_checker_sha256=c.sha(c.RATIONAL),context_sha256=c.sha(c.HERE/'context.py'), + nontrivial_endpoint_uses=len(uses),identity_endpoint_uses=len(roles)-len(uses),programs=len(programs),max_factors=max(x['count']for x in programs),max_numerator=max(x['max_numerator']for x in programs),max_denominator=max(x['max_denominator']for x in programs),retained_chart_bound=400,normalizer_bound=599,exact_inverse_products=True,exact_factor_replay=True,metric='9I-J',exterior_formula='11*a-sum(a)',factor_programs=programs,role_uses=uses) + save('endpoint-charts.json.gz',endpoint) + old=c.source('bitword/selected/bit/word_p10.json.gz');oldpairs=set(map(tuple,old['pairs'])) + ps=set(word['phase1']);order=word['phase1']+[i for i in range(len(word['ops']))if i not in ps];times={i:j for j,i in enumerate(order)};visits=defaultdict(list) + for i in order: + for role in word['ops'][i][:2]:visits[role].append(i) + gauges={e['role']:e for e in word['gauges']};seams=[];sprograms=[];registry={} + for donor,recipient in word['pairs']: + if(donor,recipient)in oldpairs:continue + donorframe=word['op_frame'][visits[donor][-1]];recipientframe=gauges[recipient]['frame'];D=frames[donorframe];E=frames[recipientframe] + assert times[visits[donor][-1]]I',raw,12,1) + r=copy.deepcopy(self.data['banks']);r['one_stage_table_uncompressed_sha256']=hashlib.sha256(raw).hexdigest() + self.rejects(lambda:b.verify_bank(gzip.compress(raw),self.inv[6],r)) + def test_finite_formula(self): + old=b.bill(658290,250195,336253,338173);new=b.bill(658290,250045,336253,338173) + self.assertEqual(old['coefficient'],25485577221183401);self.assertEqual(new['coefficient'],25476360501102401) + self.assertEqual(new['coefficient']-old['coefficient'],-9216720081000) + self.assertEqual(new['coefficient_terms']['unit_expanded_additions'],101797500) + self.assertEqual(new['coefficient_terms']['bank_selectors'],295929593400) + def test_endpoint_bound_is_separate(self): + old=b.bill(658290,250045,336253,338173);smaller=b.bill(658290,250045,336253,338173,chart_max=136) + self.assertEqual(old['coefficient_terms']['generic_wrappers'],smaller['coefficient_terms']['generic_wrappers']) + self.assertEqual(old['coefficient_terms']['matrix_preparation'],smaller['coefficient_terms']['matrix_preparation']) + self.assertGreater(old['coefficient_terms']['bank_selectors'],smaller['coefficient_terms']['bank_selectors']) +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/research/gen5b-shared-kernels/p10-updated1047/inputs.json b/research/gen5b-shared-kernels/p10-updated1047/inputs.json new file mode 100644 index 0000000000..e4bfc3a059 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/inputs.json @@ -0,0 +1,319 @@ +{ + "head": "1b37957d1520c80b6ea796bf418e52be5109c2d4", + "repository": "chafreaky/integer-mult-bounds", + "package": "research/five-stage-p10-transcript-stages/", + "files": [ + { + "path": "NOTICE.md", + "bytes": 9843, + "git_blob": "369b98c4e28e0f9172457954e222d396ddf06df8", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/NOTICE.md", + "sha256": "622b63758089429e748ce19c5ca163dbd1d5557b06f20a06434f84daa248945c", + "local": "NOTICE.md" + }, + { + "path": "bank_check.py", + "bytes": 19917, + "git_blob": "9222de6ff3e15d954db1b86d6fcf6a2ef1763e91", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bank_check.py", + "sha256": "5fdcba97a59f2713f3f534763a88a8c737adf28279b94a4e484e62b1793404aa", + "local": "bank_check.py.txt" + }, + { + "path": "bank_template.py", + "bytes": 14508, + "git_blob": "385b5583c0b650b6728155053e61ce7fd0a26fd8", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bank_template.py", + "sha256": "1c124900095abfd0c06cba507c2ed804f5475bea1b3f698ef66d412417ad4264", + "local": "bank_template.py.txt" + }, + { + "path": "bitword/bit/base_word.py", + "bytes": 9815, + "git_blob": "044f278fbe6a64303339de41a8643d444e4b5e9d", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bitword/bit/base_word.py", + "sha256": "9fe3a81b7561d2b09c086f63fac4626e88a32369ef8bc5579c94878de1218a89", + "local": "bitword/bit/base_word.py.txt" + }, + { + "path": "bitword/bit/word.py", + "bytes": 7509, + "git_blob": "def2b4178e417ab7fd3d6e05b57510af1d79e929", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bitword/bit/word.py", + "sha256": "88554981690cb43c4286fd962dddf0f20c58cf0c6cd58f0b8081ac88b16531ff", + "local": "bitword/bit/word.py.txt" + }, + { + "path": "bitword/selected/bit/frames_p10.json.gz", + "bytes": 137098, + "git_blob": "3b4bb278c89f2549d6eec04a2474579d65678f23", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bitword/selected/bit/frames_p10.json.gz", + "sha256": "f191ca102966c77e6865e18751d8a17922ce46015dcbb42789ad735925886ec8", + "local": "bitword/selected/bit/frames_p10.json.gz" + }, + { + "path": "bitword/selected/bit/graph_p10.json", + "bytes": 477170, + "git_blob": "0ccea13a95179374118cb1680351dd27a8c0d7b4", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bitword/selected/bit/graph_p10.json", + "sha256": "41e50cb6ccb5a61ff48c8d9ec2a9014f2dcdff87afd3c42bba9cd02b92605a3f", + "local": "bitword/selected/bit/graph_p10.json" + }, + { + "path": "bitword/selected/bit/kchron_p10.json", + "bytes": 120739, + "git_blob": "f1e5c67bf41769449ef80cf7a1e30b5c2acf0268", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bitword/selected/bit/kchron_p10.json", + "sha256": "228b7e2343d31191cb054c29b1c253ffdb53b768a60cb34ab3db1c1df0abb518", + "local": "bitword/selected/bit/kchron_p10.json" + }, + { + "path": "bitword/selected/bit/profile_p10.json", + "bytes": 769, + "git_blob": "3e2cf5f6182285d32b0904f74bcbc221a80265da", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bitword/selected/bit/profile_p10.json", + "sha256": "5bbfa6a9e60095d77d6569f49a2d250d812fcbb8d9f25f57c15c4c7f13e4fabb", + "local": "bitword/selected/bit/profile_p10.json" + }, + { + "path": "bitword/selected/bit/word_p10.json.gz", + "bytes": 368122, + "git_blob": "4ff695bd68eb96808e1456917a8001efa70bc4b9", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/bitword/selected/bit/word_p10.json.gz", + "sha256": "12c19c65991a12790b3f1ac772a219c58d439dd9ed655d3eefee9562502e004c", + "local": "bitword/selected/bit/word_p10.json.gz" + }, + { + "path": "code/geometry527.py", + "bytes": 7520, + "git_blob": "06506dd8573943e6023f9b0a9746d0516dff636e", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/code/geometry527.py", + "sha256": "7cf018695f54e337d5b86ac2b49e676c361841773c8ada9f44f5c04d3a314636", + "local": "code/geometry527.py.txt" + }, + { + "path": "code/global_lowering.py", + "bytes": 17283, + "git_blob": "eec2edda2c21acd5a3a138fee031dc39b5918e97", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/code/global_lowering.py", + "sha256": "ebfb692cef4c05082bceaac39dd7e9d9bcf61f38f55dfa302974ba37559b8e6d", + "local": "code/global_lowering.py.txt" + }, + { + "path": "descent-selection.json", + "bytes": 1610066, + "git_blob": "1d78c6fa4e5463e52c930e1aa47889e4f50e1031", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/descent-selection.json", + "sha256": "c548da3f1a6901d11b2eca1eb0fb6ddf835dd9fd80ba2af4c99f3557ddcecef2", + "local": "descent-selection.json" + }, + { + "path": "descent_transform.py", + "bytes": 11753, + "git_blob": "94668968adfd04813f50bd267038c70b790524bc", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/descent_transform.py", + "sha256": "7a2e3fbb4bf01e0702baaa285c9641fd8c99d793254bd8e3875fa41bf6c03b9f", + "local": "descent_transform.py.txt" + }, + { + "path": "finite_check.py", + "bytes": 13966, + "git_blob": "9de117280e422442acb05f6f1acbf4f68c067990", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/finite_check.py", + "sha256": "b856a4f501d03f12b668a3fa6af11c0fb40bd83e6548c26709a0bdc6d3ee6c8d", + "local": "finite_check.py.txt" + }, + { + "path": "inputs/complex/gcert1-p11-cmod-centre-mw-flow.json.gz", + "bytes": 469468, + "git_blob": "4fb92af24ca8b5834e8101533fe663a17ed42090", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/inputs/complex/gcert1-p11-cmod-centre-mw-flow.json.gz", + "sha256": "bb0499ab342aee3594904fc1cd72b9ff496cdb315d0840f4cdd5ba64ef794d34", + "local": "inputs/complex/gcert1-p11-cmod-centre-mw-flow.json.gz" + }, + { + "path": "kernel-selection.json", + "bytes": 410622, + "git_blob": "5039105df502cf057f1886e9ebd9871e2b341a40", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/kernel-selection.json", + "sha256": "483dbe720045ac36e23099080163da0cd644c4c0065e6ffade75af04ff3bdffd", + "local": "kernel-selection.json" + }, + { + "path": "kernel_transform.py", + "bytes": 17678, + "git_blob": "9e8c791df82a04a9c8b839ffd012683dcb005b08", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/kernel_transform.py", + "sha256": "8ca8f07e2ee73569a3222a9172e19ccccda88ba9a9657fcc00b01878c8a84902", + "local": "kernel_transform.py.txt" + }, + { + "path": "math_check.py", + "bytes": 8840, + "git_blob": "e22f96400ff748de540aa3dd8721155fd88627eb", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/math_check.py", + "sha256": "b7e9d01b40b3d9f803ce3c98d52d65734136ca3825bc16c92b048420aca99329", + "local": "math_check.py.txt" + }, + { + "path": "moment.py", + "bytes": 5562, + "git_blob": "7d697cb45203fe72d97037403d6da41f71f3b7fd", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/moment.py", + "sha256": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "local": "moment.py.txt" + }, + { + "path": "outer.py", + "bytes": 3535, + "git_blob": "43007488ad2c43187c77cc6798beff8b1cd76ad2", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/outer.py", + "sha256": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "local": "outer.py.txt" + }, + { + "path": "prepare.py", + "bytes": 4605, + "git_blob": "1348c80f5ed254c37d7f1f3966ad5d9a3a21ea72", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/prepare.py", + "sha256": "c1a215713f47b954c28a3f0d48490a055fb75f6af31a0e6b5248802d6951a09b", + "local": "prepare.py.txt" + }, + { + "path": "prime_check.py", + "bytes": 6090, + "git_blob": "aef6c5e80c480f0a207ff8d90242fed11c925cc3", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/prime_check.py", + "sha256": "94b0f0603a12e03225344ed9a1a4554a079fd893df3dc15346f569a9aba5967d", + "local": "prime_check.py.txt" + }, + { + "path": "prime_witnesses.py", + "bytes": 5066, + "git_blob": "7f16d930302ae879c562dd58e085d9747fcac077", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/prime_witnesses.py", + "sha256": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "local": "prime_witnesses.py.txt" + }, + { + "path": "proof/FINITE_BIT_ACCOUNTING.md", + "bytes": 6572, + "git_blob": "42a585d742660f9ed44ebd3ca2a9d1e0832bb0be", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/proof/FINITE_BIT_ACCOUNTING.md", + "sha256": "602923520af184670170bf159fde7b4c72e79a72570eddd7746b7c97bc51fc5b", + "local": "proof/FINITE_BIT_ACCOUNTING.md" + }, + { + "path": "proof/three-stage-cover-bit.tex", + "bytes": 13061, + "git_blob": "f05225d21f92cf8cef21b6e12601d5b4d61991f0", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/proof/three-stage-cover-bit.tex", + "sha256": "47123a756f823c83a0d48cca2bf5add6472cd88410b13aed345e70c8834fb511", + "local": "proof/three-stage-cover-bit.tex" + }, + { + "path": "proof/three-stage-cover-rows.tex", + "bytes": 4815, + "git_blob": "590da4b892a08b9d5182fb3d8a983c6239dd27db", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/proof/three-stage-cover-rows.tex", + "sha256": "6ad97a5cd7d6aecf978a81226e1c2763d37840caca130c61f3bf5c4ac111c5c8", + "local": "proof/three-stage-cover-rows.tex" + }, + { + "path": "raw_ledger.py", + "bytes": 27292, + "git_blob": "2a175c9bbadca3ae61a8f53cd175fa1efc4768ef", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/raw_ledger.py", + "sha256": "df1e5495e56db660a191a71bb53235b460c0fb1cd8b218999cede48c821e0c53", + "local": "raw_ledger.py.txt" + }, + { + "path": "reorder-selection.json", + "bytes": 119639, + "git_blob": "fea3800542e34ebb9e48892f0e773c8e39ddeb9e", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/reorder-selection.json", + "sha256": "d25b7dd2ac1cca738f54a766554aec8651406585e8727b986f660ae8b8150245", + "local": "reorder-selection.json" + }, + { + "path": "reorder_transform.py", + "bytes": 13504, + "git_blob": "eff90cafc5f5788a3d1e1f89a5172c74c1e2af17", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/reorder_transform.py", + "sha256": "dfb2759314eba6e713696bd1622e7d0be21f203f00c2c7fa88b1f443d93a8935", + "local": "reorder_transform.py.txt" + }, + { + "path": "restore-selection.json", + "bytes": 315119, + "git_blob": "f48cb0cb7ebcc0f249ada5a5b4d045c4b437ddc6", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/restore-selection.json", + "sha256": "678e468cf92e50f88ef7da8da973e9574e43f1bae3d2dd1ecfe6c84d8a2890f2", + "local": "restore-selection.json" + }, + { + "path": "restore_transform.py", + "bytes": 15123, + "git_blob": "444a0204fe17b721640f3354dd93f156dc674f32", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/restore_transform.py", + "sha256": "8ae804aba73fe6ec14c484503af02f1ef4dc6af073c9d39377f22b511896ab21", + "local": "restore_transform.py.txt" + }, + { + "path": "scalar/word.py", + "bytes": 15352, + "git_blob": "95b9affd44ba9c50a4906f074457701f862f44ce", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/scalar/word.py", + "sha256": "e675d4eb9d90ff0b44279fae0b46f1a8b39f65421cc38454b70a6b75d0e10b42", + "local": "scalar/word.py.txt" + }, + { + "path": "sink-selection.json", + "bytes": 22268, + "git_blob": "d027b30802b62f249a08b35f9d8f99068d4b9a1a", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/sink-selection.json", + "sha256": "c62b7e7d563770c6b01cea37a7a26b5ea015d87e64fc75650acc7c4b920fa093", + "local": "sink-selection.json" + }, + { + "path": "sink_transform.py", + "bytes": 15573, + "git_blob": "7862531f26bdb1cda6ca90cb0bd0ca9e2215bdee", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/sink_transform.py", + "sha256": "39c573a6404a4f76f1bca3a1721f3afe0a3937c4543d6eaadbc3ae881b632b22", + "local": "sink_transform.py.txt" + }, + { + "path": "target-selection.json", + "bytes": 403354, + "git_blob": "cd0663804114b6fe15dcc7767199c42dffe528e4", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/target-selection.json", + "sha256": "b616946f4bc5ea2350c0060843484212e773af29af5d735c440ecf740553a141", + "local": "target-selection.json" + }, + { + "path": "target_transform.py", + "bytes": 12828, + "git_blob": "820f80729b2af6cc1e66f444bbff1bcf73921a57", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/target_transform.py", + "sha256": "0955daa2a15dc58b27a6b57aad029c0e97a417400c7c2d7eba8e54a34b974d69", + "local": "target_transform.py.txt" + }, + { + "path": "word-pins.json", + "bytes": 6736, + "git_blob": "f5a77db62dfa23dccda8c22e0cc2b3161bf3a632", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/word-pins.json", + "sha256": "c694423692f0b4fa5004187f934f7d5809d490ac37c416430b5e4fb87d2969f3", + "local": "word-pins.json" + }, + { + "path": "word_pins.py", + "bytes": 2930, + "git_blob": "0d5232e8ec87d6a4f5d1f8dfc388d511b9cf8544", + "url": "https://raw.githubusercontent.com/chafreaky/integer-mult-bounds/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages/word_pins.py", + "sha256": "3cc2662630af62aaabb6966f03b5d01a2f06a5f3490c6979a3e54daf550958b4", + "local": "word_pins.py.txt" + } + ] +} diff --git a/research/gen5b-shared-kernels/p10-updated1047/matching/audit_matching.py b/research/gen5b-shared-kernels/p10-updated1047/matching/audit_matching.py new file mode 100644 index 0000000000..e5be47a86e --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/matching/audit_matching.py @@ -0,0 +1,425 @@ +"""Independently authored, read-only audit of finite matching witnesses. +No upstream or candidate-selector module is imported or run. Inputs are inert JSON. +Uses Python standard-library exact integer/rational algebra only. +""" +from pathlib import Path +from fractions import Fraction +from collections import Counter, defaultdict, deque +import json, gzip, hashlib, math, time, argparse +from decimal import Decimal, localcontext +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import support + +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument('--experiment', type=Path, default=support.OUTPUT/'matching') +parser.add_argument('--graph-cache', type=Path, help='Optional prior graph/source folder for exact cross-checks') +parser.add_argument('--graph-only', action='store_true', help='Rebuild graph, write it to output, then stop before auditing witnesses') +parser.add_argument('--include-fixed', action='store_true', help='Also audit the separately restricted fixed-original-recipient witness') +parser.add_argument('--output', type=Path, default=support.OUTPUT/'matching') +args = parser.parse_args() +ROOT, OLD, OUT = args.experiment, args.graph_cache, args.output +OUT.mkdir(parents=True, exist_ok=True) +H = 20 +START = time.time() + +def need(ok, explanation): + if not ok: + raise ValueError(explanation) + +def digest(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + +def load(path): + return json.loads(path.read_text()) + +manifest = support.pins() +source_hashes = {} +for kind in ('word', 'frames'): + rel = f'bitword/selected/bit/{kind}_p10.json.gz' + rec = next(x for x in manifest['files'] if x['path'] == rel) + raw = support.read_bytes(rel) + sha = hashlib.sha256(raw).hexdigest() + git = hashlib.sha1(b'blob ' + str(len(raw)).encode() + b'\0' + raw).hexdigest() + need(sha == rec['sha256'] and git == rec['git_blob'] and len(raw) == rec['bytes'], 'Source pin failed: ' + kind) + parsed = json.loads(gzip.decompress(raw)) + if OLD is not None: + need(parsed == load(OLD / (kind + '.json')), 'Cached-graph source differs: ' + kind) + source_hashes[kind] = dict(sha256=sha, git_blob=git) + if kind == 'word': + word = parsed + else: + frames = parsed['frames'] + +cache = None +if OLD is not None: + cache = {int(d): set(rs) for d, rs in load(OLD / 'postdescent_graph.json').items()} + need(all(len(rs) == len(set(rs)) for rs in load(OLD / 'postdescent_graph.json').values()), 'Duplicate graph edges') +gauge = {z['role']: z for z in word['gauges']} +phase = word['phase1'] +need(phase == sorted(set(phase)), 'Noncanonical phase ordering') +phase_set = set(phase) +order = phase + [i for i in range(len(word['ops'])) if i not in phase_set] +first, last, endframe = {}, {}, {} +for tick, opid in enumerate(order): + for role in word['ops'][opid][:2]: + first.setdefault(role, tick) + last[role] = tick + endframe[role] = word['op_frame'][opid] +roots = set(word['rootroles']) +sources = set(word['sources'].values()) +donors = set(first) - set(gauge) - roots - sources +if cache is not None: + need(set(cache) == donors, 'Donor universe differs') +rank = {d: frames[str(endframe[d])]['dim'] for d in donors} + +def rref(rows): + a = [list(map(Fraction, row)) for row in rows] + need(all(len(row) == H for row in a), 'Bad frame row width') + pivot_cols = [] + row = 0 + for col in range(H): + pick = next((j for j in range(row, len(a)) if a[j][col]), None) + if pick is None: + continue + a[row], a[pick] = a[pick], a[row] + scale = a[row][col] + a[row] = [x / scale for x in a[row]] + for j in range(len(a)): + if j != row and a[j][col]: + scale = a[j][col] + a[j] = [x - scale*y for x, y in zip(a[j], a[row])] + pivot_cols.append(col) + row += 1 + return a[:row], pivot_cols + +memo_ann, memo_basis, signatures = {}, {}, {} + +def kernel(rows): + a, piv = rref(rows) + result = [] + for free in sorted(set(range(H)) - set(piv)): + v = [Fraction(0)] * H + v[free] = 1 + for row, col in zip(a, piv): + v[col] = -row[free] + scale = math.lcm(*(x.denominator for x in v)) + result.append([int(x * scale) for x in v]) + return result + +def ann(fid): + if fid not in memo_ann: + obj = frames[str(fid)] + memo_ann[fid] = obj['a'] if 'a' in obj else kernel(obj['b']) + return memo_ann[fid] + +def basis(fid): + if fid not in memo_basis: + obj = frames[str(fid)] + memo_basis[fid] = obj['b'] if 'b' in obj else kernel(obj['a']) + return memo_basis[fid] + +def signature(fid): + if fid not in signatures: + signatures[fid] = tuple(tuple(row) for row in rref(ann(fid))[0]) + return signatures[fid] + +# Later equal-frame gauge tails are the bounded recipient screen inherited +# from the physical matching problem, not a claim to enumerate all possible reuse. +chains = defaultdict(list) +for z in word['gauges'][::-1]: + for target in z['targets']: + chains[target].append(z['role']) +recipients = [] +for role, z in sorted(gauge.items()): + if z['dim'] != 17: + continue + need(frames[str(z['frame'])]['dim'] == 17, 'Gauge dimension mismatch') + eligible = True + for target in z['targets']: + chain = chains[target] + need(chain.count(role) == 1, 'Repeated role in target gauge chain') + for later in chain[chain.index(role) + 1:]: + if signature(gauge[later]['frame']) != signature(z['frame']): + eligible = False + break + if eligible: + recipients.append(role) +need(len(recipients) == 960, 'Unexpected recipient universe') + +# Nonzero modular determinant proves exact nondegeneracy. It also proves +# full row rank, so record row counts certify every used frame dimension. +prime = 65521 + +def det_mod(rows): + a = [[x % prime for x in row] for row in rows] + ans = 1 + for k in range(len(a)): + pivot = next((i for i in range(k, len(a)) if a[i][k]), None) + if pivot is None: + return 0 + if pivot != k: + a[k], a[pivot] = a[pivot], a[k] + ans = -ans + p = a[k][k] + ans = ans * p % prime + inv = pow(p, -1, prime) + for i in range(k+1, len(a)): + mult = a[i][k] * inv % prime + for j in range(k+1, len(a)): + a[i][j] = (a[i][j] - mult*a[k][j]) % prime + return ans % prime + +frame_ids = {endframe[d] for d in donors} | {gauge[r]['frame'] for r in recipients} +nd_witnesses = {} +for fid in sorted(frame_ids): + obj = frames[str(fid)] + rows = obj.get('a', obj.get('b')) + dimension = obj['dim'] + need(len(rows) == (H - dimension if 'a' in obj else dimension), 'Frame row-count dimension mismatch') + scale = 11 if 'a' in obj else 9 + gram = [[scale*sum(x*y for x,y in zip(a,b)) - sum(a)*sum(b) for b in rows] for a in rows] + det = det_mod(gram) + need(det != 0, 'Nondegeneracy not established for frame ' + str(fid)) + nd_witnesses[fid] = det + +# Rebuild every edge with exact algebra. Equal 17-dimensional spaces are +# bucketed by canonical annihilator; lower ranks use sparse integer dot products. +by_frame = defaultdict(list) +for donor in sorted(donors): + if rank[donor] <= 17: + by_frame[endframe[donor]].append(donor) +recipient_annihilators = {r: ann(gauge[r]['frame']) for r in recipients} +recipient_signatures = defaultdict(list) +for r in recipients: + recipient_signatures[signature(gauge[r]['frame'])].append(r) +rebuilt = {d: set() for d in donors} +exact_frame_pairs = 0 +for fid, ds in sorted(by_frame.items()): + if frames[str(fid)]['dim'] == 17: + choices = recipient_signatures.get(signature(fid), []) + else: + B = basis(fid) + need(len(B) == frames[str(fid)]['dim'], 'Donor basis dimension mismatch') + sparse_basis = [[(i,x) for i,x in enumerate(row) if x] for row in B] + choices = [] + for r in recipients: + if all(sum(row[i]*x for i,x in vector) == 0 + for vector in sparse_basis for row in recipient_annihilators[r]): + choices.append(r) + exact_frame_pairs += len(choices) + for recipient in choices: + for donor in ds: + if last[donor] < first[recipient]: + rebuilt[donor].add(recipient) +if cache is not None: + need(rebuilt == cache, 'Exact graph reconstruction mismatch') +cache = rebuilt +# Preserve the original timeline donor order to retain the independently +# source-bound cached graph's byte identity, while sorting each neighbor list. +graph_raw = (json.dumps({str(d): sorted(cache[d]) for d in first if d in donors})+'\n').encode() +graph_sha256 = hashlib.sha256(graph_raw).hexdigest() +need(graph_sha256 == 'e111c86a5230b59ab169468779b6832d2ef95a15bf9e4ceea534f6b1194a3685', 'Reconstructed graph pin mismatch') +(OUT/'postdescent_graph.json').write_bytes(graph_raw) +print('Rebuilt exact graph:', len(donors), len(recipients), sum(map(len, cache.values())), 'edges', flush=True) +if args.graph_only: + print(json.dumps(dict(status='PASS_EXACT_GRAPH_RECONSTRUCTION',graph_sha256=graph_sha256,edges=sum(map(len,cache.values())),elapsed_seconds=time.time()-START))) + raise SystemExit(0) + +# BFS alternating-path matching, deliberately distinct from selector DFS. +# A vertex cover of equal size is independently checked for each rank prefix. +def maximum_with_cover(graph): + match_d, match_r = {}, {} + for start in sorted(graph): + q = deque([start]) + seen_d, predecessor_r = {start}, {} + finish = None + while q and finish is None: + d = q.popleft() + for r in sorted(graph[d]): + if r in predecessor_r or match_d.get(d) == r: + continue + predecessor_r[r] = d + if r not in match_r: + finish = r + break + nxt = match_r[r] + if nxt not in seen_d: + seen_d.add(nxt) + q.append(nxt) + if finish is not None: + r = finish + while True: + d = predecessor_r[r] + prior = match_d.get(d) + match_d[d], match_r[r] = r, d + if prior is None: + break + r = prior + reach_d = set(graph) - set(match_d) + reach_r = set() + q = deque(reach_d) + while q: + d = q.popleft() + for r in graph[d]: + if match_d.get(d) == r or r in reach_r: + continue + reach_r.add(r) + if r in match_r and match_r[r] not in reach_d: + reach_d.add(match_r[r]) + q.append(match_r[r]) + cover_d, cover_r = set(graph) - reach_d, reach_r + need(all(d in cover_d or r in cover_r for d,rs in graph.items() for r in rs), 'Invalid cover') + need(len(cover_d) + len(cover_r) == len(match_d), 'Matching/cover gap') + need(len(set(match_d.values())) == len(match_d), 'Matching repeat') + return match_d, {'donors': sorted(cover_d), 'recipients': sorted(cover_r)} + +old = dict(word['pairs']) +need(len(old) == len(word['pairs']) == len(set(old.values())) == 890, 'Invalid original matching') +phi = lambda x: x*math.log(100/x) if x else 0.0 +benefit = lambda r: phi(20-r) - phi(17-r) +old_score = sum(benefit(rank[d]) for d in old) +def verify_network(arcs, potentials, source, target, desired_flow): + balance = [0]*len(potentials) + reduced_costs = [] + cost = 0 + for a,b,cap,c,f in arcs: + need(0 <= f <= cap, 'Capacity violation') + balance[a] -= f + balance[b] += f + cost += f*c + if f < cap: + reduced_costs.append(c+potentials[a]-potentials[b]) + if f: + reduced_costs.append(-c+potentials[b]-potentials[a]) + need(balance[source] == -desired_flow and balance[target] == desired_flow and all(x == 0 for i,x in enumerate(balance) if i not in (source,target)), 'Flow conservation failed') + need(min(reduced_costs) >= 0, 'Negative residual reduced-cost arc') + return cost, reduced_costs + +def verify_pairs(pairs, graph, cardinality): + picked = dict(pairs) + need(len(pairs) == len(picked) == len(set(picked.values())) == cardinality, 'Invalid candidate cardinality') + need(all(d in graph and r in graph[d] for d,r in pairs), 'Ineligible candidate pair') + return picked + +results, covers = {}, {} +variants = [('unrestricted', '', 'matching-optimality-certificate.json', 'matching-result.json')] +if args.include_fixed: + variants.append(('fixed_original_recipients', '_fixedrecipients', 'matching-fixedrecipients-optimality-certificate.json', 'matching-fixedrecipients-result.json')) +for name, suffix, certname, reportname in variants: + graph = {d: rs if not suffix else rs & set(old.values()) for d,rs in cache.items()} + report = load(ROOT / reportname) + certificate = load(ROOT / certname) + candidate_path = ROOT / ('word_weighted890' + suffix + '.json') + candidate = load(candidate_path) + pairs = candidate['pairs'] + picked = verify_pairs(pairs, graph, 890) + need(pairs == certificate['pairs'], 'Certificate/candidate pair disagreement') + need(digest(candidate_path) == report['candidate_sha256'], 'Candidate hash mismatch') + need(graph_sha256 == report['graph_sha256'], 'Graph hash mismatch') + need(report['head'] == manifest['head'], 'Head mismatch') + need(sum(map(len, graph.values())) == report['graph_edges'], 'Reported edge count mismatch') + need(set(candidate) == set(word) and all(candidate[k] == word[k] for k in word if k not in ('pairs','reads')), 'Unrelated candidate change') + need(all(candidate['reads'].get(k) == v for k,v in word['reads'].items()), 'Existing read modified') + need(all(candidate['reads'][str(r)] == first[r] and last[d] < first[r] for d,r in pairs), 'Selected edge lifetime/read failed') + quotas = Counter(rank[d] for d in picked) + need(dict(quotas) == {int(k): v for k,v in certificate['rank_quotas'].items()}, 'Certificate quota mismatch') + need(dict(quotas) == {int(k): v for k,v in report['donor_rank_histogram'].items()}, 'Reported rank histogram mismatch') + prefix_rows = [] + prefix_covers = {} + for threshold in sorted(set(rank.values()), reverse=True): + sub = {d: rs for d,rs in graph.items() if rank[d] >= threshold} + matching, cover = maximum_with_cover(sub) + cap = len(matching) + achieved = sum(count for r,count in quotas.items() if r >= threshold) + need(achieved == min(890,cap), 'Rank-prefix optimum not attained') + prefix_rows.append({'minimum_donor_rank': threshold, 'matching_and_cover_size': cap, 'selected_prefix_size': achieved}) + prefix_covers[threshold] = {'matching': sorted(map(list,matching.items())), 'cover': cover} + max_cardinality = prefix_rows[-1]['matching_and_cover_size'] + need(max_cardinality == report['maximum_cardinality'], 'Reported maximum cardinality mismatch') + # Reconstruct all original network arcs with independently inferred flow. + rn = {int(r): n for r,n in certificate['rank_nodes'].items()} + dn = {int(d): n for d,n in certificate['donor_nodes'].items()} + tn = {int(r): n for r,n in certificate['recipient_nodes'].items()} + s, t = certificate['source'], certificate['target'] + p = certificate['potentials'] + need(set(rn) == set(quotas) and set(dn) == set(graph) and set(tn) == {r for rs in graph.values() for r in rs}, 'Network node domains differ') + nodes = [s,t] + list(rn.values()) + list(dn.values()) + list(tn.values()) + need(len(nodes) == len(p) and set(nodes) == set(range(len(p))), 'Network node partition invalid') + need(all(isinstance(x,int) for x in p), 'Noninteger potential') + arcs = [] + for r in rn: + arcs.append((s,rn[r],quotas[r],0,quotas[r])) + for d in graph: + if rank[d] in rn: + arcs.append((rn[rank[d]],dn[d],1,0,int(d in picked))) + for r in graph[d]: + arcs.append((dn[d],tn[r],1,int(old.get(d) != r),int(picked.get(d) == r))) + used_r = set(picked.values()) + for r in tn: + arcs.append((tn[r],t,1,0,int(r in used_r))) + cost, residual_costs = verify_network(arcs, p, s, t, 890) + retained = sum(old.get(d) == r for d,r in pairs) + need(cost == 890-retained == report['changed_pairs'], 'Cost mismatch') + need(retained == report['retained_old_pairs'], 'Retained-pair mismatch') + need(min(residual_costs) == report['minimum_residual_reduced_cost'], 'Minimum reduced cost mismatch') + score = sum(benefit(rank[d]) for d in picked) + # Independent second calculation purely from histogram, and donor transition histogram. + old_hist = Counter(rank[d] for d in old) + gain_by_histogram = sum((quotas[r]-old_hist[r])*benefit(r) for r in set(quotas)|set(old_hist)) + need(abs((score-old_score)-gain_by_histogram) < 1e-8, 'Score methods disagree') + delta = Counter() + for sign, matching in ((1,picked),(-1,old)): + for d in matching: + delta[17-rank[d]] += sign + delta[20-rank[d]] -= sign + need(abs(gain_by_histogram+sum(phi(r)*n for r,n in delta.items())) < 1e-8, 'Transition histogram score disagrees') + with localcontext() as context: + context.prec = 60 + def high_phi(r): + return Decimal(r)*(Decimal(100)/r).ln() if r else Decimal(0) + precise_gain = sum(Decimal(quotas[r]-old_hist[r])*(high_phi(20-r)-high_phi(17-r)) for r in set(quotas)|set(old_hist)) + result = dict(local_phi_gain_decimal=str(precise_gain),status='PASS',candidate_sha256=digest(candidate_path),certificate_sha256=digest(ROOT/certname),graph_edges=sum(map(len,graph.values())),maximum_cardinality=max_cardinality,selected_cardinality=890,rank_histogram=dict(sorted(quotas.items())),retained_original_exact_pairs=retained,changed_pairs=cost,flow_conservation=True,residual_arcs=len(residual_costs),minimum_reduced_cost=min(residual_costs),rank_prefix_certificates=prefix_rows,primary_score=score,old_primary_score=old_score,local_phi_gain=gain_by_histogram,transition_histogram_delta={r:n for r,n in sorted(delta.items()) if n and r},new_recipients=sorted(used_r-set(old.values())),removed_recipients=sorted(set(old.values())-used_r)) + results[name] = result + covers[name] = prefix_covers + print(name, json.dumps(result,sort_keys=True), flush=True) + +# Negative controls validate that the certificate test detects two common errors. +# The source audit uses explicit exceptions rather than removable assertions. +control_results = {} +bad_edge = next([d,r] for d in donors for r in recipients[:1] if r not in cache[d]) +try: + verify_pairs([bad_edge], cache, 1) +except ValueError as exc: + control_results['nonedge_pair_is_rejected'] = str(exc) == 'Ineligible candidate pair' +else: + control_results['nonedge_pair_is_rejected'] = False +probe = next((d,r) for d,r in pairs if old.get(d) != r) +bad_potentials = list(p) +bad_potentials[dn[probe[0]]] += 10**6 +try: + verify_network(arcs, bad_potentials, s, t, 890) +except ValueError as exc: + control_results['tampered_potential_is_rejected'] = str(exc) == 'Negative residual reduced-cost arc' +else: + control_results['tampered_potential_is_rejected'] = False +bad_arcs = list(arcs) +a,b,cap,c,f = bad_arcs[-1] +bad_arcs[-1] = a,b,cap,c,1-f +try: + verify_network(bad_arcs, p, s, t, 890) +except ValueError as exc: + control_results['broken_flow_is_rejected'] = str(exc) == 'Flow conservation failed' +else: + control_results['broken_flow_is_rejected'] = False +need(all(control_results.values()), 'Negative-control failed') +report = dict(status='PASS_INDEPENDENT_BOUNDED_MATCHING_AUDIT',source_head=manifest['head'],source_hashes=source_hashes,graph_sha256=graph_sha256,graph_legality=dict(donors=len(donors),eligible_recipients=len(recipients),edges=sum(map(len,cache.values())),full_exact_reconstruction=True,strict_lifetimes=True,exact_frame_pairs=exact_frame_pairs,nondegenerate_frames=len(nd_witnesses),nondegeneracy_modulus=prime),witnesses=results,negative_controls=control_results,checker_sha256=digest(Path(__file__)),elapsed_seconds=time.time()-START,scope='Optimal primary donor benefit and secondary retained exact original pairs at fixed cardinality 890 on each specified finite graph. Deterministic algorithmic ties are not a uniquely optimal or lexicographically minimal matching claim. No physical-stage admission, integer exponent, unrestricted reuse or global construction optimality claim.') +if args.include_fixed: + report['unrestricted_primary_gain_over_fixed'] = results['unrestricted']['local_phi_gain']-results['fixed_original_recipients']['local_phi_gain'] +report.pop('elapsed_seconds',None) +for witness in report['witnesses'].values(): + for key in ('primary_score','old_primary_score','local_phi_gain'):witness.pop(key,None) +(OUT/'audit-result.json').write_text(json.dumps(report,indent=2)+'\n') +(OUT/'rank-prefix-certificates.json').write_text(json.dumps(covers,sort_keys=True)+'\n') +(OUT/'frame-nondegeneracy-residues.json').write_text(json.dumps(nd_witnesses,sort_keys=True)+'\n') +print(json.dumps(report,sort_keys=True)) diff --git a/research/gen5b-shared-kernels/p10-updated1047/matching/census_matching.py b/research/gen5b-shared-kernels/p10-updated1047/matching/census_matching.py new file mode 100644 index 0000000000..06af4d66bf --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/matching/census_matching.py @@ -0,0 +1,73 @@ +"""Original complete dimension-path census for two bounded matching witnesses.""" +from pathlib import Path +from collections import Counter,defaultdict +import sys,json,gzip,hashlib +CODE=Path(__file__).resolve().parent;sys.path.insert(0,str(CODE.parent));import support +P=support.OUTPUT +w=support.read('bitword/selected/bit/word_p10.json.gz');G=support.read('bitword/selected/bit/graph_p10.json');K=support.read('bitword/selected/bit/kchron_p10.json');F=support.read('bitword/selected/bit/frames_p10.json.gz')['frames'] +dim=lambda f:F[str(f)]['dim'] +def clean(c):return {r:n for r,n in sorted(c.items())if n} +def difference(a,b): + c=Counter(b);c.subtract(a);return clean(c) +def census(w): + gauges={x['role']:x for x in w['gauges']};source={r:int(s)for s,r in w['sources'].items()};pairs=dict(w['pairs']);roles=sorted(set(range(9120))-set(pairs.values()));uses=defaultdict(list);roots=defaultdict(list);phase=sorted(w['phase1']);ps=set(phase);order=phase+[i for i in range(len(w['ops']))if i not in ps] + for i in order: + for r in w['ops'][i][:2]:uses[r].append(w['op_frame'][i]) + for r,f in zip(w['rootroles'],w['root_frame']):roots[r].append(f) + def price(ds): + c=Counter() + for a,b in zip(ds,ds[1:]): + assert a<=b,(a,b,ds) + if aprev:out[d-prev]+=1 + prev=d + return clean(out) +oldkd=kernel_delta(old);assert oldkd=={int(k):n for k,n in support.read('kernel-selection.json')['expected_local_delta'].items()} +reports={} +for name in ['weighted890']: + raw=(P/'matching'/('word_'+name+'.json')).read_bytes();new=census(json.loads(raw));kd=kernel_delta(new);assert kd==oldkd + hd=difference(old['helper'],new['helper']);rd=difference(old['residual'],new['residual']);assert sum(r*n for r,n in hd.items())==sum(r*n for r,n in rd.items())==0 + assert old['source']==new['source']and old['target']==new['target'] + members={stream[s]for e in entries for s in[e['pivot']]+e['donors']};changed={r for p in set(map(tuple,w['pairs']))^set(map(tuple,json.loads(raw)['pairs']))for r in p} + reports[name]=dict(label=name+' on1047kernelbaseline',histogram_delta=hd,residual_delta=rd,old_helper=old['helper'],new_helper=new['helper'],old_mass=old['mass'],new_mass=new['mass'],kernel_delta=kd,kernel_delta_unchanged=True,affected_kernel_entries=sum(bool({stream[s]for s in[e['pivot']]+e['donors']}&changed)for e in entries),changed_roles=len(changed),changed_first_dimensions={r:[old['firstdims'].get(r),new['firstdims'].get(r)]for r in members if old['firstdims'].get(r)!=new['firstdims'].get(r)},source_target_histograms_unchanged=True,candidate_sha256=hashlib.sha256(raw).hexdigest(),scope='Full dimension paths and kernel rank-chain delta only; exact spaces, cuts, scalar chronology, charts and finite admission separate.') + (P/'matching'/(name+'-delta.json')).write_text(json.dumps(reports[name],indent=2)+'\n') +print(json.dumps({name:{k:v for k,v in r.items()if k not in ['old_helper','new_helper','kernel_delta']}for name,r in reports.items()},indent=2)) diff --git a/research/gen5b-shared-kernels/p10-updated1047/matching/select_matching.py b/research/gen5b-shared-kernels/p10-updated1047/matching/select_matching.py new file mode 100644 index 0000000000..8d0ae26631 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/matching/select_matching.py @@ -0,0 +1,80 @@ +"""Original weighted-cardinality890 matching with minimum changed pairs. +Reads inert finite graph and canonical JSON. No upstream program executed. +Rank-greedy transversal selection fixes an optimal strictly rank-increasing +weight profile at cardinality890. Min-cost integral flow then maximizes old +exact pairs among matchings with that profile. Final residual potentials certify +cost optimality; sorted construction and heap ordering make ties deterministic. +""" +if not __debug__:raise RuntimeError('Assertions required') +from pathlib import Path +from collections import Counter,defaultdict +import json,hashlib,heapq,gzip +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +import support +support.require_assertions() +P=support.out('matching','placeholder').parent;Q=P +w=support.read('bitword/selected/bit/word_p10.json.gz') +f=support.read('bitword/selected/bit/frames_p10.json.gz')['frames'] +graph={int(d):sorted(rs)for d,rs in json.loads((Q/'postdescent_graph.json').read_text()).items()} +old=dict(w['pairs']);phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase];last={};first={} +for t,i in enumerate(order): + for r in w['ops'][i][:2]:last[r]=(t,w['op_frame'][i]);first.setdefault(r,t) +rank={d:f[str(last[d][1])]['dim']for d in graph} +assert len(graph)==4300 and sum(map(len,graph.values()))==18648 +assert all(r in graph[d]for d,r in old.items()) +assigned={} +def augment(d,seen): + for r in graph[d]: + if r in seen:continue + seen.add(r) + if r not in assigned or augment(assigned[r],seen):assigned[r]=d;return True + return False +chosen=[] +for d in sorted(graph,key=lambda d:(-rank[d],d not in old,d)): + if augment(d,set()):chosen.append(d) +assert len(chosen)==892 +quotas=Counter(rank[d]for d in chosen[:890]) +# Residual graph edge: [target, residual capacity, cost, reverse index]. +N=2+len(quotas)+len(graph)+len({r for rs in graph.values()for r in rs});E=[[]for _ in range(N)];s=0;t=N-1 +rn={r:1+i for i,r in enumerate(sorted(quotas))};dn={d:1+len(rn)+i for i,d in enumerate(sorted(graph))};recips=sorted({r for rs in graph.values()for r in rs});tn={r:1+len(rn)+len(dn)+i for i,r in enumerate(recips)} +def edge(a,b,cap,cost): + i=len(E[a]);j=len(E[b]);E[a].append([b,cap,cost,j]);E[b].append([a,0,-cost,i]);return i +for r,c in quotas.items():edge(s,rn[r],c,0) +for d in sorted(graph): + if rank[d]in rn:edge(rn[rank[d]],dn[d],1,0) +refs={} +for d in sorted(graph): + for r in graph[d]:refs[d,r]=(dn[d],edge(dn[d],tn[r],1,int(old.get(d)!=r))) +for r in recips:edge(tn[r],t,1,0) +pot=[0]*N;cost=0 +for flow in range(890): + dist=[10**9]*N;dist[s]=0;previous={};queue=[(0,s)] + while queue: + dd,a=heapq.heappop(queue) + if dd!=dist[a]:continue + for i,(b,cap,c,rev)in enumerate(E[a]): + if not cap:continue + z=dd+c+pot[a]-pot[b] + assert z>=dd + if z=0 and cost==sum(old.get(d)!=r for d,r in selected) +new=dict(w);new['pairs']=selected;new['reads']=dict(w['reads']) +# Retain existing explicit reads, set newly paired recipient reads at first use. +for d,r in selected: + if str(r)not in new['reads']:new['reads'][str(r)]=first[r] +raw=json.dumps(new,sort_keys=True,separators=(',',':')).encode()+b'\n';assert hashlib.sha256(raw).hexdigest()==support.WORD_SHA;assert raw==support.materialize_word().read_bytes();(P/'word_weighted890.json').write_bytes(raw) +report=dict(status='PASS_RANK_PROFILE_AND_EXACT_PAIR_MINCOST',head='1b37957d1520c80b6ea796bf418e52be5109c2d4',candidate_sha256=hashlib.sha256(raw).hexdigest(),graph_sha256=hashlib.sha256((Q/'postdescent_graph.json').read_bytes()).hexdigest(),graph_edges=18648,maximum_cardinality=892,selected_cardinality=890,donor_rank_histogram=dict(sorted(quotas.items())),retained_old_pairs=890-cost,changed_pairs=cost,minimum_residual_reduced_cost=min(reduced),old_recipients_removed=sorted(set(old.values())-{r for d,r in selected}),new_recipients_added=sorted({r for d,r in selected}-set(old.values())),checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),objective='Maximum sum(phi(20-d)-phi(17-d)) among cardinality890 matchings on cached exact graph via strictly rank-descending matroid greedy; then maximum original exact pairs for that optimal rank profile. Deterministic sorted-node/edge Dijkstra tie handling. No broader optimality claim.') +(P/'matching-result.json').write_text(json.dumps(report,indent=2)+'\n');(P/'matching-optimality-certificate.json').write_text(json.dumps(dict(rank_quotas=dict(quotas),potentials=pot,source=s,target=t,rank_nodes=rn,donor_nodes=dn,recipient_nodes=tn,pairs=selected))+'\n');print(json.dumps(report,indent=2)) diff --git a/research/gen5b-shared-kernels/p10-updated1047/run_checks.py b/research/gen5b-shared-kernels/p10-updated1047/run_checks.py new file mode 100644 index 0000000000..c96e73141e --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/run_checks.py @@ -0,0 +1,68 @@ +"""Portable aggregate of original checkers. Upstream programs remain inert text.""" +from pathlib import Path +import argparse,hashlib,json,subprocess,sys,time +import support +STEPS=[ + ('matching/audit_matching.py',['--graph-only']), + ('matching/select_matching.py',[]),('matching/audit_matching.py',[]), + ('matching/census_matching.py',[]),('arithmetic/price.py',[]), + ('arithmetic/check_second_moment.py',[]), + ('admission/check_transport.py',[]),('admission/check_target_chronology.py',[]), + ('admission/check_scalar_recurrence.py',[]),('admission/check_reorder_transport.py',[]), + ('finite/check_charts.py',[]),('finite/check_banks.py',[]),('finite/bind_finite.py',[]), +] +RECEIPTS=[ + 'matching/matching-result.json','matching/audit-result.json','matching/weighted890-delta.json', + 'arithmetic/baseline-receipt.json','arithmetic/weighted890-price.json','arithmetic/arithmetic-result.json','arithmetic/second-moment-result.json', + 'admission/transport-result.json','admission/target-chronology-result.json','admission/scalar-recurrence-result.json','admission/reorder-transport-result.json', + 'finite/chart-receipt.json','finite/bank-receipt.json','finite/finite-invoice-bound.json', +] + +def canonical(value): + if isinstance(value,dict):return {k:canonical(v) for k,v in sorted(value.items())if k not in ('seconds','elapsed_seconds','runtime_seconds')} + if isinstance(value,list):return [canonical(x)for x in value] + if isinstance(value,str): + for path,label in ((support.OUTPUT,'$OUTPUT'),(support.INPUTS,'$INPUTS'),(support.HERE,'$PACKAGE'),(support.HERE.parent,'$AUTHORED')):value=value.replace(str(path),label) + return value + +def summary(): + rows={} + for name in RECEIPTS: + value=canonical(json.loads((support.OUTPUT/name).read_text())) + # Paths inside the finite dependency binding are normalized, not dropped. + raw=json.dumps(value,sort_keys=True,separators=(',',':')).encode() + rows[name]=dict(sha256=hashlib.sha256(raw).hexdigest(),status=value.get('status')) + return dict(source_head=support.HEAD,word_sha256=support.WORD_SHA,source_manifest_sha256=support.sha(support.HERE/'inputs.json'),receipt_count=len(rows),normalization='Remove elapsed-time keys and replace only declared absolute package/input/output/authored roots. All other receipt fields are checked.',receipts=rows) + +def check_packet_files(): + path=support.HERE/'FILES.json' + if not path.exists():return + manifest=json.loads(path.read_text()) + for name,row in manifest['files'].items(): + raw=(support.HERE/name).read_bytes();assert len(raw)==row['bytes'] and hashlib.sha256(raw).hexdigest()==row['sha256'],'Frozen packet changed: '+name + assert manifest['source_head']==support.HEAD and manifest['published_base_head']=='022266b4f6a3e09b75ff664008ddbb732e9672f9' + +def run(check=False,tests=False,record=False): + support.require_assertions();check_packet_files();support.verify_inputs();support.verify_dependencies();support.materialize_word();start=time.monotonic() + for index,(step,args)in enumerate(STEPS): + log=support.out('logs',f'{index:02d}-'+step.replace('/','__')+'.log');begun=time.monotonic() + with log.open('w')as handle:r=subprocess.run([sys.executable,str(support.HERE/step),*args],stdout=handle,stderr=subprocess.STDOUT) + if r.returncode:raise RuntimeError(f'{step} failed; inspect {log}\n'+log.read_text()[-6000:]) + print(f'PASS {step} ({time.monotonic()-begun:.2f} s)',flush=True) + test_count=0 + if tests: + for folder in ('.','arithmetic','admission','finite'): + log=support.out('logs','tests-'+folder.replace('.','root')+'.log') + with log.open('w')as handle:r=subprocess.run([sys.executable,'-m','unittest','discover','-s',str(support.HERE/folder),'-p','test_*.py','-v'],stdout=handle,stderr=subprocess.STDOUT) + if r.returncode:raise RuntimeError(f'{folder} tests failed:\n'+log.read_text()) + import re + count=re.search(r'Ran (\d+) tests?',log.read_text());assert count,'No test count: '+folder;test_count+=int(count.group(1));print(log.read_text(),flush=True) + current=summary();expected=support.HERE/'expected/receipts.json' + if record:expected.write_text(json.dumps(current,indent=2)+'\n') + if check:assert current==json.loads(expected.read_text()),'Deterministic receipt mismatch. Expected evidence is not replaced automatically.' + finite=json.loads((support.OUTPUT/'finite/finite-invoice-bound.json').read_text()) + result=dict(status='PASS_PINNED_UPDATED1047_WEIGHTED890_AGGREGATE',source_head=support.HEAD,word_sha256=support.WORD_SHA,verified_input_files=len(support.pins()['files']),receipt_count=len(RECEIPTS),regression_tests=test_count,expected_receipts_match=bool(check),baseline_kappa='0.000769553898621543',conditional_kappa='0.000769997773182046',finite_coefficient=finite['finite_invoice']['coefficient'],payload_bound=finite['scalar_payload']['bound'],scope='Fresh finite evidence with explicit inherited 133 raw crossing, compiler/prime/complex/full-C/all-size hypotheses. No complete final raw frame/hash regeneration.') + support.out('aggregate-result.json').write_text(json.dumps(result,indent=2)+'\n');print(json.dumps(result,indent=2));print(f'Runtime {time.monotonic()-start:.3f} s');return result +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--check',action='store_true');p.add_argument('--tests',action='store_true');p.add_argument('--record-expected',action='store_true',help='Maintainer-only, after reviewing all finite gates and dependency hashes.') + a=p.parse_args();run(a.check,a.tests,a.record_expected) diff --git a/research/gen5b-shared-kernels/p10-updated1047/support.py b/research/gen5b-shared-kernels/p10-updated1047/support.py new file mode 100644 index 0000000000..f89928ab87 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/support.py @@ -0,0 +1,57 @@ +"""Portable immutable input and authored dependency contract. Never runs upstream code.""" +from pathlib import Path +from functools import lru_cache +import gzip, hashlib, importlib.util, json, os, sys +HERE=Path(__file__).resolve().parent +INPUTS=Path(os.environ.get('P10U_INPUTS',str(HERE/'local-inputs'))).resolve() +SOURCE=INPUTS +OUTPUT=Path(os.environ.get('P10U_OUTPUT',str(HERE/'output'))).resolve() +HEAD='1b37957d1520c80b6ea796bf418e52be5109c2d4' +WORD_SHA='41b15c5ccf7d2afd66396f183579a02c66f0f31f5410ceeb2eb271393a84d494' +DEPENDENCIES={ + '../exact_intervals.py':'c261dd44838d4e36c68768a1023ac859677089464ab121cdb46b30c918679333', + '../assembly_arithmetic.py':'f2f6293c31deb579ebbea19eeaa732c07304ce9c2cacd431685e2dd18d4b0d58', + '../p10/arithmetic/price_candidate.py':'d9954dd13bb92da8ecbdbf937f438061af2f3afaf65f0fd82cd45d89b1fe4141', + '../p10/closure/chart_rational.py':'e36c35be0d3aec9adeeca2b8f038cb4757ea2a0b685b40798d4574695bfe7355', +} +def require_assertions(): + if not __debug__:raise RuntimeError('Run without -O; assertions must be enabled.') +def out(*parts): + p=OUTPUT.joinpath(*parts);p.parent.mkdir(parents=True,exist_ok=True);return p +def sha(path):return hashlib.sha256(Path(path).read_bytes()).hexdigest() +def check_bytes(raw,row): + require_assertions() + assert len(raw)==row['bytes'] and hashlib.sha256(raw).hexdigest()==row['sha256'],row['path'] + assert hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==row['git_blob'],row['path'] +@lru_cache(None) +def pins(): + require_assertions();p=json.loads((HERE/'inputs.json').read_text());assert p['head']==HEAD + assert len({r['path']for r in p['files']})==len(p['files']) + for r in p['files']: + for key in ('path','local'):assert not Path(r[key]).is_absolute() and '..'not in Path(r[key]).parts + assert r['url']==f"https://raw.githubusercontent.com/{p['repository']}/{HEAD}/{p['package']}{r['path']}" + assert not r['local'].endswith('.py'),'Upstream programs must stay inert text.' + return p +@lru_cache(None) +def read_bytes(name): + row=next(r for r in pins()['files']if r['path']==name);raw=(INPUTS/row['local']).read_bytes();check_bytes(raw,row);return raw +def read(name): + raw=read_bytes(name);return json.loads(gzip.decompress(raw)if name.endswith('.gz')else raw) +def verify_inputs(): + require_assertions();return {r['path']:len(read_bytes(r['path']))for r in pins()['files']} +def verify_dependencies(): + require_assertions() + for path,wanted in DEPENDENCIES.items():assert sha(HERE/path)==wanted,'Authored dependency changed: '+path + return dict(DEPENDENCIES) +def load_authored(name,path): + verify_dependencies();assert path in DEPENDENCIES + spec=importlib.util.spec_from_file_location(name,HERE/path);module=importlib.util.module_from_spec(spec);sys.modules[name]=module;spec.loader.exec_module(module);return module +def materialize_word(): + require_assertions();base=read('bitword/selected/bit/word_p10.json.gz');d=json.loads((HERE/'witnesses/weighted890-delta.json').read_text()) + assert d['source_head']==HEAD and d['candidate_word_sha256']==WORD_SHA + pairs=set(map(tuple,base['pairs']));remove=set(map(tuple,d['remove']));add=set(map(tuple,d['add'])) + assert len(remove)==len(add)==63 and remove<=pairs and not add&pairs + base['pairs']=[list(x)for x in sorted((pairs-remove)|add)];base['reads'].update(d['reads_add']) + assert len(base['pairs'])==len({a for a,b in base['pairs']})==len({b for a,b in base['pairs']})==890 + raw=json.dumps(base,sort_keys=True,separators=(',',':')).encode()+b'\n';assert hashlib.sha256(raw).hexdigest()==WORD_SHA + path=out('matching','word_weighted890.json');path.write_bytes(raw);return path diff --git a/research/gen5b-shared-kernels/p10-updated1047/test_support.py b/research/gen5b-shared-kernels/p10-updated1047/test_support.py new file mode 100644 index 0000000000..16cf8e74d8 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/test_support.py @@ -0,0 +1,33 @@ +"""Source, dependency and portability mutation controls.""" +from pathlib import Path +import hashlib,json,os,subprocess,sys,tempfile,unittest +from unittest.mock import patch +import support,acquire_inputs + +class SourceTests(unittest.TestCase): + def test_all_input_pins(self):self.assertEqual(len(support.verify_inputs()),39) + def test_all_authored_pins(self):self.assertEqual(len(support.verify_dependencies()),4) + def test_input_mutation_rejected(self): + row=support.pins()['files'][0];raw=support.read_bytes(row['path']) + with self.assertRaises(AssertionError):support.check_bytes(raw+b' ',row) + bad=dict(row,git_blob='0'*40) + with self.assertRaises(AssertionError):support.check_bytes(raw,bad) + def test_cached_downloader_mutation_rejected(self): + row=support.pins()['files'][0] + with tempfile.TemporaryDirectory()as d: + p=Path(d)/row['local'];p.parent.mkdir(parents=True,exist_ok=True);p.write_bytes(b'changed') + with self.assertRaises(AssertionError):acquire_inputs.acquire(d) + def test_authored_dependency_mutation_rejected(self): + d=dict(support.DEPENDENCIES);d[next(iter(d))]='0'*64 + with patch.object(support,'DEPENDENCIES',d): + with self.assertRaises(AssertionError):support.verify_dependencies() + def test_candidate_delta_hash(self): + path=support.materialize_word();self.assertEqual(support.sha(path),support.WORD_SHA) + self.assertNotEqual(hashlib.sha256(path.read_bytes()+b' ').hexdigest(),support.WORD_SHA) + def test_assertions_disabled_rejected(self): + r=subprocess.run([sys.executable,'-O',str(support.HERE/'run_checks.py'),'--check'],cwd='/tmp',capture_output=True,text=True) + self.assertNotEqual(r.returncode,0);self.assertIn('assertions must be enabled',r.stderr) + def test_inert_manifest_paths(self): + for row in support.pins()['files']: + self.assertFalse(row['local'].endswith('.py'));self.assertIn('/'+support.HEAD+'/',row['url']) +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/research/gen5b-shared-kernels/p10-updated1047/witnesses/weighted890-delta.json b/research/gen5b-shared-kernels/p10-updated1047/witnesses/weighted890-delta.json new file mode 100644 index 0000000000..6b23110006 --- /dev/null +++ b/research/gen5b-shared-kernels/p10-updated1047/witnesses/weighted890-delta.json @@ -0,0 +1,516 @@ +{ + "source_head": "1b37957d1520c80b6ea796bf418e52be5109c2d4", + "candidate_word_sha256": "41b15c5ccf7d2afd66396f183579a02c66f0f31f5410ceeb2eb271393a84d494", + "remove": [ + [ + 2096, + 9040 + ], + [ + 2103, + 9042 + ], + [ + 2307, + 8956 + ], + [ + 2310, + 8958 + ], + [ + 2312, + 9036 + ], + [ + 2319, + 9038 + ], + [ + 2532, + 8854 + ], + [ + 2675, + 8845 + ], + [ + 2810, + 8976 + ], + [ + 2829, + 8978 + ], + [ + 2837, + 8968 + ], + [ + 2856, + 8970 + ], + [ + 2891, + 8965 + ], + [ + 2910, + 8967 + ], + [ + 2945, + 8996 + ], + [ + 2964, + 8975 + ], + [ + 2972, + 9085 + ], + [ + 2991, + 9087 + ], + [ + 3018, + 9078 + ], + [ + 3026, + 9064 + ], + [ + 3045, + 9066 + ], + [ + 3053, + 9056 + ], + [ + 3072, + 9058 + ], + [ + 3080, + 9048 + ], + [ + 3099, + 9050 + ], + [ + 3107, + 9045 + ], + [ + 3265, + 8982 + ], + [ + 3266, + 8980 + ], + [ + 3274, + 9051 + ], + [ + 3275, + 9049 + ], + [ + 3283, + 9090 + ], + [ + 3284, + 9088 + ], + [ + 3292, + 9114 + ], + [ + 3293, + 9112 + ], + [ + 3337, + 9054 + ], + [ + 3338, + 9052 + ], + [ + 3346, + 9091 + ], + [ + 3347, + 9089 + ], + [ + 3355, + 9115 + ], + [ + 3356, + 9113 + ], + [ + 3382, + 8986 + ], + [ + 3383, + 8984 + ], + [ + 3400, + 9094 + ], + [ + 3401, + 9092 + ], + [ + 3410, + 9116 + ], + [ + 3436, + 9059 + ], + [ + 3437, + 9057 + ], + [ + 3445, + 9095 + ], + [ + 3446, + 9093 + ], + [ + 3455, + 9117 + ], + [ + 3481, + 9103 + ], + [ + 3482, + 9101 + ], + [ + 3580, + 8987 + ], + [ + 3581, + 8985 + ], + [ + 3590, + 9060 + ], + [ + 3598, + 9110 + ], + [ + 3599, + 9108 + ], + [ + 3652, + 9111 + ], + [ + 3653, + 9109 + ], + [ + 3688, + 9067 + ], + [ + 3689, + 9065 + ], + [ + 3832, + 9070 + ], + [ + 3833, + 9068 + ] + ], + "add": [ + [ + 1286, + 8845 + ], + [ + 1293, + 8854 + ], + [ + 1421, + 8996 + ], + [ + 1428, + 8975 + ], + [ + 2096, + 9060 + ], + [ + 2103, + 9078 + ], + [ + 3117, + 9045 + ], + [ + 3335, + 9042 + ], + [ + 3336, + 9040 + ], + [ + 3767, + 9118 + ], + [ + 3768, + 9112 + ], + [ + 3893, + 9114 + ], + [ + 3894, + 9113 + ], + [ + 4055, + 9110 + ], + [ + 4056, + 9108 + ], + [ + 4064, + 9115 + ], + [ + 4065, + 9116 + ], + [ + 4387, + 9066 + ], + [ + 4389, + 9064 + ], + [ + 4405, + 9090 + ], + [ + 4407, + 9088 + ], + [ + 4811, + 9048 + ], + [ + 4813, + 9050 + ], + [ + 5019, + 9067 + ], + [ + 5021, + 9065 + ], + [ + 5037, + 9091 + ], + [ + 5039, + 9089 + ], + [ + 5245, + 8965 + ], + [ + 5247, + 8967 + ], + [ + 5334, + 9056 + ], + [ + 5336, + 9058 + ], + [ + 5498, + 8956 + ], + [ + 5500, + 8958 + ], + [ + 5588, + 9036 + ], + [ + 5590, + 9038 + ], + [ + 5596, + 9087 + ], + [ + 5598, + 9085 + ], + [ + 5606, + 8980 + ], + [ + 5608, + 8982 + ], + [ + 5614, + 9111 + ], + [ + 5616, + 9109 + ], + [ + 5632, + 9119 + ], + [ + 5634, + 9117 + ], + [ + 5896, + 8976 + ], + [ + 5898, + 8978 + ], + [ + 5933, + 8968 + ], + [ + 5935, + 8970 + ], + [ + 6186, + 9049 + ], + [ + 6188, + 9051 + ], + [ + 6219, + 8984 + ], + [ + 6221, + 8986 + ], + [ + 6240, + 9092 + ], + [ + 6242, + 9094 + ], + [ + 6347, + 9068 + ], + [ + 6349, + 9070 + ], + [ + 6351, + 9093 + ], + [ + 6353, + 9095 + ], + [ + 6620, + 8985 + ], + [ + 6635, + 8987 + ], + [ + 6657, + 9052 + ], + [ + 6662, + 9057 + ], + [ + 6672, + 9054 + ], + [ + 6677, + 9059 + ] + ], + "reads_add": { + "9118": 19977, + "9119": 19979 + } +} diff --git a/research/gen5b-shared-kernels/p10/.gitignore b/research/gen5b-shared-kernels/p10/.gitignore new file mode 100644 index 0000000000..53ff40a11d --- /dev/null +++ b/research/gen5b-shared-kernels/p10/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ +*.pyc +local-inputs/ +output/ diff --git a/research/gen5b-shared-kernels/p10/NOTICE.md b/research/gen5b-shared-kernels/p10/NOTICE.md new file mode 100644 index 0000000000..bcab00b06c --- /dev/null +++ b/research/gen5b-shared-kernels/p10/NOTICE.md @@ -0,0 +1,11 @@ +# Attribution and licence + +Prepared with substantial OpenAI assistance. New original verifier code is Apache-2.0. Existing notices and headers remain applicable; these credits imply neither review nor endorsement. + +Donor-rank-weighted compensated matching after producer endpoint descent follows George Lydakis’s [PR275 notice](https://github.com/lydakis/integer-mult-bounds/blob/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/NOTICE.md), prepared with substantial OpenAI Codex assistance, including Ody’s matching research. Compensated reuse itself is inherited. + +The p10 word, modules and centre-sharing complex supplier originate in DreamingOfClouds’ PR315, prepared with Anthropic Claude assistance. Chafik Boukhalfa’s pinned [PR320 notice](https://github.com/chafreaky/integer-mult-bounds/blob/e983fea0896b2a1d7355983674db7e9bb33a9e32/research/five-stage-p10-transcript-stages/NOTICE.md) preserves the full inherited contributor chain. The exact notice is acquired as inert source data by `acquire_inputs.py`. + +Shared-donor kernels build on Dugongue, eumemic, utcorvusvolat-dotcom, Rohan Arun and Chafik Boukhalfa. [PR319](https://github.com/eumemic/integer-mult-bounds/blob/14af8e5cd27d8024cbdcbc3273ef183d2db1c65c/research/p10-shared-kernels/NOTICE.md) also applies common-frame/alternate-basis closure on PR317. We do not claim that it adopted PR302, nor priority for the general method. + +This contribution is the separately checked weighted p10 selection and compatible additional closure, together with reproducible verification evidence. It does not claim an inherited mechanism, optimality, a current-best worldwide result, or a new unconditional all-size theorem. The exact arithmetic dependencies come from our earlier PR302 code at immutable commit `7efc52589533c3173bc13216fa800119a905bfa5`; their existing notices apply unchanged. diff --git a/research/gen5b-shared-kernels/p10/PROOF.md b/research/gen5b-shared-kernels/p10/PROOF.md new file mode 100644 index 0000000000..a24e301829 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/PROOF.md @@ -0,0 +1,70 @@ +# Finite composition certificate and retained hypotheses + +## 1. Immutable starting point and explicit change + +The input manifest fixes PR320 head `e983fea0896b2a1d7355983674db7e9bb33a9e32`, not a moving branch. Source files are inert. The only virtual-word changes are the declared matching pairs and two delayed gauge-read times. Applying the remove 71/add 73 witness and read-time changes must reproduce SHA256 `25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739`. + +The independent source-to-role map contains all 9120 virtual helpers. Exactly representatives 9118/9119 disappear; all surviving representative IDs remain unchanged. Source, target and helper namespaces are separate. A donor may already be a reused physical slot; actual recipient keys are not new shared-kernel candidates. + +## 2. Matching and installed transformations + +The base-word checker rebuilds the forward and literal reverse F2 operations on 10,148 independent columns, including every dirty helper column. It checks the required target source update and restoration of all other registers. Omission and prematurely delayed-read controls fail as expected. + +The path checker reconstructs the complete old and new physical alias chains, including source injection frames, donor computations, delayed recipient gauge read, recipient computations and final endpoints. It proves exact rational nesting for all 8,230 old and 8,228 new representatives. The changed matching seams are independently split into 73 cases; 43 have positive rank and 30 have identical endpoint frames and rank zero. + +All 775 installed kernel response relations and literal cut triples are rebound from logical roles. The 66 entries touching changed roles retain exactly the same paid histogram. All 480 descent gates, 240 restored helpers, 7 sinks and 133 reorder operands are checked for the declared direct-overlap conditions. Direct disjointness is not used as a substitute for the target and reorder checks below. + +The complete old/new dimension-path census independently gives the matching-only local delta + +``` +{2:+2, 3:-24, 5:+10, 6:-6, 7:-4, 8:-12, + 9:+7, 10:+8, 12:-7, 13:-4, 14:-55, 17:+55}. +``` + +Source and target paid histograms agree. The residual-family change is `{3:-2}`; no installed transformation is silently discarded. + +## 3. Nineteen additional prefix relations + +The literal initial-prefix responses of the 41 selected helpers satisfy 19 exact F2 relations. Each uses a coordinate contrast line lying inside every selected first frame. Distinct donors are activated once, giving 22 entrance charges; setup and restoration use 58 unit additions each. The pivots and donors are disjoint and were not occupied by the installed kernels. + +The triangular change of helper coordinates is invertible and each restoration cut is checked after the required prefix reads. All selected complete alias paths and final FULL endpoints are verified. The resulting local delta is + +``` +{1:+22, 2:+39, 3:-39, 4:+2, 5:-2}, +``` + +with residual change `{20:-19,19:+19}`. The aggregate combines this with the independently measured matching delta. Their total residual width decrease is 25, so 60 replicas tile width-100 without a leftover block. The count of 19 rank-one relations alone would not satisfy that divisibility condition. + +## 4. Target chronology and fresh scalar recurrence + +The checker independently reconstructs the old and new raw prefix through the last forward operation. All 120 literal target dependencies are checked on the new independent columns. Each of the 480 participating target states is checked at its own closing frame, not the first event of its group. The two delayed reads are after group 119's retained close at record 328527; their target paths remain nested. An omitted closing read is rejected. + +A separate checker reconstructs the complete pre-reorder scalar/COPY recurrence: source injections, plain compensation, all 775 installed kernel transforms, all 120 target groups, side/partner deliveries, 240 early restorations, 7 sinks and the new 19 relations. It replays every column in both directions. Its original-word reconstruction also reproduces the pinned baseline scalar counts and absolute-value bounds, using original cut/close indices for the original word and rebound indices for the overlay. + +The proposed word has 334583 weighted scalar events and 336503 literal unit ADDs. Fresh absolute recurrences give F=33129 and B=984792. Hence + +``` +64 F^3 B^2 = 2256804704633059161144889344 < 2^104. +``` + +This is a 91-bit integer payload bound. The F2 decoder identity is distinct from these integer absolute-value majorants. + +## 5. Reorder transport boundary + +The 133 original raw reorder crossing proofs are retained hypotheses. The finite transport checker compares the old and new semantic scalar words, verifies every moved gate and its defining frame, preserves the complete incident-event ordering of each possible anchor, and compares all noncommuting crossing traces. The new delayed reads touch none of the moved operands. Added prefix shears lie before the old intervals and commute with the moved shears. + +The operand commutation criterion is unchanged when coefficients are replaced by absolute values. Thus the original signed and unsigned reorder rewrites transport, conditional on the original raw crossing admission. Physical nonnegative row norms only increase under ADDs; any scratch COPY holds a previously captured physical norm, so the final maximum bounds every intermediate value. The transported words therefore retain the fresh scalar payload bound above. + +The checker does not regenerate the complete final raw frame stream, new final raw hash or all original crossing record numbers. Those are different claims from the explicit semantic transport proved here. + +## 6. Exact charts, banks and finite cost + +Dimension 20 uses metric 9I−J. The inverse-metric exterior rows are proportional to 11a−sum(a). The new first-frame quotients, pivot residuals and donor entrances have 47 distinct exact inverse programs for 82 uses, with at most 331 factors. The 73 changed interior seams have 57 exact programs, at most 155 factors; both inverse products and the required orthogonal decomposition are checked. No universal characteristic>5 claim is made; inherited prime selection must admit the actual nonzero denominators/determinants. + +The complete bank address table assigns every one of 8,221 surviving helper roles and 60 replicas once in each of 5 disjoint stages: 2,466,300 assignments. All 85,701 width-100 banks per stage are full. Data stock 230400 plus 428505 bank stock gives 658905. Fresh residual counts, normalized stock, stage/replica factors, paid calls 249085 and rank mass 1096135 are cross-bound; the fixed deficit remains 2040. + +Every positive seam is already a paid child in the rebuilt histogram. Its 80,008 generic wrapper operations and 1,024,000,000 ring-preparation allowance are counted once. Zero-rank equal-frame seams introduce no recursive child; scalar and descriptor work stays paid. Endpoint-bank charts retain 400 factors and 599 normalizer allowance. This endpoint allowance is not substituted for the generic interior compiler bound. + +The finite invoice conservatively charges all 116 new unit ADDs per invocation and gives no credit for 188 removed reads. The displayed ring/recipe coefficient is 25,415,456,130,362,201, below 2^80. Exact interval arithmetic verifies the root bracket, all 47 direct/factored assembly inequalities and rejection of the adjacent higher κ tick, producing κ=0.000769661484777339. + +The complex supplier's structural validity, common-ancestor/row-restoration interfaces, compiler and primitive constants, prime supply, descriptor precision/recovery and all-size closure remain inherited hypotheses. The full C constant is not instantiated. This is a finite, conditional evidence contribution, not an unconditional all-size theorem or optimality proof. diff --git a/research/gen5b-shared-kernels/p10/README.md b/research/gen5b-shared-kernels/p10/README.md new file mode 100644 index 0000000000..2061c81ad5 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/README.md @@ -0,0 +1,44 @@ +# Pinned p10 weighted reuse and shared-donor evidence + +This additive experiment starts from PR320, immutable head `e983fea0896b2a1d7355983674db7e9bb33a9e32`, package `research/five-stage-p10-transcript-stages/`. It has p=10, h=20, completed-bank width 100, 60 replicas and 5 stages. A main checkout is not assumed to contain these upstream inputs. + +The proposed composition replaces 71 of the 890 stored reuse pairs and adds 73, giving 892 pairs. It then adds 19 rank-one prefix relations on 41 previously unused physical helpers, charging 22 distinct donor activations and 58 setup/restoration pairs. All original 775 installed kernel entries remain. The matching change and 19 rank-one relations are priced jointly; their residual width decrease of 25 is divisible by 5 and permits full width-100 packing. The 19-relation closure without the matching change is not independently bank-admissible. + +Conditional numerical comparison: + +- Pinned PR320: κ=0.000769198971896986. +- Fixed 15 closure on the unchanged 890 matching: κ=0.000769208711124428. +- Proposed weighted 892+19: κ=0.000769661484777339, stock 658905, banked calls 249085, rank mass 1096135. + +The latter is a 0.060129% improvement over this pinned baseline. It is not an optimality or current-best claim. All displayed exponents use the retained supplier, finite-compiler, prime and all-size interfaces described below. + +Publication-time note (2026-10-10, 17:38 UTC): PR320 had advanced at 17:30:25 UTC to [head `1b37957d1520c80b6ea796bf418e52be5109c2d4`](https://github.com/chafreaky/integer-mult-bounds/tree/1b37957d1520c80b6ea796bf418e52be5109c2d4/research/five-stage-p10-transcript-stages), advertising κ=0.000769553898621543. That newer result was not independently reproduced here. Every check and comparison in this addon remains bound to the earlier `e983fea…` input manifest. + +## Reproduction + +Use Python 3.10+ without `-O`. The checkers use only the standard library. Upstream Python is downloaded with `.py.txt` suffixes and read as inert text; none is imported or executed. + +From any working directory, use absolute paths: + +``` +python /path/to/research/gen5b-shared-kernels/p10/acquire_inputs.py --dest /tmp/p10-inputs +P10_INPUTS=/tmp/p10-inputs P10_OUTPUT=/tmp/p10-output python /path/to/research/gen5b-shared-kernels/p10/run_checks.py --check --tests +``` + +The downloader pins 40 necessary input blobs by immutable URL, byte length, Git blob ID and SHA256. Existing cache entries are verified, not silently trusted. No auxiliary manifest is expected inside the downloaded directory. The two reused exact-arithmetic modules in the parent package are guarded by immutable SHA256 pins. + +Large derived objects are regenerated in `P10_OUTPUT`: full alias/path receipts, exact rational factor programs, the complete role/replica bank table and scalar receipts. They are not copied into this contribution. `expected/receipts.json` compares deterministic receipt digests, excluding elapsed-time fields. The matching word is regenerated from the small remove/add/read-time witness and its exact SHA256 must match. + +## Verification boundary + +The independent checks reconstruct baseline arithmetic and inventory; a fresh all-column base replay and a fresh complete pre-reorder scalar/COPY replay; physical alias paths and all 775 installed response/cut relations; 120 target dependencies and their individual closing frames; new shared-donor relations; exact chart factors; complete role-bank assignments; fresh integer absolute prefix bounds; and the changed finite invoice. F2 identities and integer absolute-value majorants are distinct claims in their receipts. Transport through the 133 inherited raw reorder crossing windows is conditional; no complete final frame/raw-hash regeneration is claimed. + +The admission of all 133 inherited raw reorder crossing windows, semantic transform interfaces, prime selection, decoder/compiler meaning, complex-supplier structural validity and all-size closure remain explicit inherited hypotheses where not independently reconstructed. The aggregate is not a new Lean proof and does not execute upstream producers or full upstream admission suites. No blanket claim for every characteristic greater than 5 is made: h=20 uses metric 9I−J, whose inverse exterior formula is 11a−sum(a). + +Positive interior alias seams are already paid children in the rebuilt histogram. Their generic wrapper/preparation costs are charged once. Rank-zero equal-frame seams add no recursive child; existing scalar and descriptor costs remain paid. The 400-factor/599-normalizer bounds apply to endpoint banking, not as a substitute for the separate interior compiler allowance. + +## Bounded discovery scope + +The closure screen fixes 190 coordinate-contrast lines and two deterministic donor orders. It uses exact integer maxflow for a declared 10^9-rounded finite-exponent surrogate, with full donor activation charges, then retains residues modulo 5 and disjoint unions of the three positive lines. It excludes occupied, descended, early-restored and sink roles, as well as conservative reorder-operand exclusions. Reused physical donors are eligible; actual recipient keys are not. Discovery is bounded, and final acceptance uses exact pricing and changed-stage physical checks rather than the rounded score. + +The weighted matching witness is independently checked for legality and composition. No unconstrained joint optimality is asserted. See [NOTICE.md](NOTICE.md) for source attribution and AI-assistance disclosures. diff --git a/research/gen5b-shared-kernels/p10/acquire_inputs.py b/research/gen5b-shared-kernels/p10/acquire_inputs.py new file mode 100644 index 0000000000..08e99d7071 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/acquire_inputs.py @@ -0,0 +1,21 @@ +"""Download only immutable inert data/text, verify size/Git blob/SHA256; execute none.""" +from pathlib import Path +import argparse,json,hashlib,urllib.request +from support import HERE,pins + +def check(raw,row): + assert len(raw)==row['bytes'] and hashlib.sha256(raw).hexdigest()==row['sha256'],row['path'] + assert hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==row['git_blob'],row['path'] +def acquire(destination): + root=Path(destination).resolve() + for row in pins()['files']: + path=root/row['local'] + if path.exists():check(path.read_bytes(),row);continue + request=urllib.request.Request(row['url'],headers={'User-Agent':'p10-independent-verifier'}) + with urllib.request.urlopen(request,timeout=60)as response:raw=response.read() + check(raw,row);path.parent.mkdir(parents=True,exist_ok=True);path.write_bytes(raw) + return len(pins()['files']) +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + parser=argparse.ArgumentParser();parser.add_argument('--dest',type=Path,default=HERE/'local-inputs');args=parser.parse_args() + print('Verified',acquire(args.dest),'immutable inert inputs at',args.dest.resolve()) diff --git a/research/gen5b-shared-kernels/p10/arithmetic/bind_finite_receipts.py b/research/gen5b-shared-kernels/p10/arithmetic/bind_finite_receipts.py new file mode 100644 index 0000000000..33f5728ed9 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/arithmetic/bind_finite_receipts.py @@ -0,0 +1,168 @@ +"""Bind supplied independent bridge/norm/chart results to the candidate15 invoice. +Only JSON and inert source bytes are read. No supplied checker code is executed. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from collections import Counter,defaultdict +from fractions import Fraction as F +from pathlib import Path +import gzip,hashlib,json,struct +import reproduce_p10 as b +import finite_invoice +support=b.support +HERE=support.out('arithmetic','placeholder').parent +BRIDGE=support.OUTPUT/'bridge15' +CLOSURE=support.HERE/'witnesses' +CERT=support.OUTPUT/'certificates' + +def sha(data):return hashlib.sha256(data).hexdigest() +def run(): + paths={'candidate':CLOSURE/'candidate15.json','bridge':BRIDGE/'bridge-result.json','norm':BRIDGE/'scalar-bounds-result.json','charts':CERT/'candidate15-charts.json','bridge_checker':support.HERE/'bridge15/check_bridge.py','norm_checker':support.HERE/'bridge15/check_scalar_bounds.py','banks':CERT/'candidate15-bank-receipt.json','bank_table':CERT/'candidate15-bank-addresses.bin.gz','pricing':HERE/'candidate15-pricing.json','source_pins':support.HERE/'inputs.json'} + raw={k:p.read_bytes() for k,p in paths.items()};records={k:json.loads(raw[k]) for k in ('candidate','bridge','norm','charts','banks','pricing')};hashes={k:sha(v) for k,v in raw.items()} + cand,bridge,norm,charts=[records[k] for k in ('candidate','bridge','norm','charts')] + for k in ('bridge','norm','charts','banks'):assert records[k]['candidate_sha256']==hashes['candidate'],('candidate mismatch',k) + assert cand['source_head']==bridge['head']==norm['head']==charts['source_head']==b.HEAD + assert bridge['source_pins_sha256']==hashes['source_pins'],'source pin catalog mismatch' + assert bridge['checker_sha256']==hashes['bridge_checker'],'stale bridge checker receipt' + assert norm['checker_sha256']==hashes['norm_checker'],'stale norm checker receipt' + assert norm['bridge_checker_sha256']==hashes['bridge_checker'],'stale norm-to-bridge checker binding' + assert charts['bridge_receipt_sha256']==hashes['bridge'],'stale chart-to-bridge receipt binding' + assert charts['geometry_receipt_bound'] + assert bridge['all_column_formal_composition_forward_inverse'] and bridge['omitted_setup_and_restore_rejected'] + assert bridge['final_full_endpoints_checked'] and bridge['reorder_transport']['all_new_scalar_edits_outside_intervals'] + edges=[(d,e['pivot']) for e in cand['entries'] for d in e['donors']] + assert len(cand['entries'])==15 and len(edges)==40==bridge['setup_adds']==bridge['restore_adds']==norm['setup_restore_pairs'] + assert len({x for edge in edges for x in edge})==32 + assert {e['pivot'] for e in cand['entries']}.isdisjoint({d for e in cand['entries'] for d in e['donors']}) + assert all(len(e['basis'])==e['rank']==1 for e in cand['entries']) + assert bridge['local_histogram_delta']=={'1':17,'2':30,'3':-30,'4':2,'5':-2} + assert bridge['residual_family_delta']=={'20':-15,'19':15} + # The published construction's scalar ADD edges have coefficient +1; + # its inverse layer has coefficient -1. Confirm that this is what the + # supplied norm checker majorizes, without executing that checker. + norm_text=raw['norm_checker'].decode() + assert "newsetup=[(d,z['pivot'],1)for z in witness for d in z['donors']]" in norm_text + assert 'for e in reversed(newsetup):add(new,e)' in norm_text + source_frames=b.read('bitword/selected/bit/frames_p10.json.gz')['frames'] + programs={r['program_id']:r for r in charts['factor_programs']} + assert len(programs)==38==charts['charts'] + maxnum=maxden=maxfactors=0;determinant_primes=set() + for program in programs.values(): + columns=program['basis_columns'];assert len(columns)==20 and all(len(c)==20 for c in columns) + mat=[[F(x) for x in row] for row in zip(*columns)] + assert len(program['factors'])==program['count'] + maxfactors=max(maxfactors,len(program['factors'])) + for kind,i,j,c in program['factors']: + q=F(c);maxnum=max(maxnum,abs(q.numerator));maxden=max(maxden,q.denominator) + if kind=='swap':mat[i],mat[j]=mat[j],mat[i] + elif kind=='scale':mat[i]=[q*x for x in mat[i]] + elif kind=='add':mat[i]=[x+q*y for x,y in zip(mat[i],mat[j])] + else:raise AssertionError('unknown rational factor') + assert mat==[[F(int(i==j)) for j in range(20)] for i in range(20)] + remaining=abs(int(program['determinant']));assert remaining>0 + for prime in (2,3,11): + while remaining%prime==0:determinant_primes.add(prime);remaining//=prime + assert remaining==1,('unexpected determinant factor',remaining) + assert (maxfactors,maxnum,maxden)==(331,99,297)==(charts['max_factors'],charts['max_numerator'],charts['max_denominator']) + assert maxfactors<=400 and maxnum<2**80 and maxden<2**80 + assert charts['normalizer_bound']==599==max(400,maxfactors)+99+100 + assert charts['dimension']==20 and charts['metric']=='9I-J' and charts['exterior_formula']=='11*a-sum(a)' + paths_by_role={r['role']:r for r in bridge['selected_paths']};uses=defaultdict(dict) + assert len(paths_by_role)==32 + def gram(a,c):return 9*sum(x*y for x,y in zip(a,c))-sum(a)*sum(c) + for use in charts['role_uses']: + role=use['role'];assert use['kind'] not in uses[role];uses[role][use['kind']]=use + path=paths_by_role[role];assert use['stream']==path['stream'];line=path['entrance_basis'][0] + program=programs[use['program_id']];columns=program['basis_columns'];rank=program['residual_rank'];assert rank==use['rank'] + if use['kind']=='first_frame_quotient': + assert use['frame']==path['first_frame'] and rank==path['first_dimension']-1 + assert columns[rank]==line + assert all(gram(c,line)==0 for c in columns[:rank]) + frame=source_frames[str(path['first_frame'])] + if 'a' in frame: + assert all(sum(x*y for x,y in zip(a,c))==0 for a in frame['a'] for c in columns[:rank+1]) + else: + pivots={} + for vec in frame['b']: + row=list(map(F,vec)) + for j,pivot in sorted(pivots.items()): + q=row[j];row=[x-q*y for x,y in zip(row,pivot)] + nz=next((i for i,x in enumerate(row) if x),None) + if nz is not None: + q=row[nz];pivots[nz]=[x/q for x in row] + assert len(pivots)==path['first_dimension'] + for vec in columns[:rank+1]: + row=list(map(F,vec)) + for j,pivot in sorted(pivots.items()): + q=row[j];row=[x-q*y for x,y in zip(row,pivot)] + assert not any(row) + + elif use['kind']=='pivot_residual': + assert path['kernel_kind']=='pivot' and rank==19 and columns[19]==line + assert all(gram(c,line)==0 for c in columns[:19]) + elif use['kind']=='donor_line_entrance': + assert path['kernel_kind']=='donor' and rank==1 and columns[0]==line + else:raise AssertionError('unknown chart use') + assert len(charts['role_uses'])==64 and set(uses)==set(paths_by_role) + for role,path in paths_by_role.items():assert set(uses[role])=={'first_frame_quotient','pivot_residual' if path['kernel_kind']=='pivot' else 'donor_line_entrance'} + forward=norm['forward']['certified_new_bound'];inverse=norm['inverse']['certified_new_bound'] + assert forward==norm['forward']['inherited_bound']+norm['forward']['max_added_majorant']==49937 + assert inverse==norm['inverse']['inherited_bound']+norm['inverse']['max_added_majorant']==1194200 + payload=64*forward**3*inverse**2 + assert payload==norm['payload_bound'] and payload.bit_length()==norm['payload_bits']==94 + assert payload<2**104 and norm['retained_payload_cap_2_to104'] + banks=records['banks'];pricing=records['pricing'] + assert banks['source_head']==b.HEAD and banks['pricing_sha256']==hashes['pricing'] + assert banks['compressed_table_sha256']==hashes['bank_table'] + table=gzip.decompress(raw['bank_table']);assert sha(table)==banks['one_stage_table_uncompressed_sha256'] + assert banks['all_blocks_full'] and banks['all_role_replica_pairs_exactly_once'] and banks['stage_bank_ranges_disjoint'] + assert len(table)==20*493380 and banks['total_assignments']==5*493380==2466900 + word=b.read('bitword/selected/bit/word_p10.json.gz') + removed={z for a,z in word['pairs']};original_roles=sorted(set(range(9120))-removed) + stream_to_role={1920+i:r for i,r in enumerate(original_roles)} + roles=set(original_roles)-{r['role'] for r in b.read('sink-selection.json')['sinks']} + entrances={r:0 for r in roles};endpoints={r:20 for r in roles} + for row in word['gauges']: + if row['role'] in roles:entrances[row['role']]=row['dim'] + kernel=b.read('kernel-selection.json') + for row in kernel['pairs']+kernel['families']:entrances[stream_to_role[row.get('pivot',row.get('a'))]]=row['rank'] + for row in b.read('restore-selection.json')['entries']:endpoints[stream_to_role[row['helper']]]=row['rank'] + for row in cand['entries']: + role=stream_to_role[row['pivot']];assert role==row['virtual_pivot'] and entrances[role]==0 and endpoints[role]==20;entrances[role]=1 + widths={r:endpoints[r]-entrances[r] for r in roles};assert len(widths)==8223 + census=Counter(widths.values());assert dict(census)=={int(k):v for k,v in pricing['residual_census'].items()}=={int(k):v for k,v in banks['residual_census'].items()} + rows=list(struct.iter_unpack('>IIIII',table));seen=bytearray(9120*60);last_bank=0;end=0 + for role,replica,bank,offset,width in rows: + assert role in widths and 0<=replica<60 and width==widths[role] + if bank!=last_bank: + assert bank==last_bank+1 and end==100;last_bank=bank;end=0 + assert offset==end and end+width<=100;end+=width + key=60*role+replica;assert not seen[key];seen[key]=1 + assert last_bank+1==banks['banks_per_stage']==pricing['banks_per_stage']==85707 and end==100 + assert sum(seen)==493380 and all(seen[60*r+i] for r in roles for i in range(60)) + digest=hashlib.sha256() + for stage in range(5): + for role,replica,bank,offset,width in rows:digest.update(struct.pack('>IIIIII',stage,role,replica,stage*85707+bank,offset,width)) + assert digest.hexdigest()==banks['five_stage_assignment_sha256'] + assert banks['literal_stock']==pricing['literal_stock']==60*4*960+5*85707==658935 + invoice=finite_invoice.run() + invoice['inherited_payload_envelope']['replaced_by_candidate_payload_envelope']=True + invoice.update(status='PASS_CANDIDATE15_RECEIPT_BOUND_FINITE_ARITHMETIC', + candidate_changed_stage_checks_bound=True,physical_admission=False, + bound_receipts={k:dict(path=str(paths[k]),sha256=hashes[k],bytes=len(raw[k])) for k in paths}, + verified_changed_stage=dict(gross_added_unit_ADDs=80,setup_pairs=40,selected_roles=32,all_column_dimension=bridge['all_column_dimension'],chart_programs=38,chart_uses=64,chart_programs_independently_replayed=True,chart_role_uses_independently_bound=True,max_chart_factors=331,max_factor_numerator=99,max_factor_denominator=297,retained_global_chart_bound=400,normalizer_bound=599,new_chart_determinant_prime_support=sorted(determinant_primes),removed_unit_reads_verified_but_not_credited=bridge['removed_initial_unit_additions']), + scalar_event_accounting=dict(added_unit_ADDs=80,removed_initial_unit_ADDs=bridge['removed_initial_unit_additions'],net_local_ADD_delta=80-bridge['removed_initial_unit_additions'],conservative_unused_credit_all_stages_and_replicas=5*60*bridge['removed_initial_unit_additions'],invoice_credits_removed_reads=False), + bank_binding=dict(assignments_per_stage=493380,total_assignments=2466900,banks_per_stage=85707,literal_stock=658935,role_widths_independently_rebuilt=True,table_independently_checked=True,all_blocks_full=True,all_role_replica_pairs_exactly_once=True,stage_ranges_disjoint=True), + candidate_payload_envelope=dict(forward_row_l1=forward,inverse_row_l1=inverse,payload_bound=payload,payload_bits=94,retained_strict_upper='2^104',validated_against_bound_receipt=True), + pending_obligations=[ + 'Inherited full physical decoder correctness, frozen-stage replays and raw 133-crossing reorder admission remain hypotheses; the changed-stage bridge transports them and does not rerun every raw crossing.', + 'All 2,466,900 role/replica/stage bank addresses and changed chart uses are independently bound. Their use throughout a fully generated downstream production word remains under the checked bridge and inherited bank/compiler interfaces; no upstream production verifier was executed.', + 'Inherited prime supply must avoid the required denominator/determinant primes, including2,3,11 for these changed charts. No all-characteristics-greater-than5 assertion is made.', + 'Inherited weighted compiler, common ancestor chart, restored row reserve, routing, precision/recovery, complex correctness and analytic reduction interfaces remain conditional.', + 'The full absorbed constant C_full is not instantiated: it must include this displayed coefficient times inherited primitive, wrapper and preceding ordinary-level constants. No numerical all-size cutoff or unconditional theorem is claimed.' + ],scope='Independent exact finite-formula arithmetic bound to matching candidate, changed-stage bridge, scalar majorant and freshly replayed chart receipts. Inherited full compiler/decoder/constants and all-size hypotheses remain explicit.') + for k,path in paths.items():assert sha(path.read_bytes())==hashes[k],('concurrent input changed',k) + target=HERE/'bound-receipt-inputs';target.mkdir(exist_ok=True) + for k,data in raw.items():(target/(k+('.py.txt' if k.endswith('checker') else '.bin.gz' if k=='bank_table' else '.json'))).write_bytes(data) + return invoice +if __name__=='__main__': + r=run();encoded=json.dumps(b.ae.serial(r),indent=2)+'\n';(HERE/'candidate15-finite-invoice-bound.json').write_text(encoded);(HERE/'candidate15-finite-invoice.json').write_text(encoded);print(json.dumps({k:r[k] for k in ('status','verified_changed_stage','candidate_payload_envelope')},indent=2)) diff --git a/research/gen5b-shared-kernels/p10/arithmetic/bind_weighted_invoice.py b/research/gen5b-shared-kernels/p10/arithmetic/bind_weighted_invoice.py new file mode 100644 index 0000000000..b8b7d8f6bc --- /dev/null +++ b/research/gen5b-shared-kernels/p10/arithmetic/bind_weighted_invoice.py @@ -0,0 +1,154 @@ +"""Fresh weighted892/fixed19 finite arithmetic and cross-receipt binding. +All supplied checkers remain inert. This module executes only original arithmetic +modules and the two hash-guarded prior arithmetic engines. +""" +from collections import Counter,defaultdict +from fractions import Fraction as F +from pathlib import Path +import gzip,hashlib,json,struct +import reproduce_p10 as b +import price_candidate as pricing +from finite_invoice import bill +import check_seam_contract as seam_check +import check_scalar_counts as scalar_check +support=b.support +HERE=support.out('arithmetic','placeholder').parent +PARAM=support.OUTPUT/'matching' +BRIDGE=support.OUTPUT/'weighted' +CERT=support.OUTPUT/'certificates' +CLOSURE=support.HERE/'witnesses' + +def sha(raw):return hashlib.sha256(raw).hexdigest() + +def run(): + paths=dict(word=PARAM/'word_weighted892.json',base=PARAM/'scalar_and_seams892.json',census=PARAM/'full_path_census892.json',candidate=BRIDGE/'rebound-candidate19.json',original_candidate=CLOSURE/'candidate19-residue4.json',transport=BRIDGE/'transport-result.json',targets=BRIDGE/'target-chronology-result.json',target_checker=support.HERE/'weighted/check_target_chronology.py',norms=BRIDGE/'scalar-recurrence-result.json',norm_checker=support.HERE/'weighted/check_scalar_recurrence.py',charts=CERT/'rebound-candidate19-charts.json',seam_charts=CERT/'weighted892-seam-charts.json',banks=CERT/'weighted892-candidate19-bank-receipt.json',bank_table=CERT/'weighted892-candidate19-bank-addresses.bin.gz',prior_price=HERE/'provisional892-candidate19-pricing.json') + paths.update(transport_checker=(support.HERE/'weighted')/'check_transport.py',source_loader=(support.HERE/'weighted')/'weighted_source_data.py',reorder=BRIDGE/'reorder-transport-result.json',reorder_checker=(support.HERE/'weighted')/'check_reorder_transport.py') + raw={k:p.read_bytes() for k,p in paths.items()};hashes={k:sha(x) for k,x in raw.items()};data={k:json.loads(x) for k,x in raw.items() if not k.endswith('checker') and k not in ('source_loader','bank_table')} + word=data['word'];candidate=data['candidate'];transport=data['transport'];targets=data['targets'];norm=data['norms'];charts=data['charts'];banks=data['banks'] + assert candidate['source_head']==transport['head']==targets['head']==norm['head']==charts['source_head']==banks['source_head']==b.HEAD + assert candidate['overlay_sha256']==transport['overlay_sha256']==targets['overlay_sha256']==norm['overlay_sha256']==charts['candidate_word_sha256']==banks['candidate_word_sha256']==hashes['word'] + assert norm['rebound_candidate_sha256']==charts['candidate_sha256']==banks['candidate_sha256']==hashes['candidate'] + assert transport['original_candidate_sha256']==norm['original_candidate_sha256']==hashes['original_candidate'] + assert transport['rebound_candidate_sha256']==hashes['candidate'] + assert transport['checker_sha256']==hashes['transport_checker'] and transport['source_loader_sha256']==hashes['source_loader'] + dependencies={paths[k].name:hashes[k] for k in ('transport_checker','source_loader','target_checker','norm_checker','targets','candidate')} + for receipt in (targets,norm): + assert receipt['dependency_sha256'] + for name,value in receipt['dependency_sha256'].items():assert dependencies[name]==value,('stale dependency',name) + reorder=data['reorder'] + assert reorder['head']==b.HEAD and reorder['overlay_sha256']==hashes['word'] and reorder['rebound_candidate_sha256']==hashes['candidate'] + assert reorder['checker_sha256']==hashes['reorder_checker'] + assert reorder['moves']==133 and reorder['moved_ports']==266 and reorder['all_anchors_survive'] and reorder['all_noncommuting_traces_equal'] + assert len(reorder['receipts'])==133 and all(r['all_anchor_candidates_semantically_preserved'] and r['noncommuting_trace_and_relative_position_identical'] for r in reorder['receipts']) + assert data['original_candidate']['entries']==candidate['entries'] + assert norm['checker_sha256']==hashes['norm_checker'] and targets['checker_sha256']==hashes['target_checker'] + assert charts['bridge_receipt_sha256']==hashes['transport'] and charts['geometry_receipt_bound'] + assert transport['kernel_entries_rebound']==775 and transport['kernel_relations_and_cut_triples_exact'] + assert transport['kernel_delta_old']==transport['kernel_delta_new'] and transport['complete_new_paths_checked']==8228 + assert transport['candidate19_all_column_f2_identity_forward_reverse'] and transport['candidate19_omission_controls_rejected'] + assert all(not values for values in transport['direct_role_overlaps'].values()) + assert targets['all120_literal_target_relations']==120 and targets['all480_group_members_checked_at_close'] + assert targets['all_gauge_target_paths_nested'] and targets['compressed_target_state_containment_checks']>=480 and targets['negative_controls'] + assert targets['group119']['new_close']==328527 and min(targets['new_late_gauge_records'].values())>328527 + seam=seam_check.run();counts=scalar_check.run() + assert seam['inputs']['word']['sha256']==counts['candidate_word_sha256']==hashes['word'] + assert counts['rebound_candidate_sha256']==hashes['candidate'] + assert norm['removed_initial_reads']==dict(old=23140,old_units=23140,new=188,new_units=188) + assert norm['setup_counts']==dict(old=1157,new=58) + assert norm['all_setup_and_restore_omission_controls_rejected'] + for direction,expected in [('baseline_forward',31433),('baseline_inverse',966260)]: + r=norm[direction];assert r['all_columns'] and r['columns']==10150 and r['weighted_additions']==334655 and r['literal_unit_additions']==336575 and r['max_row_l1']==expected + for direction in ('forward','inverse'): + r=norm[direction];assert r['all_columns'] and r['columns']==10148 and r['weighted_additions']==counts['post_fixed19_weighted_ADDs']==334583 and r['literal_unit_additions']==counts['post_fixed19_unit_ADDs']==336503 + assert sum(int(k)*v for k,v in r['coefficient_histogram'].items())==336503 + forward=norm['forward']['max_row_l1'];inverse=norm['inverse']['max_row_l1'];payload=64*forward**3*inverse**2 + assert (forward,inverse)==(33129,984792) and payload==norm['payload_bound'] and payload.bit_length()==norm['payload_bits']==91 and payload<2**104 and norm['retained_payload_cap_2_to104'] + # Reprice from independently measured path deltas and rebound witness. + hd=Counter({int(k):v for k,v in data['census']['helper_delta'].items()});hd.update({int(k):v for k,v in candidate['local_histogram_delta'].items()}) + rd=Counter({int(k):v for k,v in data['census']['residual_delta'].items()});rd.update({int(k):v for k,v in candidate['residual_family_delta'].items()}) + result=pricing.price(dict(hd),dict(rd),label='Receipt-bound weighted892 plus fixed19; inherited compiler/full-C conditions remain') + assert result['literal_stock']==658905 and result['banked_calls']==249085 and result['banked_rank_mass']==1096135 and result['physical_R']==8221 + assert result['assembly']['kappa']==F(769661484777339,10**18) + for key in ('literal_stock','banked_calls','banked_rank_mass','physical_R','banks_per_stage','residual_census'): + assert json.loads(json.dumps(b.ae.serial(result[key])))==data['prior_price'][key] + # Fresh endpoint and first-quotient factor program replay and role binding. + programs={r['program_id']:r for r in charts['factor_programs']};assert len(programs)==47 + frame_data=b.read('bitword/selected/bit/frames_p10.json.gz')['frames'];maxops=maxnum=maxden=0 + for program in programs.values(): + columns=program['basis_columns'];mat=[[F(x) for x in row] for row in zip(*columns)] + assert len(mat)==20 and all(len(row)==20 for row in mat) + assert len(program['factors'])==program['count'];maxops=max(maxops,len(program['factors'])) + for kind,i,j,c in program['factors']: + q=F(c);maxnum=max(maxnum,abs(q.numerator));maxden=max(maxden,q.denominator) + if kind=='swap':mat[i],mat[j]=mat[j],mat[i] + elif kind=='scale':mat[i]=[q*x for x in mat[i]] + elif kind=='add':mat[i]=[x+q*y for x,y in zip(mat[i],mat[j])] + else:raise AssertionError('unknown factor') + assert mat==[[F(int(i==j)) for j in range(20)] for i in range(20)] + assert 0IIIII',table));used=bytearray(9120*60);lastbank=0;offset_end=0 + for role,replica,bank,offset,width in rows: + assert role in widths and 0<=replica<60 and width==widths[role] + if bank!=lastbank:assert bank==lastbank+1 and offset_end==100;lastbank=bank;offset_end=0 + assert offset==offset_end and offset+width<=100;offset_end+=width + idx=60*role+replica;assert not used[idx];used[idx]=1 + assert lastbank+1==banks['banks_per_stage']==85701 and offset_end==100 and sum(used)==493260 + assert all(used[60*r+i] for r in roles for i in range(60)) + digest=hashlib.sha256() + for stage in range(5): + for role,replica,bank,offset,width in rows:digest.update(struct.pack('>IIIIII',stage,role,replica,stage*85701+bank,offset,width)) + assert digest.hexdigest()==banks['five_stage_assignment_sha256'] and banks['total_assignments']==2466300 + assert banks['literal_stock']==60*4*960+5*85701==result['literal_stock'] + charge=bill(result['literal_stock'],result['banked_calls'],counts['conservative_invoice_weighted_ADDs'],counts['conservative_invoice_unit_ADDs'],R=8221) + exact=bill(result['literal_stock'],result['banked_calls'],counts['post_fixed19_weighted_ADDs'],counts['post_fixed19_unit_ADDs'],R=8221) + assert charge['coefficient']==25415456130362201 and charge['coefficient']-exact['coefficient']==188*5*60==56400 + assert charge['coefficient']<2**80 and charge['coefficient_terms']['bank_selectors']<2**40 + report=dict(status='PASS_RECEIPT_BOUND_WEIGHTED892_FIXED19_FINITE_ARITHMETIC',physical_admission=False,all_size_theorem=False,head=b.HEAD, + inputs={k:dict(path=str(paths[k]),bytes=len(raw[k]),sha256=hashes[k]) for k in paths},pricing=result,scalar_count_contract=counts,seam_cost_contract=seam, + bound_target_chronology=dict(groups=120,group_members=480,close_containment_checks=targets['compressed_target_state_containment_checks'],group119_close=328527,new_late_gauge_records=targets['new_late_gauge_records'],negative_controls=targets['negative_controls']), + bound_reorder_transport=dict(moves=133,moved_ports=266,all_anchors_survive=True,all_noncommuting_traces_equal=True,receipt_sha256=hashes['reorder']), + candidate_geometry=dict(programs=47,chart_uses=82,selected_roles=41,max_factors=331,max_numerator=220,max_denominator=297,retained_global_chart_bound=400,normalizer_bound=599,programs_and_role_uses_independently_replayed=True), + bank_binding=dict(assignments_per_stage=493260,total_assignments=2466300,banks_per_stage=85701,stock=658905,independently_checked=True), + scalar_payload=dict(forward=forward,inverse=inverse,bound=payload,bits=91,retained_cap=104,all_columns_before_reorder=10148,scalar_recurrence_and_baseline_crosscheck_bound=True), + finite_invoice=charge,unused_removed_read_credit=56400,exact_count_variant_coefficient=exact['coefficient'],interior_seam_incremental_surcharge=0, + remaining_conditions=['All133 moved semantic anchor-incidence and noncommuting traces are freshly compared; application of the unchanged local identity still uses the inherited raw crossing proof. No final raw-record/hash regeneration is claimed.','Full final production raw-record/hash regeneration remains distinct from these finite arithmetic and semantic certificates.','Inherited weighted compiler, common ancestor chart, row restoration, prime supply, descriptor/precision/recovery and complex/analytic interfaces remain hypotheses.','The full C constant, including primitive, wrapper and prior ordinary-level constants, is not instantiated. The displayed coefficient is a ring/recipe count, not a measured Turing-machine constant or unconditional all-size theorem.']) + for k,path in paths.items():assert sha(path.read_bytes())==hashes[k],('concurrent source changed',k) + snapshots=HERE/'weighted-bound-inputs';snapshots.mkdir(exist_ok=True) + for k,blob in raw.items(): + suffix='.bin.gz' if k=='bank_table' else '.py.txt' if k.endswith('checker') or k=='source_loader' else '.json';(snapshots/(k+suffix)).write_bytes(blob) + return report +if __name__=='__main__': + r=run();(HERE/'weighted892-finite-invoice-bound.json').write_text(json.dumps(b.ae.serial(r),indent=2)+'\n');print(json.dumps(dict(status=r['status'],coefficient=r['finite_invoice']['coefficient'],payload=r['scalar_payload'],banks=r['bank_binding'],kappa=r['pricing']['assembly']['kappa_decimal']),indent=2)) diff --git a/research/gen5b-shared-kernels/p10/arithmetic/check_scalar_counts.py b/research/gen5b-shared-kernels/p10/arithmetic/check_scalar_counts.py new file mode 100644 index 0000000000..31b0cc45b5 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/arithmetic/check_scalar_counts.py @@ -0,0 +1,57 @@ +"""Independent odd-coefficient initial-prefix and inherited-kernel scalar invoice counts.""" +from collections import Counter +from pathlib import Path +import hashlib,json +import reproduce_p10 as b +support=b.support +HERE=support.out('arithmetic','placeholder').parent +PARAM=support.OUTPUT/'matching' +BRIDGE=support.OUTPUT/'weighted' +CERT=support.OUTPUT/'certificates' +CLOSURE=support.HERE/'witnesses' + +def run(): + original=b.read('bitword/selected/bit/word_p10.json.gz');graph=b.read('bitword/selected/bit/graph_p10.json') + newraw=(PARAM/'word_weighted892.json').read_bytes();new=json.loads(newraw) + changed=[k for k in original if original[k]!=new[k]];assert set(changed)=={'pairs','reads'} + gauge={x['role'] for x in original['gauges']};phase=set(original['phase1']);order=original['phase1']+[i for i in range(len(original['ops'])) if i not in phase] + adj=[Counter() for _ in range(9120)] + for root,role in zip(graph['roots'],original['rootroles']):adj[role].update(root['targets']) + for i in reversed(order): + dst,src,_=original['ops'][i];adj[src].update(adj[dst]) + coefficient=Counter() + for role in range(9120): + if role not in gauge:coefficient.update(abs(c) for c in adj[role].values() if c%2) + assert sum(coefficient.values())==300560 + maps=[] + for word in (original,new): + removed={z for a,z in word['pairs']};roles=sorted(set(range(9120))-removed);maps.append({1920+i:r for i,r in enumerate(roles)}) + kernel=b.read('kernel-selection.json');entries=kernel['pairs']+kernel['families'];pivots=[e.get('pivot',e.get('a')) for e in entries] + assert len(set(pivots))==len(pivots)==775 + old=Counter();rebased=Counter() + for pivot in pivots: + assert maps[0][pivot]==maps[1][pivot] and maps[0][pivot] not in gauge + old.update(abs(c) for c in adj[maps[0][pivot]].values() if c%2) + rebased.update(abs(c) for c in adj[maps[1][pivot]].values() if c%2) + assert old==rebased + setups=sum(len(e.get('donors',[e.get('b')])) for e in entries);assert setups==1157 + candidate_raw=(BRIDGE/'rebound-candidate19.json').read_bytes();candidate=json.loads(candidate_raw);newremoved=Counter() + for e in candidate['entries']: + role=maps[1][e['pivot']];assert role==e['virtual_pivot'] and role not in gauge + newremoved.update(abs(c) for c in adj[role].values() if c%2) + pairs=sum(len(e['donors']) for e in candidate['entries']);assert pairs==58 + scalar=next(x for x in json.loads((PARAM/'scalar_and_seams892.json').read_text()).items() if x[0]=='scalar_adds')[1];assert scalar==355400 + # Identical virtual operations/adjoints and targets imply the same raw + # odd-coefficient histogram; target/restore/sink/reorder count transport + # remains bound to the corresponding independent chronology receipts. + pins=b.pins();net=2*pairs-sum(newremoved.values());netunits=2*pairs-sum(c*n for c,n in newremoved.items()) + return dict(status='PASS_INDEPENDENT_WEIGHTED892_SCALAR_COUNT_INVARIANCE',source_head=b.HEAD,candidate_word_sha256=hashlib.sha256(newraw).hexdigest(),rebound_candidate_sha256=hashlib.sha256(candidate_raw).hexdigest(),changed_base_fields=changed, + plain_prefix_adds=sum(coefficient.values()),plain_prefix_unit_adds=sum(c*n for c,n in coefficient.items()),plain_prefix_coefficient_histogram=dict(coefficient), + inherited_kernel_entries=775,inherited_removed_adds_old=sum(old.values()),inherited_removed_adds_new=sum(rebased.values()),inherited_removed_unit_adds_old=sum(c*n for c,n in old.items()),inherited_removed_unit_adds_new=sum(c*n for c,n in rebased.items()),inherited_setup_pairs=setups, + raw_base_odd_ADDs=355400,raw_base_unit_ADDs=357320,raw_base_count_change=0,inherited_transcript_base_final_weighted_ADDs=pins['weighted_scalar_events'],inherited_transcript_base_final_unit_ADDs=pins['literal_unit_additions'], + fixed19_setup_pairs=pairs,fixed19_gross_added_ADDs=2*pairs,fixed19_removed_reads=sum(newremoved.values()),fixed19_removed_unit_reads=sum(c*n for c,n in newremoved.items()),fixed19_removed_coefficient_histogram=dict(newremoved), + net_local_weighted_delta=net,net_local_unit_delta=netunits,post_fixed19_weighted_ADDs=pins['weighted_scalar_events']+net,post_fixed19_unit_ADDs=pins['literal_unit_additions']+netunits, + conservative_invoice_weighted_ADDs=pins['weighted_scalar_events']+2*pairs,conservative_invoice_unit_ADDs=pins['literal_unit_additions']+2*pairs, + scope='Exact initial-prefix compensation and kernel scalar counts from fixed virtual adjoints; unchanged remaining transcript scalar counts require the separately checked target/restore/sink/reorder transport. Conservative finite bill gives removed new reads no credit.') +if __name__=='__main__': + r=run();(HERE/'weighted892-scalar-count-contract.json').write_text(json.dumps(r,indent=2)+'\n');print(json.dumps(r,indent=2)) diff --git a/research/gen5b-shared-kernels/p10/arithmetic/check_seam_contract.py b/research/gen5b-shared-kernels/p10/arithmetic/check_seam_contract.py new file mode 100644 index 0000000000..0890947578 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/arithmetic/check_seam_contract.py @@ -0,0 +1,96 @@ +"""Original exact audit of the supplied weighted892 interior seam cost contract. +Reads only inert source and JSON data. Does not run any supplied checker. +""" +from collections import Counter +from fractions import Fraction as F +from pathlib import Path +import hashlib,json +import reproduce_p10 as b +support=b.support +HERE=support.out('arithmetic','placeholder').parent +PARAM=support.OUTPUT/'matching' +BRIDGE=support.OUTPUT/'weighted' +CERT=support.OUTPUT/'certificates' +CLOSURE=support.HERE/'witnesses' + +def sha(data):return hashlib.sha256(data).hexdigest() +def gram(x,y):return 9*sum(a*z for a,z in zip(x,y))-sum(x)*sum(y) +def echelon(rows): + out={} + for vector in rows: + row=list(map(F,vector)) + for j,pivot in sorted(out.items()): + q=row[j];row=[x-q*y for x,y in zip(row,pivot)] + j=next((i for i,x in enumerate(row) if x),None) + if j is not None: + q=row[j];out[j]=[x/q for x in row] + return out + +def belongs(vector,frame): + if 'a' in frame:return all(sum(x*y for x,y in zip(a,vector))==0 for a in frame['a']) + row=list(map(F,vector)) + for j,pivot in sorted(echelon(frame['b']).items()): + q=row[j];row=[x-q*y for x,y in zip(row,pivot)] + return not any(row) + +def run(): + proof=b.read('proof/FINITE_BIT_ACCOUNTING.md');cover=b.read('proof/three-stage-cover-bit.tex');finite=b.read('finite_check.py');bank=b.read('bank_check.py') + assert 'Per good edge, pay at most 8m^2+8 elementary' in proof and 'Allocate 128N^3 ring operations per edge per low class' in proof + assert 'For a split idempotent $P$' in cover and 'of split rank $r$ relative to $I$' in cover + assert 'E*good+E*(128*N**3)' in finite and 'factors=maxops+(m-1)+m' in bank + paths={'word':PARAM/'word_weighted892.json','base_seams':PARAM/'scalar_and_seams892.json','charts':CERT/'weighted892-seam-charts.json','path_census':PARAM/'full_path_census892.json'} + raw={k:p.read_bytes() for k,p in paths.items()};data={k:json.loads(x) for k,x in raw.items()};charts=data['charts'];base=data['base_seams'];hashes={k:sha(x) for k,x in raw.items()} + assert charts['candidate_word_sha256']==base['candidate_word_sha256']==hashes['word'] + assert charts['seam_receipt_sha256']==hashes['base_seams'] + assert charts['source_head']==base['source_head']==b.HEAD + frames=b.read('bitword/selected/bit/frames_p10.json.gz')['frames'];programs={x['program_id']:x for x in charts['factor_programs']} + assert len(programs)==57 and len(charts['role_uses'])==73 + largest=0;num=den=0;prime_support=set() + for program in programs.values(): + columns=program['basis_columns'];matrix=[[F(x) for x in row] for row in zip(*columns)];inverse=[[F(x) for x in row] for row in program['inverse']] + assert len(columns)==20 and all(len(x)==20 for x in columns) + for left,right in ((matrix,inverse),(inverse,matrix)): + for i,row in enumerate(left): + for j,col in enumerate(zip(*right)):assert sum(x*y for x,y in zip(row,col))==int(i==j) + replay=[row[:] for row in matrix];largest=max(largest,len(program['factors']));assert len(program['factors'])==program['count'] + for kind,i,j,q in program['factors']: + q=F(q);num=max(num,abs(q.numerator));den=max(den,q.denominator) + if kind=='swap':replay[i],replay[j]=replay[j],replay[i] + elif kind=='scale':replay[i]=[q*x for x in replay[i]] + elif kind=='add':replay[i]=[x+q*y for x,y in zip(replay[i],replay[j])] + else:raise AssertionError('unknown factor') + assert replay==[[F(int(i==j)) for j in range(20)] for i in range(20)] + r=program['rank'];de=program['donor_dimension'];df=program['recipient_dimension'];assert 0<=de<=df<=20 and r==df-de + E=frames[str(program['donor_end_frame'])];Fframe=frames[str(program['recipient_gauge_frame'])] + assert E['dim']==de and Fframe['dim']==df + residual=columns[:r];donor=columns[r:r+de];outside=columns[r+de:] + assert len(outside)==20-df + assert all(belongs(c,Fframe) for c in residual+donor) + assert all(belongs(c,E) for c in donor) + assert all(gram(c,e)==0 for c in residual for e in donor) + assert all(gram(c,e)==0 for c in outside for e in residual+donor) + value=abs(int(program['determinant']));assert value>0 + for prime in (2,3,11): + while value%prime==0:value//=prime;prime_support.add(prime) + assert value==1 + assert (largest,num,den)==(155,21,36) + seams={(x['donor'],x['recipient']):x for x in base['seams']};ranks=Counter() + for use in charts['role_uses']: + seam=seams[use['donor'],use['recipient']];program=programs[use['program_id']] + assert use['stream']==seam['physical_stream'] and use['read_order']==seam['read_order'] + assert program['donor_end_frame']==seam['donor_end_frame'] and program['recipient_gauge_frame']==seam['recipient_gauge_frame'] + assert use['rank']==program['rank'];ranks[use['rank']]+=1 + assert ranks[0]==30 and sum(n for r,n in ranks.items() if r)==43 + paid_seams=43*5*60;good=8*100**2+8;matrix=128*200**3 + report=dict(status='PASS_EXACT_WEIGHTED892_SEAM_GENERIC_COST_CONTRACT',source_head=b.HEAD,physical_admission=False, + inputs={k:dict(path=str(paths[k]),sha256=hashes[k],bytes=len(raw[k])) for k in paths},programs_replayed=57,seam_uses=73,positive_rank_seams=43,zero_rank_seams=30,seam_rank_census=dict(sorted(ranks.items())),max_chart_factors=155,max_factor_numerator=21,max_factor_denominator=36,chart_determinant_prime_support=sorted(prime_support), + exact_split_projector_argument='Invertible basis columns partition as (F intersect E-perp), E, and F-perp. Exact source-frame membership, pairwise G-orthogonality and both inverse products are verified. Thus the first-block projector is exactly P_F-P_E, split rank dim(F)-dim(E); for equal dimensions it is zero.', + cost=dict(generic_wrappers_per_paid_child=good,ring_preparation_per_paid_child=matrix,positive_seam_occurrences_all_stages_replicas=paid_seams,seam_wrapper_allocation_already_within_E=paid_seams*good,seam_preparation_allocation_already_within_E=paid_seams*matrix,incremental_seam_surcharge=0,zero_rank_recursive_children=0), + bank_normalizer_scope='The retained400 chart/599 normalizer bound applies to endpoint/residual bank selectors. It is not the reason interior seams are paid. New seam normalization is compiled through the generic split-idempotent child allowance.', + zero_rank_scope='Rank-zero transitions emit no recursive MOVE child and no per-child generic wrapper. Their existing scalar operations, scheduling/descriptor preparation and any fixed table scans remain in unit-expanded scalar counts and the inherited primitive constant. No extra dense normalization pass is introduced.', + no_double_counting='The43 positive seams already occur in the rebuilt paid-path histogram. Their5*60 occurrences are included in E, and the displayed seam allocations are subsets of E*good and E*128*N^3, not extra terms.', + hypotheses=['Every changed positive seam is present in the measured full paid-path census.','The inherited generic weighted-child compiler and prefix-dependent unit adapter implementations satisfy the retained interfaces.','Complete weighted892/fixed19 chronology, scalar norms, endpoint charts and bank table are bound separately.','The inherited full primitive constant and all-size cutoff remain uninstantiated.']) + for k,path in paths.items():assert sha(path.read_bytes())==hashes[k] + return report +if __name__=='__main__': + result=run();(HERE/'weighted892-seam-cost-contract.json').write_text(json.dumps(result,indent=2)+'\n');print(json.dumps({k:result[k] for k in ('status','programs_replayed','seam_uses','positive_rank_seams','zero_rank_seams','cost')},indent=2)) diff --git a/research/gen5b-shared-kernels/p10/arithmetic/check_stage_roots.py b/research/gen5b-shared-kernels/p10/arithmetic/check_stage_roots.py new file mode 100644 index 0000000000..3ede595bc4 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/arithmetic/check_stage_roots.py @@ -0,0 +1,19 @@ +"""Arithmetic-only cross-check of the seven disclosed PR320 stage kappas.""" +from collections import Counter +from fractions import Fraction as F +from pathlib import Path +import json +import reproduce_p10 as b +EXPECTED=['0.000764230861320245','0.000765146115390441','0.000765802240659923','0.000767751918266997','0.000768386813092527','0.000768798619422518','0.000769198971896986'] + +def run(): + final,receipt=b.final_profile();helper=Counter(receipt['base']['histogram']);report=[] + deltas=[('base',{})]+[(name,row['delta']) for name,row in receipt['stages'].items()] + for (name,delta),expected in zip(deltas,EXPECTED): + helper.update(delta);profile=Counter({r:5*n for r,n in helper.items() if n});profile.update({r:1920 for r in (4,19,38,42)}) + W=F(b.mass(profile)+2040,100);root=b.bracket(profile,100,W);outer=b.assembly(root['lower']) + assert outer['kappa']==F(expected),(name,outer['kappa'],expected) + report.append(dict(stage=name,unreplicated_stock=W,local_histogram=b.clean(helper),bit_root=root['lower'],kappa=outer['kappa'],kappa_decimal=outer['kappa_decimal'])) + return dict(status='PASS_ALL_SEVEN_DISCLOSED_STAGE_KAPPAS',physical_admission=False,stages=report) +if __name__=='__main__': + r=run();(b.HERE/'stage-root-receipt.json').write_text(json.dumps(b.ae.serial(r),indent=2)+'\n');print(json.dumps(b.ae.serial(r),indent=2)) diff --git a/research/gen5b-shared-kernels/p10/arithmetic/finite_invoice.py b/research/gen5b-shared-kernels/p10/arithmetic/finite_invoice.py new file mode 100644 index 0000000000..9e440dc964 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/arithmetic/finite_invoice.py @@ -0,0 +1,52 @@ +"""Original finite ring/recipe invoice formula, pinned PR320 m100/N200 contract. +The caller supplies measured inventory and scalar counts. No admission is inferred. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +import hashlib,json +import reproduce_p10 as b + +def bill(stock,calls,local_weighted,local_units,R=8223,chart_max=400): + m=100;N=2*m;d=m*m;T=60;v=960;h=20 + E=T*calls;J=T*(24*v+10*R);normalizer=chart_max+(m-1)+m + weighted=T*(5*local_weighted+6*v);unit=T*(5*local_units+6*v) + K=2*5*T*((stock-1)+R*m*normalizer) + terms=dict(unit_expanded_additions=unit,high_affine_factors=J*16*(d+1)**2, + low_transpositions=J*(stock+h),generic_wrappers=E*(8*m*m+8), + matrix_preparation=E*128*N**3,global_matrix_preparation=16*m**3, + copy_erase_episodes=5*h*T,paid_child_overhead=E,bank_selectors=K,constant=1) + return dict(m=m,N=N,d=d,replicas=T,h=h,v=v,R=R,stock=stock,literal_paid_children=E, + local_weighted_additions=local_weighted,local_unit_additions=local_units, + weighted_additions=weighted,route_families=J,chart_factor_bound=chart_max, + normalizer_factor_bound=normalizer,coefficient_terms=terms,coefficient=sum(terms.values()), + fallback_per_child=32*m*m,fallback_generic_count=6*N*(N-1)+3*N+6*(N-1), + internal_row_coefficient=d+1,external_complex_row_coefficient=20161) + + +def run(): + finite=b.read('finite_check.py');bank=b.read('bank_check.py');pins=b.pins() + path=b.HERE/'candidate15-pricing.json';raw=path.read_bytes();candidate=json.loads(raw) + baseline=bill(pins['literal_stock'],pins['banked_calls'],pins['weighted_scalar_events'],pins['literal_unit_additions']) + assert baseline['coefficient']==pins['finite_coefficient']==25419835642718201 + assert baseline['coefficient_terms']['bank_selectors']==pins['extra_selector_calls'] + assert baseline['normalizer_factor_bound']==pins['normalizer_factor_bound']==599 + gross_adds=80;charge=bill(candidate['literal_stock'],candidate['banked_calls'],pins['weighted_scalar_events']+gross_adds,pins['literal_unit_additions']+gross_adds) + assert charge['coefficient']<2**80 and 00 + for r in row['widths']:observed[r]+=row['count'] + if dict(observed)!=dict(Counter({r:60*n for r,n in residual.items()})):raise ValueError('Packing census mismatch') + assert 100*sum(row['count'] for row in patterns)==60*base.mass(residual) + return patterns + +@lru_cache(None) +def baseline(): + # Every source is reverified on first use in this process. + return base.run() + +def price(histogram_delta,residual_delta,*,label='provisional'): + """Price integer one-stage paid-child delta and residual-role-width delta. + Deltas are relative to pinned PR320 after its final reorder. Must include + every changed helper/source/target/copy paid child. Residual widths are + endpoint_rank minus independent_entrance_rank, once per physical helper. + Entry/endpoint changes, physical sinks, scalar costs and chronology are + not inferred from the deltas and require separate evidence. + """ + hd=integer_delta(histogram_delta,20,'histogram_delta');rd=integer_delta(residual_delta,20,'residual_delta') + if base.mass(hd)!=base.mass(rd):raise ValueError('Histogram and residual delta masses differ; fixed-deficit contract violated') + initial=baseline() + helper=Counter({int(r):n for r,n in initial['profile']['final_helper'].items()});helper.update(hd) + if min(helper.values())<0:raise ValueError('Negative helper child count') + helper=Counter(base.clean(helper)) + families=Counter({int(r):n for r,n in initial['inventory']['residual_census'].items()});families.update(rd) + if min(families.values())<0:raise ValueError('Negative residual role count') + families=Counter(base.clean(families));patterns=pack_residuals(families) + banks=sum(row['count'] for row in patterns);stock=60*4*960+5*banks;W=F(stock,60) + priced=Counter({r:5*n for r,n in helper.items()});priced.update({4:1920,19:1920,38:1920,42:1920}) + assert 100*W-base.mass(priced)==2040 + root=base.bracket(priced,100,W);outer=base.assembly(root['lower']) + supplied_moment=base.moment(priced,100,W,outer['bit_coarse']);assert supplied_moment[1]<1 + delta=outer['kappa']-initial['assembly']['kappa'] + return dict(status='CONDITIONAL_PR320_CANDIDATE_ARITHMETIC',label=label,head=base.HEAD,physical_admission=False,all_size_theorem=False, + one_stage_histogram_delta=base.clean(hd),residual_role_delta=base.clean(rd),final_helper_histogram=base.clean(helper), + banked_histogram=base.clean(priced),banked_calls=sum(priced.values()),banked_rank_mass=base.mass(priced), + residual_census=base.clean(families),physical_R=sum(families.values()),banks_per_stage=banks,literal_stock=stock, + packing_patterns=patterns,packing_unused_coordinates=0,packing_optimal_for_declared_widths=True, + unreplicated_stock=W,normalized_stock=F(stock,5),deficit=2040,bit_root_bracket=root,assembly=outer, + supplied_bit_moment=supplied_moment,kappa_delta=delta,improvement_percent=100*delta/initial['assembly']['kappa'], + scope='Supplied deltas and retained assembly/complex hypotheses only. Exact chronology, source spans, all-column replays, scalar costs, charts, finite invoice and all-size admission remain separate obligations.') + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions must remain enabled') + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('input',type=Path);parser.add_argument('--output',type=Path,required=True);args=parser.parse_args() + data=json.loads(args.input.read_text());result=price(data['histogram_delta'],data['residual_delta'],label=data.get('label','provisional')) + args.output.write_text(json.dumps(base.ae.serial(result),indent=2)+'\n') + print(json.dumps(base.ae.serial(dict(kappa=result['assembly']['kappa'],kappa_decimal=result['assembly']['kappa_decimal'],kappa_delta=result['kappa_delta'],binding=result['assembly']['binding'],physical_admission=False)),indent=2)) diff --git a/research/gen5b-shared-kernels/p10/arithmetic/reproduce_p10.py b/research/gen5b-shared-kernels/p10/arithmetic/reproduce_p10.py new file mode 100644 index 0000000000..f5edcef54a --- /dev/null +++ b/research/gen5b-shared-kernels/p10/arithmetic/reproduce_p10.py @@ -0,0 +1,248 @@ +"""Independent arithmetic reconstruction of the immutable PR320 declarations. +Upstream programs are inert text, never imported or executed. Original code; +uses the explicitly verified, previously authored exact_intervals and assembly_arithmetic. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from collections import Counter, defaultdict +from decimal import Decimal, localcontext, ROUND_FLOOR +from fractions import Fraction as F +from functools import lru_cache +from pathlib import Path +import gzip, hashlib, json, os, sys +CODE=Path(__file__).resolve().parent +sys.path.insert(0,str(CODE.parent)) +import support +HERE=support.out('arithmetic','placeholder').parent +SOURCE=support.INPUTS +AUTHORED=support.HERE.parent +HEAD='e983fea0896b2a1d7355983674db7e9bb33a9e32' +for name,sha in {'exact_intervals.py':'c261dd44838d4e36c68768a1023ac859677089464ab121cdb46b30c918679333','assembly_arithmetic.py':'f2f6293c31deb579ebbea19eeaa732c07304ce9c2cacd431685e2dd18d4b0d58'}.items(): + if hashlib.sha256((AUTHORED/name).read_bytes()).hexdigest()!=sha:raise ValueError('Authored module pin mismatch: '+name) +sys.path.insert(0,str(AUTHORED)) +import exact_intervals as ex +import assembly_arithmetic as ae +M,H,V,T=100,20,960,60 +DEFICIT=2040 +GRID=10**18 +COMPLEX=F(772714351296671,GRID) +USED=set() + +def clean(h):return {r:n for r,n in sorted(h.items()) if n} +def mass(h):return sum(r*n for r,n in h.items()) +def hist(d): + if any(type(n) is not int or str(int(r))!=str(r) for r,n in d.items()):raise ValueError('Integer histogram required') + return Counter({int(r):n for r,n in d.items() if n and int(r)>0}) +def decode(v): + if isinstance(v,list) and len(v)==2 and v[0]=='Fraction':return F(v[1]) + if isinstance(v,list) and len(v)==2 and v[0]=='dict':return {k:decode(x) for k,x in v[1]} + return v + +def read(name): + raw=support.read_bytes(name) + USED.add(name) + if name.endswith('.gz'):raw=gzip.decompress(raw) + if name.endswith(('.json','.json.gz')):return json.loads(raw) + return raw.decode() + +@lru_cache(None) +def pins():return {k:decode(v) for k,v in read('word-pins.json').items()} + +def base_profile(): + w=read('bitword/selected/bit/word_p10.json.gz') + f=read('bitword/selected/bit/frames_p10.json.gz') + p=read('bitword/selected/bit/profile_p10.json') + dims={int(k):r['dim'] for k,r in f['frames'].items()} + assert p['h']==f['h']==H and p['R']==9120 and p['v']==V + gauges={r['role']:r for r in w['gauges']} + assert all(r['dim']==dims[r['frame']] for r in gauges.values()) + source_nodes={role:int(node) for node,role in w['sources'].items()} + reuse=dict(w['pairs']);removed=set(reuse.values()) + assert len(reuse)==len(removed)==890 and not set(reuse)&removed + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops'])) if i not in phase] + assert len(order)==len(set(order))==len(w['ops']) + paths=defaultdict(list) + for i in order: + for role in w['ops'][i][:2]:paths[role].append(w['op_frame'][i]) + for role,frame in zip(w['rootroles'],w['root_frame']):paths[role].append(frame) + helper=Counter() + for role in range(p['R']): + if role in removed:continue + start=gauges[role]['frame'] if role in gauges else w['source_frame'][source_nodes[role]] if role in source_nodes else None + previous=0 if start is None else dims[start] + visits=list(paths[role]) + if role in reuse: + recipient=reuse[role];visits+=[gauges[recipient]['frame']]+paths[recipient] + for frame in visits+[w['full_frame']]: + d=dims[frame]-previous + assert d>=0,(role,previous,dims[frame]) + if d:helper[d]+=1 + previous=dims[frame] + if role in source_nodes:helper[1]+=1 + before=helper.copy();helper[H-2]+=H + # Reconstruct paid source and target dimension increments independently. + # Zero-width visits carry no paid child and are discarded in both routes. + g=read('bitword/selected/bit/graph_p10.json');chron=read('bitword/selected/bit/kchron_p10.json') + source=Counter() + for entry in chron['entries']: + for key in ('carrier_chain','passive_chain'): + for a,b in zip(entry[key],entry[key][1:]): + delta=dims[b]-dims[a];assert delta>=0 + if delta:source[delta]+=1 + target_paths=[[] for _ in range(V)] + for entry in sorted(w['gauges'],key=lambda row:(row['first'],row['role'])): + for t in entry['targets']:target_paths[t].append(entry['frame']) + deliveries=defaultdict(list) + for entry in chron['entries']:deliveries[entry['deliver_after_root']].append(entry) + for j,root in enumerate(g['roots']): + if root['kind']=='side': + for t in root['targets']:target_paths[t].append(w['root_frame'][j]) + for entry in deliveries[j]: + for t in entry['receivers']:target_paths[t].append(entry['deliver_frame']) + target=Counter() + for path in target_paths: + chain=[0]+[dims[f] for f in path]+[H-1] + for a,b in zip(chain,chain[1:]): + delta=b-a;assert delta>=0 + if delta:target[delta]+=1 + assert source==hist(p['source_data_histogram']) and target==hist(p['target_data_histogram']) + assert mass(source)==mass(target)==V*(H-1) + helper.update(source);helper.update(target) + assert mass(helper)==pins()['local_paid_rank_mass'] + return helper,dict(helper_paths=clean(before),copied_centers={18:20},source_data=clean(hist(p['source_data_histogram'])),target_data=clean(hist(p['target_data_histogram'])),histogram=clean(helper),calls=sum(helper.values()),rank_mass=mass(helper),source_target_scope='Paid source increments reconstructed from kchron chains; target increments from ordered gauge/root/delivery visits and rank19 endpoints. Both agree with pinned component histograms. Frame dimensions and nominal event order are data, not a physical replay. Virtual profile child_histogram is not used.') + +def kernel_delta(): + k=read('kernel-selection.json');visits=defaultdict(set);first={};pivots={};donors=Counter() + for row in k['pairs']+k['families']: + pivot=row.get('pivot',row.get('a'));ds=row.get('donors',[row.get('b')]);pivots[pivot]=row['rank'] + dimensions=row['first_frame_dims'] + dimensions={pivot:dimensions[0],ds[0]:dimensions[1]} if isinstance(dimensions,list) else {int(r):d for r,d in dimensions.items()} + assert set(dimensions)=={pivot,*ds} + for role,dimension in dimensions.items(): + assert role not in first or first[role]==dimension + first[role]=dimension;visits[role].add(row['rank']) + donors.update(ds) + assert not set(pivots)&set(donors) + delta=Counter() + for role,ranks in visits.items(): + delta[first[role]]-=1;previous=pivots.get(role,0) + for dimension in sorted(ranks)+[first[role]]: + assert dimension>=previous + if dimension>previous:delta[dimension-previous]+=1 + previous=dimension + assert clean(delta)==dict(hist(k['expected_local_delta']))==pins()['kernel_local_delta'] + assert mass(delta)==-sum(pivots.values())==-970 + return delta,dict(entries=len(pivots),pairs=len(k['pairs']),families=len(k['families']),entrance_rank=sum(pivots.values()),distinct_donors=len(donors),shared_donors=sum(n>1 for n in donors.values()),maximum_donor_multiplicity=max(donors.values()),delta=clean(delta)) + +def final_profile(): + helper,base=base_profile();kd,ki=kernel_delta() + target=read('target-selection.json');td=Counter() + for row in target['groups']:td.update(hist(row['local_histogram_delta'])) + assert clean(td)==dict(hist(target['expected_total_delta'])) + restoration=read('restore-selection.json');rd=Counter() + for row in restoration['entries']: + entrance,helper_rank,donor_rank,end=row['dims'];assert entrance=0 + stages[name]=dict(delta=clean(delta),delta_calls=sum(delta.values()),delta_mass=mass(delta),calls=sum(helper.values()),rank_mass=mass(helper)) + priced=Counter({r:5*n for r,n in helper.items() if n});priced.update({r:2*V for r in (38,19,42,4)}) + assert sum(priced.values())==pins()['banked_calls']==249125 + assert mass(priced)==pins()['banked_rank_mass']==1096260 + raw=priced.copy();raw.update(pins()['removed_completion_histogram']) + assert sum(raw.values())==pins()['reorder_five_stage_calls']==251170 and mass(raw)==pins()['final_five_stage_rank_mass']==1204260 + return priced,dict(base=base,kernel=ki,stages=stages,final_helper=clean(helper),final_helper_calls=sum(helper.values()),final_helper_rank_mass=mass(helper),banked_histogram=clean(priced),banked_calls=sum(priced.values()),banked_rank_mass=mass(priced),with_completions=clean(raw),declared_deltas=['descent-selection.json: expected_local_histogram_delta','reorder-selection.json: expected_local_delta'],scope='Independent helper/source/target dimension census plus frozen stage deltas; physical chronology, frame nesting, and scalar correctness are separate obligations.') + +def inventory(): + w=read('bitword/selected/bit/word_p10.json.gz');k=read('kernel-selection.json');restore=read('restore-selection.json');sink=read('sink-selection.json') + removed={b for a,b in w['pairs']};regs=sorted(set(range(9120))-removed);stream={2*V+i:r for i,r in enumerate(regs)} + sinks={row['role'] for row in sink['sinks']};assert all(stream[row['stream']]==row['role'] for row in sink['sinks']) + roles=set(regs)-sinks;entrance={r:0 for r in roles};end={r:H for r in roles} + for row in w['gauges']: + if row['role'] in roles:entrance[row['role']]=row['dim'] + for row in k['pairs']+k['families']: + role=stream[row.get('pivot',row.get('a'))];assert entrance[role]==0;entrance[role]=row['rank'] + for row in restore['entries']: + role=stream[row['helper']];assert entrance[role]==row['dims'][0] and end[role]==H;end[role]=row['rank'] + residual=Counter(end[r]-entrance[r] for r in roles);gauges=Counter(x for x in entrance.values() if x) + completion=Counter(entrance[r]+H-end[r] for r in roles if entrance[r]) + for field,actual in [('residual_families',residual),('final_entrance_ranks',gauges),('completion_rank_histogram',completion)]:assert dict(actual)==pins()[field] + patterns=pins()['bank_patterns'];used=Counter() + for widths,count in patterns: + assert sum(widths)==M and count>0 + for width in widths:used[width]+=count + assert used==Counter({r:T*n for r,n in residual.items()}) + banks=sum(n for widths,n in patterns);stock=T*4*V+5*banks + assert M*banks==T*mass(residual) and banks==pins()['banks_per_stage'] and stock==pins()['literal_stock'] + return dict(physical_R=len(roles),entrance_count=sum(gauges.values()),entrance_histogram=clean(gauges),completion_histogram=clean(completion),residual_census=clean(residual),residual_rank_mass=mass(residual),banks_per_stage=banks,literal_stock=stock,packing_patterns=patterns,packing_unused_coordinates=0,scope='Role inventory and exact width packing only, no chronological bank admission.') + +def moment(histogram,m,W,a,bad=True): + lo,hi=ex.moment_interval(m,W,histogram,a) + if bad: + l,u=ex.log_interval(F(m));e,f=ex.exp_interval(a*l,a*u) + weight=F(32*m*sum(histogram.values()),10**16*W);lo+=weight*e;hi+=weight*f + return lo,hi + +def bracket(histogram,m,W,bad=True): + # Decimal proposes endpoints only. Exact rational enclosures certify both signs. + with localcontext() as ctx: + ctx.prec=65 + terms=[(Decimal(r*n)/Decimal(m)/Decimal(W.numerator)*Decimal(W.denominator),(Decimal(m)/r).ln()) for r,n in histogram.items()] + fall=Decimal(32*m*sum(histogram.values()))/10**16/Decimal(W.numerator)*Decimal(W.denominator) if bad else Decimal(0) + logm=Decimal(m).ln();low=Decimal(0);high=Decimal('.01') + for _ in range(170): + a=(low+high)/2 + if sum(p*(a*l).exp() for p,l in terms)+fall*(a*logm).exp()<1:low=a + else:high=a + tick=int((low*GRID).to_integral_value(rounding=ROUND_FLOOR)) + low=F(tick,GRID);high=low+F(1,GRID) + lm=moment(histogram,m,W,low,bad);hm=moment(histogram,m,W,high,bad) + assert lm[1]<10 + nxt=ae.direct_slacks(a,b,beta,eta,k+grid,1,rowgap);rejected=[n for n,v in nxt['slacks'].items() if v<=0];assert rejected==['g3_above_kappa'] + return dict(bit_root=root,bit_coarse=s,complex_coarse=b,complex_leaf_cap=cap,binding=binding,bootstrap_chain=chain,backoff=eta,beta=beta,strict_constraints=factored,margins=direct['margins'],kappa=k,kappa_decimal=ex.dec(k),minimum_margin=minimum,adjacent_grid_rejected=rejected,strict_constraint_count=47,scope='Exact displayed assembly conditional on the stated scalar guard, row gap and retained complex certificate.') + +def complex_certificate(): + data=read('inputs/complex/gcert1-p11-cmod-centre-mw-flow.json.gz') + assert (data['p'],data['h'],data['v'],data['R'])==(11,22,1320,9036) + local=Counter() + for component in data['blocks'].values():local.update(hist(component)) + ch=Counter({r:5*n for r,n in local.items()});ch.update({r:2640 for r in (42,21,46,4)}) + assert sum(ch.values())==351820 and mass(ch)==1571680 + m=110;W=F(14316);assert m*W-mass(ch)==3080 + root=bracket(ch,m,W);assert root['lower']==COMPLEX + plain=bracket(ch,m,W,False);assert plain['lower']==F(772714354722691,GRID) + return dict(m=m,W=W,histogram=clean(ch),calls=sum(ch.values()),rank_mass=mass(ch),deficit=3080,bad_envelope_root=root,without_bad_envelope_root=plain,scope='Histogram reconstructed from pinned declared gcert blocks, exact roots independently enclosed. Complex symbolic/physical correctness not re-proved.') + +def run(): + for name in ['math_check.py','moment.py','outer.py','raw_ledger.py','bank_template.py','word_pins.py']:read(name) + inv=inventory();histogram,profile=final_profile();complex_result=complex_certificate();W=F(inv['literal_stock'],T) + assert M*W-mass(histogram)==DEFICIT + root=bracket(histogram,M,W);outer=assembly(root['lower']) + assert root['lower']==pins()['bit_root'] and outer['kappa']==pins()['kappa'] and outer['binding']==pins()['binding'] + return dict(status='PASS_INDEPENDENT_PR320_DECLARED_ARITHMETIC',head=HEAD,physical_admission=False,all_size_theorem=False,verified_input_files=sorted(USED),inventory=inv,profile=profile,complex_certificate=complex_result,unreplicated_stock=W,normalized_stock=inv['literal_stock']//5,normalization=12,deficit=DEFICIT,bit_root_bracket=root,assembly=outer) + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions must remain enabled') + report=run();(HERE/'baseline-receipt.json').write_text(json.dumps(ae.serial(report),indent=2)+'\n') + print(json.dumps(ae.serial({k:report[k] for k in ('status','head','physical_admission','all_size_theorem')}|{'root':report['bit_root_bracket'],'kappa':report['assembly']['kappa'],'inventory':report['inventory'],'helper_histogram':report['profile']['final_helper']}),indent=2)) diff --git a/research/gen5b-shared-kernels/p10/arithmetic/test_arithmetic.py b/research/gen5b-shared-kernels/p10/arithmetic/test_arithmetic.py new file mode 100644 index 0000000000..e90bd6d16a --- /dev/null +++ b/research/gen5b-shared-kernels/p10/arithmetic/test_arithmetic.py @@ -0,0 +1,29 @@ +"""Focused portable numerical and rejection checks; supplied-source programs never run.""" +from fractions import Fraction as F +import unittest +import reproduce_p10 as b +import price_candidate as p +from finite_invoice import bill +class ArithmeticTests(unittest.TestCase): + @classmethod + def setUpClass(cls):cls.base=p.baseline() + def test_baseline(self): + self.assertEqual(self.base['assembly']['kappa'],F(384599485948493,500000000000000000)) + self.assertEqual(self.base['assembly']['strict_constraint_count'],47) + r=self.base['bit_root_bracket'];self.assertLess(r['lower_moment'][1],1);self.assertGreater(r['upper_moment'][0],1) + def test_zero_delta(self):self.assertEqual(p.price({},{})['kappa_delta'],0) + def test_complex_root(self):self.assertEqual(self.base['complex_certificate']['bad_envelope_root']['lower'],b.COMPLEX) + def test_complex_cap(self):self.assertEqual(p.price({1:-10000,2:5000},{})['assembly']['binding'],'complex') + def test_reject_nonexact(self): + for value in ({1:1.0},{True:1},{'01':1},{21:1}): + with self.assertRaises(ValueError):p.price(value,{}) + def test_reject_unbalanced(self): + with self.assertRaises(ValueError):p.price({1:1},{}) + def test_reject_negative(self): + with self.assertRaises(ValueError):p.price({1:-10**9},{20:-50000000}) + def test_candidate15(self):self.assertEqual(p.price({1:17,2:30,3:-30,4:2,5:-2},{20:-15,19:15})['assembly']['kappa'],F(192302177781107,250000000000000000)) + def test_weighted_finite_formula(self): + r=bill(658905,249085,334771,336691,R=8221) + self.assertEqual(r['coefficient'],25415456130362201) + self.assertEqual(r['coefficient_terms']['bank_selectors'],295858082400) +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/research/gen5b-shared-kernels/p10/bridge15/check_bridge.py b/research/gen5b-shared-kernels/p10/bridge15/check_bridge.py new file mode 100644 index 0000000000..139f8ba595 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/bridge15/check_bridge.py @@ -0,0 +1,195 @@ +"""Original weighted-word alias, prefix and kernel bridge check. Inert data only.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +import support +from fractions import Fraction as Q +from collections import Counter,defaultdict +import base64,gzip,hashlib,json,time +HERE=Path(__file__).resolve().parent +from source_data import SOURCE as P,OUTPUT,verify,read,read_bytes +CAND=support.HERE/'witnesses/candidate15.json' +CAND_SHA='b4c06364275f80840d8b534759b6bac0465e4d4f4b89f9e57eb4605a32dae181' +EXPECTED=dict(pivots=15,donors=17,members=32,delta={1:17,2:30,3:-30,4:2,5:-2}) +def verify_sources(): + verify() + assert hashlib.sha256(CAND.read_bytes()).hexdigest()==CAND_SHA +def rr(A): + A=[[Q(x)for x in row]for row in A];piv=[];k=0 + for j in range(20): + pivot=next((i for i in range(k,len(A))if A[i][j]),None) + if pivot is None:continue + A[k],A[pivot]=A[pivot],A[k];c=A[k][j];A[k]=[x/c for x in A[k]] + for i in range(len(A)): + if i!=k and A[i][j]: + c=A[i][j];A[i]=[x-c*y for x,y in zip(A[i],A[k])] + piv.append(j);k+=1 + return A[:k],piv +def null(B): + R,piv=rr(B);out=[] + for j in range(20): + if j in piv:continue + v=[Q(0)]*20;v[j]=1 + for i,k in enumerate(piv):v[k]=-R[i][j] + out.append(v) + return out +def run(): + verify_sources();t=time.monotonic();w=read('bitword/selected/bit/word_p10.json.gz');f={int(k):v for k,v in read('frames.json')['frames'].items()};g=read('graph.json') + ks=read('kernel-selection.json');d1=read('descent-selection.json');rest=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'] + candidate=json.loads(CAND.read_text());entries=candidate['entries'] + alias={b:a for a,b in w['pairs']};recipient={a:b for a,b in w['pairs']};regs=sorted(set(range(9120))-set(alias));ids={r:1920+i for i,r in enumerate(regs)} + sid=lambda r:ids[alias.get(r,r)];inverse={s:r for r,s in ids.items()};n=1920+len(regs);assert n==10150 + gauges={z['role']:z for z in w['gauges']};assert all(gauges[b]['dim']==17 for b in alias) + phase=w['phase1'];assert phase==sorted(phase);phase_set=set(phase);after=[i for i in range(len(w['ops']))if i not in phase_set];order=phase+after + pos={i:j for j,i in enumerate(order)};uses=defaultdict(list) + for i in order: + for r in w['ops'][i][:2]:uses[r].append(i) + adj=[{}for _ in range(9120)] + for root,r in zip(g['roots'],w['rootroles']): + for target in root['targets']:adj[r][target]=adj[r].get(target,0)+1 + for i in reversed(order): + a,b,_=w['ops'][i] + for target,c in adj[a].items():adj[b][target]=adj[b].get(target,0)+c + response=[sum(1<0 + for z in oldentries: + p=z['pivot'];value=prefix[p] + for d in z['donors']:value^=prefix[d] + assert value==0 + assert max((last[s]for s in[p]+z['donors']),key=lambda x:x[0])[1]==z['cut_read'] + # Bound the semantic common cut in the baseline raw-record coordinate. + # All initial plain compensation reads precede the first source injection. + # Old kernel setups are the only inserted pre-injection scalar events. + scalar=read_bytes('scalar/word.py').decode();assert scalar.index('for s in range(W.R):')raw_prefix_upper + active={z['virtual_pivot']for z in entries}|{d for z in entries for d in z['virtual_donors']};assert len(active)==EXPECTED['members'] and active<=eligible + pivots={z['virtual_pivot']for z in entries};donors={d for z in entries for d in z['virtual_donors']};assert len(pivots)==EXPECTED['pivots'] and len(donors)==EXPECTED['donors'] and not pivots&donors + lines={} + for z in entries: + assert z['cut_read']==lastglobal[1] + assert sid(z['virtual_pivot'])==z['pivot'] and[sid(d)for d in z['virtual_donors']]==z['donors'] + value=prefix[z['pivot']] + for d in z['donors']:value^=prefix[d] + assert value==0 + B=z['basis'];assert len(B)==1 and sum(B[0])==0 and sum(x*x for x in B[0])==2 + for r in[z['virtual_pivot']]+z['virtual_donors']: + assert r not in lines or lines[r]==B[0];lines[r]=B[0] + # Explicit formal comparison on every physical pre-compaction column; + # removed sink slots are harmless inert spectator coordinates. + def prefix_events(omit): + out=[] + for r in sorted(active-omit): + bits=prefix[sid(r)] + while bits: + bit=bits&-bits;target=bit.bit_length()-1;bits-=bit;out.append((960+target,sid(r))) + return out + q=prefix_events(set());qp=prefix_events(pivots) + setup=[(d,z['pivot'])for z in entries for d in z['donors']] + U=[(960+i,i)for i in range(960)];tail=list(reversed(q))+U + def evaluate(events): + rows=[1<1:H[d-1]+=1 + if r in donors:H[1]+=1 + pathrows.append(dict(role=r,stream=sid(r),kernel_kind='pivot'if r in pivots else'donor',entrance_basis=[lines[r]],first_frame=first,first_dimension=d,frames=path,dimensions=[f[x]['dim']for x in path],endpoint='FULL',aliased_recipient=recipient.get(r))) + if r in recipient: + b=recipient[r];receipts.append(dict(donor_role=r,recipient_role=b,physical_stream=sid(r),gauge_read_order=w['reads'][str(b)], + donor_last_order=max(pos[i]for i in uses[r]),recipient_first_order=min(pos[i]for i in uses[b]),frames=path,dimensions=[f[x]['dim']for x in path],endpoint='FULL', + first_dimension=d,literal_zero_prefix_response_bitcount=prefix[sid(r)].bit_count())) + H={r:c for r,c in sorted(H.items())if c};assert H==EXPECTED['delta'] + return dict(status='PASS_PR320_SHARED_KERNEL_ALIAS_AND_PREFIX_BRIDGE',head='e983fea0896b2a1d7355983674db7e9bb33a9e32', + candidate_sha256=hashlib.sha256(CAND.read_bytes()).hexdigest(),source_pins_sha256=hashlib.sha256((support.HERE/'inputs.json').read_bytes()).hexdigest(),checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),physical_streams_before_sink=n,weighted_matching_pairs=len(alias),plain_eligible_helpers=len(eligible),prior_conservative_helpers=len(legacy),newly_admissible_reused_helpers=len(expanded), + frozen_kernel_reused_donor_examples=len(old_reused),all_existing_reused_example_base_paths_nested=True, + old_kernel_relations_and_cut_triples_reproduced=len(oldentries),literal_prefix_plain_reads=read_count,last_plain_read=lastglobal, + all_column_formal_composition_forward_inverse=True,all_column_dimension=n,omitted_setup_and_restore_rejected=True, + selected_pivots=EXPECTED['pivots'],selected_distinct_donors=EXPECTED['donors'],selected_streams=EXPECTED['members'],selected_reused_donors=receipts, + setup_adds=sum(len(z['donors'])for z in entries),restore_adds=sum(len(z['donors'])for z in entries), + removed_initial_reads=sum(sum(c%2 for c in adj[p].values())for p in pivots),removed_initial_unit_additions=sum(sum(abs(c)for c in adj[p].values()if c%2)for p in pivots), + local_histogram_delta=H,residual_family_delta={20:-EXPECTED['pivots'],19:EXPECTED['pivots']},selected_paths=pathrows,common_cut='After all ZERO compensation reads and frozen kernel setups, before any source injection', + reorder_transport=dict(moves=133,selected_operand_overlaps=0,raw_prefix_upper=raw_prefix_upper,removed_inherited_pivot_reads=removed_old,inherited_setup_adds=old_setups,minimum_entire_interval_start=min(a for a,b in windows),maximum_entire_interval_end=max(b for a,b in windows),all_new_scalar_edits_outside_intervals=True,original_raw_crossing_contract_inherited=True,all133_raw_crossings_independently_replayed=False,proof='The new setup and deleted ZERO reads precede every entire reorder interval; the inverse layer follows the complete old word. The inherited signed ADD/COPY commutations remain valid, also with absolute coefficients. Active operands are excluded from moved gates, so their required paths are unchanged.'), + formal_scalar_identity='Let U=SQ be the inherited complete physical decoder and A=I+K the new disjoint-support shear layer. Literal physical prefix relations imply A Qprime=Q A. Since U fixes source and dirty registers and updates targets only by source-dependent values, U commutes with A and Ainv S A Qprime=U, including aliased slots. The relations above were checked on the literal initial physical columns.', + final_full_endpoints_checked=True,exact_unique_frame_containments=len(paircache), + scope='Changed-stage alias/prefix/frame and paid-demand certificate; inherited full physical decoder is a hypothesis. Fresh scalar norm, exact pricing, bank mapping and finite bill remain separate obligations.') +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + r=run();(OUTPUT/'bridge-result.json').write_text(json.dumps(r,indent=2)+'\n');print(json.dumps(r,indent=2)) diff --git a/research/gen5b-shared-kernels/p10/bridge15/check_scalar_bounds.py b/research/gen5b-shared-kernels/p10/bridge15/check_scalar_bounds.py new file mode 100644 index 0000000000..153a4d7ec9 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/bridge15/check_scalar_bounds.py @@ -0,0 +1,166 @@ +"""Original nonnegative norm transport, with conservative target-prefix bound. + +Helper updates are replayed exactly. Every target prefix ADD is majorized by +applying every target-prefix and sink batch along an exact acyclic majorant. +Deleted compression reads are restored for this upper bound. No source code +from the upstream repository is executed. +""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +import support +from collections import defaultdict,Counter +import json,sys,time,hashlib +import check_bridge +from check_bridge import read,HERE,verify_sources +from source_data import OUTPUT +def verify_inputs():verify_sources() +sys.dont_write_bytecode=True + +def suffix_build(): + w=read('bitword/selected/bit/word_p10.json.gz');g=read('graph.json');partner=read('kchron.json')['entries'] + oldrestore=read('restore-selection.json')['entries'];ks=read('kernel-selection.json');sinks=read('sink-selection.json')['sinks'] + alias={b:a for a,b in w['pairs']};regs=sorted(set(range(9120))-set(alias));physical={r:1920+i for i,r in enumerate(regs)};sid=lambda r:physical[alias.get(r,r)] + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase];sunk={z['role']for z in sinks} + byroot=defaultdict(list) + for z in partner:byroot[z['deliver_after_root']].append(z) + out=[] + for i,(r,s)in enumerate(zip(g['roots'],w['rootroles'])): + if r['kind']=='side'and s not in sunk: + for t in r['targets']:out.append((960+t,sid(s),1,'root')) + for e in byroot[i]: + out.append((e['carrier'],e['passive'],1,'partner_setup')) + for t in e['receivers']:out.append((960+t,e['carrier'],1,'partner_delivery')) + for e in partner:out.append((e['carrier'],e['passive'],-1,'partner_cleanup')) + moved={(z['helper'],z['donor']):0 for z in oldrestore} + for z in sorted(oldrestore,key=lambda z:z['helper']):out.append((z['helper'],z['donor'],z['coefficient'],'old_restore')) + for index in reversed(order): + a,b,_=w['ops'][index] + if a in sunk:continue + pair=(sid(a),sid(b)) + if pair in moved:moved[pair]+=1;continue + out.append((*pair,-1,'cleanup')) + assert all(x==1 for x in moved.values()) + for source,role in w['sources'].items():out.append((sid(role),int(source),-1,'uninject')) + entries=[dict(pivot=z['a'],donors=[z['b']])for z in ks['pairs']]+[dict(pivot=z['pivot'],donors=z['donors'])for z in ks['families']] + for z in entries: + for donor in z['donors']:out.append((donor,z['pivot'],-1,'kernel_restore')) + return 1920+len(regs),[],out,{} + +def run(candidate_path=None): + verify_inputs();start=time.monotonic();w=read('bitword/selected/bit/word_p10.json.gz');g=read('graph.json');ks=read('kernel-selection.json');target=read('target-selection.json');sinks=read('sink-selection.json')['sinks'];sink_byrole={z['role']:z for z in sinks} + candidate_path=Path(candidate_path)if candidate_path else check_bridge.CAND + witness=json.loads(candidate_path.read_text())['entries'] + oldentries=[dict(pivot=z['a'],donors=[z['b']],cut_read=z['cut_read'])for z in ks['pairs']]+[dict(pivot=z['pivot'],donors=z['donors'],cut_read=z['cut_read'])for z in ks['families']] + alias={b:a for a,b in w['pairs']};regs=sorted(set(range(9120))-set(alias));physical={r:1920+i for i,r in enumerate(regs)};sid=lambda r:physical[alias.get(r,r)] + n=1920+len(regs);phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase] + # Every inherited sink is independently tied to the literal old word. + # All seven current p10 sinks are checked, not inherited by count alone. + for z in sinks: + r=z['role'];writes=[i for i,op in enumerate(w['ops'])if op[0]==r] + assert len(writes)==z['forward_writes']==z['cleanups'] + assert not any(op[1]==r for op in w['ops']) + assert not set(writes)&phase and sid(r)==z['stream'] + roots=[i for i,q in enumerate(w['rootroles'])if q==r];assert len(roots)==1 + root=g['roots'][roots[0]];assert root['kind']=='side' + assert [960+t for t in root['targets']]==z['targets'] + assert r not in {q['role']for q in w['gauges']} and r not in w['sources'].values() + adj=[{}for _ in range(9120)] + for root,r in zip(g['roots'],w['rootroles']): + for t in root['targets']:adj[r][t]=adj[r].get(t,0)+1 + for index in reversed(order): + a,b,_=w['ops'][index] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + gauge={x['role']:x for x in w['gauges']};oldp={x['pivot']for x in oldentries};newp={x['pivot']for x in witness} + setup=defaultdict(list) + for z in oldentries:setup[tuple(z['cut_read'])].append(z) + prefix=[];hits=set() + for r in range(9120): + if r in gauge or r in sink_byrole:continue + for t,c in adj[r].items(): + if c%2: + event=(960+t,sid(r),-c) + if sid(r)not in oldp:prefix.append(event) + for z in sorted(setup.get(event,[]),key=lambda z:z['pivot']): + hits.add(z['pivot']);prefix.extend((d,z['pivot'],1)for d in z['donors']) + assert len(hits)==len(oldentries) + # Setup rank is irrelevant to scalar ordering here; the source sorts by rank + # and pivot. All factors commute because old pivot/donor sets are disjoint. + assert not oldp&{d for z in oldentries for d in z['donors']} + middle=[] + for source,r in w['sources'].items():middle.append((sid(r),int(source),1)) + for i in w['phase1']: + a,b,_=w['ops'][i];assert a not in sink_byrole;middle.append((sid(a),sid(b),1)) + for root,r in zip(g['roots'],w['rootroles']): + if root['kind']=='center':middle.extend((960+t,sid(r),1)for t in root['targets']) + at=defaultdict(list) + # The source's gauge order is reversed JSON gauge list; explicit read times + # are numbered in phase1+rest chronology. + for z in reversed(w['gauges']): + r=z['role'];at[int(w['reads'].get(str(r),len(w['phase1'])))-len(w['phase1'])].append(r) + rest=[i for i in range(len(w['ops']))if i not in phase] + for j,i in enumerate(rest): + for r in at[j]:middle.extend((960+t,sid(r),-c)for t,c in adj[r].items()if c%2) + a,b,_=w['ops'][i];middle.append((sink_byrole[a]['pivot']if a in sink_byrole else sid(a),sid(b),1)) + for r in at[len(rest)]:middle.extend((960+t,sid(r),-c)for t,c in adj[r].items()if c%2) + _,_,suffix,_=suffix_build();tail=middle+[(a,b,c)for a,b,c,tag in suffix] + newsetup=[(d,z['pivot'],1)for z in witness for d in z['donors']] + # Baseline upper word contains all uncompressed target reads. We transport + # only nonnegative increases from added new shears, ignoring new deleted reads. + allgroups=target['groups'];dependency={960+int(t):[960+p for p in ps]for z in allgroups for t,ps in z['dependent'].items()} + assert not set(dependency)&{p for ps in dependency.values()for p in ps} + # Include both setup/restore batches of every terminal sink. Acyclicity + # is checked directly rather than assuming sink and prefix supports disjoint. + edges=Counter((p,t)for t,ps in dependency.items()for p in ps) + for z in sinks: + for t in z['targets']: + if t!=z['pivot']:edges[z['pivot'],t]+=1 + target_nodes=set(x for edge in edges for x in edge);incoming=Counter(t for p,t in edges);successors=defaultdict(list) + for(p,t),multiplicity in edges.items():successors[p].append((t,2*multiplicity)) + ready=sorted(target_nodes-set(incoming));topology=[] + while ready: + p=ready.pop();topology.append(p) + for t,c in successors[p]: + incoming[t]-=1 + if not incoming[t]:ready.append(t) + assert len(topology)==len(target_nodes),'target majorant dependency cycle' + def close_target_majorant(values): + out=values[:] + for p in topology: + for t,c in successors[p]:out[t]+=c*out[p] + return out + def add(v,event): + a,b,c=event;v[a]+=abs(c)*v[b] + def bound(reverse): + # exact helper majorants for old versus sheared word, and a nonnegative + # difference; target reads are deliberately not omitted. + old=[1]*n;new=[1]*n + if not reverse: + for e in prefix:add(old,e);add(new,e) + for e in newsetup:add(new,e) + for e in tail:add(old,e);add(new,e) + for e in reversed(newsetup):add(new,e) + else: + for e in newsetup:add(new,e) + for e in reversed(tail):add(old,e);add(new,e) + for e in reversed(newsetup):add(new,e) + for e in reversed(prefix):add(old,e);add(new,e) + delta=[a-b for a,b in zip(new,old)];assert min(delta)>=0 + delta=close_target_majorant(delta) + # The old full compressed decoder bounds all its own prefixes. The helper + # paths above are exact; the full target-only acyclic graph is majorized. + pins=read('word-pins.json');inherited=pins['inverse_max_row_l1']if reverse else pins['forward_max_row_l1'] + out=inherited+max(delta) + return dict(reverse=reverse,inherited_bound=inherited,max_added_majorant=max(delta),certified_new_bound=out, + max_added_helper=max(delta[1920:]),max_added_target=max(delta[960:1920]),max_added_source=max(delta[:960])) + F,B=bound(False),bound(True);payload=64*F['certified_new_bound']**3*B['certified_new_bound']**2 + return dict(status='PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS',head='e983fea0896b2a1d7355983674db7e9bb33a9e32',selection=candidate_path.name,candidate_sha256=hashlib.sha256(candidate_path.read_bytes()).hexdigest(),checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),bridge_checker_sha256=hashlib.sha256((HERE/'check_bridge.py').read_bytes()).hexdigest(),forward=F,inverse=B, + payload_bound=payload,payload_bits=payload.bit_length(),retained_payload_cap_2_to104=payload<2**104, + cap_change='No payload-cap increase: the retained104-bit recipe bound passes.', + setup_restore_pairs=len(newsetup),max_target_prefix_degree=max(map(len,dependency.values())),target_majorant_acyclic_vertices=len(topology),target_majorant_edges=len(edges),actual_sink_redirects=sum(z['forward_writes']for z in sinks),sink_literal_words_verified=len(sinks),sink_roles=[z['role']for z in sinks], + target_majorant_proof='Targets are never read by helper/source operations. We include every target-prefix and terminal-sink setup/restore edge with its exact total multiplicity2. Their union is checked acyclic; propagating all uncompressed nonnegative increments in topological order through these weighted edges dominates every chronological placement of those ADDs. Actual sink writes are redirected, and removed sink reads/cleanup/root deliveries are absent.', + reorder_transport='This replay uses the pre-reorder actual scalar schedule. The bridge separately establishes that all new scalar edits lie outside every inherited reorder interval; signed and unsigned commutation transport these bounds to the reordered candidate. Raw crossing admission remains inherited.', + scope='Conditional on inherited old F/B, raw reorder admission and unchanged compiler; complete exact helper majorant paths are replayed, while target compression is conservatively bounded rather than reproducing record-index cut sites.') +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + r=run();(OUTPUT/'scalar-bounds-result.json').write_text(json.dumps(r,indent=2)+'\n');print(json.dumps(r,indent=2)) diff --git a/research/gen5b-shared-kernels/p10/bridge15/source_data.py b/research/gen5b-shared-kernels/p10/bridge15/source_data.py new file mode 100644 index 0000000000..a2f0fa4581 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/bridge15/source_data.py @@ -0,0 +1,9 @@ +"""Hash-verified inert inputs only; upstream programs never execute.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from support import SOURCE,HEAD,read_bytes,verify_inputs,out,read as _read +OUTPUT=out('bridge15','placeholder').parent +ALIASES={'graph.json':'bitword/selected/bit/graph_p10.json','frames.json':'bitword/selected/bit/frames_p10.json.gz','kchron.json':'bitword/selected/bit/kchron_p10.json'} +def read(name):return _read(ALIASES.get(name,name)) +def verify():return verify_inputs() diff --git a/research/gen5b-shared-kernels/p10/bridge15/test_bridge.py b/research/gen5b-shared-kernels/p10/bridge15/test_bridge.py new file mode 100644 index 0000000000..16334733b6 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/bridge15/test_bridge.py @@ -0,0 +1,63 @@ +"""Focused controls for the independently authored p10 candidate15 checker.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +import support +from unittest.mock import patch +import unittest,tempfile,json,copy,hashlib +import check_bridge as b +import check_scalar_bounds as n +class Tests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.bridge=b.run();cls.norm=n.run() + def candidate_failure(self,change): + obj=json.loads(b.CAND.read_text());change(obj) + with tempfile.TemporaryDirectory()as td: + p=Path(td)/'candidate.json';p.write_text(json.dumps(obj));s=hashlib.sha256(p.read_bytes()).hexdigest() + with patch.object(b,'CAND',p),patch.object(b,'CAND_SHA',s): + with self.assertRaises(AssertionError):b.run() + def test_pinned_census_and_payload(self): + r=self.bridge;q=self.norm + self.assertEqual((r['selected_pivots'],r['selected_distinct_donors'],r['setup_adds']),(15,17,40)) + self.assertEqual(r['local_histogram_delta'],{1:17,2:30,3:-30,4:2,5:-2}) + self.assertEqual(r['old_kernel_relations_and_cut_triples_reproduced'],775) + self.assertEqual(len(r['selected_reused_donors']),2) + self.assertEqual((q['forward']['certified_new_bound'],q['inverse']['certified_new_bound']),(49937,1194200)) + self.assertTrue(q['retained_payload_cap_2_to104']);self.assertEqual(q['payload_bits'],94) + def test_omitted_relation_donor_rejected(self): + def mutate(c):c['entries'][0]['donors'].pop();c['entries'][0]['virtual_donors'].pop() + self.candidate_failure(mutate) + def test_wrong_common_cut_rejected(self): + self.candidate_failure(lambda c:c['entries'][0]['cut_read'].__setitem__(0,960)) + def test_wrong_entrance_line_rejected(self): + self.candidate_failure(lambda c:c['entries'][0].__setitem__('basis',[[1,-1]+[0]*18])) + def test_alias_overlap_rejected(self): + original=b.read;recipient=self.bridge['selected_reused_donors'][0]['recipient_role'] + def read(name): + z=original(name) + if name.endswith('word_p10.json.gz'):z['reads'][str(recipient)]=0 + return z + with patch.object(b,'read',read): + with self.assertRaises(AssertionError):b.run() + def test_reorder_crossing_prefix_rejected(self): + original=b.read + def read(name): + z=original(name) + if name=='reorder-selection.json':z['moves'][0]['anchor']=1 + return z + with patch.object(b,'read',read): + with self.assertRaises(AssertionError):b.run() + def test_wrong_sink_target_rejected(self): + original=n.read + def read(name): + z=original(name) + if name=='sink-selection.json':z['sinks'][-1]['targets'][0]+=1 + return z + with patch.object(n,'read',read): + with self.assertRaises(AssertionError):n.run() + def test_inherited_raw_crossings_are_explicit(self): + x=self.bridge['reorder_transport'];self.assertTrue(x['original_raw_crossing_contract_inherited']) + self.assertFalse(x['all133_raw_crossings_independently_replayed']) + self.assertLess(x['raw_prefix_upper'],x['minimum_entire_interval_start']) +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/p10/certificates/check_candidate_charts.py b/research/gen5b-shared-kernels/p10/certificates/check_candidate_charts.py new file mode 100644 index 0000000000..d2c0377af5 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/certificates/check_candidate_charts.py @@ -0,0 +1,61 @@ +"""Fresh dimension20 chart programs for the fixed candidate15, no upstream execution.""" +from pathlib import Path +import sys +CODE=Path(__file__).resolve().parent +sys.path.insert(0,str(CODE.parent)) +import support +CLOSURE=support.OUTPUT/'closure' +sys.path.insert(0,str(CODE.parent/'closure')) +import hashlib,json,gzip +from collections import Counter +import chart_construction as charts +from source_contract import SOURCE,REVIEW,HEAD,verify_inputs +ROOT=support.out('certificates','placeholder').parent +BRIDGE=support.OUTPUT/'weighted' + +def run(candidate_path=None,bridge_path=None,case="weighted19"): + assert case in("weighted19","15") + candidate_path=Path(candidate_path)if candidate_path else (BRIDGE/'rebound-candidate19.json'if case=='weighted19'else support.HERE/'witnesses/candidate15.json');verify_inputs() + pins=json.loads((support.HERE/'inputs.json').read_text());row=next(x for x in pins['files']if x['path']=='bank_check.py');raw=(SOURCE/'bank_check.py.txt').read_bytes() + assert len(raw)==row['bytes'] and hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==row['git_blob'] + assert 'G=lambda a,b:9*sum(x*y for x,y in zip(a,b))-sum(a)*sum(b)'in raw.decode() + c=json.loads(candidate_path.read_text());assert c['source_head']==HEAD + assert case=='15'or c['overlay_sha256']=='25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739' + cache=json.loads(gzip.decompress((CLOSURE/'response-cache.json.gz').read_bytes()));rows=cache['roles'];f={int(k):v for k,v in json.loads(gzip.decompress((SOURCE/'bitword/selected/bit/frames_p10.json.gz').read_bytes()))['frames'].items()} + pivots={z['virtual_pivot']for z in c['entries']};donors={d for z in c['entries']for d in z['virtual_donors']};active=pivots|donors;lines={} + for z in c['entries']: + line=tuple(i for i,x in enumerate(z['basis'][0])if x) + for role in[z['virtual_pivot']]+z['virtual_donors']: + assert role not in lines or lines[role]==line;lines[role]=line + programs=[];registry={};uses=[];H=Counter() + def put(key,builder): + if key not in registry:registry[key]=len(programs);programs.append(dict(program_id=len(programs),**builder())) + return registry[key] + for role in sorted(active): + r=rows[str(role)];frame=r['first_base_use']['frame'];d=f[frame]['dim'];line=lines[role] + pid=put(('first',frame,line),lambda:dict(kind='first_frame_quotient',frame=frame,**charts.first_frame_chart(f[frame],line))) + uses.append(dict(kind='first_frame_quotient',role=role,stream=r['stream'],frame=frame,rank=d-1,program_id=pid)) + rank=19 if role in pivots else 1;kind='pivot_residual'if role in pivots else'donor_line_entrance' + pid=put(('line',line,rank),lambda:dict(kind=kind,**charts.line_chart(*line,rank))) + uses.append(dict(kind=kind,role=role,stream=r['stream'],rank=rank,program_id=pid)) + H[d]-=1 + if d>1:H[d-1]+=1 + if role in donors:H[1]+=1 + assert {k:v for k,v in H.items()if v}=={int(k):v for k,v in c['local_histogram_delta'].items()} + maxf=max(p['count']for p in programs);assert maxf<=400 + bound=max(400,maxf)+99+100;assert bound==599 + report=dict(status='PASS_FRESH_P10_CHART_PROGRAMS',source_head=HEAD,candidate_sha256=hashlib.sha256(candidate_path.read_bytes()).hexdigest(), + candidate_word_sha256=c.get('overlay_sha256'),dimension=20,metric='9I-J',metric_source_git_blob=row['git_blob'],exterior_formula='11*a-sum(a)',charts=len(programs),role_uses=uses,role_use_count=len(uses), + first_quotients=len(active),pivot_residuals=len(pivots),donor_entrances=len(donors),max_factors=maxf,max_numerator=max(p['max_numerator']for p in programs),max_denominator=max(p['max_denominator']for p in programs),normalizer_bound=bound, + factor_programs=programs,geometry_receipt_bound=False,scope='Exact rational inverse programs and first-frame inputs only. Full physical chronology, bank role assignment, scalar norms, inherited prime selection and all-size compiler admission remain separate. No all-characteristics>5 claim for dimension20 metric.') + if bridge_path: + b=json.loads(Path(bridge_path).read_text());paths={p['role']:p for p in b['selected_paths']};assert set(paths)==active + if case=='15':paths={r:dict(physical=p['stream'],frames=[p['first_frame']],dimension=p['first_dimension'])for r,p in paths.items()} + for role,p in paths.items(): + r=rows[str(role)];assert p['physical']==r['stream']and p['frames'][0]==r['first_base_use']['frame']and p['dimension']==f[p['frames'][0]]['dim'] + assert (b['overlay_sha256']==c['overlay_sha256']if case=='weighted19'else b['candidate_sha256']==report['candidate_sha256']);report.update(geometry_receipt_bound=True,bridge_receipt_sha256=hashlib.sha256(Path(bridge_path).read_bytes()).hexdigest()) + out=ROOT/(candidate_path.stem+'-charts.json');out.write_text(json.dumps(charts.base.serial(report),separators=(',',':'))+'\n') + print(json.dumps({k:v for k,v in report.items()if k not in('factor_programs','role_uses')},indent=2));return report +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + run(bridge_path=BRIDGE/'transport-result.json') diff --git a/research/gen5b-shared-kernels/p10/certificates/check_fallback.py b/research/gen5b-shared-kernels/p10/certificates/check_fallback.py new file mode 100644 index 0000000000..501e5a41cc --- /dev/null +++ b/research/gen5b-shared-kernels/p10/certificates/check_fallback.py @@ -0,0 +1,7 @@ +"""Reuse exact chart and bank verifiers for the fixed15 fallback.""" +from check_candidate_charts import run as charts,support +from check_role_banks import run as banks +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + charts(bridge_path=support.OUTPUT/'bridge15/bridge-result.json',case='15') + banks(case='15') diff --git a/research/gen5b-shared-kernels/p10/certificates/check_role_banks.py b/research/gen5b-shared-kernels/p10/certificates/check_role_banks.py new file mode 100644 index 0000000000..1c4c714737 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/certificates/check_role_banks.py @@ -0,0 +1,76 @@ +"""Fresh explicit role/replica bank-address replay for the fixed p10 candidate.""" +from pathlib import Path +import sys +CODE=Path(__file__).resolve().parent +sys.path.insert(0,str(CODE.parent)) +import support +CLOSURE=support.OUTPUT/'closure' +sys.path.insert(0,str(CODE.parent/'closure')) +from collections import Counter,defaultdict +from fractions import Fraction +import gzip,hashlib,json,struct +from source_contract import SOURCE,HEAD,verify_inputs +ROOT=support.out('certificates','placeholder').parent +BRIDGE=support.OUTPUT/'weighted' +WORD=support.OUTPUT/'matching/word_weighted892.json' +WORD_SHA='25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739' + +def read(name): + raw=(SOURCE/name).read_bytes();return json.loads(gzip.decompress(raw)if name.endswith('.gz')else raw) +def run(case="weighted19"): + assert case in("weighted19","15") + verify_inputs();cp=BRIDGE/'rebound-candidate19.json'if case=='weighted19'else support.HERE/'witnesses/candidate15.json';c=json.loads(cp.read_text());price_path=support.OUTPUT/'arithmetic'/('provisional892-candidate19-pricing.json'if case=='weighted19'else'candidate15-pricing.json');price=json.loads(price_path.read_text()) + assert case=='15'or(hashlib.sha256(WORD.read_bytes()).hexdigest()==WORD_SHA and c['overlay_sha256']==WORD_SHA) + w=json.loads(WORD.read_text())if case=='weighted19'else read('bitword/selected/bit/word_p10.json.gz');profile=read('bitword/selected/bit/profile_p10.json');R=profile['R'];v=profile['v'];h=profile['h'];assert(R,v,h)==(9120,960,20) + removed={b for a,b in w['pairs']};regs=sorted(set(range(R))-removed);physical={r:2*v+i for i,r in enumerate(regs)};inverse={s:r for r,s in physical.items()} + sinks=read('sink-selection.json')['sinks'];sunk={r['role']for r in sinks};roles=sorted(set(regs)-sunk) + entrance={r:0 for r in roles};endpoint={r:h for r in roles} + for row in w['gauges']: + if row['role']in entrance:entrance[row['role']]=row['dim'] + kernel=read('kernel-selection.json') + for row in kernel['pairs']+kernel['families']: + r=inverse[row.get('pivot',row.get('a'))];assert entrance[r]==0;entrance[r]=row['rank'] + for row in read('restore-selection.json')['entries']: + r=inverse[row['helper']];assert entrance[r]==row['dims'][0]and endpoint[r]==h;endpoint[r]=row['rank'] + for row in c['entries']: + r=row['virtual_pivot'];assert physical[r]==row['pivot']and entrance[r]==0 and endpoint[r]==h;entrance[r]=1 + widths={r:endpoint[r]-entrance[r]for r in roles};assert len(widths)==(8221 if case=="weighted19"else 8223) and min(widths.values())>0 + census=Counter(widths.values());assert dict(census)=={int(k):v for k,v in price['residual_census'].items()} + bywidth=defaultdict(list) + for r in roles:bywidth[widths[r]].append(r) + queues={width:iter((role,replica)for role in rs for replica in range(60))for width,rs in bywidth.items()} + seen=bytearray(R*60);records=[];bank=0;digest=hashlib.sha256() + for pattern in price['packing_patterns']: + assert sum(pattern['widths'])==100 + for _ in range(pattern['count']): + offset=0 + for width in pattern['widths']: + role,replica=next(queues[width]);key=60*role+replica;assert not seen[key];seen[key]=1 + assert widths[role]==width and 0<=offsetIIIII',*row));offset+=width + assert offset==100;bank+=1 + assert bank==price['banks_per_stage']==(85701 if case=="weighted19"else 85707) + assert len(records)==sum(seen)==len(roles)*60==(493260 if case=="weighted19"else 493380) + for width,q in queues.items():assert next(q,None)is None + assert all(seen[60*r+i]for r in roles for i in range(60)) + assert 60*4*v+5*bank==price['literal_stock']==(658905 if case=="weighted19"else 658935) + assert Fraction(price['literal_stock'],60)==Fraction(price['unreplicated_stock']) + label='weighted892-candidate19'if case=='weighted19'else'candidate15' + output=ROOT/(label+'-bank-addresses.bin.gz') + with gzip.GzipFile(filename=str(output),mode='wb',mtime=0)as stream: + for row in records:stream.write(struct.pack('>IIIII',*row)) + allstages=hashlib.sha256() + for stage in range(5): + lo,hi=stage*bank,(stage+1)*bank + for role,replica,b,offset,width in records: + address=lo+b;assert lo<=addressIIIIII',stage,role,replica,address,offset,width)) + report=dict(status='PASS_EXPLICIT_P10_ROLE_BANK_ASSIGNMENT',source_head=HEAD,candidate_sha256=hashlib.sha256(cp.read_bytes()).hexdigest(),pricing_sha256=hashlib.sha256(price_path.read_bytes()).hexdigest(), + candidate_word_sha256=WORD_SHA if case=='weighted19'else None,physical_R=len(roles),replicas=60,stages=5,assignments_per_stage=len(records),total_assignments=5*len(records),banks_per_stage=bank,total_banks=5*bank,literal_stock=price['literal_stock'],unreplicated_stock=price['unreplicated_stock'],residual_census=dict(sorted(census.items())), + all_blocks_full=True,all_role_replica_pairs_exactly_once=True,stage_bank_ranges_disjoint=True, + one_stage_table_format='Big-endian uint32 rows:role,replica,bank,coordinate_start,width. Stages translate bank by stage*banks_per_stage.', + one_stage_table_uncompressed_sha256=digest.hexdigest(),five_stage_assignment_sha256=allstages.hexdigest(),compressed_table_sha256=hashlib.sha256(output.read_bytes()).hexdigest(), + scope='Complete integer inventory/address binding. Reuse of these bank coordinates throughout the physical word remains under the separately checked source/frame and inherited bank/compiler interfaces.') + (ROOT/(label+'-bank-receipt.json')).write_text(json.dumps(report,indent=2)+'\n');print(json.dumps(report,indent=2));return report +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + run() diff --git a/research/gen5b-shared-kernels/p10/certificates/check_seam_charts.py b/research/gen5b-shared-kernels/p10/certificates/check_seam_charts.py new file mode 100644 index 0000000000..fe693851f9 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/certificates/check_seam_charts.py @@ -0,0 +1,67 @@ +"""New exact rank-projector charts for the 73 changed weighted892 alias seams. +Only our authored rational routines execute; pinned upstream sources are inert. +""" +from pathlib import Path +import sys,gzip,json,hashlib +from fractions import Fraction as Q +from collections import Counter +CODE=Path(__file__).resolve().parent +sys.path.insert(0,str(CODE.parent)) +import support +ROOT=support.out('certificates','placeholder').parent +CLOSURE=support.OUTPUT/'closure' +sys.path.insert(0,str(CODE.parent/'closure')) +import chart_rational as rat +from chart_construction import gram +from source_contract import SOURCE,HEAD,verify_inputs +PARAM=support.OUTPUT/'matching' +WORD_SHA='25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739' +def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest() +def basis(frame):return frame.get('b')or rat.nullspace(frame['a']) +def ann(frame):return frame.get('a')or rat.nullspace(frame['b']) +def chart(D,E): + BD=basis(D);AE=ann(E) + assert len(BD)==D['dim'] and len(AE)==20-E['dim'] + assert all(sum(a*b for a,b in zip(x,y))==0 for x in AE for y in BD) + # E intersect D-perp is precisely the image of P_E-P_D. + gd=[[9*x-sum(row)for x in row]for row in BD] + residual=rat.nullspace(AE+gd) + outside=[rat.primitive([11*x-sum(a)for x in a])for a in AE] + rank=E['dim']-D['dim'];assert len(residual)==rank>=0 + assert all(gram(a,b)==0 for a in residual for b in BD+outside) + assert all(gram(a,b)==0 for a in BD for b in outside) + columns=residual+BD+outside + assert len(columns)==20 and len(rat.rref(columns)[1])==20 + B=[list(row)for row in zip(*columns)];f=rat.factor(B) + assert f['count']<=400 and max(f['max_numerator'],f['max_denominator'])<2**80 + # Reconstruct inverse from the exact elimination program and check both products. + inv=[[Q(i==j)for j in range(20)]for i in range(20)] + for op,i,j,q in f['factors']: + if op=='swap':inv[i],inv[j]=inv[j],inv[i] + elif op=='scale':inv[i]=[x*q for x in inv[i]] + else:inv[i]=[x+q*y for x,y in zip(inv[i],inv[j])] + for L,R in ((B,inv),(inv,B)): + assert all(sum(L[i][k]*R[k][j]for k in range(20))==int(i==j)for i in range(20)for j in range(20)) + return dict(rank=rank,donor_dimension=D['dim'],recipient_dimension=E['dim'],basis_columns=columns,inverse=inv,**f) +def run(): + verify_inputs();word=PARAM/'word_weighted892.json';seams_path=PARAM/'scalar_and_seams892.json' + assert sha(word)==WORD_SHA + s=json.loads(seams_path.read_text());assert s['candidate_word_sha256']==WORD_SHA and s['changed_pairs']==73 + frames_path=SOURCE/'bitword/selected/bit/frames_p10.json.gz' + frames={int(k):v for k,v in json.loads(gzip.decompress(frames_path.read_bytes()))['frames'].items()} + programs=[];ids={};uses=[] + for row in s['seams']: + key=(row['donor_end_frame'],row['recipient_gauge_frame']) + if key not in ids: + ids[key]=len(programs);programs.append(dict(program_id=len(programs),donor_end_frame=key[0],recipient_gauge_frame=key[1],**chart(frames[key[0]],frames[key[1]]))) + p=programs[ids[key]];assert p['rank']==row['transition_rank'] + uses.append(dict(donor=row['donor'],recipient=row['recipient'],stream=row['physical_stream'],read_order=row['read_order'],rank=p['rank'],program_id=ids[key])) + report=dict(status='PASS_EXACT_CHANGED_ALIAS_SEAM_CHARTS',source_head=HEAD,candidate_word_sha256=WORD_SHA,frames_sha256=sha(frames_path),seam_receipt_sha256=sha(seams_path), + dimension=20,metric='9I-J',exterior_formula='11*a-sum(a)',changed_seams=len(uses),distinct_programs=len(programs),positive_rank_seams=sum(x['rank']>0 for x in uses),rank_census=dict(Counter(x['rank']for x in uses)), + max_chart_factors=max(x['count']for x in programs),max_numerator=max(x['max_numerator']for x in programs),max_denominator=max(x['max_denominator']for x in programs),retained_chart_bound=400,retained_normalizer_bound=599, + exact_inverse_replayed=True,role_uses=uses,factor_programs=programs,scope='Exact new interior projector charts only. No all-characteristics claim: retained prime selection and compiler interfaces are inherited. Physical kernel/target/reorder chronology and finite billing are bound separately.') + out=ROOT/'weighted892-seam-charts.json';out.write_text(json.dumps(rat.serial(report),separators=(',',':'))+'\n') + print(json.dumps({k:v for k,v in report.items()if k not in('role_uses','factor_programs')},indent=2));return report +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + run() diff --git a/research/gen5b-shared-kernels/p10/certificates/test_certificates.py b/research/gen5b-shared-kernels/p10/certificates/test_certificates.py new file mode 100644 index 0000000000..988574270b --- /dev/null +++ b/research/gen5b-shared-kernels/p10/certificates/test_certificates.py @@ -0,0 +1,32 @@ +"""Changed-path exact chart and complete bank-assignment controls.""" +import unittest,json,gzip,copy,hashlib,struct +from fractions import Fraction as Q +from check_seam_charts import ROOT,SOURCE,chart,gram +class CertificateTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.f={int(k):v for k,v in json.loads(gzip.decompress((SOURCE/'bitword/selected/bit/frames_p10.json.gz').read_bytes()))['frames'].items()} + def test_two_original_dropped_seams(self): + for frame in (53130,53190):self.assertEqual(chart(self.f[frame],self.f[14583])['rank'],14) + def test_zero_seam_is_zero_rank(self): + p=chart(self.f[14583],self.f[14583]);self.assertEqual(p['rank'],0) + def test_false_rank_rejected(self): + bad=copy.deepcopy(self.f[14583]);bad['dim']-=1 + with self.assertRaises(AssertionError):chart(self.f[53130],bad) + def test_reverse_containment_rejected(self): + with self.assertRaises(AssertionError):chart(self.f[14583],self.f[53130]) + def test_bank_stream_digest(self): + p=json.loads((ROOT/'weighted892-candidate19-bank-receipt.json').read_text());raw=gzip.decompress((ROOT/'weighted892-candidate19-bank-addresses.bin.gz').read_bytes()) + self.assertEqual(hashlib.sha256(raw).hexdigest(),p['one_stage_table_uncompressed_sha256']);self.assertEqual(len(raw),493260*20) + self.assertEqual(p['total_assignments'],5*8221*60);self.assertEqual(p['literal_stock'],60*4*960+5*p['banks_per_stage']) + def test_all_positive_seam_programs_replay(self): + p=json.loads((ROOT/'weighted892-seam-charts.json').read_text());self.assertEqual(p['positive_rank_seams'],43) + for c in p['factor_programs']: + A=[[Q(x)for x in row]for row in zip(*c['basis_columns'])] + for op,i,j,q in c['factors']: + q=Q(q) + if op=='swap':A[i],A[j]=A[j],A[i] + elif op=='scale':A[i]=[q*x for x in A[i]] + else:A[i]=[x+q*y for x,y in zip(A[i],A[j])] + self.assertEqual(A,[[int(i==j)for j in range(20)]for i in range(20)]) +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/p10/closure/build_cache.py b/research/gen5b-shared-kernels/p10/closure/build_cache.py new file mode 100644 index 0000000000..232c273481 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/closure/build_cache.py @@ -0,0 +1,59 @@ +"""New signed-adjoint and literal initial-read cache from pinned inert word data.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +import gzip,json,hashlib +from collections import defaultdict,Counter +from source_contract import ROOT,SOURCE as S,verify_inputs +OUTPUT=ROOT +OUTPUT.mkdir(parents=True,exist_ok=True) +def read(n): + b=(S/n).read_bytes() + return json.loads(gzip.decompress(b)if n.endswith('.gz')else b) +def run(): + verify_inputs();w=read('bitword/selected/bit/word_p10.json.gz');g=read('bitword/selected/bit/graph_p10.json');frames=read('bitword/selected/bit/frames_p10.json.gz')['frames'];ks=read('kernel-selection.json') + R=read('bitword/selected/bit/profile_p10.json')['R'];v=g['v'];h=g['h'];assert(R,v,h)==(9120,960,20) + alias={b:a for a,b in w['pairs']};recipient={a:b for a,b in w['pairs']};regs=sorted(set(range(R))-alias.keys());phys={r:2*v+i for i,r in enumerate(regs)};inverse={s:r for r,s in phys.items()} + sid=lambda r:phys[alias.get(r,r)] + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase] + adj=[{}for _ in range(R)] + for root,r in zip(g['roots'],w['rootroles']): + for t in root['targets']:adj[r][t]=adj[r].get(t,0)+1 + for i in reversed(order): + a,b,_=w['ops'][i] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + masks=[sum(1<=0 is x_i=x_j. + residual = base.nullspace(ann + [v]) + assert len(residual) == d - 1 + # (9I-J)^(-1) a is proportional to 11*a-sum(a). + exterior = [base.primitive([11 * x - sum(row) for x in row]) for row in ann] + assert len(exterior) == 20 - d + assert all(sum(a * b for a, b in zip(row, col)) == 0 + for row in ann for col in residual + [v]) + assert all(gram(col, other) == 0 for col in residual + [v] for other in exterior) + out = checked_chart(residual + [v] + exterior, d - 1) + out.update(first_dimension=d, line=line) + return out + + diff --git a/research/gen5b-shared-kernels/p10/closure/chart_rational.py b/research/gen5b-shared-kernels/p10/closure/chart_rational.py new file mode 100644 index 0000000000..1d54b18d1c --- /dev/null +++ b/research/gen5b-shared-kernels/p10/closure/chart_rational.py @@ -0,0 +1,64 @@ +"""Our previously authored pure rational chart helpers, adapted to dimension20 for this fixed p10 candidate. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as F +from math import gcd,lcm +def rref(A): + A=[[F(x)for x in row]for row in A];piv=[] + for j in range(len(A[0])if A else 0): + q=next((i for i in range(len(piv),len(A))if A[i][j]),None) + if q is None:continue + i=len(piv);A[i],A[q]=A[q],A[i];v=A[i][j];A[i]=[x/v for x in A[i]] + for k in range(len(A)): + if k!=i and A[k][j]: + v=A[k][j];A[k]=[a-v*b for a,b in zip(A[k],A[i])] + piv.append(j) + if len(piv)==len(A):break + return A,piv + + +def primitive(v): + d=lcm(*(F(x).denominator for x in v));v=[int(F(x)*d)for x in v];g=gcd(*v) + assert g;return [x//g for x in v] + + +def nullspace(A,n=20): + R,piv=rref(A);out=[] + for free in range(n): + if free in piv:continue + v=[F(0)]*n;v[free]=1 + for i,j in enumerate(piv):v[j]=-R[i][free] + out.append(primitive(v)) + return out + + +def factor(B): + n=len(B);A=[[F(x)for x in row]for row in B];ops=[];det=F(1) + for j in range(n): + pivot=next(i for i in range(j,n)if A[i][j]) + if pivot!=j:A[pivot],A[j]=A[j],A[pivot];ops.append(('swap',j,pivot,F(1)));det=-det + v=A[j][j];det*=v + if v!=1:A[j]=[x/v for x in A[j]];ops.append(('scale',j,j,1/v)) + for i in range(n): + if i!=j and A[i][j]: + q=-A[i][j];A[i]=[x+q*y for x,y in zip(A[i],A[j])];ops.append(('add',i,j,q)) + assert A==[[int(i==j)for j in range(n)]for i in range(n)] + # Independently replay inverse operations from I and recover B. + C=[[F(i==j)for j in range(n)]for i in range(n)] + for kind,i,j,q in reversed(ops): + if kind=='swap':C[i],C[j]=C[j],C[i] + elif kind=='scale':C[i]=[x/q for x in C[i]] + else:C[i]=[x-q*y for x,y in zip(C[i],C[j])] + assert C==B + return dict(determinant=det,factors=ops,count=len(ops), + max_numerator=max((abs(q.numerator)for kind,i,j,q in ops),default=1), + max_denominator=max((q.denominator for kind,i,j,q in ops),default=1)) + + +def serial(x): + if isinstance(x,F):return str(x) + if isinstance(x,dict):return {str(k):serial(v)for k,v in x.items()} + if isinstance(x,(list,tuple)):return [serial(v)for v in x] + return x + + diff --git a/research/gen5b-shared-kernels/p10/closure/combine_screen.py b/research/gen5b-shared-kernels/p10/closure/combine_screen.py new file mode 100644 index 0000000000..698c9d46a9 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/closure/combine_screen.py @@ -0,0 +1,32 @@ +"""Deterministic disjoint unions of the already completed190-line screen only.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from collections import Counter,defaultdict +from itertools import product +import json,hashlib +from support import OUTPUT +R=OUTPUT/'closure' +rows=json.loads((R/'positive-candidates.json').read_text());groups=defaultdict(list) +for z in rows: + k=tuple(z['line']);signature=sorted((p['pivot'],tuple(p['donors']))for p in z['relations']) + if not any(signature==sorted((p['pivot'],tuple(p['donors']))for p in old['relations'])for old in groups[k]):groups[k].append(z) +assert set(groups)=={(8,9),(12,13),(16,17)} +candidates=[] +for choices in product(*[[None]+groups[k]for k in sorted(groups)]): + selected=[x for x in choices if x] + if not selected:continue + active=set();okay=True;H=Counter() + for z in selected: + roles={p['pivot']for p in z['relations']}|{d for p in z['relations']for d in p['donors']} + if active&roles:okay=False;break + active|=roles;H.update({int(k):v for k,v in z['local_histogram_delta'].items()}) + if not okay:continue + n=sum(z['pivots']for z in selected);donors=sum(z['donors']for z in selected);score=sum(z['finite_exponent_surrogate_delta']for z in selected) + assert sum(k*v for k,v in H.items())==-n + candidates.append(dict(pivots=n,donors=donors,members=len(active),mod5=n%5,finite_exponent_surrogate_delta=score,local_histogram_delta={k:v for k,v in sorted(H.items())if v},setup_pairs=sum(z['setup_pairs']for z in selected),groups=selected)) +candidates.sort(key=lambda z:(z['finite_exponent_surrogate_delta'],z['setup_pairs'],z['pivots'])) +(R/'disjoint-union-candidates.json').write_text(json.dumps(candidates,indent=2)+'\n') +best={str(k):next((z for z in candidates if z['mod5']==k),None)for k in range(5)} +(R/'best-residue-unions.json').write_text(json.dumps(best,indent=2)+'\n') +print(json.dumps({'declared_positive_lines':len(groups),'disjoint_combinations':len(candidates),'best':{k:({a:b for a,b in v.items()if a!='groups'}if v else None)for k,v in best.items()}},indent=2)) diff --git a/research/gen5b-shared-kernels/p10/closure/emit_candidates.py b/research/gen5b-shared-kernels/p10/closure/emit_candidates.py new file mode 100644 index 0000000000..55eed54bf8 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/closure/emit_candidates.py @@ -0,0 +1,19 @@ +"""Emit fixed witness objects from the bounded, already completed screen.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from collections import Counter +import gzip,json,hashlib +from source_contract import ROOT,HEAD +R=ROOT +cache=json.loads(gzip.decompress((R/'response-cache.json.gz').read_bytes()));roles=cache['roles'];best=json.loads((R/'best-residue-unions.json').read_text()) +for residue,label in [('0','candidate15'),('4','candidate19-residue4')]: + selected=best[residue];entries=[] + for group in selected['groups']: + i,j=group['line'];basis=[int(k==i)-int(k==j)for k in range(20)] + for row in group['relations']: + p=row['pivot'];ds=row['donors'] + entries.append(dict(virtual_pivot=p,virtual_donors=ds,pivot=roles[str(p)]['stream'],donors=[roles[str(d)]['stream']for d in ds],rank=1,basis=[basis],cut_read=cache['last_plain_read']['scalar'],line=[i,j])) + assert len(entries)==selected['pivots'] + out=dict(source_head=HEAD,selection=label,pivots=len(entries),entries=entries,local_histogram_delta=selected['local_histogram_delta'],residual_family_delta={20:-len(entries),19:len(entries)},distinct_donors=selected['donors'],scalar_setup_pairs=selected['setup_pairs'],physical_members=selected['members'],rank_residue_mod5=int(residue),source_cache_sha256=hashlib.sha256((R/'response-cache.json.gz').read_bytes()).hexdigest(),physical_admission=False,scope='Exact shared response witness only. Candidate15 has a divisible rank census; candidate19 requires a separately admitted residual-rank correction before bank/pricing admission. Both require full frame/alias/scalar/chart/finite checks.') + raw=(json.dumps(out,indent=2)+'\n').encode();(R/(label+'.json')).write_bytes(raw);print(label,len(entries),hashlib.sha256(raw).hexdigest()) diff --git a/research/gen5b-shared-kernels/p10/closure/search_closure.py b/research/gen5b-shared-kernels/p10/closure/search_closure.py new file mode 100644 index 0000000000..e0f3ed043a --- /dev/null +++ b/research/gen5b-shared-kernels/p10/closure/search_closure.py @@ -0,0 +1,165 @@ +"""Bounded190-line/two-order screen, fully charging donor activations. + +Integer maxflow optimizes a rounded finite-exponent moment surrogate. Exact +candidate pricing and physical admission remain separate checks. +""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from collections import defaultdict,Counter,deque +from itertools import combinations +from fractions import Fraction as Q +import gzip,json,math,time,hashlib +from source_contract import ROOT,SOURCE,HEAD,verify_inputs + +def read(name): + raw=(SOURCE/name).read_bytes();return json.loads(gzip.decompress(raw)if name.endswith('.gz')else raw) +def annihilator(frame): + if 'a'in frame:return frame['a'] + A=[[Q(x)for x in row]for row in frame['b']];piv=[];k=0 + for j in range(20): + p=next((i for i in range(k,len(A))if A[i][j]),None) + if p is None:continue + A[k],A[p]=A[p],A[k];d=A[k][j];A[k]=[x/d for x in A[k]] + for i in range(len(A)): + if i!=k: + d=A[i][j] + if d:A[i]=[x-d*y for x,y in zip(A[i],A[k])] + piv.append(j);k+=1 + out=[] + for j in range(20): + if j in piv:continue + v=[Q(0)]*20;v[j]=1 + for i,p in enumerate(piv):v[p]=-A[i][j] + out.append(v) + assert len(piv)==frame['dim'] + return out +def closure(pivots,dimension,phi,entrance=1): + """Exact max flow for the declared 10^9-rounded integer surrogate weights.""" + ds=sorted({d for z in pivots for d in z['donors']});di={d:i for i,d in enumerate(ds)} + np=len(pivots);nd=len(ds);source=np+nd;sink=source+1;N=sink+1;G=[[]for _ in range(N)] + benefit=[round((phi(dimension[z['pivot']])-phi(dimension[z['pivot']]-entrance))*10**9)for z in pivots] + cost=[round((phi(entrance)+phi(dimension[d]-entrance)-phi(dimension[d]))*10**9)for d in ds] + assert min(benefit,default=0)>=0 and min(cost,default=0)>=0 + infinity=sum(benefit)+sum(cost)+1 + def edge(a,b,c):G[a].append([b,c,len(G[b])]);G[b].append([a,0,len(G[a])-1]) + for i,b in enumerate(benefit): + edge(source,i,b) + for d in pivots[i]['donors']:edge(i,np+di[d],infinity) + for i,c in enumerate(cost):edge(np+i,sink,c) + flow=0 + while True: + levels=[-1]*N;levels[source]=0;q=deque([source]) + while q: + a=q.popleft() + for b,c,rev in G[a]: + if c and levels[b]<0:levels[b]=levels[a]+1;q.append(b) + if levels[sink]<0:break + at=[0]*N + def dfs(a,push): + if a==sink:return push + while at[a]=1920} + first={r:z['first_base_use']['frame']for r,z in rows.items()if z['first_base_use']} + baseeligible=[r for r,z in rows.items()if not z['is_gauge']and r not in sunk|sources and z['stream']not in members|descended|restored and r in first and z['initial_read_count']>0] + eligible=[r for r in baseeligible if rows[r]['stream']not in reordered] + byframe=defaultdict(list) + for r in eligible:byframe[first[r]].append(r) + groups={pair:[]for pair in combinations(range(20),2)} + for frame,roles in byframe.items(): + A=annihilator(f[frame]);columns=defaultdict(list) + for j in range(20):columns[tuple(row[j]for row in A)].append(j) + for same in columns.values(): + for pair in combinations(same,2):groups[pair]+=roles + a=769791094751301/10**18;m=100 + # Subtracting linear rank accounts for the equal width-stock decrease. + # The exact same per-call fallback term is included for every positive child. + bad=32*m*m/10**16*math.exp(a*math.log(m))/a + phi=lambda r:0 if not r else r*math.expm1(a*math.log(m/r))/a+bad + results=[];candidates=[] + for ordername in ('role_ascending','dimension_descending_then_role'): + for line,rs in groups.items(): + dimensions={r:f[first[r]]['dim']for r in rs} + rs=sorted(rs,key=(lambda r:r)if ordername=='role_ascending'else(lambda r:(-dimensions[r],r))) + basis={};donors=[];relations=[] + for role in rs: + value=response[role];co=0 + while value: + k=value.bit_length()-1 + if k not in basis: + j=len(donors);donors.append(role);basis[k]=(value,co^(1<>j&1] + assert ds + x=response[role] + for d in ds:x^=response[d] + assert x==0 + relations.append(dict(pivot=role,donors=ds)) + chosen,profit=closure(relations,dimensions,phi) + variants=[] + # Retain one explicit endpoint for each residue, rather than dropping all + # nonzero residues. At most four deterministic marginal removals, no new bases. + for removals in range(min(4,len(chosen))+1): + used={d for z in chosen for d in z['donors']};active={z['pivot']for z in chosen}|used;H=Counter() + for role in active: + d=dimensions[role];H[d]-=1 + if d>1:H[d-1]+=1 + H[1]+=len(used);H={r:n for r,n in sorted(H.items())if n};score=sum(n*phi(r)for r,n in H.items()) + assert sum(r*n for r,n in H.items())==-len(chosen) + row=dict(order=ordername,line=list(line),pivots=len(chosen),donors=len(used),members=len(active),mod5=len(chosen)%5,removed_for_residue=removals,local_histogram_delta=H,finite_exponent_surrogate_delta=score,setup_pairs=sum(len(z['donors'])for z in chosen),reused_donor_members=sum('reuse'in rows[r]for r in active)) + variants.append(row) + if chosen and score<0: + candidates.append(dict(**row,relations=chosen[:])) + if not chosen or removals==4:break + uses=Counter(d for z in chosen for d in z['donors']) + def margin(z): + benefit=phi(dimensions[z['pivot']])-phi(dimensions[z['pivot']]-1) + released=sum(phi(1)+phi(dimensions[d]-1)-phi(dimensions[d])for d in z['donors']if uses[d]==1) + return benefit-released + drop=min(range(len(chosen)),key=lambda i:(margin(chosen[i]),chosen[i]['pivot'])) + chosen=chosen[:drop]+chosen[drop+1:] + results.append(dict(order=ordername,line=list(line),helpers=len(rs),response_rank=len(donors),nullity=len(relations),rounded_closure_profit=profit,variants=variants)) + def key(z):return(z['finite_exponent_surrogate_delta'],z['line'],z['order']) + candidates.sort(key=key) + summary=dict(status='COMPLETE_BOUNDED_190_LINE_TWO_ORDER_SCREEN',source_head=HEAD, + eligible_before_reorder_guard=len(baseeligible),eligible_after_reorder_guard=len(eligible),eligible_reused_physical_donors=sum('reuse'in rows[r]for r in eligible),reorder_guard_excluded=len(baseeligible)-len(eligible), + lines=190,donor_orders=2,basis_screens=len(results),nonzero_nullity_screens=sum(r['nullity']>0 for r in results),positive_variants=len(candidates), + positive_mod0=sum(z['mod5']==0 for z in candidates),best_by_residue={str(k):next(({a:b for a,b in z.items()if a!='relations'}for z in candidates if z['mod5']==k),None)for k in range(5)}, + cache_sha256=hashlib.sha256((ROOT/'response-cache.json.gz').read_bytes()).hexdigest(),source_inputs=pins, + scope='Unused physical slots only, including reuse donors; all installed/descended/restored/sink/source/gauged and conservatively all moved reorder operand slots excluded.190 coordinate contrasts, two fixed basis orders and at most four marginal removals per closure. Full donor activation costs and finite-exponent fallback-call terms included. Positive rounded surrogate is not exact pricing or physical admission.') + (ROOT/'screen-summary.json').write_text(json.dumps(summary,indent=2)+'\n') + (ROOT/'line-receipts.json').write_text(json.dumps(results,indent=2)+'\n') + (ROOT/'positive-candidates.json').write_text(json.dumps(candidates,indent=2)+'\n') + print(json.dumps({k:v for k,v in summary.items()if k not in('source_inputs',)},indent=2));return summary +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + run() diff --git a/research/gen5b-shared-kernels/p10/closure/source_contract.py b/research/gen5b-shared-kernels/p10/closure/source_contract.py new file mode 100644 index 0000000000..6a12360f3b --- /dev/null +++ b/research/gen5b-shared-kernels/p10/closure/source_contract.py @@ -0,0 +1,8 @@ +"""Portable source contract for the fixed bounded screen.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from support import SOURCE,HEAD,verify_inputs,OUTPUT,HERE +ROOT=OUTPUT/'closure' +ROOT.mkdir(parents=True,exist_ok=True) +REVIEW=HERE diff --git a/research/gen5b-shared-kernels/p10/closure/test_closure.py b/research/gen5b-shared-kernels/p10/closure/test_closure.py new file mode 100644 index 0000000000..88d0bf3da4 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/closure/test_closure.py @@ -0,0 +1,65 @@ +"""Bounded closure regressions; all data is inert and all executed code authored.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from collections import Counter +from itertools import combinations +from fractions import Fraction +import copy,gzip,json,math,unittest +import search_closure as s +from support import OUTPUT +R=OUTPUT/'closure' + +def check_witness(witness,cache): + rows=cache['roles'];pivots={e['virtual_pivot']for e in witness['entries']};donors={d for e in witness['entries']for d in e['virtual_donors']};H=Counter() + assert len(pivots)==len(witness['entries'])==witness['pivots']and not pivots&donors + frames={int(k):v for k,v in s.read('bitword/selected/bit/frames_p10.json.gz')['frames'].items()} + for e in witness['entries']: + p=e['virtual_pivot'];ds=e['virtual_donors'];assert e['pivot']==rows[str(p)]['stream'] and e['donors']==[rows[str(d)]['stream']for d in ds] + value=int(rows[str(p)]['response_hex'],16) + for d in ds:value^=int(rows[str(d)]['response_hex'],16) + assert value==0 and ds + assert e['cut_read']==cache['last_plain_read']['scalar'] + line=e['basis'];assert len(line)==1 and len(line[0])==20 and sorted(x for x in line[0]if x)==[-1,1] + for role in [p]+ds: + frame=frames[rows[str(role)]['first_base_use']['frame']];A=s.annihilator(frame) + assert all(sum(a*b for a,b in zip(z,line[0]))==0 for z in A) + for r in pivots|donors: + d=frames[rows[str(r)]['first_base_use']['frame']]['dim'];H[d]-=1 + if d>1:H[d-1]+=1 + H[1]+=len(donors);assert {k:v for k,v in H.items()if v}=={int(k):v for k,v in witness['local_histogram_delta'].items()} + assert sum(k*v for k,v in H.items())==-len(pivots) + assert witness['distinct_donors']==len(donors)and witness['scalar_setup_pairs']==sum(len(e['donors'])for e in witness['entries']) + return True +class ClosureTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.cache=json.loads(gzip.decompress((R/'response-cache.json.gz').read_bytes()));cls.w=json.loads((R/'candidate15.json').read_text()) + def test_01_all_source_pins(self):self.assertEqual(len(s.verify_inputs()),40) + def test_02_fixed_scope(self): + z=json.loads((R/'screen-summary.json').read_text());self.assertEqual((z['lines'],z['donor_orders'],z['basis_screens']),(190,2,380));self.assertEqual(z['eligible_after_reorder_guard'],4291) + def test_03_witness_and_activation_count(self):self.assertTrue(check_witness(self.w,self.cache)) + def test_04_wrong_mapping_rejected(self): + z=copy.deepcopy(self.w);z['entries'][0]['pivot']+=1 + with self.assertRaises(AssertionError):check_witness(z,self.cache) + def test_05_omitted_donor_rejected(self): + z=copy.deepcopy(self.w);z['entries'][0]['virtual_donors'].pop();z['entries'][0]['donors'].pop() + with self.assertRaises(AssertionError):check_witness(z,self.cache) + def test_06_missed_activation_rejected(self): + z=copy.deepcopy(self.w);z['local_histogram_delta']['1']-=1 + with self.assertRaises(AssertionError):check_witness(z,self.cache) + def test_07_residues_retained(self): + z=json.loads((R/'best-residue-unions.json').read_text());self.assertEqual(set(z),set(map(str,range(5)))) + for k,w in z.items():self.assertEqual(w['pivots']%5,int(k)) + self.assertEqual(z['4']['pivots'],19) + def test_08_maxflow_matches_complete_subset_enumeration(self): + dimensions={0:3,1:3,2:5,3:3,4:5,5:3,6:5};phi=lambda r:r*math.log(100/r)if r else 0 + relations=[dict(pivot=0,donors=[3,4]),dict(pivot=1,donors=[3,5]),dict(pivot=2,donors=[4,5,6])] + for n in range(1,4): + rel=relations[:n];chosen,profit=s.closure(rel,dimensions,phi) + def invoice(xs): + used={d for e in xs for d in e['donors']} + return sum(round((phi(dimensions[e['pivot']])-phi(dimensions[e['pivot']]-1))*10**9)for e in xs)-sum(round((phi(1)+phi(dimensions[d]-1)-phi(dimensions[d]))*10**9)for d in used) + best=max(invoice([e for i,e in enumerate(rel)if mask>>i&1])for mask in range(1<lastcopy] + return badtrace,anchortrace,bad,incidences + ot,oa,ob,oii=traces(A,IA,oi);nt,nn,nbr,nii=traces(B,IB,ni) + assert ot==nt,('new noncommuting crossing',z['record']) + assert oa==nn,('anchor event sequence changed',z['record']) + assert oi>IA[5]and ni>IB[5] + receipts.append(dict(old_record=z['record'],old_anchor=z['anchor'],side=z['side'],precompact_incidence=[a,b,c],moved_semantic_event=A[oi][-1],old_scalar_event_index=oi,new_scalar_event_index=ni,postprefix_anchor_incidence_count=len(oa),noncommuting_event_count=len(ot),all_anchor_candidates_semantically_preserved=True,noncommuting_trace_and_relative_position_identical=True)) + # The only time-relocated pre-existing semantic events are singleton gauge + # compensations9118/9119. Verify their endpoints miss all moved operands. + late=[r for r in B if r[-1][0]=='gauge'and r[-1][1]in(9118,9119)];assert len(late)==2 + assert all(not{r[1],r[2]}&allports for r in late) + out=dict(status='PASS_ALL133_SEMANTIC_ANCHOR_AND_COMMUTATION_TRACES',head=HEAD,overlay_sha256=OVER_SHA,rebound_candidate_sha256=hashlib.sha256((HERE/'rebound-candidate19.json').read_bytes()).hexdigest(),checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),moves=len(receipts),moved_ports=len(allports),late_compensations=late,all_anchors_survive=True,all_noncommuting_traces_equal=True,receipts=receipts,proof='For each moved shear E_ab(c), an ADD E_xy(d) fails the inherited sufficient commutation screen only when y=a or x=b; a COPY/ERASE fails only when its source is a. Both these complete traces and the moved gate position within them are identical old/new. The complete incident-event trace after the complete initial plain prefix is also identical, with the same defining frame per event, so every admitted old anchor persists in order and with its declared frame. Any inserted, deleted, re-addressed or relocated events between a move and its transported anchor commute. The test depends only on operands, so replacing c,d by their absolute values preserves it. Thus the inherited133 raw crossing proofs transport to the new signed and nonnegative words. Physical coordinate norms start positive and increase under unsigned ADDs. Each reused COPY scratch norm equals a captured physical norm, so it is also bounded by the maximum final physical norm. Therefore the maximum prefix row norm is bounded by the maximum final physical norm, which commuting rewrites preserve.',scope='Complete finite transport of inherited133 moves and all possible original anchors through actual old/new scalar event bijection. Does not independently rerun the original raw record-number crossing proof or emit new final frame records.') + (HERE/'reorder-transport-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps({k:v for k,v in out.items()if k!='receipts'},indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10/weighted/check_scalar_recurrence.py b/research/gen5b-shared-kernels/p10/weighted/check_scalar_recurrence.py new file mode 100644 index 0000000000..6d33098ad7 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/weighted/check_scalar_recurrence.py @@ -0,0 +1,134 @@ +"""Fresh complete scalar-only actual-overlay recurrence, newly authored. +All installed scalar edits are reconstructed from content-bound selections; +frame/raw-record output is intentionally not claimed. Reorder commutations +are transported using independently checked unchanged operand classes. +""" +from pathlib import Path +from collections import defaultdict,Counter +import json,hashlib,time +from weighted_source_data import read,verify,HEAD +from check_transport import OVER,OVER_SHA,CAND,CAND_SHA +from check_target_chronology import build +CODE=Path(__file__).resolve().parent +from weighted_source_data import OUTPUT,PACKAGE_OUTPUT,PACKAGE_ROOT +HERE=OUTPUT + +def scalar_word(w,extra): + raw,adj,sid,n,F=build(w);g=read('graph.json');K=read('kchron.json')['entries'];ks=read('kernel-selection.json');sinks=read('sink-selection.json')['sinks'];restore=read('restore-selection.json')['entries'];target=read('target-selection.json')['groups'];tc=json.loads((HERE/'target-chronology-result.json').read_text()) + assert w['pairs']==read('bitword/selected/bit/word_p10.json.gz')['pairs']or hashlib.sha256(OVER.read_bytes()).hexdigest()==OVER_SHA + baseline=w['pairs']==read('bitword/selected/bit/word_p10.json.gz')['pairs'] + which='old_'if baseline else'new_' + cut=tc['groups'][0][which+'cut'];close={e[which+'close']:target[e['group']]for e in tc['groups']};deps={960+int(q):e[which+'close']for e in tc['groups']for q in target[e['group']]['dependent']} + assert hashlib.sha256((CODE/'check_target_chronology.py').read_bytes()).hexdigest()==tc['checker_sha256'] + # Target compression; retain semantic identities through scalar-only edits. + events=[] + for i,r in enumerate(raw): + if r[0]==1: + _,a,b,c,f,sem=r + if a not in deps or not cutcut and newclose>reboundcut;closes[newclose]=j + receipts.append(dict(group=j,old_cut=cut,new_cut=reboundcut,old_close=oldclose,new_close=newclose,close_semantic_event=sem,old_close_event=A[oldclose],new_close_event=B[newclose])) + assert len(closes)==120 + center=None;close_source_columns={};negative=[] + for i,row in enumerate(B): + op,a,b,*_=row + if op==2:assert center is None;center=a;columns[b]=columns[a] + if op==3:assert center==a;center=None + if op==1: + _,a,b,c,f,sem=row + if i>reboundcut: + if 960<=b<1920:assert b-960 not in owner or i>receipts[owner[b-960]]['new_close'] + if a-960 in owner and i<=receipts[owner[a-960]]['new_close']:responses[a-960]^=columns[b] + if i in closes:close_source_columns[i]=columns[b] + columns[a]^=columns[b] + if 960<=a<1920 and f!='ZERO': + if not targetpaths[a-960]or targetpaths[a-960][-1]!=f:targetpaths[a-960].append(f) + if i in closes: + j=closes[i];e=target['groups'][j] + for q,ps in e['dependent'].items(): + z=responses[int(q)] + for p in ps:z^=responses[p] + assert z==0,('literal target relation',j) + relations+=1 + if j==119: + assert B[i][1]-960 in ps and z^close_source_columns[i] + negative.append('Omitting group119 closing retained read makes its literal dependency nonzero') + # All new target read chains exact subspace nesting, and compressed group + # close frame included before every later target read. + cache={} + def ann(f): + if f not in cache:cache[f]=F[f]['a']if'a'in F[f]else null(F[f]['b']) + return cache[f] + checks=set() + for q,path in targetpaths.items(): + for x,y in zip(path,path[1:]): + if(x,y)not in checks:assert included(ann(y),ann(x));checks.add((x,y)) + for j,e in enumerate(target['groups']): + remaining=set(e['targets']) + for row in B[receipts[j]['new_close']+1:]: + if row[0]==1 and row[1]-960 in remaining and row[4]!='ZERO': + assert all(sum(x*y for x,y in zip(a,b))==0 for a in ann(row[4])for b in e['close_basis']) + remaining.remove(row[1]-960) + # Earliest later event per target suffices by established nesting. + if not remaining:break + # A target with no remaining forward-prefix read is a terminal spectator + # here; its later side/partner frame contract is inherited unchanged. + # Fresh compressed target state at every close: check every member's + # incoming frame against the close span, then every later required frame. + targetstate={q:[]for q in owner};state_checks=0 + def basis(fid):return F[fid]['b']if'b'in F[fid]else null(F[fid]['a']) + def append_need(q,B): + nonlocal state_checks + assert included(targetstate[q],B),('compressed target nonnesting',q) + targetstate[q]=B;state_checks+=1 + for i,row in enumerate(B): + if row[0]==1: + _,a,b,c,f,sem=row;q=a-960 + if q in owner and f!='ZERO': + e=target['groups'][owner[q]] + dropped=str(q)in e['dependent']and reboundcutspecial['new_close']for i in gauges.values());assert all(i>special['old_close']for i in oldgauges.values()) + out=dict(status='PASS_FRESH_PARTIAL_RAW_PREFIX_AND_ALL120_TARGET_CUTS',head=HEAD,overlay_sha256=OVER_SHA,old_physical_columns=on,new_physical_columns=nn,global_cut_semantic_event=A[cut],all120_literal_target_relations=relations,minimum_descent_record=minimum_descent,max_original_close=max(e['close_after_record']for e in target['groups']),group119=special,old_late_gauge_records=oldgauges,new_late_gauge_records=gauges,new_late_gauge_event_details=[B[i]for i in gauges.values()],all_gauge_target_paths_nested=True,all480_group_members_checked_at_close=True,compressed_target_state_containment_checks=state_checks,negative_controls=negative,unique_target_containment_pairs=len(checks),groups=receipts,checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),scope='Fresh original and new raw prefix regenerated through last forward gate, stopping before side-root/partner/kernel/restore/sink/reorder tail. Target cuts rebound by unique semantic event identity; all120 literal relations checked on the actual new physical columns. This does not emit the complete final pipeline.',dependency_sha256={'weighted_source_data.py':hashlib.sha256((CODE/'weighted_source_data.py').read_bytes()).hexdigest(),'check_transport.py':hashlib.sha256((CODE/'check_transport.py').read_bytes()).hexdigest()}) + (HERE/'target-chronology-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10/weighted/check_transport.py b/research/gen5b-shared-kernels/p10/weighted/check_transport.py new file mode 100644 index 0000000000..26fda478b0 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/weighted/check_transport.py @@ -0,0 +1,194 @@ +"""Independent exact transport proof, reading pinned JSON and inert source text only. +No code from PR320 is imported or run. This is not raw-record regeneration. +""" +from pathlib import Path +from fractions import Fraction as Q +from collections import Counter,defaultdict +import json,hashlib,time +from weighted_source_data import read,read_bytes,verify,HEAD +CODE=Path(__file__).resolve().parent +from weighted_source_data import OUTPUT,PACKAGE_OUTPUT,PACKAGE_ROOT +HERE=OUTPUT +OVER=PACKAGE_OUTPUT/'matching'/'word_weighted892.json' +OVER_SHA='25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739' +CAND=PACKAGE_ROOT/'witnesses'/'candidate19-residue4.json' +CAND_SHA='0f1a39a516e12fe3ca3b92a1925dc1b5df9d5437aff821a75b46188f779ec954' +def compact(c):return {int(k):v for k,v in sorted(c.items())if v} +def diff(a,b): + c=Counter(b);c.subtract(a);return compact(c) +def rr(rows,width=20): + a=[list(map(Q,r)) for r in rows];piv=[];k=0 + for j in range(width): + z=next((i for i in range(k,len(a))if a[i][j]),None) + if z is None:continue + a[k],a[z]=a[z],a[k];c=a[k][j];a[k]=[x/c for x in a[k]] + for i in range(len(a)): + if i!=k and a[i][j]: + c=a[i][j];a[i]=[x-c*y for x,y in zip(a[i],a[k])] + piv.append(j);k+=1 + return a[:k],piv +def null(rows): + a,p=rr(rows);out=[] + for j in set(range(20))-set(p): + r=[Q(0)]*20;r[j]=1 + for row,k in zip(a,p):r[k]=-row[j] + out.append(r) + return out +def included(rows,space): + a,p=rr(space) + for row in rows: + row=list(map(Q,row)) + for v,k in zip(a,p): + c=row[k] + if c:row=[x-c*y for x,y in zip(row,v)] + if any(row):return False + return True +def run(): + t=time.monotonic();verify();assert hashlib.sha256(OVER.read_bytes()).hexdigest()==OVER_SHA;assert hashlib.sha256(CAND.read_bytes()).hexdigest()==CAND_SHA + old=read('bitword/selected/bit/word_p10.json.gz');w=json.loads(OVER.read_text());cand=json.loads(CAND.read_text());f={int(k):v for k,v in read('frames.json')['frames'].items()};g=read('graph.json') + assert [k for k in old if old[k]!=w[k]]==['pairs','reads'] + gauges={e['role']:e for e in w['gauges']};sources=set(w['sources'].values());roots=set(w['rootroles']) + def mapping(word): + aliases={b:a for a,b in word['pairs']};roles=sorted(set(range(9120))-set(aliases));ids={r:1920+i for i,r in enumerate(roles)} + return aliases,roles,ids,{r:ids[aliases.get(r,r)]for r in range(9120)} + oa,oreg,oi,os=mapping(old);na,nreg,ni,ns=mapping(w);inv={s:r for r,s in oi.items()};n=1920+len(nreg) + assert len(oa)==890 and len(na)==892 and n==10148 + assert set(na)-set(oa)=={9118,9119} and set(oa)<=set(na) + assert all(oi[r]==ni[r]for r in nreg) + pairs_old=set(map(tuple,old['pairs']));pairs_new=set(map(tuple,w['pairs']));changed={r for p in pairs_old^pairs_new for r in p} + rolemap=[dict(virtual_role=r,old_physical=os[r],new_physical=ns[r],old_representative=oa.get(r,r),new_representative=na.get(r,r))for r in range(9120)] + (HERE/'virtual-physical-map.json').write_text(json.dumps(dict(head=HEAD,overlay_sha256=OVER_SHA,rows=rolemap),indent=2)+'\n') + phase=sorted(w['phase1']);ps=set(phase);rest=[i for i in range(len(w['ops']))if i not in ps];order=phase+rest;pos={i:j for j,i in enumerate(order)};uses=defaultdict(list) + for i in order: + a,b,_=w['ops'][i];assert ns[a]!=ns[b] + uses[a].append(i);uses[b].append(i) + for a,b in pairs_new: + assert a not in set(gauges)|sources|roots and b in gauges and gauges[b]['dim']==17 + assert max(pos[i]for i in uses[a])a);after=Counter(b-a for a,b in zip(dims,dims[1:])if b>a) + result.update(after);result.subtract(before) + receipts.append(dict(role=r,physical=ns[r],first_frame=first,frames=path,entrance_ranks=[len(B)for B in bases],delta=diff(before,after))) + return compact(result),receipts + oldD,_=kernel_delta(old);newD,receipts=kernel_delta(w) + assert oldD==newD=={int(k):v for k,v in ks['expected_local_delta'].items()} + (HERE/'kernel-path-receipts.json').write_text(json.dumps(receipts,indent=2)+'\n') + # Check additional fixed19 on rebound coordinates and exact all-column shear identity. + cands=[];active=set();pivots=set();donors=set();lines={} + for e in cand['entries']: + vr=[e['virtual_pivot']]+e['virtual_donors'];ss=[ns[r]for r in vr];p,*ds=ss + assert e['pivot']==os[vr[0]] and e['donors']==[os[r]for r in vr[1:]] + val=prefix[p] + for d in ds:val^=prefix[d] + assert val==0 + assert e['cut_read']==list(events[-1]) + B=e['basis'];assert len(B)==1 and sum(B[0])==0 and sum(x*x for x in B[0])==2 + for r in vr: + assert r not in lines or lines[r]==B[0];lines[r]=B[0] + active.update(vr);pivots.add(vr[0]);donors.update(vr[1:]);cands.append(dict(e,pivot=p,donors=ds)) + assert (len(pivots),len(donors),len(active))==(19,22,41)and not pivots&donors + assert not active&changed and not{ns[r]for r in active}&oldmembers + assert all(r not in set(gauges)|sources for r in active) + H=Counter();candpaths=[] + for r in sorted(active): + path=fullpath(w,r);first=path[0];assert all(sum(x*y for x,y in zip(a,lines[r]))==0 for a in ann(first));d=f[first]['dim'];H[d]-=1 + if d>1:H[d-1]+=1 + if r in donors:H[1]+=1 + candpaths.append(dict(role=r,physical=ns[r],frames=path,dimension=d,aliased_recipient=dict(w['pairs']).get(r))) + assert compact(H)=={int(k):v for k,v in cand['local_histogram_delta'].items()} + q=[(960+t,ns[r])for r in sorted(active)for t in range(960)if responses[r]>>t&1];qp=[e for e in q if inv[e[1]]not in pivots] + setups=[(d,e['pivot'])for e in cands for d in e['donors']];tail=list(reversed(q))+[(960+i,i)for i in range(960)] + def evaluate(seq): + rows=[1<=1920 else None + affected=changed|active + overlaps=dict(descent=[i for i,e in enumerate(descent)if{role(s)for s in e['scalar'][:2]}&affected],restore=[i for i,e in enumerate(restore)if{role(e[k])for k in('helper','donor')}&affected],sink=[e['role']for e in sinks if e['role']in affected],reorder=[i for i,e in enumerate(reorder)if{role(lift(s))for s in e['incidence'][:2]}&affected]) + assert not any(overlaps.values()) + out=dict(status='PASS_EXACT_KERNEL_AND_FIXED19_CONDITIONAL_TRANSPORT',head=HEAD,overlay_sha256=OVER_SHA,original_candidate_sha256=CAND_SHA,rebound_candidate_sha256=hashlib.sha256((HERE/'rebound-candidate19.json').read_bytes()).hexdigest(),checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),old_physical_columns=10150,new_physical_columns=n,old_pairs=890,new_pairs=892,preserved_pairs=len(pairs_old&pairs_new),changed_role_count=len(changed),physical_representatives_removed=[9118,9119],all_retained_representative_ids_unchanged=True,virtual_map_rows=len(rolemap),initial_plain_reads=count,kernel_entries_rebound=len(newentries),kernel_relations_and_cut_triples_exact=True,kernel_entries_touching_changed_roles=sum(bool(({e['virtual_pivot']}|set(e['virtual_donors']))&changed)for e in newentries),kernel_delta_old=oldD,kernel_delta_new=newD,complete_old_paths_checked=len(oreg),complete_new_paths_checked=len(nreg),unique_exact_containment_pairs=len(subcache),candidate19_delta=compact(H),candidate19_members=len(active),candidate19_setup_and_restore_pairs=len(setups),candidate19_all_column_f2_identity_forward_reverse=True,candidate19_omission_controls_rejected=True,direct_role_overlaps=overlaps,selected_paths=candpaths,scope='Exact matching map, literal installed-kernel relations/cuts, full base alias containment, unchanged installed-kernel paid delta, and fixed19 composition. Full raw-word regeneration, inherited transform record/anchor rebinding, target-prefix cut chronology, fresh norm bounds, pricing and bank admission are separate obligations.',source_loader_sha256=hashlib.sha256((CODE/'weighted_source_data.py').read_bytes()).hexdigest()) + (HERE/'transport-result.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/p10/weighted/test_weighted.py b/research/gen5b-shared-kernels/p10/weighted/test_weighted.py new file mode 100644 index 0000000000..022fc64741 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/weighted/test_weighted.py @@ -0,0 +1,37 @@ +"""Fast mutation regressions; full certificates are generated once by aggregate.""" +import copy,hashlib,json,unittest +from pathlib import Path +from check_transport import OVER,OVER_SHA,CAND,CAND_SHA,rr,included +from weighted_source_data import OUTPUT,read +class WeightedRegressions(unittest.TestCase): + def test_overlay_binding_rejects_mutation(self): + b=OVER.read_bytes();self.assertEqual(hashlib.sha256(b).hexdigest(),OVER_SHA) + self.assertNotEqual(hashlib.sha256(b+b' ').hexdigest(),OVER_SHA) + def test_witness_binding_rejects_wrong_rank(self): + self.assertEqual(hashlib.sha256(CAND.read_bytes()).hexdigest(),CAND_SHA) + x=json.loads(CAND.read_text());x['entries'][0]['rank']=2 + self.assertNotEqual(hashlib.sha256(json.dumps(x).encode()).hexdigest(),CAND_SHA) + def test_wrong_physical_mapping(self): + w=json.loads(OVER.read_text());alias={b:a for a,b in w['pairs']};ids={r:1920+i for i,r in enumerate(sorted(set(range(9120))-set(alias)))} + e=json.loads((OUTPUT/'rebound-candidate19.json').read_text())['entries'][0] + wanted=ids[alias.get(e['virtual_pivot'],e['virtual_pivot'])] + self.assertEqual(e['pivot'],wanted);self.assertNotEqual(e['pivot']+1,wanted) + def test_wrong_line_is_not_contained(self): + self.assertTrue(included([[1,-1]+[0]*18],[[1,-1]+[0]*18])) + def test_noncontained_line_rejected(self): + self.assertFalse(included([[1,0]+[0]*18],[[0,1]+[0]*18])) + def test_exact_dependent_rank(self): + a,p=rr([[1,-1]+[0]*18,[2,-2]+[0]*18]);self.assertEqual(len(p),1) + def test_every_target_close_member_and_omission(self): + r=json.loads((OUTPUT/'target-chronology-result.json').read_text()) + self.assertEqual(r['all120_literal_target_relations'],120) + self.assertTrue(r['all480_group_members_checked_at_close']);self.assertTrue(r['negative_controls']) + def test_delayed_target_port_mutation(self): + r=json.loads((OUTPUT/'reorder-transport-result.json').read_text());ports={s for z in r['receipts']for s in z['precompact_incidence'][:2]} + self.assertTrue(all(not{z[1],z[2]}&ports for z in r['late_compensations'])) + q=list(r['late_compensations'][0]);q[1]=next(iter(ports));self.assertTrue({q[1],q[2]}&ports) + def test_norm_dependency_bindings(self): + r=json.loads((OUTPUT/'scalar-recurrence-result.json').read_text());code=Path(__file__).parent + for name,wanted in r['dependency_sha256'].items():self.assertEqual(hashlib.sha256(((code if name.endswith('.py')else OUTPUT)/name).read_bytes()).hexdigest(),wanted) + self.assertEqual(r['final_compact_columns'],10141);self.assertEqual(r['retained_sink_spectator_columns'],7);self.assertTrue(r['retained_payload_cap_2_to104']) +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/p10/weighted/weighted_source_data.py b/research/gen5b-shared-kernels/p10/weighted/weighted_source_data.py new file mode 100644 index 0000000000..b8a1ace55f --- /dev/null +++ b/research/gen5b-shared-kernels/p10/weighted/weighted_source_data.py @@ -0,0 +1,12 @@ +"""Portable pinned inert-data loader; no upstream program is executed.""" +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) +from support import HERE as PACKAGE_ROOT,OUTPUT as PACKAGE_OUTPUT,SOURCE,HEAD,read_bytes,read as _read,verify_inputs,materialize_word +OUTPUT=PACKAGE_OUTPUT/'weighted' +OUTPUT.mkdir(parents=True,exist_ok=True) +def read(name): + name={'graph.json':'bitword/selected/bit/graph_p10.json','frames.json':'bitword/selected/bit/frames_p10.json.gz','kchron.json':'bitword/selected/bit/kchron_p10.json'}.get(name,name) + return _read(name) +def verify(): + verify_inputs();materialize_word() diff --git a/research/gen5b-shared-kernels/p10/witnesses/candidate15.json b/research/gen5b-shared-kernels/p10/witnesses/candidate15.json new file mode 100644 index 0000000000..b65fcd613a --- /dev/null +++ b/research/gen5b-shared-kernels/p10/witnesses/candidate15.json @@ -0,0 +1,735 @@ +{ + "source_head": "e983fea0896b2a1d7355983674db7e9bb33a9e32", + "selection": "candidate15", + "pivots": 15, + "entries": [ + { + "virtual_pivot": 5107, + "virtual_donors": [ + 4998, + 4999, + 5106 + ], + "pivot": 7027, + "donors": [ + 6918, + 6919, + 7026 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5482, + "virtual_donors": [ + 6605, + 5103 + ], + "pivot": 7402, + "donors": [ + 8525, + 7023 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5486, + "virtual_donors": [ + 4998, + 5106 + ], + "pivot": 7406, + "donors": [ + 6918, + 7026 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5487, + "virtual_donors": [ + 4999, + 5106 + ], + "pivot": 7407, + "donors": [ + 6919, + 7026 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5671, + "virtual_donors": [ + 6590, + 6605, + 5669 + ], + "pivot": 7591, + "donors": [ + 8510, + 8525, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6194, + "virtual_donors": [ + 4782, + 5288, + 5669 + ], + "pivot": 8114, + "donors": [ + 6702, + 7208, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6196, + "virtual_donors": [ + 6590, + 6605, + 4784, + 5290, + 5669 + ], + "pivot": 8116, + "donors": [ + 8510, + 8525, + 6704, + 7210, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6248, + "virtual_donors": [ + 5288, + 5669 + ], + "pivot": 8168, + "donors": [ + 7208, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6250, + "virtual_donors": [ + 6590, + 6605, + 5290, + 5669 + ], + "pivot": 8170, + "donors": [ + 8510, + 8525, + 7210, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 4529, + "virtual_donors": [ + 4402, + 4403, + 4528 + ], + "pivot": 6449, + "donors": [ + 6322, + 6323, + 6448 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 12, + 13 + ] + }, + { + "virtual_pivot": 5034, + "virtual_donors": [ + 4402, + 4528 + ], + "pivot": 6954, + "donors": [ + 6322, + 6448 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 12, + 13 + ] + }, + { + "virtual_pivot": 5035, + "virtual_donors": [ + 4403, + 4528 + ], + "pivot": 6955, + "donors": [ + 6323, + 6448 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 12, + 13 + ] + }, + { + "virtual_pivot": 5993, + "virtual_donors": [ + 5920, + 5921, + 5992 + ], + "pivot": 7913, + "donors": [ + 7840, + 7841, + 7912 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 16, + 17 + ] + }, + { + "virtual_pivot": 6174, + "virtual_donors": [ + 5920, + 5992 + ], + "pivot": 8094, + "donors": [ + 7840, + 7912 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 16, + 17 + ] + }, + { + "virtual_pivot": 6175, + "virtual_donors": [ + 5921, + 5992 + ], + "pivot": 8095, + "donors": [ + 7841, + 7912 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 16, + 17 + ] + } + ], + "local_histogram_delta": { + "1": 17, + "2": 30, + "3": -30, + "4": 2, + "5": -2 + }, + "residual_family_delta": { + "20": -15, + "19": 15 + }, + "distinct_donors": 17, + "scalar_setup_pairs": 40, + "physical_members": 32, + "rank_residue_mod5": 0, + "source_cache_sha256": "08b05d604dfb40e7165807757d67d9787b03408e6233f1d2e0a62f4ce144d664", + "physical_admission": false, + "scope": "Exact shared response witness only. Candidate15 has a divisible rank census; candidate19 requires a separately admitted residual-rank correction before bank/pricing admission. Both require full frame/alias/scalar/chart/finite checks." +} diff --git a/research/gen5b-shared-kernels/p10/witnesses/candidate19-residue4.json b/research/gen5b-shared-kernels/p10/witnesses/candidate19-residue4.json new file mode 100644 index 0000000000..bd275d91c4 --- /dev/null +++ b/research/gen5b-shared-kernels/p10/witnesses/candidate19-residue4.json @@ -0,0 +1,939 @@ +{ + "source_head": "e983fea0896b2a1d7355983674db7e9bb33a9e32", + "selection": "candidate19-residue4", + "pivots": 19, + "entries": [ + { + "virtual_pivot": 5107, + "virtual_donors": [ + 4998, + 4999, + 5106 + ], + "pivot": 7027, + "donors": [ + 6918, + 6919, + 7026 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5486, + "virtual_donors": [ + 4998, + 5106 + ], + "pivot": 7406, + "donors": [ + 6918, + 7026 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5487, + "virtual_donors": [ + 4999, + 5106 + ], + "pivot": 7407, + "donors": [ + 6919, + 7026 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5671, + "virtual_donors": [ + 4594, + 4596, + 4710, + 4712, + 5669 + ], + "pivot": 7591, + "donors": [ + 6514, + 6516, + 6630, + 6632, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5892, + "virtual_donors": [ + 4594, + 5480 + ], + "pivot": 7812, + "donors": [ + 6514, + 7400 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 5894, + "virtual_donors": [ + 4596, + 5482 + ], + "pivot": 7814, + "donors": [ + 6516, + 7402 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6150, + "virtual_donors": [ + 4712, + 6132 + ], + "pivot": 8070, + "donors": [ + 6632, + 8052 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6194, + "virtual_donors": [ + 4782, + 5288, + 5669 + ], + "pivot": 8114, + "donors": [ + 6702, + 7208, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6196, + "virtual_donors": [ + 4594, + 4596, + 4710, + 4712, + 4784, + 5290, + 5669 + ], + "pivot": 8116, + "donors": [ + 6514, + 6516, + 6630, + 6632, + 6704, + 7210, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6248, + "virtual_donors": [ + 5288, + 5669 + ], + "pivot": 8168, + "donors": [ + 7208, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6250, + "virtual_donors": [ + 4594, + 4596, + 4710, + 4712, + 5290, + 5669 + ], + "pivot": 8170, + "donors": [ + 6514, + 6516, + 6630, + 6632, + 7210, + 7589 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6590, + "virtual_donors": [ + 4594, + 4596, + 4710, + 4712, + 5103, + 5482 + ], + "pivot": 8510, + "donors": [ + 6514, + 6516, + 6630, + 6632, + 7023, + 7402 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 6605, + "virtual_donors": [ + 5103, + 5482 + ], + "pivot": 8525, + "donors": [ + 7023, + 7402 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 8, + 9 + ] + }, + { + "virtual_pivot": 4529, + "virtual_donors": [ + 4402, + 4403, + 4528 + ], + "pivot": 6449, + "donors": [ + 6322, + 6323, + 6448 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 12, + 13 + ] + }, + { + "virtual_pivot": 5034, + "virtual_donors": [ + 4402, + 4528 + ], + "pivot": 6954, + "donors": [ + 6322, + 6448 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 12, + 13 + ] + }, + { + "virtual_pivot": 5035, + "virtual_donors": [ + 4403, + 4528 + ], + "pivot": 6955, + "donors": [ + 6323, + 6448 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 12, + 13 + ] + }, + { + "virtual_pivot": 5993, + "virtual_donors": [ + 5920, + 5921, + 5992 + ], + "pivot": 7913, + "donors": [ + 7840, + 7841, + 7912 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 16, + 17 + ] + }, + { + "virtual_pivot": 6174, + "virtual_donors": [ + 5920, + 5992 + ], + "pivot": 8094, + "donors": [ + 7840, + 7912 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 16, + 17 + ] + }, + { + "virtual_pivot": 6175, + "virtual_donors": [ + 5921, + 5992 + ], + "pivot": 8095, + "donors": [ + 7841, + 7912 + ], + "rank": 1, + "basis": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0 + ] + ], + "cut_read": [ + 1127, + 8879, + -1 + ], + "line": [ + 16, + 17 + ] + } + ], + "local_histogram_delta": { + "1": 22, + "2": 39, + "3": -39, + "4": 2, + "5": -2 + }, + "residual_family_delta": { + "20": -19, + "19": 19 + }, + "distinct_donors": 22, + "scalar_setup_pairs": 58, + "physical_members": 41, + "rank_residue_mod5": 4, + "source_cache_sha256": "08b05d604dfb40e7165807757d67d9787b03408e6233f1d2e0a62f4ce144d664", + "physical_admission": false, + "scope": "Exact shared response witness only. Candidate15 has a divisible rank census; candidate19 requires a separately admitted residual-rank correction before bank/pricing admission. Both require full frame/alias/scalar/chart/finite checks." +} diff --git a/research/gen5b-shared-kernels/p10/witnesses/weighted892-delta.json b/research/gen5b-shared-kernels/p10/witnesses/weighted892-delta.json new file mode 100644 index 0000000000..da70e27c5a --- /dev/null +++ b/research/gen5b-shared-kernels/p10/witnesses/weighted892-delta.json @@ -0,0 +1,605 @@ +{ + "remove": [ + [ + 2096, + 9040 + ], + [ + 2103, + 9042 + ], + [ + 2307, + 8956 + ], + [ + 2310, + 8958 + ], + [ + 2312, + 9036 + ], + [ + 2319, + 9038 + ], + [ + 2405, + 8889 + ], + [ + 2424, + 8891 + ], + [ + 2837, + 8968 + ], + [ + 2856, + 8970 + ], + [ + 2891, + 8965 + ], + [ + 2910, + 8967 + ], + [ + 2945, + 8996 + ], + [ + 2964, + 8975 + ], + [ + 2972, + 9085 + ], + [ + 2991, + 9087 + ], + [ + 3107, + 9045 + ], + [ + 3265, + 8982 + ], + [ + 3266, + 8980 + ], + [ + 3274, + 9051 + ], + [ + 3275, + 9049 + ], + [ + 3283, + 9090 + ], + [ + 3284, + 9088 + ], + [ + 3292, + 9114 + ], + [ + 3293, + 9112 + ], + [ + 3328, + 8983 + ], + [ + 3329, + 8981 + ], + [ + 3337, + 9054 + ], + [ + 3338, + 9052 + ], + [ + 3346, + 9091 + ], + [ + 3347, + 9089 + ], + [ + 3355, + 9115 + ], + [ + 3356, + 9113 + ], + [ + 3382, + 8986 + ], + [ + 3383, + 8984 + ], + [ + 3391, + 9055 + ], + [ + 3392, + 9053 + ], + [ + 3400, + 9094 + ], + [ + 3401, + 9092 + ], + [ + 3410, + 9116 + ], + [ + 3436, + 9059 + ], + [ + 3437, + 9057 + ], + [ + 3445, + 9095 + ], + [ + 3446, + 9093 + ], + [ + 3455, + 9117 + ], + [ + 3481, + 9103 + ], + [ + 3482, + 9101 + ], + [ + 3571, + 8902 + ], + [ + 3572, + 8900 + ], + [ + 3580, + 8987 + ], + [ + 3581, + 8985 + ], + [ + 3589, + 9062 + ], + [ + 3590, + 9060 + ], + [ + 3598, + 9110 + ], + [ + 3599, + 9108 + ], + [ + 3634, + 8990 + ], + [ + 3635, + 8988 + ], + [ + 3643, + 9063 + ], + [ + 3644, + 9061 + ], + [ + 3652, + 9111 + ], + [ + 3653, + 9109 + ], + [ + 3688, + 9067 + ], + [ + 3689, + 9065 + ], + [ + 3823, + 8991 + ], + [ + 3824, + 8989 + ], + [ + 3832, + 9070 + ], + [ + 3833, + 9068 + ], + [ + 3877, + 9071 + ], + [ + 3878, + 9069 + ], + [ + 4012, + 9079 + ], + [ + 4013, + 9077 + ] + ], + "add": [ + [ + 1286, + 8889 + ], + [ + 1293, + 8891 + ], + [ + 1421, + 8996 + ], + [ + 1428, + 8975 + ], + [ + 1529, + 9040 + ], + [ + 2096, + 9060 + ], + [ + 2103, + 9062 + ], + [ + 2405, + 8900 + ], + [ + 2424, + 8902 + ], + [ + 2837, + 8985 + ], + [ + 2856, + 8987 + ], + [ + 2891, + 8984 + ], + [ + 2910, + 8986 + ], + [ + 3274, + 9079 + ], + [ + 3275, + 9077 + ], + [ + 3283, + 9103 + ], + [ + 3284, + 9101 + ], + [ + 3335, + 9042 + ], + [ + 3336, + 9045 + ], + [ + 3767, + 9114 + ], + [ + 3768, + 9112 + ], + [ + 3893, + 9115 + ], + [ + 3894, + 9113 + ], + [ + 4055, + 9110 + ], + [ + 4056, + 9108 + ], + [ + 4064, + 9118 + ], + [ + 4065, + 9116 + ], + [ + 4387, + 9067 + ], + [ + 4389, + 9065 + ], + [ + 4405, + 9091 + ], + [ + 4407, + 9089 + ], + [ + 4811, + 9052 + ], + [ + 4813, + 9054 + ], + [ + 5019, + 9070 + ], + [ + 5021, + 9068 + ], + [ + 5037, + 9094 + ], + [ + 5039, + 9092 + ], + [ + 5245, + 8965 + ], + [ + 5247, + 8967 + ], + [ + 5334, + 9057 + ], + [ + 5336, + 9059 + ], + [ + 5498, + 8956 + ], + [ + 5500, + 8958 + ], + [ + 5588, + 9036 + ], + [ + 5590, + 9038 + ], + [ + 5596, + 9087 + ], + [ + 5598, + 9085 + ], + [ + 5606, + 8980 + ], + [ + 5608, + 8982 + ], + [ + 5614, + 9111 + ], + [ + 5616, + 9109 + ], + [ + 5632, + 9119 + ], + [ + 5634, + 9117 + ], + [ + 5896, + 8981 + ], + [ + 5898, + 8983 + ], + [ + 5933, + 8968 + ], + [ + 5935, + 8970 + ], + [ + 6186, + 9053 + ], + [ + 6188, + 9055 + ], + [ + 6219, + 8988 + ], + [ + 6221, + 8990 + ], + [ + 6240, + 9093 + ], + [ + 6242, + 9095 + ], + [ + 6347, + 9069 + ], + [ + 6349, + 9071 + ], + [ + 6351, + 9088 + ], + [ + 6353, + 9090 + ], + [ + 6620, + 8989 + ], + [ + 6635, + 8991 + ], + [ + 6657, + 9049 + ], + [ + 6662, + 9061 + ], + [ + 6672, + 9051 + ], + [ + 6677, + 9063 + ] + ], + "source_head": "e983fea0896b2a1d7355983674db7e9bb33a9e32", + "candidate_word_sha256": "25a0edc8c5f399fcf536b28c4e3575aa52177bb78b6078a631acb748954f0739", + "reads_add": { + "9118": 19977, + "9119": 19979 + }, + "matching_local_histogram_delta": { + "2": 2, + "3": -24, + "5": 10, + "6": -6, + "7": -4, + "8": -12, + "9": 7, + "10": 8, + "12": -7, + "13": -4, + "14": -55, + "17": 55 + }, + "matching_residual_family_delta": { + "3": -2 + } +} diff --git a/research/gen5b-shared-kernels/packing.py b/research/gen5b-shared-kernels/packing.py new file mode 100644 index 0000000000..b966e6d584 --- /dev/null +++ b/research/gen5b-shared-kernels/packing.py @@ -0,0 +1,51 @@ +"""Original exact primal/dual width-120 bank inventory checker. + +No geometry or chronological admission is implied by a packing witness. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as F +import source_data as sd +def verify(capacity,demand,patterns): + assert type(capacity)is int and capacity>0 + assert all(type(r)is int and 00 for r,n in demand.items()) + supplied=Counter();bins=0;waste=0 + for row in patterns: + count=row['count'];widths=row['widths'] + assert type(count)is int and count>0 + assert all(type(r)is int and 01 + while hi-lo>1: + mid=(lo+hi)//2;L,U=old.moment(H,120,W,F(mid,scale)) + if U<1:lo=mid + elif L>1:hi=mid + else:raise ArithmeticError('More interval precision required') + c=F(lo,scale);upper=F(hi,scale) + return c,upper,old.moment(H,120,W,c),old.moment(H,120,W,upper) + +def reprice(local_histogram_delta,role_rank_count_delta,patterns=None): + if any(type(r)is not int or type(n)is not int or r<=0 or r>=120 for D in (local_histogram_delta,role_rank_count_delta)for r,n in D.items()): + raise ValueError('Deltas require positive integer ranks and integer counts') + old.source_integrity();H,_=old.final_histogram() + H.update({r:5*n for r,n in local_histogram_delta.items()}) + if any(n<0 for n in H.values()):raise ValueError('Negative child count') + H=Counter({r:n for r,n in H.items()if n}) + original=packing.calculate()['stage_certificate'];demand=original['demand'].copy() + for r,n in role_rank_count_delta.items():demand[r]=demand.get(r,0)+60*n + if any(n<0 for n in demand.values()):raise ValueError('Negative residual demand') + demand={r:n for r,n in demand.items()if n} + if patterns is None:patterns=pure_retile(role_rank_count_delta) + witness=packing.verify(120,demand,patterns) + stock=422400+5*witness['feasible_bins'];W=F(stock,60) + c,upper,L,U=moment_root(H,W);b=F(754736418878859,10**18) + chain=[F(384599,10**10)] + for i in range(3):chain.append((1-c)*c+c*chain[-1]) + eta=F(1,10**12);beta=F(1,10**9) + if not chain[-1]<(1-beta)*b: + raise ValueError('Complex side now binds: this narrow repricer needs a revised bootstrap/backoff policy') + q=chain[-1]*(1-2*eta);G=(1-eta)*q/(1+q);ticks=G*10**18 + k=F((ticks.numerator-1)//ticks.denominator,10**18) + assembly=old.assembly(c,b,k) + return dict(status='CONDITIONAL_ARITHMETIC_ONLY',physical_admission=False, + local_histogram_delta=local_histogram_delta,role_rank_count_delta=role_rank_count_delta, + histogram=dict(sorted(H.items())),calls=sum(H.values()),rank_mass=old.rank(H), + literal_stock=stock,unreplicated_stock=W,deficit=120*W-old.rank(H), + packing=witness,root_bracket=[c,upper],moment_interval=L,adjacent_moment_interval=U, + kappa=k,kappa_decimal=old.ex.dec(k),assembly=assembly) diff --git a/research/gen5b-shared-kernels/run_checks.py b/research/gen5b-shared-kernels/run_checks.py new file mode 100644 index 0000000000..bfe30cd9de --- /dev/null +++ b/research/gen5b-shared-kernels/run_checks.py @@ -0,0 +1,137 @@ +"""Reproduce the 70-pivot headline and 72-pivot fallback with every binding.""" +import argparse +import json +from pathlib import Path + +import assembly_arithmetic as arithmetic +import source_data as sd +import run_coretime12 as core +import chart_bounds +import check_shared_kernel as bridge72 +import check_scalar_bounds as norm72 +import check_kernel_bank_assignment as banks72 +import check_pr300_composition as composition72 +import kernel72_pricing as price72 +import kernel72_charts as charts72 +import kernel72_finite_bill as bill72 +import check_kernel70 as bridge70 +import check_kernel70_norm as norm70 +import check_kernel70_bank_assignment as banks70 +import check_pr300_kernel70_composition as composition70 +import kernel70_pricing as price70 +import kernel70_charts as charts70 +import kernel70_finite_bill as bill70 +import check_pr300_bases + +HERE = Path(__file__).resolve().parent + + +def canonical(value): + if isinstance(value, dict): + value = {key: canonical(item) for key, item in value.items() if key != 'seconds'} + elif isinstance(value, (list, tuple)): + value = [canonical(item) for item in value] + return json.loads(json.dumps(arithmetic.serial(value))) + + +def run(output_dir=None, write_streams=False): + count = sd.verify_all() + output = Path(output_dir) if output_dir is not None else None + final12 = core.run(output / 'coretime12' if output else None, write_streams) + full_final_charts = chart_bounds.run() + results = {'coretime12/' + key: value for key, value in final12.items()} + results['pr300-bases'] = check_pr300_bases.run() + full_programs = {} + for case, bridge, norm, banks, composition, price, charts, bill in ( + ('kernel72', bridge72, norm72, banks72, composition72, price72, charts72, bill72), + ('kernel70', bridge70, norm70, banks70, composition70, price70, charts70, bill70), + ): + b = bridge.run(selection='union72') if case == 'kernel72' else bridge.run() + n = norm.run() + bank = banks.run(output / case if output else None) + comp = composition.run() + if case == 'kernel72': + priced = price.run(b, final12['frames'], final12['local']) + else: + priced = price.run(b, final12['frames'], final12['local'], comp) + assert arithmetic.F(bank['unreplicated_stock']) == arithmetic.F(priced['unreplicated_stock']) + c = charts.run(b, full_final_charts, literal_stock=priced['literal_stock']) + finite = bill.run(c, n, priced, b, bank, final12['suffix'], + composition=comp if case == 'kernel70' else None) + for name, value in {'bridge': b, 'norm': n, 'banks': bank, + 'composition': comp, 'pricing': priced, + 'charts': core.compact_charts(c), 'finite-bill': finite}.items(): + results[case + '/' + name] = value + full_programs[case] = c['factor_programs'] + if case == 'kernel72': + pin = sd.MANIFEST['files']['pr300/descent2-selection.json'] + overlay = price.price_additional_histogram( + priced, sd.read_bytes('pr300/descent2-selection.json'), pin) + overlay_bill = bill.run(c, n, overlay, b, bank, final12['suffix'], composition=comp) + results['kernel72/pr300-pricing'] = overlay + results['kernel72/pr300-finite-bill'] = overlay_bill + headline = results['kernel70/pricing'] + headline_bill = results['kernel70/finite-bill'] + results['summary'] = dict( + status='PASS_UNIFIED_CHANGED_STAGE_CHECKS_UNDER_RETAINED_INTERFACES', + verified_source_files=count, + baseline_head=sd.HEAD, + additional_head=results['kernel70/composition']['source_head'], + headline_case='PR300 + final12 + 70 shared-donor pivots', + kappa=headline['kappa'], kappa_decimal=headline['kappa_decimal'], + literal_stock=headline['literal_stock'], calls=headline['calls'], + rank_mass=headline['rank_mass'], deficit=headline['deficit'], + displayed_finite_coefficient=headline_bill['displayed_finite_coefficient'], + payload_upper=headline_bill['conservative_payload_upper'], + payload_strict_gap=headline_bill['payload_strict_gap'], + fallback_PR300_kernel72_kappa=results['kernel72/pr300-pricing']['kappa'], + checkpoint_PR299_kernel72_kappa=results['kernel72/pricing']['kappa'], + all_changed_role_bank_assignments=results['kernel70/banks']['total_stage_assignments'], + inherited_assumptions=headline_bill['inherited_assumptions'], + full_inherited_admission_replayed=False, all_size_theorem_verified=False, + global_optimality_or_priority_claimed=False, + verification_limits=[ + 'The shared-kernel F2 all-column proof is compositional under the inherited old decoder, not a full physical-word replay.', + 'PR300 complete chronological/source-span admission remains inherited; scalar incidences, support disjointness and exact selected basis determinants are checked here.', + 'Original row bounds and unchanged compiler, chart, normalizer, routing, prime, setup, complex-supplier and all-size interfaces remain hypotheses.', + 'Displayed finite bounds do not supply unknown retained constants inside C_full.' + ]) + results = {name: canonical(value) for name, value in results.items()} + if output: + for name, value in results.items(): + path = output / (name + '.json') + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(value, indent=2) + '\n') + for case, programs in full_programs.items(): + (output / case / 'chart-factor-programs.json').write_text( + json.dumps(canonical(programs), indent=2) + '\n') + return results + + +def check_certificates(results): + expected_names = {path.relative_to(HERE / 'certificates').as_posix()[:-5] + for path in (HERE / 'certificates').rglob('*.json')} + if expected_names != set(results): + raise ValueError('Committed certificate set differs from generated set') + for name, actual in results.items(): + expected = json.loads((HERE / 'certificates' / (name + '.json')).read_text()) + if actual != expected: + raise ValueError('Certificate drift: ' + name) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output-dir', type=Path) + parser.add_argument('--write-streams', action='store_true') + parser.add_argument('--check', action='store_true') + args = parser.parse_args() + if args.write_streams and args.output_dir is None: + parser.error('--write-streams requires --output-dir') + results = run(args.output_dir, args.write_streams) + if args.check: + check_certificates(results) + print(json.dumps(results['summary'], indent=2)) + + +if __name__ == '__main__': + main() diff --git a/research/gen5b-shared-kernels/run_coretime12.py b/research/gen5b-shared-kernels/run_coretime12.py new file mode 100644 index 0000000000..ae04f3ae85 --- /dev/null +++ b/research/gen5b-shared-kernels/run_coretime12.py @@ -0,0 +1,116 @@ +"""Reproduce the independently authored changed-stage checks and exact pricing.""" +import argparse +import hashlib +import json +from pathlib import Path + +import assembly_arithmetic as arithmetic +import baseline_arithmetic as baseline +import chart_bounds +import check_bank_assignment +import check_complete_suffix +import check_coretime +import check_suffix_frames +import reprice +import finite_bill +import scalar_norm_transport +import source_data + +HERE = Path(__file__).resolve().parent + + +def compact_charts(value): + value = dict(value) + programs = value.pop('factor_programs') + value['chart_summaries'] = [] + for program in programs: + summary = {key: item for key, item in program.items() + if key not in ('basis_columns', 'factors')} + data = json.dumps(arithmetic.serial(program), sort_keys=True, + separators=(',', ':')).encode() + summary['factor_program_sha256'] = hashlib.sha256(data).hexdigest() + value['chart_summaries'].append(summary) + return value + + +def run(output_dir=None, write_streams=False): + source_data.verify_all() + local = check_coretime.run(minimal=True) + suffix = check_complete_suffix.run(output_dir if write_streams else None) + frames = check_suffix_frames.run() + transport = scalar_norm_transport.run() + charts = chart_bounds.run() + banks = check_bank_assignment.run(output_dir) + priced = reprice.reprice(frames['local_histogram_delta'], + local['residual_rank_count_delta']) + assert banks['family_counts'] == {rank:count//60 for rank,count in priced['packing']['demand'].items()} + assert banks['literal_stock'] == priced['literal_stock'] + pins = source_data.read_json('expected/kernel-pins.json') + assert priced['literal_stock'] == pins['literal_stock'] + local['literal_stock_delta'] + assert transport['source_hashes']['original_suffix'] == suffix['original_suffix_sha256'] + assert transport['source_hashes']['modified_suffix'] == suffix['modified_suffix_sha256'] + assert charts['selector_calls_bound'] < 2 ** 40 + assert transport['payload_upper'] < 2 ** 104 + assert priced['kappa'] == arithmetic.F(749906929903449, 10 ** 18) + priced['source_head'] = source_data.HEAD + priced['binding'] = 'Measured chronological frame delta and exact selected endpoint residual changes.' + priced['prior_kappa'] = arithmetic.F(pins['kappa']) + priced['kappa_gain'] = priced['kappa'] - priced['prior_kappa'] + finite = finite_bill.run(charts, transport, arithmetic.serial(priced)) + results = {'local': local, 'suffix': suffix, 'frames': frames, + 'scalar-transport': transport, 'charts': compact_charts(charts), + 'pricing': priced, 'finite-bill': finite, 'banks': banks} + results['summary'] = { + 'status': 'PASS_CHANGED_STAGE_CHECKS_CONDITIONAL_ON_PINNED_BASE', + 'source_head': source_data.HEAD, + 'new_restorations': local['selected'], + 'old_restorations_undone': local['undone_old_restorations'], + 'kappa': str(priced['kappa']), + 'kappa_decimal': priced['kappa_decimal'], + 'literal_stock': priced['literal_stock'], + 'paid_calls': priced['calls'], + 'rank_mass': priced['rank_mass'], + 'deficit': str(priced['deficit']), + 'full_inherited_admission_replayed': False, + 'all_size_theorem_verified': False, + 'verification_limits': [ + 'The pinned PR299 unchanged prefix and its original admission remain hypotheses.', + 'Unchanged finite compiler, weighted chart, routing, prime and setup contracts are inherited.', + 'Changed charts, selector bound and scalar payload bound are checked here; the complete inherited finite compiler is not rerun.', + 'Outer positive literal and row-gap inputs remain conditional on the inherited finite bridge.', + 'No full all-size or machine-verification claim is made.' + ]} + for name, result in results.items(): + result.pop('seconds', None) + # Normalize integer map keys to their JSON representation before comparing. + results[name] = json.loads(json.dumps(arithmetic.serial(result))) + if output_dir is not None: + output_dir = Path(output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + for name, result in results.items(): + (output_dir / (name + '.json')).write_text(json.dumps(result, indent=2) + '\n') + (output_dir / 'chart-factor-programs.json').write_text( + json.dumps(arithmetic.serial(charts['factor_programs']), indent=2) + '\n') + return results + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output-dir', type=Path) + parser.add_argument('--write-streams', action='store_true') + parser.add_argument('--check', action='store_true', + help='Compare every regenerated receipt with the committed certificates') + args = parser.parse_args() + if args.write_streams and args.output_dir is None: + parser.error('--write-streams requires --output-dir') + results = run(args.output_dir, args.write_streams) + if args.check: + for name, actual in results.items(): + expected = json.loads((HERE / 'certificates' / 'coretime12' / (name + '.json')).read_text()) + if actual != expected: + raise ValueError('Certificate drift: ' + name) + print(json.dumps(results['summary'], indent=2)) + + +if __name__ == '__main__': + main() diff --git a/research/gen5b-shared-kernels/scalar_norm_transport.py b/research/gen5b-shared-kernels/scalar_norm_transport.py new file mode 100644 index 0000000000..a97c805c36 --- /dev/null +++ b/research/gen5b-shared-kernels/scalar_norm_transport.py @@ -0,0 +1,69 @@ +"""Original exact trace-commutation check and conservative scalar norm transport. + +If all swaps commute and each destination's update order changes by moving only +one unit-coefficient update, each new row lies on the old row trajectory or is +one old row plus/minus one old source row. Both forward and inverse maxima grow +by at most two. Upstream programs are never executed. +""" +from pathlib import Path +from collections import defaultdict,deque,Counter +import gzip,json,hashlib,time +ROOT=Path(__file__).resolve().parent +import check_complete_suffix as scalar +import source_data as sd + +def check(old,new): + assert Counter(tuple(z[:3])for z in old)==Counter(tuple(z[:3])for z in new) + buckets=defaultdict(deque) + for i,z in enumerate(old):buckets[tuple(z[:3])].append(i) + desired=[buckets[tuple(z[:3])].popleft()for z in new] + assert len(set(desired))==len(old) + old_rows=defaultdict(list);new_rows=defaultdict(list) + for i,z in enumerate(old):old_rows[z[0]].append(i) + for i in desired:new_rows[old[i][0]].append(i) + changed=[] + for dest,seq in old_rows.items(): + target=new_rows[dest] + if seq==target:continue + # No quadratic search over all updates: only at most three updates + # are expected on affected targets; still test the literal sequences. + chosen=next((x for x in seq if abs(old[x][2])==1 and + [i for i in seq if i!=x]==[i for i in target if i!=x]),None) + assert chosen is not None,('more than one update moved on row',dest) + changed.append(dict(destination=dest,moved_old_event=chosen, + moved_gate=old[chosen][:3],old_order=seq,new_order=target)) + current=list(range(len(old)));pos=current[:];swaps=0 + for i,wanted in enumerate(desired): + j=pos[wanted];assert j>=i + if j==i:continue + a,b,c=old[wanted][:3] + for k in range(i,j): + token=current[k];d,e,f=old[token][:3] + assert b!=d and e!=a,('noncommuting crossed additions',old[wanted],old[token]) + pos[token]+=1;swaps+=1 + current[i:j+1]=[wanted]+current[i:j];pos[wanted]=i + assert current==desired + return dict(commuting_adjacent_swaps=swaps,destinations_with_changed_update_order=changed, + forward_norm_factor=2,inverse_norm_factor=2) + +def run(): + start=time.monotonic();_,old,new,_=scalar.build() + certificate=check(old,new) + assert len(certificate['destinations_with_changed_update_order'])==12 + pins=sd.read_json('expected/kernel-pins.json') + old_forward=pins['forward_max_row_l1'];old_inverse=pins['inverse_max_row_l1'] + assert (old_forward,old_inverse)==(77985,2475558) + forward=2*old_forward;inverse=2*old_inverse;payload=64*forward**3*inverse**2 + assert payload<2**104 + return dict(status='PASS_EXACT_SCALAR_NORM_TRANSPORT',suffix_additions=len(old), + **certificate,original_forward_bound=old_forward,original_inverse_bound=old_inverse, + new_forward_bound=forward,new_inverse_bound=inverse,payload_upper=payload, + payload_bits=payload.bit_length(),retained_payload_cap_bits=104, + unchanged_literal_scalar_multiset=True, + source_hashes={name:hashlib.sha256(json.dumps(events,separators=(',',':')).encode()).hexdigest()for name,events in [('original_suffix',old),('modified_suffix',new)]}, + theorem='Commuting swaps preserve each source value sampled by a gate. Every unchanged destination update sequence has the old row-value trajectory. Each changed destination order moves one unit update; at intermediate cuts its row is an old row plus or minus that same old source row. Reversing both schedules gives the identical property. The unchanged prefix is composed using the retained old global row-norm bounds.', + scope='Changed scalar suffix and retained old prefix bounds only. Address geometry and inherited finite compiler hypotheses are separate.',seconds=time.monotonic()-start) + +if __name__=='__main__': + x=run() + print(x['status'],'swaps',x['commuting_adjacent_swaps'],'changed row orders',len(x['destinations_with_changed_update_order']),'payload bits',x['payload_bits'],'seconds',x['seconds']) diff --git a/research/gen5b-shared-kernels/source_data.py b/research/gen5b-shared-kernels/source_data.py new file mode 100644 index 0000000000..55830601cc --- /dev/null +++ b/research/gen5b-shared-kernels/source_data.py @@ -0,0 +1,49 @@ +"""Read immutable PR299/PR300 data; never import or execute upstream programs.""" +from pathlib import Path +import gzip +import hashlib +import json +import os + +if not __debug__: + raise RuntimeError('Run without -O; certificate assertions must remain enabled.') + +HERE = Path(__file__).resolve().parent +MANIFEST = json.loads((HERE / 'inputs.json').read_text()) +HEAD = MANIFEST['commit'] + + +def source_root(): + value = os.environ.get('CORETIME_SOURCE_DIR') + if not value: + raise RuntimeError('Set CORETIME_SOURCE_DIR to the pinned input directory; see README.md.') + return Path(value).expanduser().resolve() + + +def verify_bytes(name, data): + pin = MANIFEST['files'][name] + if len(data) != pin['bytes'] or hashlib.sha256(data).hexdigest() != pin['sha256']: + raise ValueError('Pinned input bytes changed: ' + name) + blob = hashlib.sha1(b'blob ' + str(len(data)).encode() + b'\0' + data).hexdigest() + if blob != pin['git_blob']: + raise ValueError('Pinned Git blob changed: ' + name) + return data + + +def read_bytes(name): + if name not in MANIFEST['files']: + raise ValueError('Unpinned input: ' + name) + return verify_bytes(name, (source_root() / name).read_bytes()) + + +def read_json(name): + data = read_bytes(name) + if name.endswith('.gz'): + data = gzip.decompress(data) + return json.loads(data) + + +def verify_all(): + for name in MANIFEST['files']: + read_bytes(name) + return len(MANIFEST['files']) diff --git a/research/gen5b-shared-kernels/test_bank_assignment.py b/research/gen5b-shared-kernels/test_bank_assignment.py new file mode 100644 index 0000000000..60de45aa65 --- /dev/null +++ b/research/gen5b-shared-kernels/test_bank_assignment.py @@ -0,0 +1,32 @@ +import unittest + +import check_bank_assignment as banks + + +class BankAssignmentTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.result = banks.run() + + def test_complete_role_and_replica_bijection(self): + x = self.result + self.assertEqual(x['helper_roles'], 15427) + self.assertEqual(x['checked_role_replica_assignments_per_stage'], 925620) + self.assertEqual(x['total_stage_assignments'], 4628100) + self.assertTrue(x['stages_have_disjoint_bank_namespaces']) + + def test_frozen_assignment_and_stock(self): + x = self.result + self.assertEqual(x['assignment_sha256'], + '0317c568260dafde4cbc6ac1b88cae8afaa66d164ea454c372c01ea551af5f5b') + self.assertEqual(x['banks_per_stage'], 161467) + self.assertEqual(x['literal_stock'], 1229735) + self.assertTrue(x['all_banks_full']) + + def test_duplicated_role_rejected(self): + with self.assertRaisesRegex(AssertionError, 'Missing or duplicated helper role'): + banks.run(mutation='duplicate_role') + + +if __name__ == '__main__': + unittest.main() diff --git a/research/gen5b-shared-kernels/test_bank_binding.py b/research/gen5b-shared-kernels/test_bank_binding.py new file mode 100644 index 0000000000..e595704826 --- /dev/null +++ b/research/gen5b-shared-kernels/test_bank_binding.py @@ -0,0 +1,37 @@ +"""Regression controls for stock units and replica/stage factors.""" +import copy +import json +from pathlib import Path +import unittest +import bank_binding + + +class StockBindingTests(unittest.TestCase): + def pair(self, case='kernel70'): + root=Path(__file__).resolve().parent/'certificates'/case + return [json.loads((root/(name+'.json')).read_text()) for name in ('banks','pricing')] + def test_both_cases(self): + for case in ('kernel70','kernel72'): + bank_binding.check(*self.pair(case)) + def test_half_normalized_stock_rejected(self): + b,p=self.pair();b['unreplicated_stock']='30739/3' + with self.assertRaises(AssertionError):bank_binding.check(b,p) + def test_literal_stock_rejected(self): + b,p=self.pair();b['literal_stock']+=1 + with self.assertRaises(AssertionError):bank_binding.check(b,p) + def test_stage_factor_rejected(self): + b,p=self.pair();b['total_banks']//=5 + with self.assertRaises(AssertionError):bank_binding.check(b,p) + def test_replica_factor_rejected(self): + b,p=self.pair();b['checked_role_replica_assignments_per_stage']//=60 + with self.assertRaises(AssertionError):bank_binding.check(b,p) + def test_inventory_demand_rejected(self): + b,p=self.pair();p['packing']['demand']['23']+=1 + with self.assertRaises(AssertionError):bank_binding.check(b,p) + def test_paid_rank_mass_rejected(self): + b,p=self.pair();p['rank_mass']+=1 + with self.assertRaises(AssertionError):bank_binding.check(b,p) + def test_explicit_wrong_factors_rejected(self): + with self.assertRaises(AssertionError):bank_binding.check(*self.pair(),replicas=30) + +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/test_candidate70.py b/research/gen5b-shared-kernels/test_candidate70.py new file mode 100644 index 0000000000..08711cfed2 --- /dev/null +++ b/research/gen5b-shared-kernels/test_candidate70.py @@ -0,0 +1,24 @@ +import unittest +from check_kernel70 import run as kernel +from check_kernel70_norm import run as bounds +from check_pr300_kernel70_composition import run as composition +class Candidate70Tests(unittest.TestCase): + def test_exact_candidate(self): + r=kernel();self.assertEqual((r['pivots'],r['distinct_donors'],r['setup_adds']),(70,87,601));self.assertTrue(r['formal_forward_and_inverse_equal']) + def test_entrance_mutation(self): + with self.assertRaises(AssertionError):kernel('bad_entrance') + def test_response_mutation(self): + with self.assertRaises(AssertionError):kernel('bad_relation') + def test_missing_setup(self): + with self.assertRaises(AssertionError):kernel('omit_setup') + def test_missing_restore(self): + with self.assertRaises(AssertionError):kernel('omit_restore') + def test_payload_cap(self): + r=bounds();self.assertEqual(r['payload_bits'],104);self.assertTrue(r['retained_payload_cap_2_to104']) + def test_pr300_composition(self): + r=composition();self.assertEqual(r['kernel70_streams'],157);self.assertTrue(r['paid_ledgers_additive']) + def test_reject_pr300_kernel_overlap(self): + with self.assertRaises(AssertionError):composition('kernel_overlap') + def test_reject_pr300_final12_overlap(self): + with self.assertRaises(AssertionError):composition('frame_overlap') +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/test_chart_bounds.py b/research/gen5b-shared-kernels/test_chart_bounds.py new file mode 100644 index 0000000000..3b749700e3 --- /dev/null +++ b/research/gen5b-shared-kernels/test_chart_bounds.py @@ -0,0 +1,26 @@ +from fractions import Fraction as F +import unittest +import chart_bounds as c + +class ChartTests(unittest.TestCase): + def test_identity(self): + r=c.factor([[1,0],[0,1]]) + self.assertEqual(r['count'],0);self.assertEqual(r['determinant'],1) + def test_exact_nontrivial_factorization(self): + r=c.factor([[1,2],[3,5]]) + self.assertEqual(r['determinant'],-1) + self.assertGreater(r['count'],0) + def test_singular_rejected(self): + with self.assertRaises(StopIteration):c.factor([[1,2],[2,4]]) + def test_integer_nullspace(self): + A=[[1,2,3],[2,4,6]];B=c.nullspace(A,3) + self.assertEqual(len(B),2) + self.assertTrue(all(sum(x*y for x,y in zip(a,b))==0 for a in A for b in B)) + def test_all_actual_charts(self): + r=c.run();self.assertEqual(r['charts'],18) + self.assertEqual(r['max_changed_chart_factors'],142) + self.assertEqual(r['max_factor_numerator'],11) + self.assertEqual(r['max_factor_denominator'],9) + self.assertEqual(r['selector_calls_bound'],905994200400) + +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/research/gen5b-shared-kernels/test_coretime.py b/research/gen5b-shared-kernels/test_coretime.py new file mode 100644 index 0000000000..26acf83d02 --- /dev/null +++ b/research/gen5b-shared-kernels/test_coretime.py @@ -0,0 +1,35 @@ +import unittest +import check_coretime as c + +class TestCoretime(unittest.TestCase): + @classmethod + def setUpClass(cls):cls.result=c.run() + def test_selected_and_lost(self): + self.assertEqual((self.result['selected'],self.result['undone_old_restorations']),(32,26)) + def test_exact_integer_identity(self): + self.assertTrue(self.result['exact_integer_root_schedule_identity']) + self.assertTrue(self.result['missing_restoration_control_rejected']) + def test_net_histogram(self): + self.assertEqual(self.result['local_histogram_delta'],{1:-46,2:20}) + self.assertEqual(self.result['residual_rank_count_delta'],{2:32,3:-58,4:26}) + def test_conflicts_explicit(self): + self.assertEqual({z['helper']for z in self.result['rejected']},{16485,16709}) + def test_exact_source_spans(self): + self.assertTrue(all(z['source_union_size']==180 for z in self.result['candidates'])) + def test_wrong_promoted_frame_rejected(self): + with self.assertRaisesRegex(AssertionError,'Promoted delivery outside target cap'): + c.run('wrong_promoted_frame') + def test_missing_old_undo_rejected(self): + with self.assertRaisesRegex(AssertionError,'Missing old restoration undo'): + c.run('omit_old_restoration_undo') + def test_shared_blocker_rejected(self): + with self.assertRaisesRegex(AssertionError,'Shared blocker'): + c.run('shared_blocker') + def test_incompatible_prefix_rejected(self): + with self.assertRaisesRegex(AssertionError,'Prefix closing frame outside common frame'): + c.run('incompatible_prefix') + def test_kernel_donor_overlap_disclosed(self): + self.assertEqual({r['donor']for r in self.result['kernel_donor_contracts']}, + {12649,12678,8811,11313,11329}) + +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/test_finite_bill.py b/research/gen5b-shared-kernels/test_finite_bill.py new file mode 100644 index 0000000000..d71471a416 --- /dev/null +++ b/research/gen5b-shared-kernels/test_finite_bill.py @@ -0,0 +1,23 @@ +from fractions import Fraction as F +import unittest + +import finite_bill + + +class FiniteBillTests(unittest.TestCase): + def test_explicit_cutoff_inequalities(self): + for delta in (F(1), F(1, 100), F(1, 10 ** 20)): + for coefficient in (1, 90386288803484701): + cutoff = finite_bill.cutoff(delta, coefficient) + self.assertGreaterEqual(F(cutoff) * delta ** 2, 36) + self.assertGreaterEqual(F(cutoff) * delta, + 2 * (4 + (coefficient - 1).bit_length())) + + def test_invalid_gap_rejected(self): + for delta in (F(0), F(-1), F(2)): + with self.assertRaises(AssertionError): + finite_bill.cutoff(delta, 1) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/gen5b-shared-kernels/test_kernel70_arithmetic.py b/research/gen5b-shared-kernels/test_kernel70_arithmetic.py new file mode 100644 index 0000000000..ea19724d7e --- /dev/null +++ b/research/gen5b-shared-kernels/test_kernel70_arithmetic.py @@ -0,0 +1,110 @@ +"""Focused kernel70 exact-pricing, chart, composition and finite-bound checks.""" +import copy +from fractions import Fraction as F +import unittest + +import check_kernel70 +import check_kernel70_norm +import check_pr300_kernel70_composition +import check_kernel70_bank_assignment +import check_complete_suffix +import kernel70_pricing as price +import kernel70_charts as charts +import kernel70_finite_bill as bill + + +class SmallChartTests(unittest.TestCase): + def test_both_line_orders(self): + for line in ((6,7),(16,17),(2,3)): + for rank in (1,23): + z=charts.line_chart(*line,rank) + self.assertEqual(abs(z['determinant']),2) + self.assertLessEqual(z['max_numerator'],2) + self.assertLessEqual(z['max_denominator'],2) + def test_bad_line_rejected(self): + with self.assertRaises(AssertionError):charts.line_chart(2,2,1) + def test_nonorthogonal_partition_rejected(self): + cols=[[int(i==j)for i in range(24)]for j in range(24)] + with self.assertRaises(AssertionError):charts.checked_chart(cols,1) + def test_bad_histogram_types_rejected(self): + for d in ({1:True},{True:1},{'x':1},{1:1,'1':2}): + with self.assertRaises(ValueError):price.integer_map(d) + def test_odd_pivot_packing_rejected(self): + with self.assertRaises(ValueError):price.patterns(69,{}) + + +class IntegratedBindingTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.bridge=check_kernel70.run() + cls.composition=check_pr300_kernel70_composition.run() + cls.price=price.run(cls.bridge,composition=cls.composition) + cls.charts=charts.run(cls.bridge) + cls.norm=check_kernel70_norm.run() + cls.banks=check_kernel70_bank_assignment.run() + cls.suffix=check_complete_suffix.run() + def run_bill(self,**changes): + args=dict(chart=self.charts,norm=self.norm,math=self.price,bridge=self.bridge, + banks=self.banks,suffix=self.suffix,composition=self.composition) + args.update(changes) + return bill.run(**args) + def test_full_pricing_and_bill(self): + r=self.run_bill() + self.assertEqual(self.price['kappa'],F(749940157923873,10**18)) + self.assertEqual(self.price['literal_stock'],1229560) + self.assertEqual(self.price['calls'],483425) + self.assertEqual(r['payload_bits'],104) + self.assertEqual(r['payload_strict_gap'],7354671393307281152206899447616) + self.assertLess(r['conservative_payload_upper'],2**104) + self.assertEqual(r['displayed_finite_coefficient'],90466979917115701) + self.assertEqual(r['pivot_residual_demands'],70) + self.assertFalse(r['all_size_theorem_verified']) + def test_measured_histogram_mismatch_rejected(self): + z=copy.deepcopy(self.bridge);z['local_paid_histogram_delta'][1]+=1 + with self.assertRaises(AssertionError):price.measured_kernel_delta(z) + def test_missing_path_rejected(self): + z=copy.deepcopy(self.bridge);z['paths'].pop() + with self.assertRaises(AssertionError):price.measured_kernel_delta(z) + def test_corrupt_paid_entrance_rejected(self): + z=copy.deepcopy(self.bridge);z['paths'][0]['new_paid_entrance_dimensions']=[1,3] + with self.assertRaises(AssertionError):price.measured_kernel_delta(z) + def test_wrong_shear_count_rejected(self): + z=copy.deepcopy(self.bridge);z['setup_adds']=473 + with self.assertRaises(AssertionError):price.measured_kernel_delta(z) + def test_missing_chart_use_rejected(self): + z=copy.deepcopy(self.charts);z['role_chart_uses'].pop() + with self.assertRaises(AssertionError):self.run_bill(chart=z) + def test_wrong_chart_rank_rejected(self): + z=copy.deepcopy(self.charts);p=z['role_chart_uses'][0]['program_id'] + z['factor_programs'][p]['residual_rank']+=1 + with self.assertRaises(AssertionError):self.run_bill(chart=z) + def test_missing_sink_redirects_rejected(self): + z=copy.deepcopy(self.norm);z['actual_sink_redirects']=0 + with self.assertRaises(AssertionError):self.run_bill(norm=z) + def test_missing_sink_graph_edges_rejected(self): + z=copy.deepcopy(self.norm);z['target_majorant_edges']-=1 + with self.assertRaises(AssertionError):self.run_bill(norm=z) + def test_payload_equality_at_cap_rejected(self): + z=copy.deepcopy(self.norm);z['payload_bound']=2**104 + with self.assertRaises(AssertionError):self.run_bill(norm=z) + def test_wrong_bank_count_rejected(self): + z=copy.deepcopy(self.banks);z['banks_per_stage']-=1 + with self.assertRaises(AssertionError):self.run_bill(banks=z) + def test_final12_multiset_required(self): + z=copy.deepcopy(self.suffix);z['unchanged_scalar_multiset']=False + with self.assertRaises(AssertionError):self.run_bill(suffix=z) + def test_pr300_scalar_invariance_required(self): + z=copy.deepcopy(self.composition);z['scalar_majorants_unchanged_by_descent2']=False + with self.assertRaises(AssertionError):self.run_bill(composition=z) + def test_pr300_disjointness_required(self): + z=copy.deepcopy(self.composition);z['descent2_overlap_kernel70']=[1] + with self.assertRaises(AssertionError):self.run_bill(composition=z) + def test_pr300_histogram_binding_required(self): + z=copy.deepcopy(self.composition);z['combined_local_histogram_delta_over299'][1]+=1 + with self.assertRaises(AssertionError):self.run_bill(composition=z) + def test_pr300_wrong_source_pin_rejected(self): + z=copy.deepcopy(self.composition);z['input_sha256']['pr300/descent2-selection.json']='0'*64 + with self.assertRaises(AssertionError):self.run_bill(composition=z) + + +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/research/gen5b-shared-kernels/test_kernel70_bank_assignment.py b/research/gen5b-shared-kernels/test_kernel70_bank_assignment.py new file mode 100644 index 0000000000..3885a500fd --- /dev/null +++ b/research/gen5b-shared-kernels/test_kernel70_bank_assignment.py @@ -0,0 +1,36 @@ +import unittest + +import check_kernel70_bank_assignment as banks + + +class KernelBankAssignmentTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.result = banks.run() + + def test_complete_role_rebinding(self): + x = self.result + self.assertEqual(x['new_shared_kernel_pivots'], 70) + self.assertEqual(x['helper_roles'], 15427) + self.assertEqual(x['checked_role_replica_assignments_per_stage'], 925620) + self.assertEqual(x['total_stage_assignments'], 4628100) + self.assertEqual(x['family_counts'][23], 1644) + self.assertEqual(x['family_counts'][24], 11403) + + def test_bank_addresses_and_stock(self): + x = self.result + self.assertEqual(x['assignment_sha256'], + '69841a26beddd5a1d4cea70c745d831fe36e6543270b515a8beb4ffb2c61bee5') + self.assertEqual(x['banks_per_stage'], 161432) + self.assertEqual(x['literal_stock'], 1229560) + self.assertEqual(x['unreplicated_stock'], '61478/3') + self.assertTrue(x['all_banks_full']) + self.assertTrue(x['stages_have_disjoint_bank_namespaces']) + + def test_duplicated_role_is_rejected(self): + with self.assertRaisesRegex(AssertionError, 'Missing or duplicated helper role'): + banks.run(mutation='duplicate_role') + + +if __name__ == '__main__': + unittest.main() diff --git a/research/gen5b-shared-kernels/test_kernel72_arithmetic.py b/research/gen5b-shared-kernels/test_kernel72_arithmetic.py new file mode 100644 index 0000000000..952e973513 --- /dev/null +++ b/research/gen5b-shared-kernels/test_kernel72_arithmetic.py @@ -0,0 +1,120 @@ +"""Focused exact-construction and end-to-end binding negative controls.""" +import copy +from fractions import Fraction as F +import unittest + +import check_shared_kernel +import check_scalar_bounds +import check_complete_suffix +import check_kernel_bank_assignment +import check_pr300_composition +import source_data as sd +import kernel72_pricing as price +import kernel72_charts as charts +import kernel72_finite_bill as bill + + +class SmallChartTests(unittest.TestCase): + def test_both_line_orders(self): + for line in ((6,7),(16,17),(2,3)): + for rank in (1,23): + z=charts.line_chart(*line,rank) + self.assertEqual(abs(z['determinant']),2) + self.assertLessEqual(z['max_numerator'],2) + self.assertLessEqual(z['max_denominator'],2) + def test_bad_line_rejected(self): + with self.assertRaises(AssertionError):charts.line_chart(2,2,1) + def test_non_line_rank_rejected(self): + with self.assertRaises(ValueError):charts.line_chart(2,3,2) + def test_nonorthogonal_partition_rejected(self): + cols=[[int(i==j)for i in range(24)]for j in range(24)] + with self.assertRaises(AssertionError):charts.checked_chart(cols,1) + def test_bad_histogram_types_rejected(self): + for d in ({1:True},{True:1},{'x':1},{1:1,'1':2}): + with self.assertRaises(ValueError):price.integer_map(d) + def test_odd_pivot_packing_rejected(self): + with self.assertRaises(ValueError):price.patterns(71,{}) + + +class IntegratedBindingTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.bridge=check_shared_kernel.run(selection='union72') + cls.price=price.run(cls.bridge) + cls.charts=charts.run(cls.bridge) + cls.norm=check_scalar_bounds.run() + cls.banks=check_kernel_bank_assignment.run() + cls.suffix=check_complete_suffix.run() + cls.composition=check_pr300_composition.run() + cls.extra=price.price_additional_histogram( + cls.price, sd.read_bytes('pr300/descent2-selection.json'), + sd.MANIFEST['files']['pr300/descent2-selection.json']) + def run_bill(self,**changes): + args=dict(chart=self.charts,norm=self.norm,math=self.price,bridge=self.bridge, + banks=self.banks,suffix=self.suffix);args.update(changes) + return bill.run(**args) + def test_full_pricing_and_bill(self): + r=self.run_bill() + self.assertEqual(self.price['kappa'],F(749917402998347,10**18)) + self.assertEqual(self.price['literal_stock'],1229555) + self.assertEqual(self.price['calls'],483130) + self.assertEqual(r['payload_bits'],102) + self.assertLess(r['displayed_finite_coefficient'],2**80) + self.assertEqual(r['pivot_residual_demands'],72) + self.assertFalse(r['all_size_theorem_verified']) + def test_measured_histogram_mismatch_rejected(self): + z=copy.deepcopy(self.bridge);z['local_paid_histogram_delta'][1]+=1 + with self.assertRaises(AssertionError):price.measured_kernel_delta(z) + def test_missing_path_rejected(self): + z=copy.deepcopy(self.bridge);z['paths'].pop() + with self.assertRaises(AssertionError):price.measured_kernel_delta(z) + def test_corrupt_paid_entrance_rejected(self): + z=copy.deepcopy(self.bridge);z['paths'][0]['new_paid_entrance_dimensions']=[1,3] + with self.assertRaises(AssertionError):price.measured_kernel_delta(z) + def test_missing_chart_use_rejected(self): + z=copy.deepcopy(self.charts);z['role_chart_uses'].pop() + with self.assertRaises(AssertionError):self.run_bill(chart=z) + def test_wrong_chart_rank_rejected(self): + z=copy.deepcopy(self.charts);p=z['role_chart_uses'][0]['program_id'] + z['factor_programs'][p]['residual_rank']+=1 + with self.assertRaises(AssertionError):self.run_bill(chart=z) + def test_missing_sink_redirects_rejected(self): + z=copy.deepcopy(self.norm);z['actual_sink_redirects']=0 + with self.assertRaises(AssertionError):self.run_bill(norm=z) + def test_missing_sink_graph_edges_rejected(self): + z=copy.deepcopy(self.norm);z['target_majorant_edges']-=1 + with self.assertRaises(AssertionError):self.run_bill(norm=z) + def test_payload_tamper_rejected(self): + z=copy.deepcopy(self.norm);z['payload_bound']-=1 + with self.assertRaises(AssertionError):self.run_bill(norm=z) + def test_wrong_bank_count_rejected(self): + z=copy.deepcopy(self.banks);z['banks_per_stage']-=1 + with self.assertRaises(AssertionError):self.run_bill(banks=z) + def test_final12_multiset_required(self): + z=copy.deepcopy(self.suffix);z['unchanged_scalar_multiset']=False + with self.assertRaises(AssertionError):self.run_bill(suffix=z) + def test_extra_source_byte_change_rejected(self): + pin=dict(repository='example/repo',path='selection.json',commit='a'*40, + git_blob='b'*40,sha256='c'*64) + with self.assertRaises(ValueError):price.price_additional_histogram(self.price,b'{}',pin) + def test_pr300_composed_finite_bill(self): + r=self.run_bill(math=self.extra,composition=self.composition) + self.assertEqual(self.extra['kappa'],F(749936120273400,10**18)) + self.assertEqual(r['literal_children'],60*483455) + self.assertEqual(r['payload_bits'],102) + self.assertIn('PR300',r['status']) + self.assertFalse(r['all_size_theorem_verified']) + def test_extra_price_needs_composition(self): + with self.assertRaises(AssertionError):self.run_bill(math=self.extra) + def test_pr300_scalar_invariance_required(self): + z=copy.deepcopy(self.composition);z['scalar_majorants_unchanged_by_descent2']=False + with self.assertRaises(AssertionError):self.run_bill(math=self.extra,composition=z) + def test_pr300_disjointness_required(self): + z=copy.deepcopy(self.composition);z['descent2_overlap_final12']=[1] + with self.assertRaises(AssertionError):self.run_bill(math=self.extra,composition=z) + def test_pr300_histogram_binding_required(self): + z=copy.deepcopy(self.composition);z['combined_local_histogram_delta_over299'][1]+=1 + with self.assertRaises(AssertionError):self.run_bill(math=self.extra,composition=z) + + +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/research/gen5b-shared-kernels/test_kernel_bank_assignment.py b/research/gen5b-shared-kernels/test_kernel_bank_assignment.py new file mode 100644 index 0000000000..aeefae2d8f --- /dev/null +++ b/research/gen5b-shared-kernels/test_kernel_bank_assignment.py @@ -0,0 +1,35 @@ +import unittest + +import check_kernel_bank_assignment as banks + + +class KernelBankAssignmentTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.result = banks.run() + + def test_complete_role_rebinding(self): + x = self.result + self.assertEqual(x['new_shared_kernel_pivots'], 72) + self.assertEqual(x['helper_roles'], 15427) + self.assertEqual(x['checked_role_replica_assignments_per_stage'], 925620) + self.assertEqual(x['total_stage_assignments'], 4628100) + self.assertEqual(x['family_counts'][23], 1646) + self.assertEqual(x['family_counts'][24], 11401) + + def test_bank_addresses_and_stock(self): + x = self.result + self.assertEqual(x['assignment_sha256'], + '70da321406af20759213ffdfd5bb440ea2fd2757d89101c4f56d2efec01a951a') + self.assertEqual(x['banks_per_stage'], 161431) + self.assertEqual(x['literal_stock'], 1229555) + self.assertTrue(x['all_banks_full']) + self.assertTrue(x['stages_have_disjoint_bank_namespaces']) + + def test_duplicated_role_is_rejected(self): + with self.assertRaisesRegex(AssertionError, 'Missing or duplicated helper role'): + banks.run(mutation='duplicate_role') + + +if __name__ == '__main__': + unittest.main() diff --git a/research/gen5b-shared-kernels/test_pipeline.py b/research/gen5b-shared-kernels/test_pipeline.py new file mode 100644 index 0000000000..018f181708 --- /dev/null +++ b/research/gen5b-shared-kernels/test_pipeline.py @@ -0,0 +1,71 @@ +"""Independent local and complete-suffix controls for the 12-helper exchange.""" +from collections import Counter +import unittest + +import check_coretime +import check_complete_suffix as scalar +import check_suffix_frames as frames + + +class PipelineTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.local = check_coretime.run(minimal=True) + cls.size, cls.before, cls.after, cls.scalar = scalar.build() + + def test_minimal_selection(self): + self.assertEqual(self.local['selected'], 12) + self.assertEqual(self.local['undone_old_restorations'], 6) + groups = Counter(z['old_restored_helper_stream'] for z in self.local['candidates']) + self.assertEqual(set(groups.values()), {2}) + + def test_integer_local_map(self): + self.assertTrue(self.local['exact_integer_root_schedule_identity']) + self.assertTrue(self.local['missing_restoration_control_rejected']) + + def test_all_columns_forward(self): + self.assertEqual(self.size, 18954) + self.assertEqual(scalar.evaluate(self.before, self.size), + scalar.evaluate(self.after, self.size)) + + def test_all_columns_reverse(self): + self.assertEqual(scalar.evaluate(self.before, self.size, True), + scalar.evaluate(self.after, self.size, True)) + + def test_exact_integer_operators_and_majorants(self): + for reverse in (False, True): + for absolute in (False, True): + self.assertEqual(scalar.integer_operator(self.before, self.size, reverse, absolute), + scalar.integer_operator(self.after, self.size, reverse, absolute)) + + def test_complete_scalar_multiset(self): + self.assertEqual(len(self.before), 55985) + self.assertEqual(Counter(x[:3] for x in self.before), + Counter(x[:3] for x in self.after)) + self.assertEqual(self.scalar['co_retimed_partner_deliveries'], 12) + + def test_missing_restoration_is_detected(self): + bad = self.after[:] + index = next(i for i, row in enumerate(bad) if row[3].startswith('new_restore:')) + del bad[index] + self.assertNotEqual(scalar.evaluate(self.before, self.size), + scalar.evaluate(bad, self.size)) + + def test_measured_paid_delta(self): + result = frames.run() + self.assertEqual(result['local_histogram_delta'], {1: 18, 2: -12}) + self.assertEqual(result['affected_streams'], 60) + self.assertTrue(result['both_reflected_ledgers']) + self.assertEqual(result['partner_setup_descent_replacements_applied'], 12) + + def test_missing_partner_promotion_rejected(self): + with self.assertRaisesRegex(AssertionError, 'nonnested'): + frames.run('omit_partner_promotion') + + def test_missing_old_restoration_undo_rejected(self): + with self.assertRaises(AssertionError): + frames.run('omit_old_undo') + + +if __name__ == '__main__': + unittest.main() diff --git a/research/gen5b-shared-kernels/test_pr300_bases.py b/research/gen5b-shared-kernels/test_pr300_bases.py new file mode 100644 index 0000000000..b71b0ab277 --- /dev/null +++ b/research/gen5b-shared-kernels/test_pr300_bases.py @@ -0,0 +1,18 @@ +import unittest +import copy +import source_data as sd +import check_pr300_bases as bases + +class BasisTests(unittest.TestCase): + def test_pinned_bases(self): + r=bases.run() + self.assertEqual(r['unique_selected_bases'],65) + self.assertTrue(r['nondegenerate_over_every_field_of_characteristic_above5']) + def test_singular_basis_rejected(self): + x=sd.read_json('pr300/descent2-selection.json') + x['entries'][0]['new_basis'][0]=[0]*24 + with self.assertRaises(AssertionError): bases.basis_receipt(x) + def test_bareiss_row_swap(self): + self.assertEqual(bases.det([[0,2],[3,4]]),-6) + +if __name__=='__main__': unittest.main() diff --git a/research/gen5b-shared-kernels/test_pr300_composition.py b/research/gen5b-shared-kernels/test_pr300_composition.py new file mode 100644 index 0000000000..eec5bb2092 --- /dev/null +++ b/research/gen5b-shared-kernels/test_pr300_composition.py @@ -0,0 +1,14 @@ +import unittest +from check_pr300_composition import run +class CompositionTests(unittest.TestCase): + def test_exact_disjoint_composition(self): + r=run();self.assertEqual(r['new_descent_gate_count'],89);self.assertEqual(r['final12_broader_scalar_closure'],84);self.assertEqual(r['kernel72_streams'],165) + def test_histograms_add(self): + r=run();H=r['combined_local_histogram_delta_over299'];self.assertEqual(sum(k*v for k,v in H.items()),-78) + def test_unchanged_following_stages(self): + r=run();self.assertEqual((r['unchanged_restore_entries'],r['unchanged_sink_entries']),(440,7)) + def test_reject_final12_overlap(self): + with self.assertRaises(AssertionError):run('frame_overlap') + def test_reject_kernel_overlap(self): + with self.assertRaises(AssertionError):run('kernel_overlap') +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/test_pricing.py b/research/gen5b-shared-kernels/test_pricing.py new file mode 100644 index 0000000000..d1967e8efd --- /dev/null +++ b/research/gen5b-shared-kernels/test_pricing.py @@ -0,0 +1,51 @@ +from fractions import Fraction as F +import unittest + +import baseline_arithmetic as baseline +import packing +import reprice + + +class PricingTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.result = reprice.reprice({1: 18, 2: -12}, {2: 12, 3: -18, 4: 6}) + + def test_profile_and_packing(self): + x = self.result + self.assertEqual((x['calls'], x['rank_mass'], x['literal_stock']), + (482665, 2455070, 1229735)) + self.assertEqual(x['deficit'], 4400) + self.assertEqual(x['packing']['feasible_bins'], 161467) + self.assertTrue(x['packing']['optimal']) + self.assertEqual(x['packing']['unused_coordinate_capacity'], 0) + + def test_adjacent_moment_bounds(self): + x = self.result + self.assertEqual(x['root_bracket'], + [F(750469712644613, 10 ** 18), F(750469712644614, 10 ** 18)]) + self.assertLess(x['moment_interval'][1], 1) + self.assertGreater(x['adjacent_moment_interval'][0], 1) + + def test_outer_constraints_and_scope(self): + x = self.result + self.assertEqual(x['kappa'], F(749906929903449, 10 ** 18)) + self.assertEqual(len(x['assembly']['strict_constraints']), 47) + self.assertTrue(all(v > 0 for v in x['assembly']['strict_constraints'].values())) + self.assertEqual(x['assembly']['adjacent_grid_rejected'], ['g3_above_kappa']) + self.assertFalse(x['physical_admission']) + + def test_missing_bank_is_rejected(self): + x = self.result['packing'] + patterns = [dict(widths=row['widths'][:], count=row['count']) for row in x['patterns']] + patterns[0]['count'] -= 1 + with self.assertRaises(AssertionError): + packing.verify(120, x['demand'], patterns) + + def test_float_delta_is_rejected(self): + with self.assertRaises(ValueError): + reprice.reprice({1: 18.0}, {}) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/gen5b-shared-kernels/test_rootcuts.py b/research/gen5b-shared-kernels/test_rootcuts.py new file mode 100644 index 0000000000..d619f1d891 --- /dev/null +++ b/research/gen5b-shared-kernels/test_rootcuts.py @@ -0,0 +1,8 @@ +import unittest +import check_rootcuts as c +class TestCutScreen(unittest.TestCase): + def test_rank_empty(self): self.assertEqual(c.rank([]),0) + def test_rank_dependent(self): self.assertEqual(c.rank([[1,2],[2,4]],2),1) + def test_rank_independent(self): self.assertEqual(c.rank([[1,2],[2,5]],2),2) + def test_all_actual_roles(self): self.assertEqual(c.run()['count'],34) +if __name__=='__main__': unittest.main() diff --git a/research/gen5b-shared-kernels/test_scalar_norm.py b/research/gen5b-shared-kernels/test_scalar_norm.py new file mode 100644 index 0000000000..b42503bfb5 --- /dev/null +++ b/research/gen5b-shared-kernels/test_scalar_norm.py @@ -0,0 +1,31 @@ +import unittest + +import scalar_norm_transport as transport + + +class ScalarNormTests(unittest.TestCase): + def test_commuting_same_destination_updates(self): + old = [(0, 1, 1, 'a'), (0, 2, -1, 'b')] + result = transport.check(old, old[::-1]) + self.assertEqual(result['commuting_adjacent_swaps'], 1) + self.assertEqual(result['forward_norm_factor'], 2) + + def test_noncommuting_swap_rejected(self): + old = [(0, 1, 1, 'a'), (1, 2, 1, 'b')] + with self.assertRaisesRegex(AssertionError, 'noncommuting'): + transport.check(old, old[::-1]) + + def test_changed_coefficient_rejected(self): + with self.assertRaises(AssertionError): + transport.check([(0, 1, 1, 'a')], [(0, 1, -1, 'a')]) + + def test_complete_transport(self): + result = transport.run() + self.assertEqual(result['commuting_adjacent_swaps'], 172944) + self.assertEqual(len(result['destinations_with_changed_update_order']), 12) + self.assertEqual(result['payload_bits'], 103) + self.assertLess(result['payload_upper'], 2 ** 104) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/gen5b-shared-kernels/test_shared_kernel.py b/research/gen5b-shared-kernels/test_shared_kernel.py new file mode 100644 index 0000000000..2529435e7b --- /dev/null +++ b/research/gen5b-shared-kernels/test_shared_kernel.py @@ -0,0 +1,24 @@ +import unittest +from check_shared_kernel import run + +class SharedKernelTests(unittest.TestCase): + def test_three_individual_groups(self): + for s in('line6','line16','line2'): + with self.subTest(selection=s):self.assertTrue(run(selection=s)['formal_forward_and_inverse_equal']) + def test_two_line_union(self): + r=run();self.assertEqual(r['pivots'],34);self.assertEqual(r['distinct_donors'],43) + def test_trimmed_three_line_union(self): + r=run(selection='union72');self.assertEqual(r['setup_adds'],473);self.assertEqual(r['max_donor_multiplicity'],21) + def test_missing_setup_rejected(self): + with self.assertRaises(AssertionError):run('omit_setup') + def test_missing_restore_rejected(self): + with self.assertRaises(AssertionError):run('omit_restore') + def test_bad_response_rejected(self): + with self.assertRaises(AssertionError):run('bad_relation') + def test_conservative_payload_cap(self): + from check_scalar_bounds import run as bounds + r=bounds();self.assertEqual(r['payload_bits'],102);self.assertTrue(r['retained_payload_cap_2_to104']);self.assertEqual(r['actual_sink_redirects'],14) + def test_bad_entrance_rejected(self): + with self.assertRaises(AssertionError):run('bad_entrance') + +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/test_source_data.py b/research/gen5b-shared-kernels/test_source_data.py new file mode 100644 index 0000000000..20381c8e66 --- /dev/null +++ b/research/gen5b-shared-kernels/test_source_data.py @@ -0,0 +1,59 @@ +"""Mutation and portability controls for the immutable input loader.""" +import io +import os +from pathlib import Path +import tempfile +import unittest +from unittest.mock import patch + +import fetch_inputs +import source_data as sd + + +class SourceDataTests(unittest.TestCase): + def test_all_input_pins(self): + self.assertEqual(sd.verify_all(), len(sd.MANIFEST['files'])) + + def test_altered_input_rejected(self): + name = 'expected/kernel-pins.json' + with self.assertRaisesRegex(ValueError, 'Pinned input bytes changed'): + sd.verify_bytes(name, sd.read_bytes(name) + b' ') + + def test_unpinned_path_rejected(self): + with self.assertRaisesRegex(ValueError, 'Unpinned input'): + sd.read_bytes('../untrusted.json') + + def test_source_location_is_explicit(self): + with patch.dict(os.environ, {}, clear=True): + with self.assertRaisesRegex(RuntimeError, 'CORETIME_SOURCE_DIR'): + sd.source_root() + + def test_fetch_url_and_exact_bytes(self): + name = 'expected/kernel-pins.json' + raw = sd.read_bytes(name) + manifest = dict(sd.MANIFEST, files={name: sd.MANIFEST['files'][name]}) + with tempfile.TemporaryDirectory() as directory: + with patch.object(fetch_inputs, 'MANIFEST', manifest): + with patch('urllib.request.urlopen', return_value=io.BytesIO(raw)) as request: + fetch_inputs.fetch(directory) + url = request.call_args.args[0] + self.assertIn('/' + sd.HEAD + '/', url) + self.assertTrue(url.endswith('/' + name)) + self.assertEqual((Path(directory) / name).read_bytes(), raw) + with patch('urllib.request.urlopen') as request: + fetch_inputs.fetch(directory) + request.assert_not_called() + + def test_fetch_rejects_corrupted_download(self): + name = 'expected/kernel-pins.json' + manifest = dict(sd.MANIFEST, files={name: sd.MANIFEST['files'][name]}) + with tempfile.TemporaryDirectory() as directory: + with patch.object(fetch_inputs, 'MANIFEST', manifest): + with patch('urllib.request.urlopen', return_value=io.BytesIO(b'{}')): + with self.assertRaisesRegex(ValueError, 'Pinned input bytes changed'): + fetch_inputs.fetch(directory) + self.assertFalse((Path(directory) / name).exists()) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/gen5b-shared-kernels/test_target_majorant.py b/research/gen5b-shared-kernels/test_target_majorant.py new file mode 100644 index 0000000000..1ae0090059 --- /dev/null +++ b/research/gen5b-shared-kernels/test_target_majorant.py @@ -0,0 +1,35 @@ +"""Exhaustive small-model check of target-prefix plus sink domination.""" +from itertools import permutations,product +import unittest + +def close(v): + # Dp: row0<-row1. Ds: row2<-row0. Dp Ds=0, Ds Dp !=0. + z=v[:];z[0]+=2*v[1];z[2]+=2*z[0];return z + +def replay(word,seed): + v=seed[:] + for op in word: + if op in ('p0','p1'):v[0]+=v[1] + elif op in ('s0','s1'):v[2]+=v[0] + else:v[int(op)]+=1 + return v + +class TargetMajorant(unittest.TestCase): + def test_all_interleavings_nonnegative_sources(self): + count=0 + # Two copies of each target shear and one increment in every coordinate. + for word in permutations(('p0','p1','s0','s1','0','1','2')): + for seed in product(range(2),repeat=3): + bound=close([x+1 for x in seed]);actual=replay(word,list(seed)) + self.assertTrue(all(a<=b for a,b in zip(actual,bound)));count+=1 + self.assertEqual(count,40320) + def test_missing_sink_batch_can_underestimate(self): + seed=[0,1,0];actual=replay(('p0','p1','s0','s1'),seed) + prefix_only=[2,1,0] + self.assertGreater(actual[2],prefix_only[2]) + def test_reversing_closure_can_underestimate(self): + # (I+2Dp)(I+2Ds) misses the directed Ds Dp cross-term. + actual=replay(('p0','p1','s0','s1'),[0,1,0]) + self.assertEqual(actual,[2,1,4]);self.assertGreater(actual[2],0) + +if __name__=='__main__':unittest.main() diff --git a/research/gen5b-shared-kernels/weighted275/.gitignore b/research/gen5b-shared-kernels/weighted275/.gitignore new file mode 100644 index 0000000000..f360d73424 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +inputs/ +generated/ diff --git a/research/gen5b-shared-kernels/weighted275/DEPENDENCIES.json b/research/gen5b-shared-kernels/weighted275/DEPENDENCIES.json new file mode 100644 index 0000000000..d1ca8a2f80 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/DEPENDENCIES.json @@ -0,0 +1,21 @@ +{ + "parent_commit": "f4be7cfff0ea3935d454b2cb944ecabc5ac4595a", + "files": { + "exact_intervals.py": { + "bytes": 2242, + "sha256": "c261dd44838d4e36c68768a1023ac859677089464ab121cdb46b30c918679333" + }, + "assembly_arithmetic.py": { + "bytes": 5223, + "sha256": "f2f6293c31deb579ebbea19eeaa732c07304ce9c2cacd431685e2dd18d4b0d58" + }, + "kernel70-witness.json": { + "bytes": 53356, + "sha256": "8b99bb2f0e9f352c303d251009058cc30e7ad4c20b8e32e863afb0ebcc3388b7" + }, + "certificates/coretime12/local.json": { + "bytes": 7577, + "sha256": "773519b2e5511a1f18a2d3d3f2798a432d97a6b3ceca1a7d5febd119f457ce5f" + } + } +} diff --git a/research/gen5b-shared-kernels/weighted275/MANIFEST.json b/research/gen5b-shared-kernels/weighted275/MANIFEST.json new file mode 100644 index 0000000000..38cbe1595c --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/MANIFEST.json @@ -0,0 +1,183 @@ +{ + "schema": "weighted275-additive-files/1", + "source_head": "10b40041d4ab8a6610083e95bc571aee3468bca2", + "parent_pr302_commit": "f4be7cfff0ea3935d454b2cb944ecabc5ac4595a", + "files": { + ".gitignore": { + "bytes": 32, + "sha256": "5730cb3eb4b2a2d6afa49a9a41ea2aeba9da921fdec0024ce1013275350044f2" + }, + "DEPENDENCIES.json": { + "bytes": 663, + "sha256": "be869c6fad9016242012ebc0bb59fb8a2a02cfa9fe613b4ad1b60f804f798f08" + }, + "NOTICE.md": { + "bytes": 2520, + "sha256": "038e6d32fd297a9c3e1d04a81d49f1e8fdc14cb447db9001965dbc4eaade5576" + }, + "PROOF.md": { + "bytes": 10869, + "sha256": "141ce08deb071c822c75f2e0bab1eb778f8c7d7d93eeabbd83370a7bbc38f30d" + }, + "README.md": { + "bytes": 6576, + "sha256": "6bf5d8e95ce8ee581fcadbc7ef98bc846a0a6294acd5bd4974693b6cbf4e8123" + }, + "bank_receipt_binding.py": { + "bytes": 4178, + "sha256": "f712502f645163fb7bfa4d39cfee2478c8ff9f2ac333f95d39c0e5e2c62dcb57" + }, + "build_response_cache.py": { + "bytes": 4314, + "sha256": "e9546161445c9430a579f50167949f13338c5b6977019e65d6dc282de6d4febf" + }, + "candidate-combined166-reclosed.json": { + "bytes": 159502, + "sha256": "f2932216a90298b62e2895bad0c5402faf6ce79e40aabc62e8e0c601067f4006" + }, + "candidate-combined48-reclosed-reverse.json": { + "bytes": 33025, + "sha256": "778c702ce5ca0601063f27d6b878be9aebad3806d755c31bd33519fe626b486f" + }, + "candidate-line16-17.json": { + "bytes": 140725, + "sha256": "ccfd4af2bb28f78c3d7c0df1b53b62abd4907942e533b33d3d38eccae9bbdada" + }, + "candidate-line2-3.json": { + "bytes": 7564, + "sha256": "dd000858f9c5639c580b4e3754991f430750f92436f45838da12efd469434aef" + }, + "candidate-line6-7.json": { + "bytes": 25008, + "sha256": "52ce4569b69afb2c3fd786cbb8efa315b5686b7cb62e8388e6b8467778863ba7" + }, + "candidate70-rebound.json": { + "bytes": 53277, + "sha256": "423da9c6edc40200a1defec3fd6ee507cb93e48a438df432df7f427b50bdbc01" + }, + "cases.py": { + "bytes": 970, + "sha256": "f54406a116cab7bb14b1be439478eed054613a6d7ec6cd9a04bbb6859725e3ce" + }, + "certificates/aggregate.json": { + "bytes": 1698, + "sha256": "c6760b5e1aa945b300c6bde3de4c501f56f9c5b977eca01e783ec9ad7ac927a7" + }, + "certificates/baseline.json": { + "bytes": 24587, + "sha256": "b0b1313f7aac627415fbeae4a21980e2f0f5089211ed346c9d259fe1383053dc" + }, + "certificates/case166.json": { + "bytes": 30962, + "sha256": "27da6fa6e75498b40b3ce7f46e2b1e6724ed69020499320c67b219947238a911" + }, + "certificates/case70.json": { + "bytes": 26484, + "sha256": "4afbba554f85adf2d43be20c30cd172be63066aac8392c41cd978475cc2455f2" + }, + "certificates/complex.json": { + "bytes": 3546, + "sha256": "26aaeff711d1fc3cfe1d98fb21593d00680705f14c05049db73ee3532f589d99" + }, + "certificates/overlap.json": { + "bytes": 1479, + "sha256": "7e907dbd9dcf4aac2ee1bc75c6baba3b11992b2867b8b96b07942e133bc53571" + }, + "chart_construction.py": { + "bytes": 2584, + "sha256": "d8ef92102d2ae7dccd85fd6f0565b3c5050878db4f6e580e9033a93090bd900f" + }, + "chart_rational.py": { + "bytes": 2337, + "sha256": "e95042aa1e8311cc3575663eeb0b50468044be68460bbdcac094cd5c76c3d07c" + }, + "check_bridge.py": { + "bytes": 11467, + "sha256": "38fb6d3ec2ecabd8b806f7b08151f57bcb1edb6aec60c33f83ec19da1e03d5d9" + }, + "check_candidate_charts.py": { + "bytes": 5378, + "sha256": "e588e1e33f5235e3a5905422c4703a762f9e4f60090cbd13e065020a3f2cdc99" + }, + "check_scalar_bounds.py": { + "bytes": 9673, + "sha256": "55f6f076448956f71f5b907d232ed20ed17daf5d0938854ec0f8fe01f0bde834" + }, + "check_shared_banks.py": { + "bytes": 7311, + "sha256": "2c2c2a36d4151de8e8cb7e614cb38aa87b25a11db9de2c45b1ce38e7ea3cdbf3" + }, + "compose_screened_groups.py": { + "bytes": 3220, + "sha256": "04ce226b69ba7f744985fc026ae68156a15a8a14cfe9254dcf71f3dd5024049d" + }, + "fetch_inputs.py": { + "bytes": 1351, + "sha256": "13f47ddb3b718c4deeeabd70169009ae4ea0a416d4c38f5b48964ed91a17798d" + }, + "inputs.json": { + "bytes": 17029, + "sha256": "bacbed72b4e184974596bb68fe0d4f288f4f943e88f7b5eb33cef0828f7d77bb" + }, + "integrate_bounded_candidate.py": { + "bytes": 9560, + "sha256": "2a7b37d8b4fdf33ac679e13c82df845b87a4b1e4a355bd98e1e0131e6b5507cb" + }, + "map_roles.py": { + "bytes": 4318, + "sha256": "f0c605d0364d7a08bc194e0d7885aec355b9c5ee1baf9cdff1719c233804a64b" + }, + "price_candidate.py": { + "bytes": 3864, + "sha256": "bce58448e1c73768231fa1d3c1df7ed4bcd9338972660f45ddfe86dbf968b9b8" + }, + "reproduce_complex.py": { + "bytes": 4589, + "sha256": "fd522134485624fd642747905aea99e107ea88e50d0ef89fb99c52d297f5eb0d" + }, + "reproduce_pr275.py": { + "bytes": 15576, + "sha256": "7b18d737e7423e2dc0115878d3b3c6f6f92c00c843b3851652453ab4a57d9904" + }, + "resolve_group_overlaps.py": { + "bytes": 3341, + "sha256": "dd4f9f4d8e0e46967f41958f26ffb57ad4e65d38c19a1fd95e8ff81c6f49e9c0" + }, + "review_payload_cap.py": { + "bytes": 5232, + "sha256": "ebcf73a8f5d0a052fb6f099fbe1dac2d93ff29db38d1c9e32d476eb3fd498b07" + }, + "run_checks.py": { + "bytes": 5210, + "sha256": "f3167f381a4aeb90793dc6982207e85b60e67b701f6248f23c8692fe7bfd085c" + }, + "search_expanded_lines.py": { + "bytes": 7693, + "sha256": "00063d58382bbad694c98d052a21899aa9ddb2a3941a395f836e700b03314bac" + }, + "source_data.py": { + "bytes": 1265, + "sha256": "24d386d6406767d20e137b6ed35ee8e499a501fa333a02242a10a0fa693f6283" + }, + "test_arithmetic.py": { + "bytes": 3672, + "sha256": "9ad651ca488edd47a07c6a5c7304400acffb837df4158455693412f43b1489e1" + }, + "test_bounded.py": { + "bytes": 2514, + "sha256": "043026bc3573b6bf43341242e1c6b1dc70dc9284372a6fc6e9ef906ad482b55a" + }, + "test_bridge166.py": { + "bytes": 3176, + "sha256": "9c2974b092b8ea10dc6152c56421a45f934e68b166cc42a28e4a0b44d10956da" + }, + "test_candidate_binding.py": { + "bytes": 3155, + "sha256": "43be8cc63e124ed7c2c8078fefd1a39bcf1d990df31b6251f2faa6ccd1c355f3" + }, + "test_portable_contract.py": { + "bytes": 3131, + "sha256": "7afaf6a2590d1faf69b7130b29d8fff827ee7993ba2e5e6361252ece8a37af40" + } + } +} diff --git a/research/gen5b-shared-kernels/weighted275/NOTICE.md b/research/gen5b-shared-kernels/weighted275/NOTICE.md new file mode 100644 index 0000000000..3f5e05c864 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/NOTICE.md @@ -0,0 +1,37 @@ +# Attribution and verification scope + +New material is provided under the repository's Apache-2.0 license and was +prepared with substantial OpenAI assistance. Independent AI-assisted replays +are not human peer review, an OpenAI endorsement or proof-assistant verification. + +The weighted-matching word, matching method and fixed-graph proof are the +PR275 contribution prepared for George Lydakis with substantial OpenAI Codex +assistance, including Ody's matching research and coordinated integration and +review. This update builds on the immutable package at +`10b40041d4ab8a6610083e95bc571aee3468bca2`: + +- [PR275 full notice](https://github.com/lydakis/integer-mult-bounds/blob/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/NOTICE.md) +- [Retained PR299 notice](https://github.com/lydakis/integer-mult-bounds/blob/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/NOTICE-PR299.md) +- [Retained PR300 notice](https://github.com/lydakis/integer-mult-bounds/blob/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/NOTICE-PR300.md) + +In particular, Rohan Arun's second constructed-frame descent is inherited +through PR300, including its prior PR291 lineage and Anthropic Claude assistance +disclosure. Chafik Boukhalfa's PR299 package and its source contributors retain +credit for the upstream kernel, restoration, sink, complex and compiler chain. +The parent PR302 NOTICE.md records that lineage in more detail and remains +unchanged. Source-specific licenses, including any inherited CC0 material, +remain applicable to their original sources. + +The contribution added here is the exact role-map port, corrected eligibility +of physical reuse donors, shared-donor line/closure construction, two bounded +overlap-resolution orders, explicit role-bank and chart binding, scalar bounds, +transparent candidate-specific payload certificate and conditional repricing. +No authorship of the weighted matching or inherited descents is claimed. +No exclusive priority or global optimality claim is made. + +The parent directory's earlier 70/72 construction, coordinated final12 component, +source manifests and receipts remain byte-for-byte intact. The old final12 +endpoint saving is explicitly rejected on this weighted word. No upstream +program is imported or executed. This update is conditional on the inherited +physical decoder, compiler, primitive constants and all-size interfaces; finite +certificate success is not verification of the full multiplication theorem. diff --git a/research/gen5b-shared-kernels/weighted275/PROOF.md b/research/gen5b-shared-kernels/weighted275/PROOF.md new file mode 100644 index 0000000000..93a1030b0c --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/PROOF.md @@ -0,0 +1,191 @@ +# A 166-pivot shared-donor bridge on the weighted-matching word + +## Result and scope + +Pinned base: PR275, commit `10b40041d4ab8a6610083e95bc571aee3468bca2`. +The candidate has 166 pivots, 210 distinct donors, 376 physical helper slots, +and 2,587 scalar setup ADDs followed by 2,587 inverse ADDs. +It removes 2,020 initial unit compensation ADDs. There is no co-retiming12 +contribution in this construction. + +The changed-stage checker passes the physical prefix relations, complete aliased +frame paths, paid-demand difference, and arbitrary-dirty-input compositional +identity. Exact pricing, literal role-to-bank packing, new chart factorization, +and the numerical finite invoice are separate companion certificates. The +inherited complete decoder, compiler and width-uniform interfaces remain +hypotheses. This is not a new unconditional multiplication theorem or a replay +of the entire upstream producer. + +## Why reused physical donor slots are legal here + +The weighted word stores `(donor, recipient)` pairs. Its physical map identifies +the recipient with the donor slot. The kernel guard excludes recipient keys; +it does not exclude donor values. Every paired recipient is gauged at rank21. +It has no initial ZERO-frame compensation read. Hence the literal initial +response of a reused donor slot is the donor's response, not the XOR of the two +virtual responses. The later recipient compensation remains in the suffix. + +We independently rebuild the signed adjoint and the physical initial prefix +from the pinned graph and word. This reproduces all 648,088 odd initial reads, +and all 1,720 existing kernel relations and cut-read triples. The new candidate +uses 105 reused physical donor slots. For each, the donor's last operation +strictly precedes the recipient gauge read, which precedes or coincides with +its first operation. Every complete physical frame chain is nested and ends at +FULL. The check includes 2,561 distinct exact rational containments, including +all 132 existing reused-donor examples. + +## Common cut and scalar proof + +Place the new setup after all ZERO compensation reads and old kernel setups, +before any source injection. Selected physical slots are disjoint from every +old kernel member and both descent endpoint sets. No selected slot is an old +early-restored helper or sunk helper. Thus its current entrance remains ZERO; +its first old required frame is explicitly recovered from the full alias path. + +Write `Q` for the old initial compensation prefix and `Q'` for that prefix +with the selected pivot reads removed. Let `A` be the commuting shear layer +`d += p` for every listed pivot/donor incidence. Pivot and donor sets are +disjoint; shared donors are permitted. The literal parity relations are +`R_p = sum_d R_d`. They imply `A Q' = Q A` over F2. +If the inherited remaining word is `S` and its full decoder is `U = S Q`, then +`A^-1 S A Q' = A^-1 U A = U`, because the inherited decoder fixes all dirty +helper coordinates. This also covers reused slots and arbitrary independent +dirty inputs. The final inverse layer is appended after the complete old word, +when all selected slots are at FULL. Its listed reverse order is valid even +with shared donors, since the shear factors commute. + +The checker evaluates this composition and its inverse on all 18,952 physical +pre-compaction coordinate columns. Removed sink slots are inert spectators. +This is a full-column check of the stated composition theorem, not a claimed +literal regeneration of the entire upstream scalar stream. Omitting a setup +or restore factor is detected. + +## Frame and paid-demand proof + +Each group uses `E = span(e_i-e_j)`, for one of the three specified pairs. +Every member's first required old frame contains E, checked exactly. Under +`G = 9I-J`, the vector has squared norm18, so E is nondegenerate over Q and +over the retained large-prime address fields. Payload computations are over +F2; address-field nondegeneracy is a separate requirement. + +A pivot starts at E through its residual bank endpoint. Each distinct donor +pays one ZERO-to-E call, regardless of fan-in. Every old first climb of rank d +becomes rank d-1, followed by the unchanged nested alias chain. Scalars are +charged once per incidence, not once per donor. The measured local paid +histogram difference is: + +`{1:+210, 2:+306, 3:-306, 4:+70, 5:-70}`. + +Residual families change by `{24:-166, 23:+166}` per unreplicated stage. +The full five-stage rank mass falls by830, as does twice the stock change +once the separate packing witness is applied. The deficit remains unchanged. + +## Scalar size and the explicit new recipe ceiling + +Fresh exact helper majorant propagation on the weighted word, with all14 +actual sink redirects and an acyclic target-only majorant graph, gives + +- forward prefix bound F = 433193; +- inverse prefix bound B = 14098095; +- `64 F^3 B^2 = 1034058550487293134087986294683200` (110 bits). + +This does not satisfy the old 104-bit reporting ceiling. It does satisfy the +explicit new 112-bit fixed-recipe ceiling. The payload-cap section below explains the pinned +source audit: the old104 assertion is a recipe-specific reporting limit, not +a discovered prime/recovery threshold. The fixed primitive constant may depend +on the finite recipe; no concrete all-size machine constant is inferred. +The new scalar ADD invoice and chart/bank operations must still be charged. +No argument here identifies the F2 payload size with the separate odd-prime +address budget. + +## Role-bank and finite arithmetic binding + +The independent stock census starts from the literal recipient-to-donor map, +removes the seven sunk roles, applies the 1,720 existing kernel entrances and +440 old restoration endpoints, then applies the 166 new rank-one entrances. +No old final12 endpoint saving is used. There are 15,425 remaining helper roles. + +Each of the 60 replicas is placed in explicit full width-120 banks using the +retained mixed patterns and exact pure-bin fills. For a rank-r role at sorted +index j and replica v, its ordinal is 60*j+v; an explicit segment table maps it +to one bank, block and coordinate interval. Every block is checked once, every +role/replica appears once, and every bank is full. The five stages have disjoint +bank namespaces. There are 161,384 banks per stage; with 422,400 data slots this +gives 1,229,320 literal stock slots. A second implementation independently +re-enumerates all 925,500 addresses per stage and checks normalized stock, +literal stock, stage and replica factors against the moment calculation. + +Every selected first-frame quotient, rank-one donor entrance and rank-23 pivot +residual is connected to an explicit exact rational chart program. There are +304 distinct programs and 752 role uses. Every inverse factorization is replayed +exactly. The maximum program length is 508; numerators and denominators are at +most 615 and 810. Thus the inherited 576 chart-factor bound and combined +815 normalizer bound remain valid for these changed programs. + +The displayed finite invoice charges all 2,587 setup and 2,587 inverse ADDs, +without credit for the 2,020 removed unit ADDs. It recomputes every stock-, +call- and selector-dependent term, producing 90,433,795,441,918,801 (<2^80). +This is the displayed operation coefficient, not an instantiation of the +unknown full primitive/compiler constant. All three bootstrap gaps stay +strictly positive, and the displayed-coefficient cutoff inequalities are +checked. The quantified inherited C_full is not set to zero or silently +identified with this displayed bill. + +## Explicit payload-cap audit + +The pinned `finite_check.py` is parsed as inert syntax. The only consumers of +its payload bound are its bit-length diagnostic, the `payload < 2**104` +assertion and emitted receipt fields. Neither payload variable occurs in the +displayed coefficient computation. Eight manifest-bound proof/code texts are +also checked: the packaged bit interface distinguishes F2 payload scalars from +odd-prime address geometry, and allows the fixed primitive constant to depend +on the finite recipe while remaining independent of input width. The q-squared +bound in the row proof concerns volume padding, not payload magnitudes. + +Consequently, this update supplies a separate, explicit 112-bit certificate for +its freshly bounded fixed recipe. It does not claim that the original 104-bit +checker passes unchanged. Changing only this reporting ceiling adds no scalar +or recursive operation and no term to the displayed invoice. An unspecified +recipe-dependent primitive constant remains inside C_full before choosing the +ordinary cutoff. No exact universal-machine cutoff or concrete value of that +constant is asserted. All original code and its 104-bit assertion are retained +as immutable input data. + +## Discovery scope and a useful fixed-set limitation + +The line screen uses exact F2 elimination with a fixed ascending-role basis. +Its maximum-closure instance selects pivot benefits while charging activated +donors once. Integer capacities come from a declared 10^9 rounding of the +entropy surrogate r*log(120/r); discovery is reproducible for this fixed screen, +but this surrogate is not the final certified objective. + +For a fixed active set U, common entrance dimension e and response rank r, +changing only the donor basis cannot change the local histogram: + +`sum_{s in U} ([d_s-e]-[d_s]) + r[e]`. + +Here `[0]` is omitted. Each active old first climb is split once, and exactly r +donors pay the entrance; hence the rank decrease is e*(|U|-r). Basis changes can +still affect scalar count and scalar growth. Improving this histogram requires +changing the active set or the entrance/cut model. This elementary limitation +does not prove the chosen active set optimal. + +The packaged selection replays exactly 276 lines, the three positive groups, +and two overlap-priority orders. The 166 witness is rederived as the retained +136+12 groups plus 18 secondary pivots, after reclosure and one deterministic +parity trim. Broader matching exchanges, donor bases, active sets and different +cut positions are outside this bounded experiment. + +## Verification boundary + +The complete upstream physical decoder and source-span/chronological admission +are inherited hypotheses. So are unchanged primitive chart and cover/compiler +interfaces, row conversion, eligible prime supply, precision/recovery where +applicable, the complex construction's semantic correctness, and the analytic +all-size framework. The complex profile and its rational arithmetic are +independently replayed, but that alone does not establish its physical theorem. +Separate AI-assisted implementations are useful checks, not human peer review +or proof-assistant verification. The full-column scalar check here proves the +stated conditional composition theorem, not a literal whole-word regeneration. + +See README.md for the complete portable commands and NOTICE.md for attribution. diff --git a/research/gen5b-shared-kernels/weighted275/README.md b/research/gen5b-shared-kernels/weighted275/README.md new file mode 100644 index 0000000000..f3b6b1db22 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/README.md @@ -0,0 +1,118 @@ +# Shared-donor kernels on the pinned weighted-matching word + +This additive PR302 experiment composes shared-donor kernels with PR275's +weighted-matching word. It preserves the parent directory's original pinned +70/72-pivot and co-retiming evidence. It does **not** transfer the old final12 +stock saving: every one of those twelve helpers is now a matched recipient, +whose earlier donor lifetime still needs its unchanged FULL cleanup. + +## Conditional results + +| Fixed case | κ | Literal stock | Five-stage calls | Rank mass | +|---|---:|---:|---:|---:| +| Pinned PR275 baseline | 0.000751075693834608 | 1,229,735 | 482,100 | 2,455,070 | +| Weighted word + transported 70 | 0.000751090249287618 | 1,229,560 | 482,535 | 2,454,720 | +| Weighted word + reclosed 166 | **0.000751097723288767** | **1,229,320** | **483,150** | **2,454,240** | + +The 166 case improves the pinned baseline by about **0.00293305%**. These are +exact rational grid choices with denominator 10^18, conditional on the retained +physical decoder, compiler, primitive and all-size interfaces. This is a small +finite-recipe improvement, with no global priority, optimality or unconditional +multiplication-theorem claim. + +The final candidate has 166 pivots, 210 distinct donors and 376 physical helper +slots, including 105 reused donor slots. It has 2,587 setup ADDs and the same +number of inverse ADDs. Its measured local histogram change is +`{1:+210, 2:+306, 3:-306, 4:+70, 5:-70}`. The residual-width change is +`{24:-166, 23:+166}`. The deficit remains 4,400 in the unreplicated profile. + +Fresh scalar bounds are F=433,193 and B=14,098,095. The exact payload upper bound +is 1,034,058,550,487,293,134,087,986,294,683,200 (110 bits). The original 104-bit +assertion fails; the separately reviewed, explicitly named 112-bit fixed-recipe +certificate passes. This distinction is intentional and tested. See PROOF.md +for the static source audit and the remaining quantified constants. + +## Immutable inputs and attribution + +The base is `lydakis/integer-mult-bounds` at +`10b40041d4ab8a6610083e95bc571aee3468bca2`, package +`research/gen5b-weighted-matching`. It already includes its remapped inherited +kernels, descents, 440 restorations and seven sinks. Those transforms are not +added again. One separately pinned PR299 word is used only for the old-to-new +role-map diagnostic. The two pure arithmetic helpers, original 70 witness and +final12 diagnostic are reused from the unchanged parent PR302 package. + +`inputs.json` pins 39 inert input files (about 10.9 MB) by immutable URL, +byte count, SHA-256 and Git blob ID. All downloaded Python files are stored as +`.py.txt` and read or parsed as data. No upstream producer, verifier or module +is executed. Large source bundles, generated chart programs and complete bank +tables are deliberately not committed. See NOTICE.md for credit and AI disclosure. + +## Reproduce from the PR302 checkout + +Python 3.11+ and the standard library suffice. Assertions must remain enabled. +From this `weighted275` directory: + +```sh +python3 -B fetch_inputs.py --output /tmp/weighted275-inputs +export PR275_INPUTS=/tmp/weighted275-inputs +export PR275_OUTPUTS=/tmp/weighted275-results +python3 -B -m unittest discover -s . -p 'test_*.py' -v +python3 -B run_checks.py --check --inputs "$PR275_INPUTS" --output "$PR275_OUTPUTS" +``` + +Absolute invocation from another working directory also works. Existing input +files are accepted only after hash verification. The aggregate independently +rebuilds both cases, baseline and complex arithmetic, full role/replica bank +addresses, changed chart programs, finite invoices, the 276-line screen and +both declared overlap-resolution orders. Generated data stays in the chosen +output directory. `--case 70` or `--case 166` selects one case; `--skip-screen` +omits discovery replay but does not skip that case's admission checks. + +The parent directory's existing test/replay commands remain unchanged. Its +original source inputs are separate; fetching the new weighted inputs does not +replace them. + +## What this update checks + +- Exact virtual-to-physical alias map, source pins and all 1,720 old kernel + response relations and cut triples on the new word. +- The final 166 relations, complete chronological donor/recipient paths, + 2,561 exact containments and final FULL endpoints. +- Forward/inverse compositional F2 equality on all 18,952 physical columns, + assuming the inherited complete decoder. This is not a literal regeneration + of the entire upstream scalar stream. +- 304 distinct exact rational chart programs, bound to 752 role uses. The + maximum is 508 factors; factor numerators/denominators are at most 615/810. + The retained combined normalizer bound is 815. +- All 15,425 helper roles in 60 replicas: 925,500 explicit addresses per stage, + five disjoint stages, 4,627,500 total assignments. Every width-120 bank is full. +- Sink-aware forward/inverse scalar majorants, every added setup/restore ADD, + selector bound 905,876,591,400, and displayed finite coefficient + 90,433,795,441,918,801, strictly below 2^80. +- Exact bit-root bracket + `[751662295432463, 751662295432464] / 10^18`, three bootstrap steps, all 47 + strict rational inequalities and rejection of the next κ grid tick. +- Negative controls for mapping/relation/frame/alias errors, omission of shear + factors, bank/stock/replica drift, missing chart paths and the old payload cap. + +## Bounded discovery scope + +The corrected eligible domain has 8,085 unused physical helpers, including +1,591 reused donor slots. Recipient keys, existing kernel members, both descent +supports, early-restored endpoints, sources and sinks remain excluded. + +The experiment tests all 276 contrast lines `e_i-e_j` in 24 dimensions using a +fixed role-order response basis. A maximum-closure calculation charges shared +donors once and optimizes a 10^9-rounded entropy surrogate, not κ itself. Three +groups survive: 136 pivots on line16/17, 36 on line6/7 and 12 on line2/3. + +There are four overlapping logical roles between the first two groups; the +third is disjoint. We evaluate exactly two priority orders. Preserving the +136- and 12-pivot groups leaves 29 nonconflicting secondary relations; closure +selects 19, then a declared deterministic parity trim removes pivot10764, +leaving 18. Thus the winner is 136+12+18=166. The reverse priority order selects +no additional surviving primary relations and returns the 48-pivot union. +The two naive prune-and-retain variants are comparison cases, not further +search domains. No optimum over all bases, active sets or conflict resolutions +is asserted. diff --git a/research/gen5b-shared-kernels/weighted275/bank_receipt_binding.py b/research/gen5b-shared-kernels/weighted275/bank_receipt_binding.py new file mode 100644 index 0000000000..973a054f75 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/bank_receipt_binding.py @@ -0,0 +1,64 @@ +"""Our standalone exact role-bank receipt binding, independent of candidate size. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as F +from pathlib import Path +import hashlib,json +import reproduce_pr275 as base +def digest(path):return hashlib.sha256(Path(path).read_bytes()).hexdigest() + +def bind_banks(result, receipt_path, table_path, expected_status): + banks=json.loads(receipt_path.read_text());table=json.loads(table_path.read_text()) + assert banks['status']==expected_status + assert banks['source_head']==base.HEAD and banks['candidate_sha256']==result['candidate_sha256'] + counts={int(r):n for r,n in banks['family_counts'].items()} + assert counts==result['residual_census'] + assert sum(counts.values())==banks['helper_roles']==result['physical_R']==15425 + assert base.mass(counts)==banks['residual_rank_per_replica'] + assert table['stages']==5 and table['replicas']==60 and table['width']==120 + assert table['stage_banks']==banks['banks_per_stage']==result['banks_per_stage'] + assert 120*banks['banks_per_stage']==60*base.mass(counts) + assert banks['total_banks']==5*banks['banks_per_stage'] + assert banks['literal_data_stock']==60*4*1760==422400 + assert banks['literal_stock']==422400+banks['total_banks']==result['literal_stock'] + assert F(banks['unreplicated_stock'])==result['unreplicated_stock']==F(banks['literal_stock'],60) + assert 120*banks['literal_stock']-60*result['rank_mass']==60*result['deficit']==264000 + assert banks['checked_role_replica_assignments_per_stage']==60*15425==925500 + assert banks['total_stage_assignments']==5*60*15425==4627500 + families={int(r):roles for r,roles in table['families'].items()} + assert {r:len(roles)for r,roles in families.items()}==counts + allroles=[role for roles in families.values()for role in roles] + assert len(allroles)==len(set(allroles))==15425 + patterns=table['patterns'];expected_masks=[] + for row in patterns: + assert sum(row['widths'])==120 + expected_masks.extend([(1<=0 is x_i=x_j. + residual = base.nullspace(ann + [v]) + assert len(residual) == d - 1 + # (9I-J)^(-1) a is proportional to 15*a-sum(a). + exterior = [base.primitive([15 * x - sum(row) for x in row]) for row in ann] + assert len(exterior) == 24 - d + assert all(sum(a * b for a, b in zip(row, col)) == 0 + for row in ann for col in residual + [v]) + assert all(gram(col, other) == 0 for col in residual + [v] for other in exterior) + out = checked_chart(residual + [v] + exterior, d - 1) + out.update(first_dimension=d, line=line) + return out + + diff --git a/research/gen5b-shared-kernels/weighted275/chart_rational.py b/research/gen5b-shared-kernels/weighted275/chart_rational.py new file mode 100644 index 0000000000..40bf896729 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/chart_rational.py @@ -0,0 +1,64 @@ +"""Our previously authored pure rational chart helpers, copied for PR275. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as F +from math import gcd,lcm +def rref(A): + A=[[F(x)for x in row]for row in A];piv=[] + for j in range(len(A[0])if A else 0): + q=next((i for i in range(len(piv),len(A))if A[i][j]),None) + if q is None:continue + i=len(piv);A[i],A[q]=A[q],A[i];v=A[i][j];A[i]=[x/v for x in A[i]] + for k in range(len(A)): + if k!=i and A[k][j]: + v=A[k][j];A[k]=[a-v*b for a,b in zip(A[k],A[i])] + piv.append(j) + if len(piv)==len(A):break + return A,piv + + +def primitive(v): + d=lcm(*(F(x).denominator for x in v));v=[int(F(x)*d)for x in v];g=gcd(*v) + assert g;return [x//g for x in v] + + +def nullspace(A,n=24): + R,piv=rref(A);out=[] + for free in range(n): + if free in piv:continue + v=[F(0)]*n;v[free]=1 + for i,j in enumerate(piv):v[j]=-R[i][free] + out.append(primitive(v)) + return out + + +def factor(B): + n=len(B);A=[[F(x)for x in row]for row in B];ops=[];det=F(1) + for j in range(n): + pivot=next(i for i in range(j,n)if A[i][j]) + if pivot!=j:A[pivot],A[j]=A[j],A[pivot];ops.append(('swap',j,pivot,F(1)));det=-det + v=A[j][j];det*=v + if v!=1:A[j]=[x/v for x in A[j]];ops.append(('scale',j,j,1/v)) + for i in range(n): + if i!=j and A[i][j]: + q=-A[i][j];A[i]=[x+q*y for x,y in zip(A[i],A[j])];ops.append(('add',i,j,q)) + assert A==[[int(i==j)for j in range(n)]for i in range(n)] + # Independently replay inverse operations from I and recover B. + C=[[F(i==j)for j in range(n)]for i in range(n)] + for kind,i,j,q in reversed(ops): + if kind=='swap':C[i],C[j]=C[j],C[i] + elif kind=='scale':C[i]=[x/q for x in C[i]] + else:C[i]=[x-q*y for x,y in zip(C[i],C[j])] + assert C==B + return dict(determinant=det,factors=ops,count=len(ops), + max_numerator=max((abs(q.numerator)for kind,i,j,q in ops),default=1), + max_denominator=max((q.denominator for kind,i,j,q in ops),default=1)) + + +def serial(x): + if isinstance(x,F):return str(x) + if isinstance(x,dict):return {str(k):serial(v)for k,v in x.items()} + if isinstance(x,(list,tuple)):return [serial(v)for v in x] + return x + + diff --git a/research/gen5b-shared-kernels/weighted275/check_bridge.py b/research/gen5b-shared-kernels/weighted275/check_bridge.py new file mode 100644 index 0000000000..e066c2c1bf --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/check_bridge.py @@ -0,0 +1,185 @@ +"""Original weighted-word alias, prefix and kernel bridge check. Inert data only.""" +from pathlib import Path +from fractions import Fraction as Q +from collections import Counter,defaultdict +import base64,gzip,hashlib,json,time +HERE=Path(__file__).resolve().parent +from source_data import SOURCE as P,verify,pins,OUTPUT +from cases import CASES +CASE=CASES['166'];CAND=HERE/CASE['file'] +def configure(label): + global CASE,CAND + CASE=CASES[str(label)];CAND=HERE/CASE['file'] +def verify_sources(): + verify() + assert hashlib.sha256(CAND.read_bytes()).hexdigest()==CASE['sha256'] + +def read(n): + n={'graph.json':'gen5bit/selected/bit/graph_p12.json','frames.json':'gen5bit/selected/bit/frames_p12.json.gz','kchron.json':'gen5bit/selected/bit/kchron_p12.json'}.get(n,n) + p=P/n + return json.load(gzip.open(p))if n.endswith('.gz')else json.loads(p.read_text()) +def rr(A): + A=[[Q(x)for x in row]for row in A];piv=[];k=0 + for j in range(24): + pivot=next((i for i in range(k,len(A))if A[i][j]),None) + if pivot is None:continue + A[k],A[pivot]=A[pivot],A[k];c=A[k][j];A[k]=[x/c for x in A[k]] + for i in range(len(A)): + if i!=k and A[i][j]: + c=A[i][j];A[i]=[x-c*y for x,y in zip(A[i],A[k])] + piv.append(j);k+=1 + return A[:k],piv +def null(B): + R,piv=rr(B);out=[] + for j in range(24): + if j in piv:continue + v=[Q(0)]*24;v[j]=1 + for i,k in enumerate(piv):v[k]=-R[i][j] + out.append(v) + return out +def run(): + verify_sources();t=time.monotonic();w=read('gen5bit/selected/bit/word_p12.json.gz');f={int(k):v for k,v in read('frames.json')['frames'].items()};g=read('graph.json') + ks=read('kernel-selection.json');d1=read('descent-selection.json');d2=read('descent2-selection.json');rest=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'] + candidate=json.loads(CAND.read_text());entries=candidate['entries'] + alias={b:a for a,b in w['pairs']};recipient={a:b for a,b in w['pairs']};regs=sorted(set(range(17160))-set(alias));ids={r:3520+i for i,r in enumerate(regs)} + sid=lambda r:ids[alias.get(r,r)];inverse={s:r for r,s in ids.items()};n=3520+len(regs);assert n==18952 + gauges={z['role']:z for z in w['gauges']};assert all(gauges[b]['dim']==21 for b in alias) + phase=w['phase1'];assert phase==sorted(phase);phase_set=set(phase);after=[i for i in range(len(w['ops']))if i not in phase_set];order=phase+after + pos={i:j for j,i in enumerate(order)};uses=defaultdict(list) + for i in order: + for r in w['ops'][i][:2]:uses[r].append(i) + adj=[{}for _ in range(17160)] + for root,r in zip(g['roots'],w['rootroles']): + for target in root['targets']:adj[r][target]=adj[r].get(target,0)+1 + for i in reversed(order): + a,b,_=w['ops'][i] + for target,c in adj[a].items():adj[b][target]=adj[b].get(target,0)+c + response=[sum(1<1:H[d-1]+=1 + if r in donors:H[1]+=1 + pathrows.append(dict(role=r,stream=sid(r),kernel_kind='pivot'if r in pivots else'donor',entrance_basis=[lines[r]],first_frame=first,first_dimension=d,frames=path,dimensions=[f[x]['dim']for x in path],endpoint='FULL',aliased_recipient=recipient.get(r))) + if r in recipient: + b=recipient[r];receipts.append(dict(donor_role=r,recipient_role=b,physical_stream=sid(r),gauge_read_order=w['reads'][str(b)], + donor_last_order=max(pos[i]for i in uses[r]),recipient_first_order=min(pos[i]for i in uses[b]),frames=path,dimensions=[f[x]['dim']for x in path],endpoint='FULL', + first_dimension=d,literal_zero_prefix_response_bitcount=prefix[sid(r)].bit_count())) + H={r:c for r,c in sorted(H.items())if c};assert H==CASE['delta'] + # Concrete obstruction to importing the original final12 endpoint invoice: + # each former helper now shares a slot with an earlier independent lifetime. + core=json.loads((HERE.parent/'certificates/coretime12/local.json').read_text())['candidates'];blocked=[] + for z in core: + a=z['helper'];assert a in alias;d=alias[a];assert uses[d] + assert max(pos[i]for i in uses[d])1:H[d-1]+=1 + if role in donors:H[1]+=1 + assert base.clean(H)==dict(base.histogram(bridge['local_histogram_delta'])) + assert Counter(u['kind']for u in uses)==dict(first_frame_quotient=len(active),pivot_residual=len(pivots),donor_line_entrance=len(donors)) + assert all(programs[u['program_id']]['residual_rank']==u['rank']for u in uses) + pins=base.read('expected/kernel-pins.json');largest=max(p['count']for p in programs);bound=max(pins['max_chart_factors'],largest)+119+120 + assert pins['max_chart_factors']==576 and bound==815 + assert literal_stock==pins['literal_stock']-5*len(pivots)//2 and len(pivots)%2==0 + selector=600*((literal_stock-1)+pins['physical_R']*120*bound);assert selector<2**40 + return dict(status='PASS_PR275_BOUNDED_CANDIDATE_CHANGED_CHARTS',source_head=base.HEAD, + candidate_sha256=hashlib.sha256(raw).hexdigest(),charts=len(programs),final12_charts=0, + first_frame_quotient_demands=len(active),pivot_residual_demands=len(pivots),donor_line_entrance_demands=len(donors), + role_chart_uses=uses,max_changed_chart_factors=largest,max_factor_numerator=max(p['max_numerator']for p in programs), + max_factor_denominator=max(p['max_denominator']for p in programs),combined_normalizer_factor_bound=bound, + literal_stock=literal_stock,selector_calls_bound=selector,local_histogram_delta=base.clean(H),factor_programs=programs, + scope='All changed first-frame, rank23 pivot residual and rank1 donor entrance charts are exactly constructed, factored, inverse-replayed and bound to fresh selected_paths. No final12 charts; unchanged chart/compiler contracts remain inherited.') diff --git a/research/gen5b-shared-kernels/weighted275/check_scalar_bounds.py b/research/gen5b-shared-kernels/weighted275/check_scalar_bounds.py new file mode 100644 index 0000000000..dd149f437f --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/check_scalar_bounds.py @@ -0,0 +1,151 @@ +"""Original nonnegative norm transport, with conservative target-prefix bound. + +Helper updates are replayed exactly. Every target prefix ADD is majorized by +applying every target-prefix and sink batch along an exact acyclic majorant. +Deleted compression reads are restored for this upper bound. No source code +from the upstream repository is executed. +""" +from pathlib import Path +from collections import defaultdict,Counter +import json,sys,time +import check_bridge +from check_bridge import read,HERE,verify_sources +from source_data import OUTPUT +def verify_inputs():verify_sources() +sys.dont_write_bytecode=True + +def suffix_build(): + w=read('gen5bit/selected/bit/word_p12.json.gz');g=read('graph.json');partner=read('kchron.json')['entries'] + oldrestore=read('restore-selection.json')['entries'];ks=read('kernel-selection.json');sinks=read('sink-selection.json')['sinks'] + alias={b:a for a,b in w['pairs']};regs=sorted(set(range(17160))-set(alias));physical={r:3520+i for i,r in enumerate(regs)};sid=lambda r:physical[alias.get(r,r)] + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase];sunk={z['role']for z in sinks} + byroot=defaultdict(list) + for z in partner:byroot[z['deliver_after_root']].append(z) + out=[] + for i,(r,s)in enumerate(zip(g['roots'],w['rootroles'])): + if r['kind']=='side'and s not in sunk: + for t in r['targets']:out.append((1760+t,sid(s),1,'root')) + for e in byroot[i]: + out.append((e['carrier'],e['passive'],1,'partner_setup')) + for t in e['receivers']:out.append((1760+t,e['carrier'],1,'partner_delivery')) + for e in partner:out.append((e['carrier'],e['passive'],-1,'partner_cleanup')) + moved={(z['helper'],z['donor']):0 for z in oldrestore} + for z in sorted(oldrestore,key=lambda z:z['helper']):out.append((z['helper'],z['donor'],z['coefficient'],'old_restore')) + for index in reversed(order): + a,b,_=w['ops'][index] + if a in sunk:continue + pair=(sid(a),sid(b)) + if pair in moved:moved[pair]+=1;continue + out.append((*pair,-1,'cleanup')) + assert all(x==1 for x in moved.values()) + for source,role in w['sources'].items():out.append((sid(role),int(source),-1,'uninject')) + entries=[dict(pivot=z['a'],donors=[z['b']])for z in ks['pairs']]+[dict(pivot=z['pivot'],donors=z['donors'])for z in ks['families']] + for z in entries: + for donor in z['donors']:out.append((donor,z['pivot'],-1,'kernel_restore')) + return 3520+len(regs),[],out,{} + +def run(candidate_path=None): + verify_inputs();start=time.monotonic();w=read('gen5bit/selected/bit/word_p12.json.gz');g=read('graph.json');ks=read('kernel-selection.json');target=read('target-selection.json');sinks=read('sink-selection.json')['sinks'];sink_byrole={z['role']:z for z in sinks} + candidate_path=Path(candidate_path)if candidate_path else check_bridge.CAND + witness=json.loads(candidate_path.read_text())['entries'] + oldentries=[dict(pivot=z['a'],donors=[z['b']],cut_read=z['cut_read'])for z in ks['pairs']]+[dict(pivot=z['pivot'],donors=z['donors'],cut_read=z['cut_read'])for z in ks['families']] + alias={b:a for a,b in w['pairs']};regs=sorted(set(range(17160))-set(alias));physical={r:3520+i for i,r in enumerate(regs)};sid=lambda r:physical[alias.get(r,r)] + n=3520+len(regs);phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase] + adj=[{}for _ in range(17160)] + for root,r in zip(g['roots'],w['rootroles']): + for t in root['targets']:adj[r][t]=adj[r].get(t,0)+1 + for index in reversed(order): + a,b,_=w['ops'][index] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + gauge={x['role']:x for x in w['gauges']};oldp={x['pivot']for x in oldentries};newp={x['pivot']for x in witness} + setup=defaultdict(list) + for z in oldentries:setup[tuple(z['cut_read'])].append(z) + prefix=[];hits=set() + for r in range(17160): + if r in gauge or r in sink_byrole:continue + for t,c in adj[r].items(): + if c%2: + event=(1760+t,sid(r),-c) + if sid(r)not in oldp:prefix.append(event) + for z in sorted(setup.get(event,[]),key=lambda z:z['pivot']): + hits.add(z['pivot']);prefix.extend((d,z['pivot'],1)for d in z['donors']) + assert len(hits)==len(oldentries) + # Setup rank is irrelevant to scalar ordering here; the source sorts by rank + # and pivot. All factors commute because old pivot/donor sets are disjoint. + assert not oldp&{d for z in oldentries for d in z['donors']} + middle=[] + for source,r in w['sources'].items():middle.append((sid(r),int(source),1)) + for i in w['phase1']: + a,b,_=w['ops'][i];assert a not in sink_byrole;middle.append((sid(a),sid(b),1)) + for root,r in zip(g['roots'],w['rootroles']): + if root['kind']=='center':middle.extend((1760+t,sid(r),1)for t in root['targets']) + at=defaultdict(list) + # The source's gauge order is reversed JSON gauge list; explicit read times + # are numbered in phase1+rest chronology. + for z in reversed(w['gauges']): + r=z['role'];at[int(w['reads'].get(str(r),len(w['phase1'])))-len(w['phase1'])].append(r) + rest=[i for i in range(len(w['ops']))if i not in phase] + for j,i in enumerate(rest): + for r in at[j]:middle.extend((1760+t,sid(r),-c)for t,c in adj[r].items()if c%2) + a,b,_=w['ops'][i];middle.append((sink_byrole[a]['pivot']if a in sink_byrole else sid(a),sid(b),1)) + for r in at[len(rest)]:middle.extend((1760+t,sid(r),-c)for t,c in adj[r].items()if c%2) + _,_,suffix,_=suffix_build();tail=middle+[(a,b,c)for a,b,c,tag in suffix] + newsetup=[(d,z['pivot'],1)for z in witness for d in z['donors']] + # Baseline upper word contains all uncompressed target reads. We transport + # only nonnegative increases from added new shears, ignoring new deleted reads. + allgroups=target['groups'];dependency={1760+int(t):[1760+p for p in ps]for z in allgroups for t,ps in z['dependent'].items()} + assert not set(dependency)&{p for ps in dependency.values()for p in ps} + # Include both setup/restore batches of every terminal sink. Acyclicity + # is checked directly rather than assuming sink and prefix supports disjoint. + edges=Counter((p,t)for t,ps in dependency.items()for p in ps) + for z in sinks: + for t in z['targets']: + if t!=z['pivot']:edges[z['pivot'],t]+=1 + target_nodes=set(x for edge in edges for x in edge);incoming=Counter(t for p,t in edges);successors=defaultdict(list) + for(p,t),multiplicity in edges.items():successors[p].append((t,2*multiplicity)) + ready=sorted(target_nodes-set(incoming));topology=[] + while ready: + p=ready.pop();topology.append(p) + for t,c in successors[p]: + incoming[t]-=1 + if not incoming[t]:ready.append(t) + assert len(topology)==len(target_nodes),'target majorant dependency cycle' + def close_target_majorant(values): + out=values[:] + for p in topology: + for t,c in successors[p]:out[t]+=c*out[p] + return out + def add(v,event): + a,b,c=event;v[a]+=abs(c)*v[b] + def bound(reverse): + # exact helper majorants for old versus sheared word, and a nonnegative + # difference; target reads are deliberately not omitted. + old=[1]*n;new=[1]*n + if not reverse: + for e in prefix:add(old,e);add(new,e) + for e in newsetup:add(new,e) + for e in tail:add(old,e);add(new,e) + for e in reversed(newsetup):add(new,e) + else: + for e in newsetup:add(new,e) + for e in reversed(tail):add(old,e);add(new,e) + for e in reversed(newsetup):add(new,e) + for e in reversed(prefix):add(old,e);add(new,e) + delta=[a-b for a,b in zip(new,old)];assert min(delta)>=0 + delta=close_target_majorant(delta) + # The old full compressed decoder bounds all its own prefixes. The helper + # paths above are exact; the full target-only acyclic graph is majorized. + pins=read('expected/kernel-pins.json');inherited=pins['inverse_max_row_l1']if reverse else pins['forward_max_row_l1'] + out=inherited+max(delta) + return dict(reverse=reverse,inherited_bound=inherited,max_added_majorant=max(delta),certified_new_bound=out, + max_added_helper=max(delta[3520:]),max_added_target=max(delta[1760:3520]),max_added_source=max(delta[:1760])) + F,B=bound(False),bound(True);payload=64*F['certified_new_bound']**3*B['certified_new_bound']**2 + return dict(status='PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS',selection=candidate_path.name,forward=F,inverse=B, + payload_bound=payload,payload_bits=payload.bit_length(),retained_payload_cap_2_to104=payload<2**104,explicit_new_payload_cap_bits=112,new_payload_cap_2_to112=payload<2**112, + cap_change=('The original104 ceiling passes for this case.' if payload<2**104 else 'The original104 check fails; a separately reviewed fixed112 bound is used. See PROOF.md. No prime, row, moment or inherited width-uniformity hypothesis is changed.'), + setup_restore_pairs=len(newsetup),max_target_prefix_degree=max(map(len,dependency.values())),target_majorant_acyclic_vertices=len(topology),target_majorant_edges=len(edges),actual_sink_redirects=sum(z['forward_writes']for z in sinks), + target_majorant_proof='Targets are never read by helper/source operations. We include every target-prefix and terminal-sink setup/restore edge with its exact total multiplicity2. Their union is checked acyclic; propagating all uncompressed nonnegative increments in topological order through these weighted edges dominates every chronological placement of those ADDs. Actual sink writes are redirected, and removed sink reads/cleanup/root deliveries are absent.', + scope='Conditional on inherited old F/B and unchanged compiler; complete exact helper majorant paths are replayed, while target compression is conservatively bounded rather than reproducing record-index cut sites.',seconds=time.monotonic()-start) +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + r=run();(OUTPUT/'scalar-bounds-result.json').write_text(json.dumps(r,indent=2)+'\n');print(json.dumps(r,indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/check_shared_banks.py b/research/gen5b-shared-kernels/weighted275/check_shared_banks.py new file mode 100644 index 0000000000..2745ae7c5d --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/check_shared_banks.py @@ -0,0 +1,123 @@ +"""Explicit role-resolved bank assignment for each fixed shared-kernel rewrite on the weighted PR275 word.""" +from collections import Counter,defaultdict +from fractions import Fraction +import hashlib,json,time +from source_data import read,verify,ROOT,HEAD + +def run(candidate_path, output_dir=None, mutation=None): + started=time.monotonic();verify() + w=read('gen5bit/selected/bit/word_p12.json.gz') + kernel=read('kernel-selection.json') + restore=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'] + removed={b for a,b in w['pairs']};regs=sorted(set(range(17160))-removed) + original_from_stream={3520+i:r for i,r in enumerate(regs)} + sinkroles={r['role']for r in sinks};roles=sorted(set(regs)-sinkroles) + assert len(roles)==15425 + entrances={r:0 for r in roles};entrance_type={r:'ZERO'for r in roles} + for z in w['gauges']: + if z['role']in entrances: + entrances[z['role']]=z['dim'];entrance_type[z['role']]=f'frame:{z["frame"]}' + pivots=[(z['a'],z['rank'])for z in kernel['pairs']]+[(z['pivot'],z['rank'])for z in kernel['families']] + pivot_residuals=Counter() + for stream,rank in pivots: + role=original_from_stream[stream];assert entrances[role]==0 + entrances[role]=rank;entrance_type[role]=f'kernel:{stream}' + pivot_residuals[24-rank]+=1 + from pathlib import Path + raw_candidate=Path(candidate_path).read_bytes() + candidate=json.loads(raw_candidate);assert candidate['source_head']==HEAD + new_kernel=candidate['entries'] + new_count=len(new_kernel) + assert new_count>0 and new_count%2==0 and len({z['pivot']for z in new_kernel})==new_count + for z in new_kernel: + role=original_from_stream[z['pivot']] + assert role==z['virtual_pivot'] and entrances[role]==0 + assert z['rank']==1 and len(z['basis'])==1 + entrances[role]=1 + entrance_type[role]=f'shared_kernel:{z["pivot"]}' + pivot_residuals[23]+=1 + endpoints={r:24 for r in roles};endpoint_type={r:'FULL'for r in roles} + assert len(restore)==440 + for z in restore: + r=original_from_stream[z['helper']];assert entrances[r]==z['dims'][0] + endpoints[r]=z['rank'];endpoint_type[r]=f'old_restore:{z["helper"]}' + families=defaultdict(list) + for r in roles: + width=endpoints[r]-entrances[r];assert 0=0 and 120%width==0 and leftover%blocks==0 + patterns.append(([width]*blocks,leftover//blocks)) + total=Counter();segments=defaultdict(list);bank_start=0 + for pattern,(widths,n) in enumerate(patterns): + assert sum(widths)==120 and n>0 + offsets=[];x=0 + for r in widths:offsets.append(x);x+=r + for r in set(widths): + blocks=[(i,offsets[i])for i,v in enumerate(widths)if v==r] + lo=total[r];hi=lo+n*len(blocks) + segments[r].append(dict(lo=lo,hi=hi,pattern=pattern,bank_start=bank_start,blocks=blocks)) + total[r]=hi + bank_start+=n + assert total=={r:60*n for r,n in counts.items()} + assert bank_start==161467-new_count//2 + def assignment(role_index,replica,width): + q=60*role_index+replica + for s in segments[width]: + if s['lo']<=q1:h[d-1]+=1 + h[1]+=len(ds);h={r:n for r,n in sorted(h.items())if n} + assert sum(r*n for r,n in h.items())==-len(ps) + return h,len(ds) +def run(): + groups={n:json.loads((ROOT/f'candidate-line{n}.json').read_text())for n in ('16-17','6-7','2-3')} + receipts=[] + for name,left,right in [('keep136','16-17','6-7'),('keep36','6-7','16-17')]: + accepted=groups[left]['entries'][:];used=members(accepted);remaining=[e for e in groups[right]['entries']if not members([e])&used] + omitted=[e['virtual_pivot']for e in groups[right]['entries']if members([e])&used];parity=None + extras=groups['2-3']['entries'];assert not members(extras)&(used|members(remaining)) + if(len(accepted)+len(remaining)+len(extras))%2: + counts=Counter(r for e in remaining for r in e['virtual_donors']) + def marginal(e): + benefit=phi(dim(e['virtual_pivot']))-phi(dim(e['virtual_pivot'])-1) + release=sum(phi(1)+phi(dim(r)-1)-phi(dim(r))for r in e['virtual_donors']if counts[r]==1) + return(round((benefit-release)*10**9),e['virtual_pivot']) + parity=min(remaining,key=marginal);remaining=[e for e in remaining if e is not parity] + entries=accepted+remaining+extras;H,D=ledger(entries) + out=dict(source_head='10b40041d4ab8a6610083e95bc571aee3468bca2',selection=name,pivots=len(entries),entries=entries, + deterministic_pruning=dict(priority_line=left,secondary_line=right,overlap_omitted_pivots=omitted,parity_omitted_pivot=parity['virtual_pivot']if parity else None,parity_rule='Lowest rounded10^9 first-order marginal gain, ties by logical pivot ID.'), + local_histogram_delta=H,residual_family_delta={24:-len(entries),23:len(entries)},distinct_donors=D, + scalar_setup_pairs=sum(len(e['donors'])for e in entries),phi_delta=sum(n*phi(r)for r,n in H.items()), + scope='Deterministic disjoint support pruning of three already screened line groups. Exact F2 relations and first-frame ledger only; full combined alias/scalar/frame/norm/chart/bank admission required; no final12.') + file=OUTPUT/f'candidate-combined{len(entries)}-{name}.json';file.write_text(json.dumps(out,indent=2)+'\n') + receipts.append(dict(file=file.name,sha256=hashlib.sha256(file.read_bytes()).hexdigest(),**{k:v for k,v in out.items()if k!='entries'})) + (OUTPUT/'combined-screen-summary.json').write_text(json.dumps(receipts,indent=2)+'\n');print(json.dumps(receipts,indent=2)) +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/weighted275/fetch_inputs.py b/research/gen5b-shared-kernels/weighted275/fetch_inputs.py new file mode 100644 index 0000000000..a216fdf28d --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/fetch_inputs.py @@ -0,0 +1,23 @@ +"""Download immutable upstream data only; never execute upstream programs.""" +from pathlib import Path +import argparse,json,urllib.request +from source_data import ROOT,pins,validate,HEAD + +def run(destination): + destination=Path(destination).resolve();destination.mkdir(parents=True,exist_ok=True) + manifest=pins() + for name,row in manifest['files'].items(): + target=destination/row['local'] + assert destination in target.resolve().parents + url=row['url'];commit=row.get('commit',HEAD) + assert url.startswith('https://raw.githubusercontent.com/') and '/'+commit+'/' in url + if target.exists():raw=target.read_bytes() + else: + with urllib.request.urlopen(url,timeout=90) as response:raw=response.read() + validate(name,raw);target.parent.mkdir(parents=True,exist_ok=True) + if not target.exists():target.write_bytes(raw) + return dict(status='PASS_ALL_IMMUTABLE_INPUT_HASHES',files=len(manifest['files']),bytes=sum(z['bytes']for z in manifest['files'].values()),destination=str(destination),upstream_programs_executed=False) +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + parser=argparse.ArgumentParser();parser.add_argument('--output',type=Path,default=ROOT/'inputs') + print(json.dumps(run(parser.parse_args().output),indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/inputs.json b/research/gen5b-shared-kernels/weighted275/inputs.json new file mode 100644 index 0000000000..17d9f2909d --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/inputs.json @@ -0,0 +1,283 @@ +{ + "repository": "lydakis/integer-mult-bounds", + "commit": "10b40041d4ab8a6610083e95bc571aee3468bca2", + "files": { + "KERNEL-PROOF.md": { + "local": "KERNEL-PROOF.md", + "bytes": 3820, + "git_blob": "a8abc839c03b41dea830fdd54fc8f1374efd8e77", + "sha256": "692191b9b29ff4ca508cee61425b6192c955e28bb43aec450afe574f1ef487e1", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/KERNEL-PROOF.md" + }, + "MANIFEST.json": { + "local": "MANIFEST.json", + "bytes": 16504, + "git_blob": "bf83520d4c3a5fc9938d4bb80f1ec1a1d60471ac", + "sha256": "135f3a9c8cdb9b3663832ade632947df54df4bdef633306462451edb712d0c87", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/MANIFEST.json" + }, + "MATCHING-PROOF.md": { + "local": "MATCHING-PROOF.md", + "bytes": 3863, + "git_blob": "27f32b668e0caefdf0bfd687c5d02de7bc3b67ca", + "sha256": "eb70b76c085f95d85df2b7ee84e4e6ddba3b9db34772c5165104cc7e33252ff2", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/MATCHING-PROOF.md" + }, + "PROOF.md": { + "local": "PROOF.md", + "bytes": 855, + "git_blob": "829225de4188111db4566012ac4c73242a009bdf", + "sha256": "1136962d02b5a392a601141cdb2d1079184601dcb9853972e780fb60a7fec27c", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/PROOF.md" + }, + "README.md": { + "local": "README.md", + "bytes": 5163, + "git_blob": "1d1b5897d50b5e3a6274d2f074a6ab38ce7e8925", + "sha256": "443a14764c391ccecdd8399dc5a7267a16d4996da6be530707f5df34f4be8e44", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/README.md" + }, + "SECOND-DESCENT-PROOF.md": { + "local": "SECOND-DESCENT-PROOF.md", + "bytes": 2197, + "git_blob": "d499b9b6d1ad6da06bc1ec25c0a9b3b523715f84", + "sha256": "770e950a7656ac9be5ca9d27f77f537295b3583db106c64d5493c1360ceac721", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/SECOND-DESCENT-PROOF.md" + }, + "SOURCE.json": { + "local": "SOURCE.json", + "bytes": 5688, + "git_blob": "29d8789ee19280048e6ebf28b29097f9d9349ce3", + "sha256": "363092c9a0775a2e469b6ea63e6d99d983041d2f39f353fc2e9315fa9948bb6f", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/SOURCE.json" + }, + "descent-selection.json": { + "local": "descent-selection.json", + "bytes": 4225342, + "git_blob": "d53d2f894a8a0bcfee06c84181e25f39c3d02df3", + "sha256": "d32c900002565565915467353acea887e96ea33da62583ccdca861bdd1bde6b1", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/descent-selection.json" + }, + "descent2-selection.json": { + "local": "descent2-selection.json", + "bytes": 319701, + "git_blob": "a465305c7d818e76918d79e20f4ba1fa7c898724", + "sha256": "b38f1cf6f8a6f0f53874e0bb7f1ddbb3a8bd57eadfa38e432d543ae8f2f8813b", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/descent2-selection.json" + }, + "kernel-selection.json": { + "local": "kernel-selection.json", + "bytes": 873734, + "git_blob": "5806ce264b8c5b18087c1f2a5275ebdc1b238284", + "sha256": "3de6647a97efda200269cee06446ee15944b197935b531efde61f4012526cc0d", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/kernel-selection.json" + }, + "kernel_transform.py": { + "local": "kernel_transform.py.txt", + "bytes": 17104, + "git_blob": "510bf5445b4449bdd1dc6a1da9014dd687dadde9", + "sha256": "fd5c98e7e50d6cae4a4c56ba33bc317bcf6a52b2a448b84146d0276eb140cbc2", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/kernel_transform.py" + }, + "math_check.py": { + "local": "math_check.py.txt", + "bytes": 5158, + "git_blob": "7f36db7e5c422d29f027de7d47a654969537cb47", + "sha256": "c44fe0f710fc8f00c2f085f40f1afadda287628e631f76ee7ca9160f94cf3bb6", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/math_check.py" + }, + "moment.py": { + "local": "moment.py.txt", + "bytes": 5568, + "git_blob": "1e43aaeaca1b9d1ff40b8805ca7ae3e6a219c392", + "sha256": "9d465c716c6b910ff66e1453e3bf0057608a787b5f5361be93781f42cb3370f7", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/moment.py" + }, + "restore-selection.json": { + "local": "restore-selection.json", + "bytes": 808745, + "git_blob": "39ed9e171661bc2779e7b7e19c7fcbd9dd978afc", + "sha256": "3b720a5aeb38d6930bc11fdf91816d31fe694a4f13b7ba29311d6c970fbab3be", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/restore-selection.json" + }, + "restore_transform.py": { + "local": "restore_transform.py.txt", + "bytes": 14720, + "git_blob": "ffc6cfe4d5c91a3991ba7c33ff0f17760071897b", + "sha256": "f7c80c5052efe17655dbaebe94ea37575db187c8e92eee30432fbf66199cfcd6", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/restore_transform.py" + }, + "sink-selection.json": { + "local": "sink-selection.json", + "bytes": 31837, + "git_blob": "4eac2269dcd315460db73b72616b82b4265fd0bb", + "sha256": "daf20cffc8de40048473088195827c8a0a86a5190ddbaca8c5162257453e0ed6", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/sink-selection.json" + }, + "sink_transform.py": { + "local": "sink_transform.py.txt", + "bytes": 15171, + "git_blob": "45662ae89ab154809f1c2867dc03abdec36e519a", + "sha256": "596995e17df374d0d5e5b49dc295ba71e647a46c464c73a4c4e57a6a71038ea5", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/sink_transform.py" + }, + "target-selection.json": { + "local": "target-selection.json", + "bytes": 1040746, + "git_blob": "1b96d9704a1daa9d837e56227f8ae17aa5143635", + "sha256": "3f700a370847e254d56a387ae73add542403bd8a2fd7352bfd1750eb20c3c3ee", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/target-selection.json" + }, + "gen5bit/selected/bit/frames_p12.json.gz": { + "local": "gen5bit/selected/bit/frames_p12.json.gz", + "bytes": 297501, + "git_blob": "a558091c81ab56c8a8b74ab3c5ebe28b2a1d9694", + "sha256": "c5e9eadf7ea06cefcb31f94f00b99c9cf3b850231af222bc88efee51f5d01295", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/gen5bit/selected/bit/frames_p12.json.gz" + }, + "gen5bit/selected/bit/graph_p12.json": { + "local": "gen5bit/selected/bit/graph_p12.json", + "bytes": 927750, + "git_blob": "d25a5f7be51c6a064a30a210c0aac3811e44e9f1", + "sha256": "73814dd03979f08b13cf981a30b56dc9b8127f618162407b815009e44298cb00", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/gen5bit/selected/bit/graph_p12.json" + }, + "gen5bit/selected/bit/kchron_p12.json": { + "local": "gen5bit/selected/bit/kchron_p12.json", + "bytes": 226522, + "git_blob": "f8295fab205a81dfdf2612e9b37ef536aea952e7", + "sha256": "e28cd9e9842605af568eea62203a15c48fb08a92e99b38a3480f2fe462d8e1b4", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/gen5bit/selected/bit/kchron_p12.json" + }, + "gen5bit/selected/bit/profile_p12.json": { + "local": "gen5bit/selected/bit/profile_p12.json", + "bytes": 917, + "git_blob": "f00ab5c99495fd3912dd8c744e0611bdbf3d9753", + "sha256": "bcfebb851f1d2e91c604867da2235d83f36f3d591a14d113a4aab734417b3c0b", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/gen5bit/selected/bit/profile_p12.json" + }, + "gen5bit/selected/bit/word_p12.json.gz": { + "local": "gen5bit/selected/bit/word_p12.json.gz", + "bytes": 727353, + "git_blob": "5bda3fa78a8858e807825b2158fb1b6264941ac1", + "sha256": "2317c6f6685dc48e6c2a41d10f6212ac15e99c774c4a8251a975e04b91e0f2cb", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/gen5bit/selected/bit/word_p12.json.gz" + }, + "expected/kernel-pins.json": { + "local": "expected/kernel-pins.json", + "bytes": 3279, + "git_blob": "7edadf3cdf1318332244be2e26d94d484aa67d8c", + "sha256": "9cbf1cb271cf6a32246630418d6ff86d23967e79ca687216049e970efabc7e90", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/expected/kernel-pins.json" + }, + "portable_complex.py": { + "local": "portable_complex.py.txt", + "bytes": 11070, + "git_blob": "debb378eb8e858376ccea380facdd64b5ce44286", + "sha256": "2097ab2a59fd3950527daa1da087e1aacefe107cbb49c5c55cc4adb28e4dee95", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/portable_complex.py" + }, + "inputs/complex/source-pins.json": { + "local": "inputs/complex/source-pins.json", + "bytes": 13587, + "sha256": "17b2c01350abc7fdd57a82fbe540488fb253a198d0cf7eb80275baef8864e11d", + "git_blob": "5ca82f7e66c4822c573300e3c6b4b7fd0c0459a6", + "external_byte_binding": "MANIFEST.json SHA256", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/inputs/complex/source-pins.json" + }, + "inputs/complex/gcert1-p11-pr233-flow.json.gz": { + "local": "inputs/complex/gcert1-p11-pr233-flow.json.gz", + "bytes": 478851, + "sha256": "09ceba1c0ea17282da155b937c8463669b913443c20f45fe2a7e6e024cb2d33a", + "git_blob": "d4026e4cbdf4866d15d16b34b3e6057bf9589a96", + "external_byte_binding": "inputs/complex/source-pins.json compressed SHA256", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/inputs/complex/gcert1-p11-pr233-flow.json.gz" + }, + "code/complex_labels.py": { + "local": "code/complex_labels.py.txt", + "bytes": 9082, + "sha256": "b1f6f3ad7ad5a1f702d472aa129d8d3617e826d9a5ae27828fa7aa2048d9eabd", + "git_blob": "77c4a35a9897a0172fea308a4eb075c22dc30477", + "external_byte_binding": "MANIFEST.json SHA256", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/code/complex_labels.py" + }, + "finite_check.py": { + "local": "finite_check.py.txt", + "bytes": 11658, + "sha256": "8a2c3b1476284bee9d8c86239f9d8ed664e52dd4b806640b1cb8dfbc5a1a20c7", + "git_blob": "f5c55cedd295c5fb685c6309366a3d732cb0f76c", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/finite_check.py" + }, + "bank_template.py": { + "local": "bank_template.py.txt", + "bytes": 11063, + "sha256": "60f4eef1964ed3bae195d729ba1afc2b1b41f5ba8e1c0d28989aa18f4953f07b", + "git_blob": "3f339355c3bc50c1beb24d7360540e0221656a33", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/bank_template.py" + }, + "proof/FINITE_BIT_ACCOUNTING.md": { + "local": "cap_sources/FINITE_BIT_ACCOUNTING.md", + "bytes": 6572, + "git_blob": "42a585d742660f9ed44ebd3ca2a9d1e0832bb0be", + "sha256": "602923520af184670170bf159fde7b4c72e79a72570eddd7746b7c97bc51fc5b", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/proof/FINITE_BIT_ACCOUNTING.md" + }, + "proof/INTEGRATED_PROOF.md": { + "local": "cap_sources/INTEGRATED_PROOF.md", + "bytes": 14080, + "git_blob": "c624da6c5c1f8e44c8ecda24af477d11dfee8e12", + "sha256": "cff22391e71a50bad27a1e832d5c0a2c8b2446df55adb1297c8b1485b3761257", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/proof/INTEGRATED_PROOF.md" + }, + "proof/PARITY-CONTRACT.md": { + "local": "cap_sources/PARITY-CONTRACT.md", + "bytes": 6418, + "git_blob": "fad6150b1f9987280f8e2dc72e3418eb85f3d8e6", + "sha256": "a9246be656e31f1a21d5ec714e002f51be0aa07c36e1528066a25b2c7a02db91", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/proof/PARITY-CONTRACT.md" + }, + "UPSTREAM-PR234-PROOF.md": { + "local": "cap_sources/UPSTREAM-PR234-PROOF.md", + "bytes": 4165, + "git_blob": "dbd880696772b68c63af15336a4fe749550f1146", + "sha256": "c9722b07256758cd3b307dd46689f99984c66e16c3dd934f9c34e551620bfc0f", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/UPSTREAM-PR234-PROOF.md" + }, + "prime_check.py": { + "local": "cap_sources/prime_check.py.txt", + "bytes": 5868, + "git_blob": "373ecbee8a0d4fd03374a0332419fde6345de239", + "sha256": "0c6b95d793e3251aba01346fb844a963a0868016f99cac2eb7dabc573f2c46a8", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/prime_check.py" + }, + "scalar_check.py": { + "local": "cap_sources/scalar_check.py.txt", + "bytes": 8413, + "git_blob": "013059639dcefaafa103ce1154e895f7365383e4", + "sha256": "e3bde38a25e14ccc9d74608d963d38a7702f345d4ff3ddbc7418dc67b00f4414", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/scalar_check.py" + }, + "proof/three-stage-cover-bit.tex": { + "local": "cap_sources/three-stage-cover-bit.tex.txt", + "bytes": 13061, + "git_blob": "f05225d21f92cf8cef21b6e12601d5b4d61991f0", + "sha256": "47123a756f823c83a0d48cca2bf5add6472cd88410b13aed345e70c8834fb511", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/proof/three-stage-cover-bit.tex" + }, + "proof/three-stage-cover-rows.tex": { + "local": "cap_sources/three-stage-cover-rows.tex.txt", + "bytes": 4815, + "git_blob": "590da4b892a08b9d5182fb3d8a983c6239dd27db", + "sha256": "6ad97a5cd7d6aecf978a81226e1c2763d37840caca130c61f3bf5c4ac111c5c8", + "url": "https://raw.githubusercontent.com/lydakis/integer-mult-bounds/10b40041d4ab8a6610083e95bc571aee3468bca2/research/gen5b-weighted-matching/proof/three-stage-cover-rows.tex" + }, + "prior299-word.json.gz": { + "git_blob": "ad318242f00ab47190660dd57f30e0d1d612f6f8", + "sha256": "f2a8b915209c28812c73a6a51a1b30b9cf830d7e0acbf00e7094b976d513cdb8", + "bytes": 727150, + "local": "prior299-word.json.gz", + "url": "https://raw.githubusercontent.com/CrocSwap/integer-mult-bounds/5f6bd3fbc0e6796dd31263cef1f06dc968186f64/research/five-stage-gen5b-kernels-restorations-sinks/gen5bit/selected/bit/word_p12.json.gz", + "commit": "5f6bd3fbc0e6796dd31263cef1f06dc968186f64" + } + } +} diff --git a/research/gen5b-shared-kernels/weighted275/integrate_bounded_candidate.py b/research/gen5b-shared-kernels/weighted275/integrate_bounded_candidate.py new file mode 100644 index 0000000000..b23a4a0f71 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/integrate_bounded_candidate.py @@ -0,0 +1,118 @@ +"""Separate full changed-obligation arithmetic for a bounded PR275 candidate. + +Imports only our newly authored bridge/norm programs and pure arithmetic. +Upstream source remains inert JSON/text. Original104-bit comparison is retained +as false when an explicitly reviewed fixed112-bit candidate bound is used. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as F +from pathlib import Path +import hashlib,importlib.util,json,sys +import reproduce_pr275 as base +from source_data import OUTPUT +import review_payload_cap +from price_candidate import price +from bank_receipt_binding import bind_banks +from check_candidate_charts import run as charts_run + +def digest(path):return hashlib.sha256(Path(path).read_bytes()).hexdigest() +def ceil(x):return -((-x.numerator)//x.denominator) + +def load(name,path): + spec=importlib.util.spec_from_file_location(name,path);module=importlib.util.module_from_spec(spec) + sys.modules[name]=module;spec.loader.exec_module(module);return module + +def invoice(stock,calls,added): + pins=base.read('expected/kernel-pins.json');m=120;v=1760;R=pins['physical_R'];T=60;N=240;d=m*m + E=T*calls;weighted=T*(5*(pins['scalar_events']+added)+6*v);unit=T*(5*(pins['literal_unit_additions']+added)+6*v) + J=T*(24*v+10*R);good=8*m*m+8;high=16*(d+1)**2;K=600*((stock-1)+R*120*815) + coefficient=unit+J*high+J*(stock+24)+E*good+E*(128*N**3)+16*m**3+120*T+E+K+1 + assert coefficient<2**80 and K<2**40 and stock+24<2**80 and 2*m**3*10**16<2**80 + return dict(literal_stock=stock,literal_children=E,gross_added_scalar_events_per_stage=added, + weighted_additions_upper=weighted,unit_additions_upper=unit,route_families=J, + normalizer_factor_bound=815,selector_calls_bound=K,displayed_finite_coefficient=coefficient, + coefficient_bits=coefficient.bit_length(),coefficient_cap=2**80,coefficient_cap_strict_gap=2**80-coefficient, + no_credit_taken_for_omitted_reads=True,primitive_chart_and_all_size_admission_replayed=False) + +def run(label,candidate_path,bridge_dir,bank_receipt,bank_table): + base.verify_sources();candidate_path=Path(candidate_path);bridge_dir=Path(bridge_dir) + witness=json.loads(candidate_path.read_text());n=len(witness['entries']) + import check_bridge as bridge_module,check_scalar_bounds as norm_module + from cases import CASES + case=next(k for k,v in CASES.items()if v['sha256']==digest(candidate_path)) + bridge_module.configure(case) + assert Path(bridge_module.CAND).resolve()==candidate_path.resolve() + code_hashes={name:digest(base.HERE/name)for name in('check_bridge.py','check_scalar_bounds.py')} + bridge=bridge_module.run();norm=norm_module.run(candidate_path) + assert code_hashes=={name:digest(base.HERE/name)for name in code_hashes} + assert bridge['head']==witness['source_head']==base.HEAD and bridge['selected_pivots']==n + assert bridge['all_column_formal_composition_forward_inverse'] and bridge['omitted_setup_and_restore_rejected'] and bridge['final_full_endpoints_checked'] + H=base.histogram(bridge['local_histogram_delta']);R=base.histogram(bridge['residual_family_delta']) + assert dict(R)=={24:-n,23:n} and base.mass(H)==-n + result=price(H,R,{23:n},label=label+' bound to freshly rerun exact bridge/norm; no final12') + result['status']='PASS_PR275_CHANGED_OBLIGATIONS_UNDER_DECLARED_INTERFACES' + result['source_head']=base.HEAD;result['candidate_sha256']=digest(candidate_path) + result['bridge_code_sha256']=code_hashes;result['bridge_status']=bridge['status'];result['bridge_scope']=bridge['scope'] + result['role_bank_binding']=bind_banks(result,Path(bank_receipt),Path(bank_table),'PASS_PR275_SHARED_KERNEL_ROLE_BANK_ASSIGNMENT') + chart=charts_run(candidate_path,bridge,result['literal_stock']) + assert chart['candidate_sha256']==result['candidate_sha256'] and chart['pivot_residual_demands']==n + assert len(chart['role_chart_uses'])==2*bridge['selected_streams'] + assert chart['max_changed_chart_factors']<=576 and chart['combined_normalizer_factor_bound']==815 + assert chart['max_factor_numerator']<2**80 and chart['max_factor_denominator']<2**80 + from source_data import OUTPUT + chart_path=OUTPUT/(label+'-charts-receipt.json');chart_path.write_text(json.dumps(base.ae.serial(chart),separators=(',',':'))+'\n') + result['changed_charts']={k:v for k,v in chart.items()if k not in('factor_programs','role_chart_uses')} + result['changed_chart_receipt_sha256']=digest(chart_path) + pins=base.read('expected/kernel-pins.json');setup=sum(len(e['donors'])for e in witness['entries']) + assert setup==norm['setup_restore_pairs'] and norm['status']=='PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS' + for direction,key in [('forward','forward_max_row_l1'),('inverse','inverse_max_row_l1')]: + row=norm[direction];assert row['inherited_bound']==pins[key] and row['max_added_source']==0 + assert row['certified_new_bound']==row['inherited_bound']+row['max_added_majorant'] + forward=norm['forward']['certified_new_bound'];inverse=norm['inverse']['certified_new_bound'];payload=64*forward**3*inverse**2 + assert payload==norm['payload_bound'] and payload.bit_length()==norm['payload_bits'] + if case=='166': + assert not payload<2**104 and norm['retained_payload_cap_2_to104'] is False + cap=review_payload_cap.run(forward,inverse,112) + assert cap['payload']==payload and cap['original_cap_satisfied'] is False and cap['explicit_candidate_cap_satisfied'] + result['payload_cap_review']=cap + cap_bits=112 + else: + assert payload<2**104 and norm['retained_payload_cap_2_to104'] is True + cap_bits=104 + assert norm['target_majorant_edges']==681 and norm['target_majorant_acyclic_vertices']==908 and norm['actual_sink_redirects']==14 + result['norm_review']=dict(forward=forward,inverse=inverse,payload=payload,payload_bits=payload.bit_length(), + original_cap_bits=104,original_cap_satisfied=payload<2**104,explicit_candidate_cap_bits=cap_bits, + explicit_candidate_cap_satisfied=True,explicit_candidate_cap_gap=2**cap_bits-payload,fresh_norm_receipt=norm) + baseline=invoice(pins['literal_stock'],pins['priced_five_stage_calls'],0);assert baseline['displayed_finite_coefficient']==90322316339049601 + finite=invoice(result['literal_stock'],result['calls'],2*setup) + assert finite['selector_calls_bound']==chart['selector_calls_bound'] + literal_mass=60*result['rank_mass'];assert 120*result['literal_stock']-literal_mass==264000 + finite.update(literal_rank_mass=literal_mass,max_bank_block_scalar=max(len(row['widths'])for row in result['packing_patterns']), + normalizer_status='All changed chart programs freshly certified below retained576; exact normalizer815 bound retained.', + baseline_displayed_coefficient=baseline['displayed_finite_coefficient']) + assert finite['max_bank_block_scalar']==40 + formula=base.SOURCE/'finite_check.py.txt';assert 'coefficient=unit+J*high+J*(stock+24)+E*good+E*(128*N**3)+16*m**3+120*T+E+K+1'in formula.read_text() + finite['pinned_finite_formula_sha256']=digest(formula) + delta_tau=1-result['bit_root_bracket']['lower_moment'][1] + delta_linear=1-F(literal_mass,120*result['literal_stock'])-F(32*120*finite['literal_children'],10**16*result['literal_stock']) + assert delta_tau>0 and delta_linear>0 + chain=result['assembly']['bootstrap_chain'];coarse=result['bit_root_bracket']['lower'];gaps=[] + for stage,(prior,a)in enumerate(zip(chain,chain[1:]),1): + slacks=dict(atom=coarse-a,borrowing=1-a-coarse,remainder=1-a-coarse*(1-prior),stock=1-coarse);delta=min(slacks.values());assert delta>0 + coefficient=finite['displayed_finite_coefficient'];cutoff=max(1,ceil(36/delta**2),ceil(F(2*(4+(coefficient-1).bit_length()))/delta)) + assert cutoff*delta**2>=36 and cutoff*delta>=2*(4+(coefficient-1).bit_length()) + gaps.append(dict(stage=stage,slacks=slacks,minimum=delta,displayed_coefficient_cutoff_log2=cutoff)) + finite.update(delta_tau_lower=delta_tau,delta_linear=delta_linear,bootstrap_gap_checks=gaps, + cutoff_scope='Displayed fixed bill only. C_full still includes unspecified inherited primitive, wrapper, setup and previous ordinary-level constants; none are set to zero or claimed numerically measured.') + result['finite_arithmetic']=finite + result['scope']='All changed obligations represented here are independently recomputed and bound to the fixed candidate: alias/prefix/frame bridge, charts, role banks, conservative norm, explicit case-specific numeric payload bound, displayed finite formula, moment and47 rational inequalities. Original104 comparison is retained explicitly, and fails for166. Unchanged full physical decoder, compiler and all-size interfaces remain assumptions; no upstream program executed.' + return result + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + label,candidate,bridge,banks,table=sys.argv[1:] + result=run(label,candidate,bridge,banks,table) + (OUTPUT/(label+'-bound-receipt.json')).write_text(json.dumps(base.ae.serial(result),indent=2)+'\n') + print(json.dumps(dict(status=result['status'],kappa=result['assembly']['kappa_decimal'],charts=result['changed_charts']['charts'], + finite_coefficient=result['finite_arithmetic']['displayed_finite_coefficient'],payload_bits=result['norm_review']['payload_bits'], + old104=result['norm_review']['original_cap_satisfied'],new112=result['norm_review']['explicit_candidate_cap_satisfied']),indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/map_roles.py b/research/gen5b-shared-kernels/weighted275/map_roles.py new file mode 100644 index 0000000000..86f5f8faa2 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/map_roles.py @@ -0,0 +1,64 @@ +"""Independent logical-to-physical audit; no upstream program is imported.""" +from pathlib import Path +import gzip,json,hashlib +ROOT=Path(__file__).resolve().parent +from source_data import SOURCE,OUTPUT +FROZEN=ROOT.parent + +def word(p):return json.loads(gzip.decompress(p.read_bytes())) +def layout(w): + pairs=w['pairs'];assert all(len(z)==2 for z in pairs) + recipient_to_donor={b:a for a,b in pairs};donors={a for a,b in pairs} + assert len(recipient_to_donor)==len(donors)==len(pairs) + assert not donors&recipient_to_donor.keys() + regs=sorted(set(range(17160))-recipient_to_donor.keys()) + phys={r:3520+i for i,r in enumerate(regs)} + return recipient_to_donor,donors,phys + +def run(): + old=word(SOURCE/'prior299-word.json.gz');new=word(SOURCE/'gen5bit/selected/bit/word_p12.json.gz') + old_alias,old_donors,oldphys=layout(old);alias,donors,phys=layout(new) + assert len(old_alias)==1726 and len(alias)==1728 + assert {k for k in new if new[k]!=old[k]}=={'pairs','reads'} + assert len(phys)==15432 + oldinv={s:r for r,s in oldphys.items()} + kernels=json.loads((SOURCE/'kernel-selection.json').read_text()) + occupied={r for z in kernels['pairs']for r in (z['a'],z['b'])}|{r for z in kernels['families']for r in [z['pivot']]+z['donors']} + def info(r): + return dict(logical_role=r,old_stream=oldphys[old_alias.get(r,r)],new_stream=phys[alias.get(r,r)], + old_recipient=r in old_alias,new_recipient=r in alias, + old_reuse_donor=r in old_donors,new_reuse_donor=r in donors, + new_alias=alias.get(r,r),new_kernel_member=phys[alias.get(r,r)]in occupied) + witness=json.loads((FROZEN/'kernel70-witness.json').read_text())['entries'] + remapped=[] + for z in witness: + p=info(z['virtual_pivot']);ds=[info(r)for r in z['virtual_donors']] + remapped.append(dict(old_pivot=z['pivot'],pivot=p,donors=ds,basis=z['basis'],rank=z['rank'])) + member_ids={z['virtual_pivot']for z in witness}|{r for z in witness for r in z['virtual_donors']} + members=[info(r)for r in sorted(member_ids)] + core=json.loads((FROZEN/'certificates/coretime12/local.json').read_text())['candidates'] + core_rows=[] + for z in core: + row={k:info(z[k])for k in ('helper','donor','blocker')} + row['old_restore_helper']=info(oldinv[z['old_restored_helper_stream']]) + row['old_restore_helper_stream']=z['old_restored_helper_stream'] + row['new_endpoint']=z['new_endpoint'];core_rows.append(row) + reused_members=[m for m in members if m['new_reuse_donor']] + recipient_members=[m for m in members if m['new_recipient']] + occupied_members=[m for m in members if m['new_kernel_member']] + core_recipients=[z['helper']for z in core_rows if z['helper']['new_recipient']] + result=dict(status='PASS_EXACT_ROLE_MAPPING_ONLY',head='10b40041d4ab8a6610083e95bc571aee3468bca2', + changed_word_fields=['pairs','reads'],old_reuse_pairs=1726,new_reuse_pairs=1728, + all_virtual_roles=17160,new_independent_helpers_before_sinks=15432,new_all_columns_before_sinks=18952, + expected_after_seven_sinks=15425,old_kernel_physical_members=len(occupied), + kernel70_relation_count=len(remapped),kernel70_distinct_virtual_members=len(members), + transported_recipient_members=recipient_members,transported_reuse_donor_members=reused_members, + transported_occupied_kernel_members=occupied_members,final12_new_recipient_helpers=core_recipients, + kernel70_relations=remapped,kernel70_members=members,final12_candidates=core_rows, + scope='Exact alias/stream mapping and occupancy only. No response, common-cut, aliased frame, suffix, bank or finite-cost admission is asserted. Physical donor roles remain eligible for later full-path checking; recipient keys are excluded from new kernel pivots/donors.') + (OUTPUT/'role-mapping.json').write_text(json.dumps(result,indent=2)+'\n') + (OUTPUT/'all-role-map.json').write_text(json.dumps({str(r):phys[alias.get(r,r)]for r in range(17160)},separators=(',',':'))+'\n') + print(json.dumps({k:v for k,v in result.items()if k not in ('kernel70_relations','kernel70_members','final12_candidates')},indent=2)) + return result + +if __name__=='__main__':run() diff --git a/research/gen5b-shared-kernels/weighted275/price_candidate.py b/research/gen5b-shared-kernels/weighted275/price_candidate.py new file mode 100644 index 0000000000..a15bbb9136 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/price_candidate.py @@ -0,0 +1,66 @@ +"""Conditional exact repricing on freshly reproduced PR275 arithmetic. + +The caller supplies measured or explicitly provisional histogram and role-width +deltas. No baseline physical admission or candidate admission is asserted. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as F +from pathlib import Path +import json +import reproduce_pr275 as base + +def price(histogram_delta,residual_delta,pivot_delta=None,label='provisional'): + base.verify_sources() + H,profile=base.final_profile();inv=base.inventory() + H.update({r:5*n for r,n in histogram_delta.items()}) + assert min(H.values())>=0 + H=Counter(base.clean(H)) + families=Counter(inv['residual_census']);families.update(residual_delta) + assert min(families.values())>=0 + families=Counter(base.clean(families)) + pivots=Counter(inv['pivot_residual_census']);pivots.update(pivot_delta or {}) + patterns=[dict(widths=[7]*12+[4]*9,count=10)] + for width,count in sorted(pivots.items()): + patterns.append(dict(widths=[width]*4+[24]+[4]*(24-width),count=15*count)) + supplied=Counter() + for row in patterns: + assert sum(row['widths'])==120 + supplied.update({r:n*row['count'] for r,n in Counter(row['widths']).items()}) + for width in (3,4,6,24): + remainder=60*families[width]-supplied[width] + assert remainder>=0 and 120%width==0 and remainder%(120//width)==0 + if remainder:patterns.append(dict(widths=[width]*(120//width),count=remainder//(120//width))) + supplied=Counter() + for row in patterns: + supplied.update({r:n*row['count'] for r,n in Counter(row['widths']).items()}) + assert supplied==Counter({r:60*n for r,n in families.items()}) + banks=sum(row['count'] for row in patterns) + assert 120*banks==60*base.mass(families) + stock=422400+5*banks;W=F(stock,60);deficit=120*W-base.mass(H) + assert deficit==4400 + root=base.bracket(H,120,W);assembly=base.assembly(root['lower']) + baseline_kappa=F(base.read('expected/kernel-pins.json')['kappa']) + return dict(status='CONDITIONAL_CANDIDATE_PROFILE_ARITHMETIC',label=label, + physical_admission=False,all_size_theorem=False, + local_histogram_delta=histogram_delta,residual_role_delta=residual_delta, + final_histogram=base.clean(H),calls=sum(H.values()),rank_mass=base.mass(H), + residual_census=base.clean(families),physical_R=sum(families.values()), + banks_per_stage=banks,total_banks=5*banks,literal_stock=stock, + packing_patterns=patterns,packing_unused_coordinates=0, + unreplicated_stock=W,deficit=deficit,bit_root_bracket=root,assembly=assembly, + kappa_improvement_over_pr275=assembly['kappa']-baseline_kappa, + improvement_percent=100*(assembly['kappa']/baseline_kappa-1), + scope='Repriced declared profile only. Supplied deltas require independent exact changed-stage/chronology, geometry, scalar-cost and finite-invoice validation before admission.') + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + result=price({1:87,2:137,3:-137,4:18,5:-16,6:-2},{24:-70,23:70},{23:70}, + label='PROVISIONAL direct70; two newly reused donor aliases awaiting chronological verification; no final12 delta') + path=Path(__file__).with_name('direct70-provisional-receipt.json') + path.write_text(json.dumps(base.ae.serial(result),indent=2)+'\n') + print(json.dumps(base.ae.serial(dict(kappa=result['assembly']['kappa'], + kappa_decimal=result['assembly']['kappa_decimal'],calls=result['calls'],rank_mass=result['rank_mass'], + stock=result['literal_stock'],improvement_percent=base.ex.dec(result['improvement_percent']), + bit_root_bracket=[result['bit_root_bracket'][key] for key in ('lower','upper')], + physical_admission=False)),indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/reproduce_complex.py b/research/gen5b-shared-kernels/weighted275/reproduce_complex.py new file mode 100644 index 0000000000..8d0d8f4002 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/reproduce_complex.py @@ -0,0 +1,87 @@ +"""Independently authored complex-certificate dimension path and moment audit. + +Only inert primary JSON is consumed. This is not a scalar map or Lean replay. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as F +import hashlib,gzip,json +import reproduce_pr275 as base + +def profile(): + pins=base.read('inputs/complex/source-pins.json')['certificate'] + packed=(base.SOURCE/pins['path']).read_bytes();raw=gzip.decompress(packed) + assert hashlib.sha256(packed).hexdigest()==pins['compressed_sha256'] + assert hashlib.sha256(raw).hexdigest()==pins['uncompressed_sha256'] + c=json.loads(raw) + h,v,R=c['h'],c['v'],c['R'];assert(h,v,R)==(22,1320,9412) + frames=c['frames'];dims=list(map(len,frames));current=c['start'][:] + assert len(current)==len(c['final'])==2*v+R + assert frames[0]==[] and dims[1]==h + for frame in frames: + pivots=[x.bit_length()-1 for x in frame] + assert pivots==sorted(set(pivots),reverse=True) + assert all(type(x)is int and 0dims[before] + pair=(before,after) + if pair not in checked: + for vector in frames[before]: + remainder=vector + for basis in frames[after]: + if remainder&(1<<(basis.bit_length()-1)):remainder^=basis + assert remainder==0 + checked.add(pair) + rank=dims[after]-dims[before] + label='x' if reg0 and n}) + +def mass(h): + return sum(r*n for r,n in h.items()) + +def clean(h): + return {r:n for r,n in sorted(h.items()) if n} + +def verify_sources(): + pins=read('PINS.json') + assert pins['commit']==HEAD + for name,row in pins['files'].items(): + data=(SOURCE/row['local']).read_bytes() + assert len(data)==row['bytes'] + assert hashlib.sha256(data).hexdigest()==row['sha256'] + assert hashlib.sha1(b'blob '+str(len(data)).encode()+b'\0'+data).hexdigest()==row['git_blob'] + return dict(pinned_head=HEAD,verified_files=len(pins['files']),upstream_programs_executed=False) + +def kernel_delta(): + k=read('kernel-selection.json') + ranks=defaultdict(set);first={};pivots={};donors=Counter() + for row in k['pairs']+k['families']: + pivot=row.get('pivot',row.get('a')) + ds=row.get('donors',[row.get('b')]);pivots[pivot]=row['rank'] + dims=row['first_frame_dims'] + dims={pivot:dims[0],ds[0]:dims[1]} if isinstance(dims,list) else {int(r):d for r,d in dims.items()} + assert set(dims)=={pivot,*ds} + for role,dimension in dims.items(): + assert role not in first or first[role]==dimension + first[role]=dimension;ranks[role].add(row['rank']) + donors.update(ds) + assert not set(pivots)&set(donors) + h=Counter() + for role,visits in ranks.items(): + h[first[role]]-=1;previous=pivots.get(role,0) + for dimension in sorted(visits)+[first[role]]: + assert dimension>=previous + if dimension>previous:h[dimension-previous]+=1 + previous=dimension + assert clean(h)==dict(histogram(k['expected_local_delta'])) + assert mass(h)==-sum(pivots.values()) + return h,dict(entries=len(pivots),pairs=len(k['pairs']),families=len(k['families']), + entrance_rank=sum(pivots.values()),distinct_donors=len(donors), + shared_donors=sum(n>1 for n in donors.values()),max_donor_multiplicity=max(donors.values()), + histogram_delta=clean(h),method='One ordered entrance-dimension chain per member, counting shared donors once. Dimension arithmetic only; nesting is an inherited geometry obligation.') + +def inventory(): + w=read('gen5bit/selected/bit/word_p12.json.gz') + k=read('kernel-selection.json');rest=read('restore-selection.json');sink=read('sink-selection.json') + removed={b for a,b in w['pairs']};regs=sorted(set(range(17160))-removed) + bystream={3520+i:r for i,r in enumerate(regs)} + sinks={row['role'] for row in sink['sinks']} + assert all(bystream[row['stream']]==row['role'] for row in sink['sinks']) + roles=set(regs)-sinks;entrance={r:0 for r in roles};endpoint={r:24 for r in roles} + for row in w['gauges']: + if row['role'] in roles:entrance[row['role']]=row['dim'] + pivot_residual=Counter() + for row in k['pairs']+k['families']: + stream=row.get('pivot',row.get('a'));role=bystream[stream] + assert entrance[role]==0 + entrance[role]=row['rank'];pivot_residual[24-row['rank']]+=1 + for row in rest['entries']: + role=bystream[row['helper']] + assert entrance[role]==row['dims'][0] and endpoint[role]==24 + endpoint[role]=row['rank'] + families=Counter(endpoint[r]-entrance[r] for r in roles) + gauges=Counter(x for x in entrance.values() if x) + completion=Counter(entrance[r]+24-endpoint[r] for r in roles if entrance[r]) + assert len(roles)==sum(families.values()) and min(families)>0 + # A primal width-120 packing: retained mixed pivot and rank-7 templates, + # then exact pure-bin fills. y_r=r/120 is the volume lower-bound dual. + patterns=[dict(widths=[7]*12+[4]*9,count=10)] + for width,count in sorted(pivot_residual.items()): + patterns.append(dict(widths=[width]*4+[24]+[4]*(24-width),count=15*count)) + used=Counter() + for row in patterns: + assert sum(row['widths'])==120 + used.update({r:n*row['count'] for r,n in Counter(row['widths']).items()}) + for width in (3,4,6,24): + remaining=60*families[width]-used[width];blocks=120//width + assert 120%width==0 and remaining>=0 and remaining%blocks==0 + if remaining:patterns.append(dict(widths=[width]*blocks,count=remaining//blocks)) + packed=Counter() + for row in patterns:packed.update({r:n*row['count'] for r,n in Counter(row['widths']).items()}) + assert packed==Counter({r:60*n for r,n in families.items()}) + banks=sum(row['count'] for row in patterns) + assert 120*banks==60*mass(families) + p=read('expected/kernel-pins.json') + for field,actual in [('bank_families',families),('pivot_residual_census',pivot_residual),('entrance_rank_histogram',gauges),('completion_rank_histogram',completion)]: + assert dict(actual)==dict(histogram(p[field])),(field,actual,p[field]) + assert len(roles)==p['physical_R'] + assert 5*banks==p['banks_total'] + stock=60*4*1760+5*banks + assert stock==p['literal_stock'] + return dict(physical_R=len(roles),kernel_entries=sum(pivot_residual.values()), + restore_helpers=len(rest['entries']),sink_count=len(sinks),entrance_count=sum(gauges.values()), + entrance_rank_histogram=clean(gauges),completion_rank_histogram=clean(completion), + residual_census=clean(families),pivot_residual_census=clean(pivot_residual), + residual_rank=mass(families),banks_per_stage=banks,banks_total=5*banks, + literal_data_stock=60*4*1760,literal_stock=stock,packing_patterns=patterns, + packing_optimal_for_declared_widths=True,packing_unused_coordinates=0, + scope='Exact declared role inventory and zero-waste width packing; no chronological bank admission claimed.') + +def final_profile(): + h,base=base_profile();kd,kernel=kernel_delta() + target=read('target-selection.json');td=Counter() + for row in target['groups']:td.update(histogram(row['local_histogram_delta'])) + assert clean(td)==dict(histogram(target['expected_total_delta'])) + restore=read('restore-selection.json');rd=Counter() + for row in restore['entries']: + entrance,helper,donor,end=row['dims'];assert entranceFULL by helper->end and split donor->FULL at end. + rd[24-helper]-=1;rd[24-donor]-=1 + for width in (end-helper,end-donor,24-end): + if width:rd[width]+=1 + assert clean(rd)==dict(histogram(restore['expected_local_delta'])) + sink=read('sink-selection.json');sd=Counter() + for row in sink['sinks']: + rank=len(row['root_frame_basis']);sd[rank]-=1;sd[24-rank]-=1 + assert clean(sd)==dict(histogram(sink['expected_local_delta'])) + p=read('expected/kernel-pins.json');stages={} + deltas=[('descent',histogram(read('descent-selection.json')['expected_local_histogram_delta'])), + ('target',td),('kernel',kd),('descent2',histogram(read('descent2-selection.json')['expected_local_histogram_delta'])), + ('restore',rd),('sink',sd)] + for name,delta in deltas: + h.update(delta);assert min(h.values())>=0 + stages[name]=dict(calls=sum(h.values()),rank_mass=mass(h),delta=clean(delta), + delta_calls=sum(delta.values()),delta_rank_mass=mass(delta)) + assert stages['kernel']['rank_mass']==p['kernel_helper_rank_mass'] + assert stages['descent2']['delta_calls']==65 and stages['descent2']['delta_rank_mass']==0 + final=Counter({r:5*n for r,n in h.items() if n});final.update({4:3520,23:3520,46:3520,50:3520}) + assert sum(final.values())==p['priced_five_stage_calls'] and mass(final)==p['priced_five_stage_rank_mass'] + completion=Counter({5*r:n for r,n in histogram(p['completion_rank_histogram']).items()}) + uncompacted=final.copy();uncompacted.update(completion) + assert sum(uncompacted.values())==p['sink_five_stage_calls'] and mass(uncompacted)==p['final_five_stage_rank_mass'] + return final,dict(base=base,kernel=kernel,target_groups=len(target['groups']),stages=stages, + final_local_histogram=clean(h),final_local_calls=sum(h.values()),final_local_rank_mass=mass(h), + priced_five_stage_histogram=clean(final),priced_five_stage_calls=sum(final.values()),priced_five_stage_rank_mass=mass(final), + with_completions_calls=sum(uncompacted.values()),with_completions_rank_mass=mass(uncompacted), + declared_census_inputs=['gen5bit/selected/bit/profile_p12.json: source_data_histogram and target_data_histogram'], + declared_delta_inputs=['descent-selection.json: expected_local_histogram_delta','descent2-selection.json: expected_local_histogram_delta'], + scope='Independent arithmetic from pinned word/frame dimensions and declared selections; does not execute or certify upstream physical admission.') + +def base_profile(): + w = read('gen5bit/selected/bit/word_p12.json.gz') + frames = read('gen5bit/selected/bit/frames_p12.json.gz') + profile = read('gen5bit/selected/bit/profile_p12.json') + dims = {int(k):v['dim'] for k,v in frames['frames'].items()} + assert profile['h'] == frames['h'] == 24 + assert profile['R'] == 17160 and profile['v'] == 1760 + gauges = {row['role']:row for row in w['gauges']} + assert all(row['dim'] == dims[row['frame']] for row in gauges.values()) + source_nodes = {role:int(node) for node,role in w['sources'].items()} + reuse = dict(w['pairs']) + removed = set(reuse.values()) + assert len(reuse) == len(removed) == len(w['pairs']) + assert not set(reuse) & removed + assert all(a not in gauges and b in gauges for a,b in reuse.items()) + phase = set(w['phase1']) + order = list(w['phase1']) + [i for i in range(len(w['ops'])) if i not in phase] + assert len(order) == len(set(order)) == len(w['ops']) + paths = defaultdict(list) + for i in order: + for role in w['ops'][i][:2]: + paths[role].append(w['op_frame'][i]) + for role,frame in zip(w['rootroles'],w['root_frame']): + paths[role].append(frame) + h=Counter() + for role in range(profile['R']): + if role in removed: + continue + start = gauges[role]['frame'] if role in gauges else w['source_frame'][source_nodes[role]] if role in source_nodes else None + dim = 0 if start is None else dims[start] + visits = paths[role][:] + if role in reuse: + recipient = reuse[role] + visits += [gauges[recipient]['frame']] + paths[recipient] + visits += [w['full_frame']] + for frame in visits: + delta = dims[frame]-dim + assert delta>=0,(role,dim,dims[frame]) + if delta: + h[delta]+=1 + dim=dims[frame] + if role in source_nodes: + h[1]+=1 + helper_h = h.copy() + # Declared profile components, separately identified from helper-path replay. + h[22]+=24 + for key in ('source_data_histogram','target_data_histogram'): + h.update(histogram(profile[key])) + return h, dict(reused_pairs=len(reuse),logical_roles=profile['R'], + physical_helpers_before_sinks=profile['R']-len(removed), + helper_path_calls=sum(helper_h.values()),helper_path_rank_mass=mass(helper_h), + calls=sum(h.values()),rank_mass=mass(h),histogram=dict(sorted(h.items()))) + +def moment(h,m,W,a,bad=True): + low, high = ex.moment_interval(m,W,h,a) + if bad: + L,U=ex.log_interval(F(m)) + E,G=ex.exp_interval(a*L,a*U) + weight=F(32*m*sum(h.values()),10**16*W) + low += weight*E + high += weight*G + return low,high + +def bracket(h,m,W,bad=True,scale=10**18): + low,high=0,scale//100 + assert moment(h,m,W,F(low,scale),bad)[1]<1 + assert moment(h,m,W,F(high,scale),bad)[0]>1 + while high-low>1: + mid=(low+high)//2 + a,b=moment(h,m,W,F(mid,scale),bad) + if b<1: + low=mid + elif a>1: + high=mid + else: + raise ArithmeticError('Insufficient moment enclosure precision') + lo,hi=F(low,scale),F(high,scale) + return dict(lower=lo,upper=hi,lower_moment=moment(h,m,W,lo,bad),upper_moment=moment(h,m,W,hi,bad)) + +def assembly(coarse,complex_coarse=None): + b=complex_coarse if complex_coarse is not None else F(754736418878859,10**18) + chain=[F(384599,10**10)] + for _ in range(3): + nxt=(1-coarse)*coarse+coarse*chain[-1] + assert chain[-1]0 + next_point=ae.direct_slacks(a,b,beta,h,k+F(1,10**18),1,row_gap) + rejected=[name for name,value in next_point['slacks'].items() if value<=0] + assert rejected==['g3_above_kappa'] + return dict(bit_coarse=coarse,complex_coarse=b,bootstrap_chain=chain, + backoff=h,beta=beta,strict_constraints=factored,margins=direct['margins'], + kappa=k,kappa_decimal=ex.dec(k),minimum_margin=minimum,absorption_gap=minimum-k, + adjacent_grid_rejected=rejected,strict_constraint_count=len(factored), + scope='All 47 exact displayed inequalities, conditional on literal scalar guard=1, stated positive row gap, and complex coarse bound. This is not an all-size bridge certificate.') + +def run(): + integrity=verify_sources();inv=inventory();h,profile=final_profile() + W=F(inv['literal_stock'],60) + assert 120*W-mass(h)==4400 + root=bracket(h,120,W) + outer=assembly(root['lower']) + assert outer['kappa']==F(read('expected/kernel-pins.json')['kappa']) + return dict(status='PASS_INDEPENDENT_PR275_DECLARED_PROFILE_ARITHMETIC', + physical_admission=False,all_size_theorem=False,integrity=integrity, + inventory=inv,profile=profile,unreplicated_stock=W,deficit=4400, + bit_root_bracket=root,assembly=outer) + +if __name__ == '__main__': + if not __debug__:raise RuntimeError('Assertions must remain enabled') + report=run() + (HERE/'baseline-receipt.json').write_text(json.dumps(ae.serial(report),indent=2)+'\n') + print(json.dumps(ae.serial(dict(status=report['status'],kappa=report['assembly']['kappa'], + kappa_decimal=report['assembly']['kappa_decimal'], + bit_root_bracket=[report['bit_root_bracket'][key] for key in ('lower','upper')], + bit_endpoint_residuals=[ex.dec(report['bit_root_bracket']['lower_moment'][1]-1),ex.dec(report['bit_root_bracket']['upper_moment'][0]-1)], + physical_admission=False)),indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/resolve_group_overlaps.py b/research/gen5b-shared-kernels/weighted275/resolve_group_overlaps.py new file mode 100644 index 0000000000..3e932bd192 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/resolve_group_overlaps.py @@ -0,0 +1,49 @@ +"""Exactly two bounded priority orders; no additional line or basis search. + +Regenerate each result in memory and compare its integer construction against +its frozen candidate. Entropy numbers are diagnostic screening quantities. +""" +from pathlib import Path +from collections import Counter +import json +from search_expanded_lines import closure +from compose_screened_groups import members,ledger,dim,phi +from source_data import ROOT,OUTPUT + +def resolve(primary,secondary,extra): + entries=primary['entries']+extra['entries'];assert not members(primary['entries'])&members(extra['entries']) + used=members(entries) + remaining=[dict(pivot=e['virtual_pivot'],donors=e['virtual_donors'])for e in secondary['entries']if not members([e])&used] + dimensions={r:dim(r)for e in remaining for r in[e['pivot']]+e['donors']} + selected,profit=closure(remaining,dimensions,phi);before=len(selected);parity=None + if len(selected)%2: + counts=Counter(d for e in selected for d in e['donors']) + def marginal(e): + benefit=phi(dim(e['pivot']))-phi(dim(e['pivot'])-1) + released=sum(phi(1)+phi(dim(d)-1)-phi(dim(d))for d in e['donors']if counts[d]==1) + return round((benefit-released)*10**9),e['pivot'] + parity=min(selected,key=marginal);selected=[e for e in selected if e is not parity] + keep={e['pivot']for e in selected};entries += [e for e in secondary['entries']if e['virtual_pivot']in keep] + h,donors=ledger(entries) + return dict(entries=entries,pivots=len(entries),distinct_donors=donors, + local_histogram_delta=h,residual_family_delta={24:-len(entries),23:len(entries)}, + scalar_setup_pairs=sum(len(e['donors'])for e in entries), + remaining_relations=len(remaining),selected_before_parity=before, + selected_after_parity=len(selected),parity_omitted_pivot=parity['pivot']if parity else None, + rounded_closure_profit_before_parity=profit) + +def run(): + a=json.loads((ROOT/'candidate-line16-17.json').read_text());b=json.loads((ROOT/'candidate-line6-7.json').read_text());c=json.loads((ROOT/'candidate-line2-3.json').read_text()) + results=[] + for label,primary,secondary,name in [('preserve136',a,b,'candidate-combined166-reclosed.json'),('preserve36',b,a,'candidate-combined48-reclosed-reverse.json')]: + result=resolve(primary,secondary,c);frozen=json.loads((ROOT/name).read_text()) + for key in ('entries','pivots','distinct_donors','scalar_setup_pairs'): + assert result[key]==frozen[key],(label,key) + for key in ('local_histogram_delta','residual_family_delta'): + assert result[key]=={int(k):v for k,v in frozen[key].items()},(label,key) + results.append(dict(order=label,candidate=name,**{k:v for k,v in result.items()if k!='entries'})) + return dict(status='PASS_TWO_FIXED_OVERLAP_RESOLUTIONS',orders=results, + scope='Exactly two priority orders on the three positive groups from the declared276-line pass. Same rounded closure algorithm reused on surviving relations, then one deterministic parity trim. No claim of optimality over all conflict resolutions or bases.') + +if __name__=='__main__': + out=run();(OUTPUT/'overlap-resolution-receipt.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/review_payload_cap.py b/research/gen5b-shared-kernels/weighted275/review_payload_cap.py new file mode 100644 index 0000000000..b71a1ff35c --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/review_payload_cap.py @@ -0,0 +1,81 @@ +"""Independent static review of the proposed candidate-specific payload cap. + +Upstream programs are parsed as inert syntax only, never imported or executed. +This confirms the displayed fixed-recipe interface; unknown primitive constants +stay quantified in C_full. Prepared with substantial OpenAI assistance. +Apache-2.0. +""" +from pathlib import Path +import ast,hashlib,json +import reproduce_pr275 as base + +CAP_DIR=base.SOURCE/'cap_sources' + +def run(forward=432881,inverse=14083738,new_bits=112): + base.verify_sources() + manifest=base.read('MANIFEST.json')['files'] + mapped={};texts={} + for path in sorted(CAP_DIR.iterdir()): + data=path.read_bytes();raw=data + matches=[name for name,sha in manifest.items() if hashlib.sha256(raw).hexdigest()==sha] + extra=0 + if not matches: + assert data.endswith(b'\n') + raw=data[:-1];extra=1 + matches=[name for name,sha in manifest.items() if hashlib.sha256(raw).hexdigest()==sha] + assert len(matches)==1,('Proof source does not match immutable manifest',path) + name=matches[0];texts[name]=raw.decode('utf-8') + mapped[name]=dict(manifest_bound_sha256=hashlib.sha256(raw).hexdigest(), + supplied_copy_sha256=hashlib.sha256(data).hexdigest(),extra_trailing_newlines_in_copy=extra) + assert len(mapped)==8 + finite=base.SOURCE/'finite_check.py.txt';raw=finite.read_bytes();tree=ast.parse(raw) + assert hashlib.sha256(raw).hexdigest()==manifest['finite_check.py'] + parents={child:node for node in ast.walk(tree)for child in ast.iter_child_nodes(node)} + loads={name:[] for name in ('payload','payloadbits')} + contexts=[] + for node in ast.walk(tree): + if isinstance(node,ast.Name) and isinstance(node.ctx,ast.Load) and node.id in loads: + loads[node.id].append(node.lineno) + ancestor=node + while not isinstance(ancestor,(ast.Assign,ast.Assert,ast.Return)): + ancestor=parents[ancestor] + contexts.append((node.id,type(ancestor).__name__,ancestor.lineno)) + if isinstance(ancestor,ast.Assign): + assert len(ancestor.targets)==1 and isinstance(ancestor.targets[0],ast.Name) + assert ancestor.targets[0].id=='payloadbits' + assert ast.unparse(ancestor.value)=='payload.bit_length()' + elif isinstance(ancestor,ast.Assert): + assert ast.unparse(ancestor.test)=='payload < 2 ** 104' + else: + assert isinstance(ancestor,ast.Return) + assert contexts and len(loads['payload'])==3 and len(loads['payloadbits'])==1 + coefficient=next(node for node in ast.walk(tree)if isinstance(node,ast.Assign) and any(isinstance(t,ast.Name) and t.id=='coefficient' for t in node.targets)) + dependencies={n.id for n in ast.walk(coefficient.value)if isinstance(n,ast.Name)} + assert not dependencies&set(loads) + accounting=texts['proof/FINITE_BIT_ACCOUNTING.md'];parity=texts['proof/PARITY-CONTRACT.md'];rows=texts['proof/three-stage-cover-rows.tex'] + assert 'primitive constant C may depend on q, the fixed source recipe' in accounting + assert 'does not depend on n,w' in accounting + assert 'scalar domain need not equal the label field' in parity + assert 'payload scalars are binary' in parity + assert 'total\nlogical-volume increase is below $q^2$' in rows + assert all('104'not in text for text in texts.values()) + payload=64*forward**3*inverse**2 + if (forward,inverse)==(432881,14083738): + assert payload==1029725389598377713081823232358656 and payload.bit_length()==110 + assert payload>=2**104 and payload<2**new_bits + assert new_bits==112 + return dict(status='PASS_INDEPENDENT_EXPLICIT_PAYLOAD_CAP_REVIEW',head=base.HEAD, + finite_source_sha256=hashlib.sha256(raw).hexdigest(),proof_source_bindings=mapped, + payload_load_contexts=contexts,payload=payload,payload_bits=payload.bit_length(), + original_cap_bits=104,original_cap_satisfied=False, + explicit_candidate_cap_bits=new_bits,explicit_candidate_cap_satisfied=True, + explicit_candidate_cap_gap=2**new_bits-payload, + direct_payload_consumers=['bit_length diagnostic','original fixed104 assertion','receipt fields'], + displayed_formula_payload_dependencies=False, + conclusion='The fixed104 ceiling is not a consumed threshold in the displayed finite formula. A separately named fixed112 candidate certificate is compatible with the retained binary-payload and fixed-recipe quantifiers, subject to a fresh exact norm bound and every other changed obligation. The original104 check fails and is not relabeled as passing.', + qualification='Changing the reported numeric ceiling alone adds no scalar operation, recursive child, or displayed coefficient term. Any implementation-dependent finite constant remains inside quantified C_full; this review does not give an exact machine cutoff, replay upstream admission, or discharge all-size hypotheses.') + +if __name__=='__main__': + result=run() + (base.HERE/'payload-cap-review.json').write_text(json.dumps(result,indent=2)+'\n') + print(json.dumps({k:v for k,v in result.items() if k!='proof_source_bindings'},indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/run_checks.py b/research/gen5b-shared-kernels/weighted275/run_checks.py new file mode 100644 index 0000000000..313f029f4c --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/run_checks.py @@ -0,0 +1,69 @@ +"""Portable full replay, with generated banks/charts outside frozen receipts. + +All executed modules are this contribution's authored code. Upstream files are +read-only data, including Python source parsed as syntax for the cap audit. +""" +from pathlib import Path +import argparse,contextlib,io,json,os,sys,time + +def run(case_names=('70','166'),screen=True,check=False): + import source_data as src + import reproduce_pr275 as base,reproduce_complex + import check_shared_banks as banks + import integrate_bounded_candidate as integration + from cases import CASES + src.OUTPUT.mkdir(parents=True,exist_ok=True) + started=time.monotonic();count=src.verify() + def stable(x): + if isinstance(x,dict):return {k:stable(v)for k,v in x.items()if k not in ('seconds','receipt_sha256')} + if isinstance(x,list):return [stable(v)for v in x] + return x + def save(name,result): + serial=base.ae.serial(result) + (src.OUTPUT/(name+'.json')).write_text(json.dumps(serial,indent=2)+'\n') + expected=src.ROOT/'certificates'/(name+'.json') + if check and expected.exists() and (name!='aggregate' or (tuple(case_names)==('70','166') and screen)): + assert stable(json.loads(json.dumps(serial)))==json.loads(expected.read_text()),('Frozen certificate differs',name) + + baseline=base.run();complex_result=reproduce_complex.run() + save('baseline',baseline);save('complex',complex_result) + results={} + for name in case_names: + case=CASES[name];candidate=src.ROOT/case['file'];bank_dir=src.OUTPUT/('banks'+name) + bank=banks.run(candidate,bank_dir);bank_path=src.OUTPUT/('banks'+name+'.json');save('banks'+name,bank) + result=integration.run('case'+name,candidate,src.ROOT,bank_path,bank_dir/'bank-address-table.json') + assert result['literal_stock']==case['stock'] and result['calls']==case['calls'] and result['rank_mass']==case['rank'] + assert result['assembly']['kappa']==base.F(case['kappa']) + assert result['norm_review']['forward']==case['F'] and result['norm_review']['inverse']==case['B'] + assert result['changed_charts']['charts']==case['chart_programs'] + assert result['finite_arithmetic']['displayed_finite_coefficient']==case['finite_coefficient'] + assert result['role_bank_binding']['assignment_sha256']==case['assignment_sha256'] + save('case'+name,result);results[name]=dict(kappa=case['kappa'],stock=case['stock'],calls=case['calls'],rank=case['rank'],chart_programs=case['chart_programs'],payload_bits=result['norm_review']['payload_bits'],original104=result['norm_review']['original_cap_satisfied'],explicit_cap_bits=result['norm_review']['explicit_candidate_cap_bits'],finite_coefficient=case['finite_coefficient']) + search_summary=None + if screen: + import map_roles,build_response_cache + with contextlib.redirect_stdout(io.StringIO()):mapping=map_roles.run();cache=build_response_cache.run() + assert len(mapping['final12_new_recipient_helpers'])==12 + import search_expanded_lines,resolve_group_overlaps + search=search_expanded_lines.run() + assert search['lines_tested']==276 and search['eligible_unused_helpers']==8085 and search['eligible_reused_donors']==1591 + expected={(16,17):(136,170),(6,7):(36,46),(2,3):(12,16)} + assert {tuple(z['line']):(z['selected_pivots'],z['used_donors'])for z in search['best_candidates']}==expected + for row in search['best_candidates']: + file=src.ROOT/('candidate-line%d-%d.json'%tuple(row['line']));candidate=json.loads(file.read_text()) + assert [(e['virtual_pivot'],e['virtual_donors'])for e in candidate['entries']]==[(e['pivot'],e['donors'])for e in row['relations']] + from compose_screened_groups import ledger + assert ledger(candidate['entries'])[0]==row['local_histogram_delta'] + overlap=resolve_group_overlaps.run();save('overlap',overlap) + search_summary={k:v for k,v in search.items()if k not in('best_candidates','all_line_receipts')} + save('line-screen',search) + result=dict(status='PASS_WEIGHTED275_PORTABLE_AGGREGATE',source_files=count,cases=results,screen=search_summary,seconds=time.monotonic()-started,scope='Changed obligations under inherited physical-decoder and compiler interfaces. Exact candidate112 ceiling is separate from the failing legacy104 assertion. Rounded closure is a bounded discovery procedure, not a global optimality proof.') + save('aggregate',result);return result + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + parser=argparse.ArgumentParser();parser.add_argument('--inputs',type=Path);parser.add_argument('--output',type=Path);parser.add_argument('--case',choices=('70','166','both'),default='both');parser.add_argument('--skip-screen',action='store_true');parser.add_argument('--check',action='store_true') + args=parser.parse_args() + if args.inputs:os.environ['PR275_INPUTS']=str(args.inputs.resolve()) + if args.output:os.environ['PR275_OUTPUTS']=str(args.output.resolve()) + print(json.dumps(run(('70','166')if args.case=='both'else(args.case,),not args.skip_screen,args.check),indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/search_expanded_lines.py b/research/gen5b-shared-kernels/weighted275/search_expanded_lines.py new file mode 100644 index 0000000000..e83b9576b8 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/search_expanded_lines.py @@ -0,0 +1,147 @@ +"""Bounded 276-line shared-donor screen on the exact weighted word. + +Only unused physical roles are considered; reused donor slots are permitted. +The rounded closure objective is a screen, not the certified exponent or finite +payload admission. Candidate relations still require full aliased path checks. +""" +from pathlib import Path +from collections import defaultdict,Counter,deque +from itertools import combinations +from fractions import Fraction as Q +import json,gzip,math,time +from source_data import ROOT,SOURCE,OUTPUT +def read(name): + raw=(SOURCE/name).read_bytes() + return json.loads(gzip.decompress(raw)if name.endswith('.gz')else raw) +def annihilator(frame): + if 'a'in frame:return frame['a'] + A=[[Q(x)for x in row]for row in frame['b']];piv=[];k=0 + for j in range(24): + p=next((i for i in range(k,len(A))if A[i][j]),None) + if p is None:continue + A[k],A[p]=A[p],A[k];d=A[k][j];A[k]=[x/d for x in A[k]] + for i in range(len(A)): + if i!=k: + d=A[i][j] + if d:A[i]=[x-d*y for x,y in zip(A[i],A[k])] + piv.append(j);k+=1 + out=[] + for j in range(24): + if j in piv:continue + v=[Q(0)]*24;v[j]=1 + for i,p in enumerate(piv):v[p]=-A[i][j] + out.append(v) + assert len(piv)==frame['dim'] + return out +def closure(pivots,dimension,phi,entrance=1): + """Exact max flow for the declared 10^9-rounded integer surrogate weights.""" + ds=sorted({d for z in pivots for d in z['donors']});di={d:i for i,d in enumerate(ds)} + np=len(pivots);nd=len(ds);source=np+nd;sink=source+1;N=sink+1;G=[[]for _ in range(N)] + benefit=[round((phi(dimension[z['pivot']])-phi(dimension[z['pivot']]-entrance))*10**9)for z in pivots] + cost=[round((phi(entrance)+phi(dimension[d]-entrance)-phi(dimension[d]))*10**9)for d in ds] + assert min(benefit,default=0)>=0 and min(cost,default=0)>=0 + infinity=sum(benefit)+sum(cost)+1 + def edge(a,b,c):G[a].append([b,c,len(G[b])]);G[b].append([a,0,len(G[a])-1]) + for i,b in enumerate(benefit): + edge(source,i,b) + for d in pivots[i]['donors']:edge(i,np+di[d],infinity) + for i,c in enumerate(cost):edge(np+i,sink,c) + flow=0 + while True: + levels=[-1]*N;levels[source]=0;q=deque([source]) + while q: + a=q.popleft() + for b,c,rev in G[a]: + if c and levels[b]<0:levels[b]=levels[a]+1;q.append(b) + if levels[sink]<0:break + at=[0]*N + def dfs(a,push): + if a==sink:return push + while at[a]0] + assert len(eligible)==8085 and sum('reuse'in rows[r]for r in eligible)==1591 + byframe=defaultdict(list) + for r in eligible:byframe[first[r]].append(r) + groups={pair:[]for pair in combinations(range(24),2)} + for frame,roles in byframe.items(): + A=annihilator(f[frame]);columns=defaultdict(list) + for j in range(24):columns[tuple(row[j]for row in A)].append(j) + for same in columns.values(): + for pair in combinations(same,2):groups[pair]+=roles + phi=lambda r:0 if not r else r*math.log(120/r) + results=[] + for line,rs in groups.items(): + rs=sorted(rs);basis={};donors=[];pivots=[] + for role in rs: + value=resp[role];co=0 + while value: + k=value.bit_length()-1 + if k not in basis: + j=len(donors);donors.append(role);basis[k]=(value,co^(1<>j&1] + x=resp[role] + for d in ds:x^=resp[d] + assert not x + pivots.append(dict(pivot=role,donors=ds)) + # Globally select dependent pivots while charging each basis donor once. + dimensions={r:f[first[r]]['dim']for r in rs} + pivots,integer_profit=closure(pivots,dimensions,phi) + # Only actually used basis donors pay a new entrance split. + used={d for z in pivots for d in z['donors']} + # Require an even rank drop for integral full-bank retiling. + if len(pivots)%2: + counts=Counter(d for z in pivots for d in z['donors']) + def gain(z): + benefit=phi(dimensions[z['pivot']])-phi(dimensions[z['pivot']]-1) + released=sum(phi(1)+phi(dimensions[d]-1)-phi(dimensions[d])for d in z['donors']if counts[d]==1) + return benefit-released + omitted=min(range(len(pivots)),key=lambda i:gain(pivots[i])) + pivots=pivots[:omitted]+pivots[omitted+1:];used={d for z in pivots for d in z['donors']} + active=[z['pivot']for z in pivots]+sorted(used);H=Counter() + for r in active: + dim=f[first[r]]['dim'];H[dim]-=1 + if dim>1:H[dim-1]+=1 + H[1]+=len(used);H={r:n for r,n in H.items()if n} + score=sum(n*phi(r)for r,n in H.items()) + assert sum(r*n for r,n in H.items())==-len(pivots) + results.append(dict(line=line,helpers=len(rs),response_rank=len(donors),nullity=len(rs)-len(donors), + selected_pivots=len(pivots),used_donors=len(used),local_histogram_delta=H,phi_delta=score,rounded_closure_profit=integer_profit, + relations=pivots if score<0 else [],setup_restore_pairs=sum(len(z['donors'])for z in pivots),reused_donor_slot_members=[r for r in active if'reuse'in rows[r]])) + positive=[z for z in results if z['selected_pivots']and z['phi_delta']<0] + return dict(status='COMPLETE_276_LINE_WEIGHTED_UNUSED_ROLE_SCREEN',source_head='10b40041d4ab8a6610083e95bc571aee3468bca2', + eligible_unused_helpers=len(eligible),eligible_reused_donors=1591,lines_tested=len(results),lines_with_nonzero_nullity=sum(z['nullity']>0 for z in results), + phi_improving_groups=len(positive),best_candidates=sorted(positive,key=lambda z:z['phi_delta'])[:10], + all_line_receipts=[{k:v for k,v in z.items()if k!='relations'}for z in results],seconds=time.monotonic()-start, + scope='Exact F2 rank and first-entrance histogram screen on276 contrast lines for8085 unused physical roles, including1591 reused donor slots. Both descents, old kernel members, early restored endpoints, sources and sinks are excluded. Rounded maxflow optimizes a floating entropy surrogate, not final exponent. Every selected alias requires chronological/frame/scalar/packing/chart/finite-payload admission; cap must not be inferred from entropy score.') +if __name__=='__main__': + r=run();(OUTPUT/'expanded-line-screen.json').write_text(json.dumps(r,indent=2)+'\n') + print(json.dumps({k:v for k,v in r.items()if k not in('best_candidates','all_line_receipts')},indent=2)) + print(json.dumps([{k:v for k,v in x.items()if k!='relations'}for x in r['best_candidates'][:5]],indent=2)) diff --git a/research/gen5b-shared-kernels/weighted275/source_data.py b/research/gen5b-shared-kernels/weighted275/source_data.py new file mode 100644 index 0000000000..743e7277c2 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/source_data.py @@ -0,0 +1,29 @@ +"""Immutable data acquisition contract. No upstream program is imported. + +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +import gzip,hashlib,json,os +ROOT=Path(__file__).resolve().parent +SOURCE=Path(os.environ.get('PR275_INPUTS',ROOT/'inputs')).resolve() +OUTPUT=Path(os.environ.get('PR275_OUTPUTS',ROOT/'generated')).resolve() +HEAD='10b40041d4ab8a6610083e95bc571aee3468bca2' +def pins(): + value=json.loads((ROOT/'inputs.json').read_text()) + assert value['commit']==HEAD + return value +def validate(name,raw): + pin=pins()['files'][name] + assert len(raw)==pin['bytes'],('Length mismatch',name) + assert hashlib.sha256(raw).hexdigest()==pin['sha256'],('SHA256 mismatch',name) + assert hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==pin['git_blob'],('Git blob mismatch',name) + return raw +def read_bytes(name): + return validate(name,(SOURCE/pins()['files'][name]['local']).read_bytes()) +def read(name): + raw=read_bytes(name) + return json.loads(gzip.decompress(raw)if name.endswith('.gz')else raw) +def verify(): + if not __debug__:raise RuntimeError('Assertions are required; do not use python -O') + for name in pins()['files']:read_bytes(name) + return len(pins()['files']) diff --git a/research/gen5b-shared-kernels/weighted275/test_arithmetic.py b/research/gen5b-shared-kernels/weighted275/test_arithmetic.py new file mode 100644 index 0000000000..216f22d432 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/test_arithmetic.py @@ -0,0 +1,79 @@ +"""Original regression tests for the PR275 arithmetic replay.""" +from fractions import Fraction as F +import unittest +import reproduce_pr275 as replay + +class PR275ArithmeticTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.h,cls.profile=replay.final_profile() + cls.inventory=replay.inventory() + + def test_base_role_inventory(self): + b=self.profile['base'] + self.assertEqual((b['reused_pairs'],b['physical_helpers_before_sinks']), (1728,15432)) + self.assertEqual((self.inventory['physical_R'],self.inventory['sink_count']), (15425,7)) + + def test_complete_signed_delta_census(self): + d=self.profile['stages']['descent2'] + self.assertEqual(d['delta_calls'],65) + self.assertEqual(d['delta_rank_mass'],0) + self.assertTrue(any(n<0 for n in d['delta'].values())) + self.assertEqual(self.profile['final_local_calls'],93604) + self.assertEqual(self.profile['final_local_rank_mass'],404422) + + def test_shared_donors_not_counted_per_entry(self): + k=self.profile['kernel'] + self.assertEqual((k['entries'],k['distinct_donors'],k['shared_donors']),(1720,1438,918)) + self.assertEqual(k['histogram_delta'][1],3294) + self.assertEqual(sum(r*n for r,n in k['histogram_delta'].items()),-2192) + + def test_profile_and_normalization(self): + self.assertEqual((sum(self.h.values()),replay.mass(self.h)),(482100,2455070)) + stock=self.inventory['literal_stock'] + self.assertEqual(stock,1229735) + self.assertEqual(120*F(stock,60)-replay.mass(self.h),4400) + self.assertEqual(self.inventory['banks_per_stage'],161467) + + def test_known_adjacent_bit_root_endpoints(self): + W=F(self.inventory['literal_stock'],60) + low=F(751640232848887,10**18);high=low+F(1,10**18) + self.assertLess(replay.moment(self.h,120,W,low)[1],1) + self.assertGreater(replay.moment(self.h,120,W,high)[0],1) + + def test_all47_and_kappa_grid_control(self): + a=replay.assembly(F(751640232848887,10**18)) + self.assertEqual(a['kappa'],F('46942230864663/62500000000000000')) + self.assertEqual(len(a['strict_constraints']),47) + self.assertGreater(min(a['strict_constraints'].values()),0) + self.assertEqual(a['adjacent_grid_rejected'],['g3_above_kappa']) + + def test_bad_numeric_inputs_rejected(self): + for bad in (True,0.001,'0.001'): + with self.assertRaises(ValueError):replay.ae.rational(bad) + with self.assertRaises(ValueError):replay.ex.moment_interval(120,1,{120:1},F(1,1000)) + + def test_exact_changed_line_chart(self): + import chart_construction as charts + for rank in (1,23): + c=charts.line_chart(2,3,rank) + self.assertEqual(c['residual_rank'],rank) + self.assertNotEqual(c['determinant'],0) + self.assertLessEqual(c['count'],576) + + def test_degenerate_changed_chart_rejected(self): + import chart_construction as charts + columns=[[int(i==j) for i in range(24)]for j in range(24)] + columns[-1]=columns[0][:] + with self.assertRaises(AssertionError):charts.checked_chart(columns,1) + + def test_bound_finite_formula_reproduces_baseline(self): + import integrate_bounded_candidate as binding + p=replay.read('expected/kernel-pins.json') + r=binding.invoice(p['literal_stock'],p['priced_five_stage_calls'],0) + self.assertEqual(r['displayed_finite_coefficient'],90322316339049601) + self.assertEqual(r['selector_calls_bound'],905876840400) + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + unittest.main() diff --git a/research/gen5b-shared-kernels/weighted275/test_bounded.py b/research/gen5b-shared-kernels/weighted275/test_bounded.py new file mode 100644 index 0000000000..80d3f13fa9 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/test_bounded.py @@ -0,0 +1,54 @@ +"""Regression checks for explicit payload-bound and bounded-candidate arithmetic.""" +from fractions import Fraction as F +from collections import Counter +import unittest +import reproduce_pr275 as base +import review_payload_cap as cap +from integrate_bounded_candidate import invoice + +class BoundedCandidateTests(unittest.TestCase): + def test_old_cap_failure_is_explicit(self): + r=cap.run() + self.assertFalse(r['original_cap_satisfied']) + self.assertTrue(r['explicit_candidate_cap_satisfied']) + self.assertEqual(r['payload_bits'],110) + self.assertEqual(r['explicit_candidate_cap_bits'],112) + self.assertEqual(len(r['proof_source_bindings']),8) + + def test_too_large_payload_rejected(self): + with self.assertRaises(AssertionError):cap.run(10**20,10**20,112) + + def test_no_silent_legacy_cap_relaxation(self): + with self.assertRaises(AssertionError):cap.run(new_bits=104) + + def test_every_declared_delta_conserves_deficit(self): + for size,h in [(136,{1:170,2:236,3:-236,4:70,5:-70}), + (176,{1:229,2:335,3:-335,4:70,5:-70}), + (164,{1:223,2:324,3:-324,4:63,5:-63}), + (166,{1:210,2:306,3:-306,4:70,5:-70})]: + self.assertEqual(base.mass(h),-size) + self.assertEqual(F(120*(-5*size//2),60),5*base.mass(h)) + + def test_line136_displayed_invoice_charges_all_shears(self): + r=invoice(1229395,482950,2*2477) + self.assertEqual(r['gross_added_scalar_events_per_stage'],4954) + self.assertEqual(r['unit_additions_upper'],219601200) + self.assertEqual(r['selector_calls_bound'],905876636400) + self.assertLess(r['displayed_finite_coefficient'],2**80) + + def test_exact_candidate_comparison_exponent(self): + gap=F('0.000751091445301206')-F('0.000751090249287618') + self.assertEqual(gap,F(299003397,250000000000000000)) + self.assertGreater(gap,F(1,10**9)) + self.assertLess(gap,F(2,10**9)) + + def test_best_bounded_candidate_endpoint_signs(self): + h,_=base.final_profile();h.update({r:5*n for r,n in {1:210,2:306,3:-306,4:70,5:-70}.items()}) + W=F(1229320,60);a=F(751662295432463,10**18) + self.assertLess(base.moment(h,120,W,a)[1],1) + self.assertGreater(base.moment(h,120,W,a+F(1,10**18))[0],1) + self.assertEqual(base.assembly(a)['kappa'],F('0.000751097723288767')) + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + unittest.main() diff --git a/research/gen5b-shared-kernels/weighted275/test_bridge166.py b/research/gen5b-shared-kernels/weighted275/test_bridge166.py new file mode 100644 index 0000000000..36631c2078 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/test_bridge166.py @@ -0,0 +1,52 @@ +"""Independently authored regression checks. Upstream files remain inert data.""" +import copy,json,tempfile,unittest +from pathlib import Path +from unittest.mock import patch +import check_bridge as bridge +from check_scalar_bounds import run as norms +class Bridge166Tests(unittest.TestCase): + @classmethod + def setUpClass(cls): + bridge.configure('166');cls.r=bridge.run() + def test_exact_full_alias_paths(self): + self.assertEqual(len(self.r['selected_reused_donors']),105) + self.assertEqual(len(self.r['selected_paths']),376) + for z in self.r['selected_reused_donors']: + self.assertLess(z['donor_last_order'],z['gauge_read_order']);self.assertLessEqual(z['gauge_read_order'],z['recipient_first_order']);self.assertEqual(z['dimensions'][-1],24) + def test_literal_response_and_inverse(self): + self.assertEqual(self.r['old_kernel_relations_and_cut_triples_reproduced'],1720);self.assertTrue(self.r['all_column_formal_composition_forward_inverse']);self.assertTrue(self.r['omitted_setup_and_restore_rejected']);self.assertEqual(self.r['all_column_dimension'],18952) + def test_paid_demand(self): + self.assertEqual(self.r['local_histogram_delta'],{1:210,2:306,3:-306,4:70,5:-70});self.assertEqual(self.r['residual_family_delta'],{24:-166,23:166}) + def test_scalar_bill_counts(self): + self.assertEqual((self.r['setup_adds'],self.r['restore_adds'],self.r['removed_initial_unit_additions']),(2587,2587,2020)) + def test_explicit_new_payload_ceiling(self): + r=norms();self.assertEqual(r['payload_bits'],110);self.assertFalse(r['retained_payload_cap_2_to104']);self.assertTrue(r['new_payload_cap_2_to112']);self.assertEqual(r['explicit_new_payload_cap_bits'],112) + def test_no_final12_gain(self): + self.assertEqual(len(self.r['direct_final12_endpoint_port_rejected']),12) + def mutate_witness(self,fn): + obj=json.loads(bridge.CAND.read_text());fn(obj) + # Hash verification already passes on the untouched pinned witness in setUpClass. + # These controls bypass only the witness hash to reach structural validation. + with tempfile.TemporaryDirectory() as td: + p=Path(td)/'mutated.json';p.write_text(json.dumps(obj)) + with patch.object(bridge,'CAND',p),patch.object(bridge,'verify_sources',lambda:None): + with self.assertRaises(AssertionError):bridge.run() + def test_wrong_physical_mapping_rejected(self): + self.mutate_witness(lambda x:x['entries'][0]['donors'].__setitem__(0,x['entries'][0]['donors'][0]+1)) + def test_wrong_relation_rejected(self): + def change(x): + e=x['entries'][0];e['donors'].pop();e['virtual_donors'].pop() + self.mutate_witness(change) + def test_invalid_entrance_line_rejected(self): + self.mutate_witness(lambda x:x['entries'][0]['basis'][0].__setitem__(0,2)) + def test_premature_alias_reuse_rejected(self): + recipient=self.r['selected_reused_donors'][0]['recipient_role'];oldread=bridge.read + def changed_read(name): + obj=oldread(name) + if name=='gen5bit/selected/bit/word_p12.json.gz':obj['reads'][str(recipient)]=0 + return obj + with patch.object(bridge,'read',changed_read): + with self.assertRaises(AssertionError):bridge.run() +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + unittest.main() diff --git a/research/gen5b-shared-kernels/weighted275/test_candidate_binding.py b/research/gen5b-shared-kernels/weighted275/test_candidate_binding.py new file mode 100644 index 0000000000..1cd310904b --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/test_candidate_binding.py @@ -0,0 +1,67 @@ +"""Independent binding mutations for the bounded166 candidate. + +Mutations affect temporary copies only; the pinned source, witness and completed +70 checkpoint are untouched. Prepared with substantial OpenAI assistance. +Apache-2.0. +""" +from copy import deepcopy +from fractions import Fraction as F +from pathlib import Path +import json,tempfile,unittest +import reproduce_pr275 as base +from bank_receipt_binding import bind_banks +from check_candidate_charts import run as check_charts + +from source_data import ROOT +CAND=ROOT/'candidate-combined166-reclosed.json' + +class CandidateBindingTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + import hashlib,check_bridge,check_shared_banks + from price_candidate import price + cls.temp=tempfile.TemporaryDirectory();cls.folder=Path(cls.temp.name) + bank=check_shared_banks.run(CAND,cls.folder) + (cls.folder/'receipt.json').write_text(json.dumps(bank)) + r=price({1:210,2:306,3:-306,4:70,5:-70},{24:-166,23:166},{23:166},label='test166') + r['candidate_sha256']=hashlib.sha256(CAND.read_bytes()).hexdigest() + cls.result=r;cls.table=json.loads((cls.folder/'bank-address-table.json').read_text()) + check_bridge.configure('166');cls.bridge=check_bridge.run() + @classmethod + def tearDownClass(cls):cls.temp.cleanup() + + def run_bad_table(self,table): + with tempfile.TemporaryDirectory()as directory: + path=Path(directory)/'table.json';path.write_text(json.dumps(table)) + with self.assertRaises(AssertionError): + bind_banks(self.result,self.folder/'receipt.json',path,'PASS_PR275_SHARED_KERNEL_ROLE_BANK_ASSIGNMENT') + + def test_wrong_literal_stock_rejected(self): + result=deepcopy(self.result);result['literal_stock']+=1 + with self.assertRaises(AssertionError): + bind_banks(result,self.folder/'receipt.json',self.folder/'bank-address-table.json','PASS_PR275_SHARED_KERNEL_ROLE_BANK_ASSIGNMENT') + + def test_wrong_replica_multiplier_rejected(self): + table=deepcopy(self.table);table['replicas']=59;self.run_bad_table(table) + + def test_duplicate_helper_role_rejected(self): + table=deepcopy(self.table);roles=table['families']['23'];roles[1]=roles[0];self.run_bad_table(table) + + def test_missing_bank_width_rejected(self): + table=deepcopy(self.table);table['patterns'][0]['widths'].pop();self.run_bad_table(table) + + def test_missing_path_rejected(self): + bridge=deepcopy(self.bridge);bridge['selected_paths'].pop() + with self.assertRaises(AssertionError):check_charts(CAND,bridge,1229320) + + def test_wrong_first_frame_rejected(self): + bridge=deepcopy(self.bridge);bridge['selected_paths'][0]['first_frame']=0 + with self.assertRaises(AssertionError):check_charts(CAND,bridge,1229320) + + def test_wrong_physical_stream_rejected(self): + bridge=deepcopy(self.bridge);bridge['selected_paths'][0]['stream']+=1 + with self.assertRaises(AssertionError):check_charts(CAND,bridge,1229320) + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + unittest.main() diff --git a/research/gen5b-shared-kernels/weighted275/test_portable_contract.py b/research/gen5b-shared-kernels/weighted275/test_portable_contract.py new file mode 100644 index 0000000000..2e0a2d99ff --- /dev/null +++ b/research/gen5b-shared-kernels/weighted275/test_portable_contract.py @@ -0,0 +1,62 @@ +"""Portable path, pin, case-switch, closure, and bank binding controls.""" +from fractions import Fraction as F +from pathlib import Path +from copy import deepcopy +from unittest.mock import patch +import hashlib,json,tempfile,unittest +import source_data as src +import check_bridge,check_scalar_bounds +import check_shared_banks +from cases import CASES + +class PortableContractTests(unittest.TestCase): + def test_all_input_pins(self):self.assertEqual(src.verify(),39) + def test_modified_bytes_rejected(self): + name='gen5bit/selected/bit/profile_p12.json' + with self.assertRaises(AssertionError):src.validate(name,src.read_bytes(name)+b' ') + def test_immutable_candidate_hashes(self): + for case in CASES.values():self.assertEqual(hashlib.sha256((src.ROOT/case['file']).read_bytes()).hexdigest(),case['sha256']) + def test_dynamic_norm_default_tracks_case(self): + try: + for name in ('70','166'): + check_bridge.configure(name);r=check_scalar_bounds.run() + self.assertEqual(r['setup_restore_pairs'],CASES[name]['pairs']) + self.assertEqual(r['forward']['certified_new_bound'],CASES[name]['F']) + finally:check_bridge.configure('166') + def test_70_full_geometry_fallback(self): + try: + check_bridge.configure('70');r=check_bridge.run() + self.assertEqual(len(r['selected_reused_donors']),2) + self.assertEqual(r['local_histogram_delta'],CASES['70']['delta']) + self.assertEqual(r['selected_streams'],157) + finally:check_bridge.configure('166') + def test_duplicate_bank_role_rejected(self): + with self.assertRaisesRegex(AssertionError,'Missing or duplicated'): + check_shared_banks.run(src.ROOT/CASES['166']['file'],mutation='duplicate_role') + def test_replica_stage_units_both_cases(self): + for case in CASES.values(): + b=check_shared_banks.run(src.ROOT/case['file']) + self.assertEqual(b['literal_stock'],case['stock']) + self.assertEqual(F(b['unreplicated_stock']),F(b['literal_stock'],60)) + self.assertEqual(b['literal_stock'],422400+5*b['banks_per_stage']) + self.assertEqual(b['total_stage_assignments'],5*60*15425) + self.assertEqual(b['assignment_sha256'],case['assignment_sha256']) + def test_no_final12_endpoint_saving_in_inventory(self): + b=check_shared_banks.run(src.ROOT/CASES['166']['file']) + self.assertEqual((b['new_restorations'],b['reverted_old_restorations']),(0,0)) + self.assertEqual(b['retained_old_restorations'],440) + def test_rounded_shared_donor_closure_charges_once(self): + from search_expanded_lines import closure + rows=[{'pivot':1,'donors':[3]},{'pivot':2,'donors':[3]}] + # Two benefits2 versus one shared cost3: each alone loses, together gain1. + dimensions={1:2,2:2,3:3};phi=lambda r:{0:0,1:5,2:7,3:9}[r] + selected,profit=closure(rows,dimensions,phi) + self.assertEqual(selected,rows);self.assertEqual(profit,10**9) + def test_rounded_closure_rejects_losing_activation(self): + from search_expanded_lines import closure + selected,profit=closure([{'pivot':1,'donors':[3]}],{1:2,3:3},lambda r:{0:0,1:5,2:7,3:9}[r]) + self.assertEqual(selected,[]);self.assertEqual(profit,0) + +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + unittest.main() diff --git a/research/gen5b-shared-kernels/weighted305/.gitignore b/research/gen5b-shared-kernels/weighted305/.gitignore new file mode 100644 index 0000000000..f360d73424 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +inputs/ +generated/ diff --git a/research/gen5b-shared-kernels/weighted305/DEPENDENCIES.json b/research/gen5b-shared-kernels/weighted305/DEPENDENCIES.json new file mode 100644 index 0000000000..d3cb551f40 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/DEPENDENCIES.json @@ -0,0 +1,41 @@ +{ + "parent_commit": "67985f88c3440edd399f01bf39f51852f94cd176", + "files": { + "exact_intervals.py": { + "bytes": 2242, + "sha256": "c261dd44838d4e36c68768a1023ac859677089464ab121cdb46b30c918679333" + }, + "assembly_arithmetic.py": { + "bytes": 5223, + "sha256": "f2f6293c31deb579ebbea19eeaa732c07304ce9c2cacd431685e2dd18d4b0d58" + }, + "certificates/coretime12/local.json": { + "bytes": 7577, + "sha256": "773519b2e5511a1f18a2d3d3f2798a432d97a6b3ceca1a7d5febd119f457ce5f" + }, + "weighted275/candidate-combined166-reclosed.json": { + "bytes": 159502, + "sha256": "f2932216a90298b62e2895bad0c5402faf6ce79e40aabc62e8e0c601067f4006" + }, + "weighted275/candidate-line2-3.json": { + "bytes": 7564, + "sha256": "dd000858f9c5639c580b4e3754991f430750f92436f45838da12efd469434aef" + }, + "weighted275/chart_construction.py": { + "bytes": 2584, + "sha256": "d8ef92102d2ae7dccd85fd6f0565b3c5050878db4f6e580e9033a93090bd900f" + }, + "weighted275/chart_rational.py": { + "bytes": 2337, + "sha256": "e95042aa1e8311cc3575663eeb0b50468044be68460bbdcac094cd5c76c3d07c" + }, + "weighted275/search_expanded_lines.py": { + "bytes": 7693, + "sha256": "00063d58382bbad694c98d052a21899aa9ddb2a3941a395f836e700b03314bac" + }, + "weighted275/fetch_inputs.py": { + "bytes": 1351, + "sha256": "13f47ddb3b718c4deeeabd70169009ae4ea0a416d4c38f5b48964ed91a17798d" + } + } +} diff --git a/research/gen5b-shared-kernels/weighted305/MANIFEST.json b/research/gen5b-shared-kernels/weighted305/MANIFEST.json new file mode 100644 index 0000000000..d853483ded --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/MANIFEST.json @@ -0,0 +1,155 @@ +{ + "schema": "weighted305-additive-files/1", + "source_head": "a17c42903bbe8d9d26c4bc712d7216a7176237e9", + "parent_pr302_commit": "67985f88c3440edd399f01bf39f51852f94cd176", + "files": { + ".gitignore": { + "bytes": 32, + "sha256": "5730cb3eb4b2a2d6afa49a9a41ea2aeba9da921fdec0024ce1013275350044f2" + }, + "DEPENDENCIES.json": { + "bytes": 1454, + "sha256": "d2e8394bdbc9fca1df65a37bcc782a516e2ca8611c3a4842401b4346979d245c" + }, + "NOTICE.md": { + "bytes": 2442, + "sha256": "bdc87a4aa893d0b86b19cd81488778ac1f45909c872a1395084e61cc78ba1dd1" + }, + "PROOF.md": { + "bytes": 8411, + "sha256": "6e3b3bd755831bf443a8892189111f95c58e1d1c9d09f3eb51bc4b4ea1a72459" + }, + "README.md": { + "bytes": 5983, + "sha256": "c4274a3cb92f2e5c1b9155330d5114a2924608e8247eb8415ae07725a2393025" + }, + "acquire_inputs.py": { + "bytes": 426, + "sha256": "a41f88448096aa0f14ba21a2b956d96def5a50808bc7ade701abf912bdf783e7" + }, + "bank_receipt_binding.py": { + "bytes": 4261, + "sha256": "6e88ed87f0f09d7f78f75462fc946e3523a8597fbfc346490c224d8303703f84" + }, + "bind_candidate.py": { + "bytes": 6419, + "sha256": "3b0c55b3f9f4ecc9be7c06d473dea94436c16962bc9b1f29682fdaac308846f1" + }, + "build_response_cache.py": { + "bytes": 4314, + "sha256": "a12e399c6daf9934664869c3e715006eafea583ca6842b0c7bc65c0de7faa1f5" + }, + "certificates/aggregate.json": { + "bytes": 1192, + "sha256": "362b8f15408f1813a085424ccc72e7402e047b94d709a6f2455312ce73d0691d" + }, + "certificates/banks154.json": { + "bytes": 1419, + "sha256": "5c1490c9fda103f54cfc51156ca2a72fdddf98fcf26f4e75a6aa410e1028b793" + }, + "certificates/banks156.json": { + "bytes": 1423, + "sha256": "013c54184caeab7518dc3944f1c7a442ea34161287679d7e508c1ad30457273e" + }, + "certificates/baseline.json": { + "bytes": 24473, + "sha256": "24cbd078d0be776f5fa89f7accdf9e3d648608d20a176ffb8e2c18c73b5eced6" + }, + "certificates/bounded-port.json": { + "bytes": 2221, + "sha256": "ef9814539da6638280ca2cfb0236c1ec879f6011a7c54e33165aa79fd0ff46c4" + }, + "certificates/case154.json": { + "bytes": 31625, + "sha256": "2dc5325076d6fe8e22c4213db79f2aa581a24ab0f2a82f67b6623648383190a6" + }, + "certificates/case156.json": { + "bytes": 31330, + "sha256": "09af30b955dedc18f9478d58012e2235ccfb31bd22de9e8834c64a32646e5215" + }, + "certificates/complex.json": { + "bytes": 3546, + "sha256": "26aaeff711d1fc3cfe1d98fb21593d00680705f14c05049db73ee3532f589d99" + }, + "check_bridge.py": { + "bytes": 12106, + "sha256": "b17b38d2eb7646f39f7ec69459a04d6040d75fb36aa1447530b45b09368b3dae" + }, + "check_candidate_charts.py": { + "bytes": 5378, + "sha256": "d2ef210a353e5323c1617a67fc52b84b87103db3d68a1876f6fdcf990879e23e" + }, + "check_scalar_bounds.py": { + "bytes": 10686, + "sha256": "d31339f8744b76c4db766fdf99d7089a2a5b3f7c2098b3f4e7d40ab1727a009b" + }, + "check_shared_banks.py": { + "bytes": 7526, + "sha256": "31f254baf9ac555b12665f1c002228f3134d05edb3542ea2d2101ebe1926f75e" + }, + "finite_bill.py": { + "bytes": 3555, + "sha256": "a61586f43c1e9cec613faeef77057200c64c7bc6a79ab9d94595c2ff15ec760f" + }, + "inputs.json": { + "bytes": 16787, + "sha256": "c4931368de485d9bb3bddd4b027d140b187fad28d1fbd41e5d91fcefb7f97626" + }, + "port_and_reclose.py": { + "bytes": 5587, + "sha256": "75242b59d9647521d3abc4e272c3bd11995909327d87d3680d2c4b0b5b3828a6" + }, + "price_candidate.py": { + "bytes": 3864, + "sha256": "d16542aef47cd1e41d4f1d3198b8fd62639b1704992e30abd52c6143ac113330" + }, + "price_witness.py": { + "bytes": 3386, + "sha256": "d7920f8ff07f828910d2f22c1d8f62a1c9dd48fa08e11e4e2a23ed650600ce39" + }, + "reproduce_complex.py": { + "bytes": 4589, + "sha256": "143ac72b4323b4fa569b85ba4e23d9eb975e6b3ae38126cf169fc251d348a7de" + }, + "reproduce_pr305.py": { + "bytes": 15602, + "sha256": "e77b87462a45e7edf3794625bc441fddf1c13e0a33dab22cfdbe1bfdb0ee4110" + }, + "review_payload_cap.py": { + "bytes": 5232, + "sha256": "e162d5bf6bb488c1c4257b8cbe5fe385c72010a407ba8fb2327eb02146b36b03" + }, + "run_checks.py": { + "bytes": 4081, + "sha256": "8b682fd425084aeedd21dd257878c98b1b40694c473c9e7aea221103d649d276" + }, + "selection.json": { + "bytes": 5906, + "sha256": "524ea9954652eb6deffffa386077f4b186b8a74d6e109a9bb1d5c365fa04ba32" + }, + "source_data.py": { + "bytes": 1358, + "sha256": "74356d89ee44059b92397ad0ccf1d2de3a84da35bfa093e4ca607348d5190568" + }, + "test_arithmetic.py": { + "bytes": 3342, + "sha256": "45eb5baf43c3873b97fe835a0867d08549fa30b5da175fb7799d1ced40c51524" + }, + "test_bridge156.py": { + "bytes": 4298, + "sha256": "ddc5c2b1ab2edf0aac2c0cf4615892c0cd426eeebea34e2eff71c34a8bbe345e" + }, + "test_candidate_binding.py": { + "bytes": 4845, + "sha256": "cdd1a6704fac05d3017a116d0a1e4d11e5c9fdef1914438acecae0936cc9e268" + }, + "test_portable_contract.py": { + "bytes": 3033, + "sha256": "3dc7e33212279f66f900055960f2adfeb06c72fd031b8dd16ce58887cf2e6a92" + }, + "witness.py": { + "bytes": 1187, + "sha256": "d3638df3c15e13ec1d7df4e99d28911dd2fabb25969d627027634c3ddfeeed67" + } + } +} diff --git a/research/gen5b-shared-kernels/weighted305/NOTICE.md b/research/gen5b-shared-kernels/weighted305/NOTICE.md new file mode 100644 index 0000000000..e477c02c85 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/NOTICE.md @@ -0,0 +1,34 @@ +# Attribution and scope + +New material is Apache-2.0 and was prepared with substantial OpenAI assistance. +Separate AI-assisted implementations and replays are not human peer review, +proof-assistant verification or an OpenAI endorsement. + +This update builds on the PR305 composition in `eumemic/integer-mult-bounds`, +pinned at `a17c42903bbe8d9d26c4bc712d7216a7176237e9`. It preserves the original +[PR305 notice](https://github.com/eumemic/integer-mult-bounds/blob/a17c42903bbe8d9d26c4bc712d7216a7176237e9/research/gen5b-weighted-repacked/NOTICE.md) +and its contribution and licensing boundaries by reference. + +PR275 / George Lydakis and OpenAI Codex supplied the weighted compensated +matching and predecessor integration, including Ody's matching research. +PR300 / Rohan Arun and Anthropic Claude supplied restart packing and the second +descent. PR299/296 / Chafik Boukhalfa supplied the underlying kernel pipeline +and modules, following DreamingOfClouds and the retained source527, five-stage, +paired-cube, bank, sink, restoration and complex-supplier chain. The immutable +[PR275 notice](https://github.com/eumemic/integer-mult-bounds/blob/a17c42903bbe8d9d26c4bc712d7216a7176237e9/research/gen5b-weighted-repacked/NOTICE-PR275.md), +[PR300 notice](https://github.com/eumemic/integer-mult-bounds/blob/a17c42903bbe8d9d26c4bc712d7216a7176237e9/research/gen5b-weighted-repacked/NOTICE-PR300.md) +and [PR299 notice](https://github.com/eumemic/integer-mult-bounds/blob/a17c42903bbe8d9d26c4bc712d7216a7176237e9/research/gen5b-weighted-repacked/NOTICE-PR299.md) +retain the full source lineage and assistance disclosures. Source-specific +licenses remain applicable, including inherited CC0 sources where identified. + +The new contribution is the bounded 154/156 shared-donor port, one restricted +third-line reclosure, fresh eight-sink-aware scalar majorant, full alias/chart/ +bank binding, displayed finite invoice and exact conditional repricing. It +claims no authorship of the inherited weighted matching, restart packing or +descents, and no exclusive priority or global optimum. + +The earlier PR302 files, weighted275 evidence and source manifests are +unchanged. Their authored pure helpers and prior witness are reused explicitly. +No upstream program is imported or executed. The unchanged physical decoder, +compiler, primitive constants and all-size interfaces remain hypotheses; +finite success is not verification of the full multiplication theorem. diff --git a/research/gen5b-shared-kernels/weighted305/PROOF.md b/research/gen5b-shared-kernels/weighted305/PROOF.md new file mode 100644 index 0000000000..c9a1f30f7d --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/PROOF.md @@ -0,0 +1,144 @@ +# Shared-donor kernels composed with PR305 + +## Scope and results + +Base commit: `a17c42903bbe8d9d26c4bc712d7216a7176237e9`, package +`research/gen5b-weighted-repacked`. All 39 cached inputs are verified by both +SHA-256 and Git blob identity. Upstream programs are read as inert text only. + +Two fixed candidates are checked. The 154 checkpoint preserves complete groups +on lines 16/17 and 6/7. The 156 candidate adds the single bounded, reclosed 2/3 +selection after excluding new occupied roles. There is no additional search +and no co-retiming 12 saving in these receipts. + +- 154: 154 pivots, 194 distinct donors, 348 physical slots; 2,541 setup ADDs and + 2,541 final inverse ADDs; 1,920 initial unit reads removed. +- 156: 156 pivots, 197 distinct donors, 353 physical slots; 2,545 setup ADDs and + 2,545 final inverse ADDs; 1,928 initial unit reads removed. + +Both contain 102 reused physical donor slots. The 154 checker verifies 2,453 +unique rational containments; 156 verifies 2,468. Every selected physical path +includes its complete aliased recipient lifetime and ends at FULL. All 1,734 +inherited kernel relations and cut-read triples are independently reproduced. +All 134 inherited reused-donor examples have nested base alias paths. + +The local paid histogram changes are respectively +`{1:+194,2:+278,3:-278,4:+70,5:-70}` and +`{1:+197,2:+283,3:-283,4:+70,5:-70}`. +Their residual-family changes are rank 24 to 23 for 154 or 156 pivot slots. +Literal role-bank assignment, chart factorization, exact moment pricing and the +finite invoice are separately bound companion certificates. + +## Composition proof + +The literal initial physical response of a reused donor is its own virtual +response. Its matched recipient is gauged and has no ZERO-frame initial read. +The later recipient read remains in the suffix. We check the strict ordering +of the donor's last use, recipient gauge read, and recipient's first use. + +At a common cut after initial ZERO reads and the old kernel setups, but before +source injection, place one shear `d += p` for every listed incidence. Distinct +pivot and donor sets ensure these factors commute, including shared donors. +Each group has one common entrance line `span(e_i-e_j)`. It lies in every +member's first required frame. Each distinct donor pays only one entrance +call; every scalar incidence is nevertheless charged. + +Let Q be the old initial compensation operator, and Q' omit new pivot reads. +The verified F2 response relations give `A Q' = Q A`, with A the new shear +layer. For the inherited full dirty-restoring decoder U=SQ, +`A^-1 S A Q' = A^-1 U A = U`. The last equality uses that U fixes every dirty +helper coordinate. Therefore all dirty inputs remain arbitrary and restored. +Append the inverse shear layer after the entire old word, at FULL. + +Both the forward and inverse composition are checked on every one of 18,952 +pre-compaction formal coordinate columns. The eight compacted sink coordinates +are inert spectators in this comparison. Missing setup or inverse factors are +rejected. This verifies the stated composition theorem and its physical frame +obligations; it is not a claim to have executed or regenerated the entire +inherited producer. + +## Fresh scalar-size proof with the eighth sink + +The PR305 inherited norm pins are F=86453 and B=2766560. No previous candidate +norm bound is carried over. The emitter replays the actual 1,734 kernel setups, +all compensation and alias timing,440 restoration entries, and all eight +terminal sinks. For each sink we additionally verify its exact two writes, +absence of helper-source uses, physical slot, and side-root target set. The +new sink has logical role 13115 and target pivot 2536. + +All 16 actual sink redirects are included. The union of target-prefix and sink +setup/restore edges is an exact acyclic majorant with 684 weighted edges and 912 +vertices. Topological propagation bounds every chronological placement of +those target-only batches, in both directions. Sources and helpers never read +target coordinates. + +For both 154 and 156, fresh conservative bounds are +F=438151 and B=14104135. The common payload bound is +`64 F^3 B^2 = 1070888631470889114458162912766400`, which has 110 bits. +It fails the original 104-bit reporting ceiling and passes the explicit 112-bit +fixed-recipe ceiling. The finite checker and all eight reviewed proof sources +are byte-identical to PR275; see the identical hashes in the two source manifests and the independently replayed `review_payload_cap.py`. +This does not identify the F2 payload bound with the separate odd-prime address +budget, nor assign a concrete numerical value to unspecified inherited +all-size primitive constants. + +## Explicit fixed-recipe cap and finite cost + +The pinned finite source is parsed as inert syntax. Its payload bound is used +only for a bit-length diagnostic, the old `payload < 2**104` assertion and +receipt fields. Neither payload variable enters its displayed coefficient. +The eight reviewed proof texts separate binary payload from address geometry +and permit a primitive constant depending on the fixed recipe, independent of +input width. The q-squared statement in the row proof concerns volume padding. + +Thus the present certificate explicitly proves and names a 112-bit bound for +the changed fixed recipe. The original 104-bit assertion still fails. Changing +only this reporting ceiling adds no operation or displayed coefficient term; +it does not instantiate the unknown recipe-dependent primitive constant C_full. +The actual changed scalar word, charts, selectors, banks and children are +charged independently. No exact universal-machine cutoff is inferred. + +The 156 bill charges all 5,090 added setup/inverse events per stage, without +credit for removed reads. Its displayed coefficient is 90,417,469,526,202,901, +strictly below 2^80. The selector count is 905,817,884,400. Its 281 distinct +chart programs are bound to 706 role uses and retain the combined normalizer +bound 815. Inverting every exact rational factor program recovers its chart. + +The role census is rebuilt from the current physical alias map, 1,734 existing +kernel entries, 440 restores, eight sinks and 156 new entrances. There are +15,424 helper roles. The deterministic full-bank table assigns each role in +all 60 replicas to a unique block; a second implementation re-enumerates all +925,440 addresses per stage. Five disjoint stage namespaces and literal data +stock 422,400 give final stock 1,229,275. Normalized/literal stock, replica and +stage factors are independently cross-bound to the exact priced histogram. + +## Bounded discovery and portable representation + +Both constructions are exact subsets of the earlier 166 witness. The 154 case +preserves its entire 136-pivot line16/17 and 18-pivot line6/7 groups. The only +additional search is a single shared-donor maximum closure on the five original +line2/3 relations remaining after excluding six occupied roles. It retains +three, then the fixed parity rule omits pivot9355, leaving two. The surrogate +uses declared 10^9-rounded capacities; all final numerical claims use exact +rational moment and assembly checks instead of that discovery score. + +The small selection index records reconstruct the exact full JSON witnesses, +including their original metadata and SHA-256 values. The independent role, +response and closure replay produces the same bytes. This storage reduction +adds no mathematical assumption and does not mutate the predecessor witness. + +## Remaining hypotheses and reproduction + +The inherited complete physical decoder, chronological/source-span admission, +unchanged chart/cover/compiler and primitive interfaces, row conversion, +eligible prime supply, precision/recovery where applicable, complex semantic +correctness and analytic all-size framework remain hypotheses. Complex profile +arithmetic is replayed, but its physical correctness is not reproved here. +The displayed finite bill is not the unknown full primitive constant C_full. +These are conditional changed-obligation certificates, not human peer review, +proof-assistant verification or a full unconditional multiplication theorem. + +README.md gives the portable aggregate and regression commands. Both cases are +freshly executed by the aggregate before their receipt hashes, path demands, +bank census and finite arithmetic are bound. Existing PR302 results remain +unchanged. NOTICE.md records attribution and assistance disclosures. diff --git a/research/gen5b-shared-kernels/weighted305/README.md b/research/gen5b-shared-kernels/weighted305/README.md new file mode 100644 index 0000000000..3b5ff93523 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/README.md @@ -0,0 +1,113 @@ +# Bounded shared-donor port to the pinned restart-packed word + +This additive PR302 verifier builds on PR305 at +`a17c42903bbe8d9d26c4bc712d7216a7176237e9`, package +`research/gen5b-weighted-repacked` in `eumemic/integer-mult-bounds`. +The parent directory and earlier `weighted275/` evidence remain unchanged. +All comparisons here are historical pinned comparisons, with no current-best, +exclusive-priority or global-optimality claim. + +## Conditional results + +| Fixed case | κ | Literal stock | Calls | Rank mass | +|---|---:|---:|---:|---:| +| Independently reproduced PR305 | 0.000751140529238897 | 1,229,665 | 482,030 | 2,454,930 | +| Complete 154-group port | 0.000751160050810041 | 1,229,280 | 483,000 | 2,454,160 | +| Single reclosure, 156 pivots | **0.000751160060489770** | **1,229,275** | **483,015** | **2,454,150** | + +The 156 result is approximately 0.00260021% above the pinned baseline. The +advantage over 154 is only 9.679729×10^-12 in κ. Both cases are fully checked +for the represented changed obligations under the inherited interfaces. +Finite certificate success does not establish an unconditional multiplication +theorem or practical performance improvement. + +## Exactly what was searched + +The new base occupies six logical roles used by the previous line2/3 group: +7955, 8998, 8999, 9146, 9147 and 9263. The complete 136-pivot line16/17 group +and retained 18-pivot line6/7 group are disjoint from the new occupied support. +They form the first fixed candidate, with 154 pivots. + +Exactly one additional maximum-closure computation is run on the five +surviving relations of the **existing** line2/3 group. It selects three; the +declared even-parity trim removes pivot9355, leaving two. Thus the second +candidate has 156 pivots. No new lines, donor bases, matching exchanges or +other search domain is introduced. + +`selection.json` stores exact indices into the already published 166 witness. +`witness.py` reconstructs the two complete JSON witnesses and checks their +immutable SHA-256 values. This avoids duplicating their large entry lists. +The discovery replay independently regenerates the same selections and hashes. + +## Fresh integration, not an additive headline estimate + +The baseline already contains 1,734 inherited kernel entries, 87 second-descent +retimings, 440 early restorations and **eight** sinks. These are not added again. +The old final12 endpoint saving is not transferred. + +For 156, the measured local histogram change is +`{1:+197, 2:+283, 3:-283, 4:+70, 5:-70}`; residual widths change by +`{24:-156, 23:+156}`. The construction has 197 distinct donors, 353 active +physical slots and 2,545 setup ADDs, followed by 2,545 inverse ADDs. It removes +1,928 initial unit ADDs; the finite bill takes no credit for them. + +Both candidates use the actual eight sink entries. Literal sink incidence and +target sets are independently checked. The scalar majorant contains 16 actual +sink redirects, 684 acyclic target edges and 912 vertices. Fresh bounds are +F=438151 and B=14104135, giving +`64 F^3 B^2 = 1070888631470889114458162912766400` (110 bits). +The original 104-bit ceiling **fails**; the explicitly reviewed 112-bit +fixed-recipe certificate passes. No unchanged upstream checker is relabeled +as passing after that change. + +The 156 chart certificate has 281 exact rational programs and 706 role uses, +with at most 508 factors and factor numerators/denominators at most 615/810. +The retained combined normalizer bound is 815. Concrete full-bank allocation +checks all 15,424 helpers in 60 replicas: 925,440 addresses per stage and +4,627,200 across five disjoint stages. Every width-120 bank is full. + +The displayed finite coefficient is 90,417,469,526,202,901 (<2^80); the selector +bound is 905,817,884,400. The bit root is rigorously bracketed by +`[751724726385730, 751724726385731] / 10^18`. All three bootstrap steps and 47 +exact rational inequalities pass, and the next κ grid tick is rejected. + +## Reproduction + +Python 3.11+ standard library only, with assertions enabled. From this directory: + +```sh +python3 -B acquire_inputs.py --output /tmp/weighted305-inputs +export PR305_INPUTS=/tmp/weighted305-inputs +export PR305_OUTPUTS=/tmp/weighted305-results +python3 -B -m unittest discover -s . -p 'test_*.py' -v +python3 -B run_checks.py --check --inputs "$PR305_INPUTS" --output "$PR305_OUTPUTS" +``` + +Absolute invocation from another working directory is supported. `--case 154` +or `--case 156` narrows the aggregate to one construction; both are the default. +Run the earlier directories' suites as separate Python processes with their +own documented source variables. Their original files and source pins are +unchanged. + +`inputs.json` pins 39 external files by immutable URL, exact byte count, +SHA-256 and Git blob hash. Upstream Python is stored as inert `.py.txt` and +never imported or executed. We reuse the parent exact-interval/assembly code +and sibling pure chart, closure and acquisition helpers. `DEPENDENCIES.json` +records their hashes. Downloaded source bundles and large generated bank/chart +outputs are excluded from the diff. + +## Verification boundary + +The checker proves changed physical prefix relations and forward/inverse +compositional F2 identities on all 18,952 pre-compaction physical columns. +It checks complete aliased paths and FULL endpoints, not a literal regeneration +of the entire inherited scalar stream. Its complete physical decoder and +source-span/chronological admission remain hypotheses. + +Unchanged compiler, primitive chart/cover, routing, row conversion, eligible +prime supply, precision/recovery, complex semantic and analytic all-size +interfaces remain inherited. Exact complex profile arithmetic is replayed; +that is not a proof of its physical construction. The displayed finite invoice +does not instantiate the unspecified full primitive constant C_full or an +exact universal-machine cutoff. PROOF.md explains the composition and the +explicit payload-ceiling change. NOTICE.md preserves attribution and disclosure. diff --git a/research/gen5b-shared-kernels/weighted305/acquire_inputs.py b/research/gen5b-shared-kernels/weighted305/acquire_inputs.py new file mode 100644 index 0000000000..b5356996e0 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/acquire_inputs.py @@ -0,0 +1,9 @@ +"""Reuse the authored immutable-data downloader with the PR305 input contract.""" +import argparse,json +from pathlib import Path +import source_data +from fetch_inputs import run +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + p=argparse.ArgumentParser();p.add_argument('--output',type=Path,default=source_data.ROOT/'inputs') + print(json.dumps(run(p.parse_args().output),indent=2)) diff --git a/research/gen5b-shared-kernels/weighted305/bank_receipt_binding.py b/research/gen5b-shared-kernels/weighted305/bank_receipt_binding.py new file mode 100644 index 0000000000..a349d2a921 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/bank_receipt_binding.py @@ -0,0 +1,65 @@ +"""Our standalone exact role-bank receipt binding, independent of candidate size. +Prepared with substantial OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction as F +from pathlib import Path +import hashlib,json +import reproduce_pr305 as base +def digest(path):return hashlib.sha256(Path(path).read_bytes()).hexdigest() + +def bind_banks(result, receipt_path, table_path, expected_status): + banks=json.loads(receipt_path.read_text());table=json.loads(table_path.read_text()) + physical_R=base.read('expected/kernel-pins.json')['physical_R'] + assert banks['status']==expected_status + assert banks['source_head']==base.HEAD and banks['candidate_sha256']==result['candidate_sha256'] + counts={int(r):n for r,n in banks['family_counts'].items()} + assert counts==result['residual_census'] + assert sum(counts.values())==banks['helper_roles']==result['physical_R']==physical_R + assert base.mass(counts)==banks['residual_rank_per_replica'] + assert table['stages']==5 and table['replicas']==60 and table['width']==120 + assert table['stage_banks']==banks['banks_per_stage']==result['banks_per_stage'] + assert 120*banks['banks_per_stage']==60*base.mass(counts) + assert banks['total_banks']==5*banks['banks_per_stage'] + assert banks['literal_data_stock']==60*4*1760==422400 + assert banks['literal_stock']==422400+banks['total_banks']==result['literal_stock'] + assert F(banks['unreplicated_stock'])==result['unreplicated_stock']==F(banks['literal_stock'],60) + assert 120*banks['literal_stock']-60*result['rank_mass']==60*result['deficit']==264000 + assert banks['checked_role_replica_assignments_per_stage']==60*physical_R + assert banks['total_stage_assignments']==5*60*physical_R + families={int(r):roles for r,roles in table['families'].items()} + assert {r:len(roles)for r,roles in families.items()}==counts + allroles=[role for roles in families.values()for role in roles] + assert len(allroles)==len(set(allroles))==physical_R + patterns=table['patterns'];expected_masks=[] + for row in patterns: + assert sum(row['widths'])==120 + expected_masks.extend([(1<1:H[d-1]+=1 + if r in donors:H[1]+=1 + pathrows.append(dict(role=r,stream=sid(r),kernel_kind='pivot'if r in pivots else'donor',entrance_basis=[lines[r]],first_frame=first,first_dimension=d,frames=path,dimensions=[f[x]['dim']for x in path],endpoint='FULL',aliased_recipient=recipient.get(r))) + if r in recipient: + b=recipient[r];receipts.append(dict(donor_role=r,recipient_role=b,physical_stream=sid(r),gauge_read_order=w['reads'][str(b)], + donor_last_order=max(pos[i]for i in uses[r]),recipient_first_order=min(pos[i]for i in uses[b]),frames=path,dimensions=[f[x]['dim']for x in path],endpoint='FULL', + first_dimension=d,literal_zero_prefix_response_bitcount=prefix[sid(r)].bit_count())) + H={r:c for r,c in sorted(H.items())if c};assert H==EXPECTED['delta'] + # Concrete obstruction to importing the original final12 endpoint invoice: + # each former helper now shares a slot with an earlier independent lifetime. + core=json.loads((HERE.parent/'certificates/coretime12/local.json').read_text())['candidates'];blocked=[] + for z in core: + a=z['helper'];assert a in alias;d=alias[a];assert uses[d] + assert max(pos[i]for i in uses[d])1:H[d-1]+=1 + if role in donors:H[1]+=1 + assert base.clean(H)==dict(base.histogram(bridge['local_histogram_delta'])) + assert Counter(u['kind']for u in uses)==dict(first_frame_quotient=len(active),pivot_residual=len(pivots),donor_line_entrance=len(donors)) + assert all(programs[u['program_id']]['residual_rank']==u['rank']for u in uses) + pins=base.read('expected/kernel-pins.json');largest=max(p['count']for p in programs);bound=max(pins['max_chart_factors'],largest)+119+120 + assert pins['max_chart_factors']==576 and bound==815 + assert literal_stock==pins['literal_stock']-5*len(pivots)//2 and len(pivots)%2==0 + selector=600*((literal_stock-1)+pins['physical_R']*120*bound);assert selector<2**40 + return dict(status='PASS_PR305_BOUNDED_CANDIDATE_CHANGED_CHARTS',source_head=base.HEAD, + candidate_sha256=hashlib.sha256(raw).hexdigest(),charts=len(programs),final12_charts=0, + first_frame_quotient_demands=len(active),pivot_residual_demands=len(pivots),donor_line_entrance_demands=len(donors), + role_chart_uses=uses,max_changed_chart_factors=largest,max_factor_numerator=max(p['max_numerator']for p in programs), + max_factor_denominator=max(p['max_denominator']for p in programs),combined_normalizer_factor_bound=bound, + literal_stock=literal_stock,selector_calls_bound=selector,local_histogram_delta=base.clean(H),factor_programs=programs, + scope='All changed first-frame, rank23 pivot residual and rank1 donor entrance charts are exactly constructed, factored, inverse-replayed and bound to fresh selected_paths. No final12 charts; unchanged chart/compiler contracts remain inherited.') diff --git a/research/gen5b-shared-kernels/weighted305/check_scalar_bounds.py b/research/gen5b-shared-kernels/weighted305/check_scalar_bounds.py new file mode 100644 index 0000000000..ec404d3e6b --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/check_scalar_bounds.py @@ -0,0 +1,162 @@ +"""Original nonnegative norm transport, with conservative target-prefix bound. + +Helper updates are replayed exactly. Every target prefix ADD is majorized by +applying every target-prefix and sink batch along an exact acyclic majorant. +Deleted compression reads are restored for this upper bound. No source code +from the upstream repository is executed. +""" +from pathlib import Path +from collections import defaultdict,Counter +import json,sys,time,hashlib +import check_bridge +from check_bridge import read,HERE,verify_sources +from source_data import OUTPUT +def verify_inputs():verify_sources() +sys.dont_write_bytecode=True + +def suffix_build(): + w=read('gen5bit/selected/bit/word_p12.json.gz');g=read('graph.json');partner=read('kchron.json')['entries'] + oldrestore=read('restore-selection.json')['entries'];ks=read('kernel-selection.json');sinks=read('sink-selection.json')['sinks'] + alias={b:a for a,b in w['pairs']};regs=sorted(set(range(17160))-set(alias));physical={r:3520+i for i,r in enumerate(regs)};sid=lambda r:physical[alias.get(r,r)] + phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase];sunk={z['role']for z in sinks} + byroot=defaultdict(list) + for z in partner:byroot[z['deliver_after_root']].append(z) + out=[] + for i,(r,s)in enumerate(zip(g['roots'],w['rootroles'])): + if r['kind']=='side'and s not in sunk: + for t in r['targets']:out.append((1760+t,sid(s),1,'root')) + for e in byroot[i]: + out.append((e['carrier'],e['passive'],1,'partner_setup')) + for t in e['receivers']:out.append((1760+t,e['carrier'],1,'partner_delivery')) + for e in partner:out.append((e['carrier'],e['passive'],-1,'partner_cleanup')) + moved={(z['helper'],z['donor']):0 for z in oldrestore} + for z in sorted(oldrestore,key=lambda z:z['helper']):out.append((z['helper'],z['donor'],z['coefficient'],'old_restore')) + for index in reversed(order): + a,b,_=w['ops'][index] + if a in sunk:continue + pair=(sid(a),sid(b)) + if pair in moved:moved[pair]+=1;continue + out.append((*pair,-1,'cleanup')) + assert all(x==1 for x in moved.values()) + for source,role in w['sources'].items():out.append((sid(role),int(source),-1,'uninject')) + entries=[dict(pivot=z['a'],donors=[z['b']])for z in ks['pairs']]+[dict(pivot=z['pivot'],donors=z['donors'])for z in ks['families']] + for z in entries: + for donor in z['donors']:out.append((donor,z['pivot'],-1,'kernel_restore')) + return 3520+len(regs),[],out,{} + +def run(candidate_path=None): + verify_inputs();start=time.monotonic();w=read('gen5bit/selected/bit/word_p12.json.gz');g=read('graph.json');ks=read('kernel-selection.json');target=read('target-selection.json');sinks=read('sink-selection.json')['sinks'];sink_byrole={z['role']:z for z in sinks} + candidate_path=Path(candidate_path)if candidate_path else check_bridge.CAND + witness=json.loads(candidate_path.read_text())['entries'] + oldentries=[dict(pivot=z['a'],donors=[z['b']],cut_read=z['cut_read'])for z in ks['pairs']]+[dict(pivot=z['pivot'],donors=z['donors'],cut_read=z['cut_read'])for z in ks['families']] + alias={b:a for a,b in w['pairs']};regs=sorted(set(range(17160))-set(alias));physical={r:3520+i for i,r in enumerate(regs)};sid=lambda r:physical[alias.get(r,r)] + n=3520+len(regs);phase=set(w['phase1']);order=w['phase1']+[i for i in range(len(w['ops']))if i not in phase] + # Every inherited sink is independently tied to the literal old word. + # This is especially material for the eighth sink newly present in PR305. + for z in sinks: + r=z['role'];writes=[i for i,op in enumerate(w['ops'])if op[0]==r] + assert len(writes)==z['forward_writes']==z['cleanups'] + assert not any(op[1]==r for op in w['ops']) + assert not set(writes)&phase and sid(r)==z['stream'] + roots=[i for i,q in enumerate(w['rootroles'])if q==r];assert len(roots)==1 + root=g['roots'][roots[0]];assert root['kind']=='side' + assert [1760+t for t in root['targets']]==z['targets'] + assert r not in {q['role']for q in w['gauges']} and r not in w['sources'].values() + adj=[{}for _ in range(17160)] + for root,r in zip(g['roots'],w['rootroles']): + for t in root['targets']:adj[r][t]=adj[r].get(t,0)+1 + for index in reversed(order): + a,b,_=w['ops'][index] + for t,c in adj[a].items():adj[b][t]=adj[b].get(t,0)+c + gauge={x['role']:x for x in w['gauges']};oldp={x['pivot']for x in oldentries};newp={x['pivot']for x in witness} + setup=defaultdict(list) + for z in oldentries:setup[tuple(z['cut_read'])].append(z) + prefix=[];hits=set() + for r in range(17160): + if r in gauge or r in sink_byrole:continue + for t,c in adj[r].items(): + if c%2: + event=(1760+t,sid(r),-c) + if sid(r)not in oldp:prefix.append(event) + for z in sorted(setup.get(event,[]),key=lambda z:z['pivot']): + hits.add(z['pivot']);prefix.extend((d,z['pivot'],1)for d in z['donors']) + assert len(hits)==len(oldentries) + # Setup rank is irrelevant to scalar ordering here; the source sorts by rank + # and pivot. All factors commute because old pivot/donor sets are disjoint. + assert not oldp&{d for z in oldentries for d in z['donors']} + middle=[] + for source,r in w['sources'].items():middle.append((sid(r),int(source),1)) + for i in w['phase1']: + a,b,_=w['ops'][i];assert a not in sink_byrole;middle.append((sid(a),sid(b),1)) + for root,r in zip(g['roots'],w['rootroles']): + if root['kind']=='center':middle.extend((1760+t,sid(r),1)for t in root['targets']) + at=defaultdict(list) + # The source's gauge order is reversed JSON gauge list; explicit read times + # are numbered in phase1+rest chronology. + for z in reversed(w['gauges']): + r=z['role'];at[int(w['reads'].get(str(r),len(w['phase1'])))-len(w['phase1'])].append(r) + rest=[i for i in range(len(w['ops']))if i not in phase] + for j,i in enumerate(rest): + for r in at[j]:middle.extend((1760+t,sid(r),-c)for t,c in adj[r].items()if c%2) + a,b,_=w['ops'][i];middle.append((sink_byrole[a]['pivot']if a in sink_byrole else sid(a),sid(b),1)) + for r in at[len(rest)]:middle.extend((1760+t,sid(r),-c)for t,c in adj[r].items()if c%2) + _,_,suffix,_=suffix_build();tail=middle+[(a,b,c)for a,b,c,tag in suffix] + newsetup=[(d,z['pivot'],1)for z in witness for d in z['donors']] + # Baseline upper word contains all uncompressed target reads. We transport + # only nonnegative increases from added new shears, ignoring new deleted reads. + allgroups=target['groups'];dependency={1760+int(t):[1760+p for p in ps]for z in allgroups for t,ps in z['dependent'].items()} + assert not set(dependency)&{p for ps in dependency.values()for p in ps} + # Include both setup/restore batches of every terminal sink. Acyclicity + # is checked directly rather than assuming sink and prefix supports disjoint. + edges=Counter((p,t)for t,ps in dependency.items()for p in ps) + for z in sinks: + for t in z['targets']: + if t!=z['pivot']:edges[z['pivot'],t]+=1 + target_nodes=set(x for edge in edges for x in edge);incoming=Counter(t for p,t in edges);successors=defaultdict(list) + for(p,t),multiplicity in edges.items():successors[p].append((t,2*multiplicity)) + ready=sorted(target_nodes-set(incoming));topology=[] + while ready: + p=ready.pop();topology.append(p) + for t,c in successors[p]: + incoming[t]-=1 + if not incoming[t]:ready.append(t) + assert len(topology)==len(target_nodes),'target majorant dependency cycle' + def close_target_majorant(values): + out=values[:] + for p in topology: + for t,c in successors[p]:out[t]+=c*out[p] + return out + def add(v,event): + a,b,c=event;v[a]+=abs(c)*v[b] + def bound(reverse): + # exact helper majorants for old versus sheared word, and a nonnegative + # difference; target reads are deliberately not omitted. + old=[1]*n;new=[1]*n + if not reverse: + for e in prefix:add(old,e);add(new,e) + for e in newsetup:add(new,e) + for e in tail:add(old,e);add(new,e) + for e in reversed(newsetup):add(new,e) + else: + for e in newsetup:add(new,e) + for e in reversed(tail):add(old,e);add(new,e) + for e in reversed(newsetup):add(new,e) + for e in reversed(prefix):add(old,e);add(new,e) + delta=[a-b for a,b in zip(new,old)];assert min(delta)>=0 + delta=close_target_majorant(delta) + # The old full compressed decoder bounds all its own prefixes. The helper + # paths above are exact; the full target-only acyclic graph is majorized. + pins=read('expected/kernel-pins.json');inherited=pins['inverse_max_row_l1']if reverse else pins['forward_max_row_l1'] + out=inherited+max(delta) + return dict(reverse=reverse,inherited_bound=inherited,max_added_majorant=max(delta),certified_new_bound=out, + max_added_helper=max(delta[3520:]),max_added_target=max(delta[1760:3520]),max_added_source=max(delta[:1760])) + F,B=bound(False),bound(True);payload=64*F['certified_new_bound']**3*B['certified_new_bound']**2 + return dict(status='PASS_CONSERVATIVE_SCALAR_PREFIX_BOUNDS',head='a17c42903bbe8d9d26c4bc712d7216a7176237e9',selection=candidate_path.name,candidate_sha256=hashlib.sha256(candidate_path.read_bytes()).hexdigest(),checker_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),bridge_checker_sha256=hashlib.sha256((HERE/'check_bridge.py').read_bytes()).hexdigest(),forward=F,inverse=B, + payload_bound=payload,payload_bits=payload.bit_length(),retained_payload_cap_2_to104=payload<2**104,explicit_new_payload_cap_bits=112,new_payload_cap_2_to112=payload<2**112, + cap_change='The old104-bit report is explicitly replaced by112 for this fixed recipe; see independently reviewed PAYLOAD_CAP.md. No prime, row, moment or inherited width-uniformity hypothesis is changed.', + setup_restore_pairs=len(newsetup),max_target_prefix_degree=max(map(len,dependency.values())),target_majorant_acyclic_vertices=len(topology),target_majorant_edges=len(edges),actual_sink_redirects=sum(z['forward_writes']for z in sinks),sink_literal_words_verified=len(sinks),sink_roles=[z['role']for z in sinks], + target_majorant_proof='Targets are never read by helper/source operations. We include every target-prefix and terminal-sink setup/restore edge with its exact total multiplicity2. Their union is checked acyclic; propagating all uncompressed nonnegative increments in topological order through these weighted edges dominates every chronological placement of those ADDs. Actual sink writes are redirected, and removed sink reads/cleanup/root deliveries are absent.', + scope='Conditional on inherited old F/B and unchanged compiler; complete exact helper majorant paths are replayed, while target compression is conservatively bounded rather than reproducing record-index cut sites.',seconds=time.monotonic()-start) +if __name__=='__main__': + if not __debug__:raise RuntimeError('Assertions required') + check_bridge.configure('156');r=run();(OUTPUT/'scalar-bounds-result.json').write_text(json.dumps(r,indent=2)+'\n');print(json.dumps(r,indent=2)) diff --git a/research/gen5b-shared-kernels/weighted305/check_shared_banks.py b/research/gen5b-shared-kernels/weighted305/check_shared_banks.py new file mode 100644 index 0000000000..4b2cef5720 --- /dev/null +++ b/research/gen5b-shared-kernels/weighted305/check_shared_banks.py @@ -0,0 +1,126 @@ +"""Explicit role-resolved bank assignment for the bounded shared-kernel rewrite on the weighted PR305 word.""" +from collections import Counter,defaultdict +from fractions import Fraction +import hashlib,json,time +from source_data import read,verify,ROOT,HEAD + +def run(candidate_path, output_dir=None, mutation=None): + started=time.monotonic();verify() + w=read('gen5bit/selected/bit/word_p12.json.gz') + kernel=read('kernel-selection.json') + restore=read('restore-selection.json')['entries'];sinks=read('sink-selection.json')['sinks'] + removed={b for a,b in w['pairs']};regs=sorted(set(range(17160))-removed) + original_from_stream={3520+i:r for i,r in enumerate(regs)} + sinkroles={r['role']for r in sinks};roles=sorted(set(regs)-sinkroles) + pins=read('expected/kernel-pins.json');R=pins['physical_R'];assert R==15424 + assert len(roles)==R + entrances={r:0 for r in roles};entrance_type={r:'ZERO'for r in roles} + for z in w['gauges']: + if z['role']in entrances: + entrances[z['role']]=z['dim'];entrance_type[z['role']]=f'frame:{z["frame"]}' + pivots=[(z['a'],z['rank'])for z in kernel['pairs']]+[(z['pivot'],z['rank'])for z in kernel['families']] + pivot_residuals=Counter() + for stream,rank in pivots: + role=original_from_stream[stream];assert entrances[role]==0 + entrances[role]=rank;entrance_type[role]=f'kernel:{stream}' + pivot_residuals[24-rank]+=1 + from pathlib import Path + raw_candidate=Path(candidate_path).read_bytes() + candidate=json.loads(raw_candidate);assert candidate['source_head']==HEAD + new_kernel=candidate['entries'] + new_count=len(new_kernel) + assert new_count>0 and new_count%2==0 and len({z['pivot']for z in new_kernel})==new_count + for z in new_kernel: + role=original_from_stream[z['pivot']] + assert role==z['virtual_pivot'] and entrances[role]==0 + assert z['rank']==1 and len(z['basis'])==1 + entrances[role]=1 + entrance_type[role]=f'shared_kernel:{z["pivot"]}' + pivot_residuals[23]+=1 + endpoints={r:24 for r in roles};endpoint_type={r:'FULL'for r in roles} + assert len(restore)==440 + for z in restore: + r=original_from_stream[z['helper']];assert entrances[r]==z['dims'][0] + endpoints[r]=z['rank'];endpoint_type[r]=f'old_restore:{z["helper"]}' + families=defaultdict(list) + for r in roles: + width=endpoints[r]-entrances[r];assert 0=0 and 120%width==0 and leftover%blocks==0 + patterns.append(([width]*blocks,leftover//blocks)) + total=Counter();segments=defaultdict(list);bank_start=0 + for pattern,(widths,n) in enumerate(patterns): + assert sum(widths)==120 and n>0 + offsets=[];x=0 + for r in widths:offsets.append(x);x+=r + for r in set(widths): + blocks=[(i,offsets[i])for i,v in enumerate(widths)if v==r] + lo=total[r];hi=lo+n*len(blocks) + segments[r].append(dict(lo=lo,hi=hi,pattern=pattern,bank_start=bank_start,blocks=blocks)) + total[r]=hi + bank_start+=n + assert total=={r:60*n for r,n in counts.items()} + assert bank_start==pins['banks_total']//5-new_count//2 + def assignment(role_index,replica,width): + q=60*role_index+replica + for s in segments[width]: + if s['lo']<=q