From ac185e4529a01156f7b574555b50827f8cb645bb Mon Sep 17 00:00:00 2001 From: Ali Romman <226877337+aliromman@users.noreply.github.com> Date: Wed, 18 Nov 2026 10:17:10 -0500 Subject: [PATCH] Classify full-endpoint words on the shared-hub triple pool --- .../CREDITS.md | 50 + .../PROOF.md | 246 ++++ .../README.md | 86 ++ .../RESULT.json | 1139 +++++++++++++++++ .../SOURCES.json | 18 + .../TASK.json | 77 ++ .../VERIFY.json | 34 + .../verify.py | 338 +++++ 8 files changed, 1988 insertions(+) create mode 100644 research/shared-hub-triple-word-obstruction/CREDITS.md create mode 100644 research/shared-hub-triple-word-obstruction/PROOF.md create mode 100644 research/shared-hub-triple-word-obstruction/README.md create mode 100644 research/shared-hub-triple-word-obstruction/RESULT.json create mode 100644 research/shared-hub-triple-word-obstruction/SOURCES.json create mode 100644 research/shared-hub-triple-word-obstruction/TASK.json create mode 100644 research/shared-hub-triple-word-obstruction/VERIFY.json create mode 100644 research/shared-hub-triple-word-obstruction/verify.py diff --git a/research/shared-hub-triple-word-obstruction/CREDITS.md b/research/shared-hub-triple-word-obstruction/CREDITS.md new file mode 100644 index 0000000000..b2971ac2b1 --- /dev/null +++ b/research/shared-hub-triple-word-obstruction/CREDITS.md @@ -0,0 +1,50 @@ +# Attribution and exact sources + +Ali Romman prepared the new commutator lemma, word classification, full +endpoint argument and checks with substantial OpenAI Codex assistance. +New work is Apache-2.0. This is author-checked work, not independent +review of the consumed source proofs. + +Ali Romman's [PR #7707](https://github.com/CrocSwap/integer-mult-bounds/pull/7707), +head `57e24923b609d2588b83321f530fa2a1e75ed364`, supplies the +[exceptional six-projector pool](https://github.com/aliromman/integer-mult-bounds/blob/57e24923b609d2588b83321f530fa2a1e75ed364/research/edge-matching-even-attainment/PROOF.md). +The pool, its irreducibility and geometric maximum remain prior results. +The [retained geometric credit chain](https://github.com/aliromman/integer-mult-bounds/blob/57e24923b609d2588b83321f530fa2a1e75ed364/research/edge-matching-even-attainment/CREDITS.md) +identifies unpaidmoon's normal triples and different dimension-five +attainer, Nick Petalas's links and one-edge bound, and earlier pattern- +fiber work. Those results are not new here. + +Ali Romman's [PR #7710](https://github.com/CrocSwap/integer-mult-bounds/pull/7710), +head `c396e9ee03b331f3b46aa87526817b237f5ad6f8`, gives the +[bridge-family obstruction and explicit sixth-projector exclusion](https://github.com/aliromman/integer-mult-bounds/blob/c396e9ee03b331f3b46aa87526817b237f5ad6f8/research/orthogonal-bridge-family-obstruction/PROOF.md). +It provides the open question. Its separate-bridge argument does not +prove the result here. The added projector changes the linear relations +to common totals within each triple. + +Ali Romman's [PR #7695](https://github.com/CrocSwap/integer-mult-bounds/pull/7695), +head `996c002d82420141c19797e4e3b699ed88aee330`, supplies the prior +[augmentation and paid-subset argument](https://github.com/aliromman/integer-mult-bounds/blob/996c002d82420141c19797e4e3b699ed88aee330/research/orthogonal-basis-bridge-obstruction/PROOF.md) +and the [binary, rank, degree-two and Laurent primitives](https://github.com/aliromman/integer-mult-bounds/blob/996c002d82420141c19797e4e3b699ed88aee330/research/orthogonal-basis-bridge-obstruction/verify.py) +adapted in this checker. These routines are copied into the self-contained +package. No predecessor module is imported. The new allocation, chronology, +full-endpoint fixtures and controls concern the six-member pool. + +The original chronology and Laurent methods are CubeJerry's work in +[PR #6782](https://github.com/CrocSwap/integer-mult-bounds/pull/6782), +head `685457252b51b9c7932ece363365bdf0b12c9c31`: +[five-core word proof](https://github.com/CubeJerry/integer-mult-bounds/blob/685457252b51b9c7932ece363365bdf0b12c9c31/research/bit-three-relation-core/FIVE-CORE-WORD.md) +and [original recurrence](https://github.com/CubeJerry/integer-mult-bounds/blob/685457252b51b9c7932ece363365bdf0b12c9c31/research/bit-three-relation-core/independent_five_word.py). +The nonzero-even-total control is an adaptation of that prior distinction, +not a newly discovered need to check exact exponents. + +The consumed PR #7695 also retains Ali Romman's +[PR #7694](https://github.com/CrocSwap/integer-mult-bounds/pull/7694), +head `96b8b22f5925c4cf4514ed27575f465ebc95e51a`, and its +[edge-family proof](https://github.com/aliromman/integer-mult-bounds/blob/96b8b22f5925c4cf4514ed27575f465ebc95e51a/research/extremal-core-word-obstruction/PROOF.md). +Douglas Colkitt and the repository contributors supplied the framework, +task catalogue and package tools. + +SOURCES.json pins main-branch provenance at +`e54523517d0f03e58352e647c403a5af3e525a57`. The unmerged proof and code +sources are pinned separately above. They are not represented as +ancestors of main. Their full replay suites were not rerun. diff --git a/research/shared-hub-triple-word-obstruction/PROOF.md b/research/shared-hub-triple-word-obstruction/PROOF.md new file mode 100644 index 0000000000..b2d11b0068 --- /dev/null +++ b/research/shared-hub-triple-word-obstruction/PROOF.md @@ -0,0 +1,246 @@ +# Words on two normal triples with one common coordinate + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +This is an author-checked scoped proof. It does not give a new kappa. + +## 1. Exact statement + +Work over F2. A pair of positive integers (x,y) denotes the rank-one +matrix `x y^T`, with binary digits in coordinate order 0 through 4. +Use exactly these six projectors: + +```text +A0=(6,5), A1=(5,6), A2=(7,7), +B0=(12,20), B1=(20,12), B2=(28,28). +DA=A0+A1+A2=diag(1,1,1,0,0), +DB=B0+B1+B2=diag(0,0,1,1,1). +``` + +Each triple is orthogonal. The common coordinate is 2. The two other +coordinates of each triple are its private coordinates. The six-member +complete pool and its pattern dimension four are prior results of +[PR #7707](https://github.com/CrocSwap/integer-mult-bounds/pull/7707), +at the [source proof](https://github.com/aliromman/integer-mult-bounds/blob/57e24923b609d2588b83321f530fa2a1e75ed364/research/edge-matching-even-attainment/PROOF.md). +This proof uses the displayed matrices directly. It does not require +the source's full geometric maximum theorem. + +An m-call word applies `I+([a_j]-1)P_j` in chronological order over +the group algebra F2[H]. The additive group H is the torsion-free +abelian group generated by its paid exponents a_j. Equivalently, +`H=Z^m/L`, where L is saturated. Every one of the six types occurs. +Require `rank(L)<=4`. Add any number of unused coordinate spectators. +Require a diagonal monomial endpoint on the full ambient space in +the original coordinate basis. A coordinate permutation is allowed; +an arbitrary ambient change of basis is not included. + +Then all A calls occur before all B calls, or all B calls occur before +all A calls. The three A-type exponent totals are one common S, and +the three B-type totals are one common T. The five target exponents +are `(S,S,S+T,T,T)`. Spectators have exponent zero. + +Conversely, this two-block chronology and these exact totals give that +full endpoint. This converse is an identity and needs no relation limit. +The necessity uses every stated hypothesis. + +Each target is the sum of a disjoint subset of paid exponents: give +coordinates 0 and 1 the A0 and A1 calls, coordinates 3 and 4 the B0 +and B1 calls, and coordinate 2 all A2 and B2 calls. Give spectators +the empty subset. Thus rational address-matrix rank subadditivity gives + +```text +sum of target ranks <= sum of paid ranks. +``` + +All paid calls remain charged. There is no rank saving in this class. + +## 2. The first-order quotient + +Let off delete a matrix's diagonal, and let Q be the span of the six +off-patterns. It has dimension four. Within each triple the sum of +the patterns is zero. There are no other relations: in the two private +coordinates of A, the private off-diagonal entries of A0,A1,A2 are, +respectively, `E10`, `E01`, and `E10+E01`. The B triple has the same +property, with the private coordinate order reversed if necessary. +The two triple supports have no common off-diagonal entry. + +Write U for the degree-one space of the augmentation ideal of F2[H]. +Since H is the paid-generated torsion-free group, its degree-one +dimension is `m-rank(L)`. Its associated graded algebra is Sym(U). +This follows by choosing an integral basis of H and expanding its +Laurent variables at one. No larger ambient exponent group is used. + +The endpoint's off-diagonal degree-one part is zero. Therefore the +type-total linear forms obey exactly four independent relations: + +```text +sum(A0 calls) = sum(A1 calls) = sum(A2 calls) = u, +sum(B0 calls) = sum(B1 calls) = sum(B2 calls) = v. (1) +``` + +Each type occurs, so the four relations have rank four before quotient. +The limit `rank(L)<=4` forces equality and leaves no further linear +relation in U. In particular, u and v are independent. + +For each type, retain all but one call variable and express its last +variable from (1). This is a basis description of U: u, v, and the +private retained variables of all six types. If E_i is the span of +the degree-one call variables of type Ai, then +`E_i=span(u, its private variables)`. If F_j is the corresponding span +for Bj, then `F_j=span(v, its private variables)`. Within each type, +all its call variables are independent. The subspaces from the A and +B sides are disjoint. + +The augmentation method comes from CubeJerry's +[PR #6782](https://github.com/CrocSwap/integer-mult-bounds/pull/6782), +[word proof](https://github.com/CubeJerry/integer-mult-bounds/blob/685457252b51b9c7932ece363365bdf0b12c9c31/research/bit-three-relation-core/FIVE-CORE-WORD.md). +The prior arbitrary-basis use and paid-group caveat are in +[PR #7695](https://github.com/CrocSwap/integer-mult-bounds/pull/7695), +[proof](https://github.com/aliromman/integer-mult-bounds/blob/996c002d82420141c19797e4e3b699ed88aee330/research/orthogonal-basis-bridge-obstruction/PROOF.md). +The present first-order equations differ from the bridge-total equations. + +## 3. The cross-commutator lemma + +Put `C_ij=off(Ai Bj+Bj Ai)` in the quotient by Q. The nine C_ij have +exactly one linear relation: their total sum is zero. + +Here is a direct proof. For coefficients r_ij, restrict their sum to +the rectangle with A-private rows and B-private columns. The three +private image columns of A form a rank-two matrix X whose kernel is +the all-one vector. The three private covectors of B form a rank-two +matrix Y with the same kernel. Every cross factor pairing through the +common coordinate equals one. Thus this rectangle is `X R Y^T`. +Every matrix in Q is zero on it. + +The kernel of `R -> X R Y^T` consists of `r_ij=s_i+t_j`. To check this, +choose two independent columns on each side. The four corresponding +entries determine the quotient map, which is onto the four-dimensional +space of two-by-two matrices. The displayed additive row-and-column +forms lie in its kernel and have dimension five. They are the full +kernel by dimension. + +For this form, the full commutator sum is + +```text +sum_i s_i [Ai,DB] + sum_j t_j [DA,Bj]. (2) +``` + +Here `[P,R]=PR+RP`. The first term is supported inside the A triple +and has only common/private entries; it has no private/private entry. +The second term has the corresponding support inside B. These off- +diagonal supports are disjoint. A member of the A-pattern space with +zero private/private entries is zero, by the explicit entries in +Section 2. The same is true for B. Thus membership of (2) in Q forces +both terms to vanish separately. + +The common/private entries of the first term vanish exactly when the +private image sum and private covector sum vanish. Both two-by-three +matrices have all-one kernel, so s0=s1=s2. The same argument gives +t0=t1=t2. Thus all r_ij are equal. Conversely their common value one +gives `[DA,DB]=0`, since DA and DB are diagonal. This proves the lemma, +including the quotient by Q. Its rank is eight. + +## 4. Degree two forces two blocks + +For each pair i,j, define the quadratic polynomial q_ij to be the sum +of `a*b` over calls a of type Ai and calls b of type Bj for which b +occurs before a. These are degree-one call variables in U. + +Compare the word's degree-two coefficient with the order in which all +A calls precede all B calls. Calls inside a triple commute exactly. +Each interchange of an A call and a B call changes the degree-two +matrix by its variable product times the corresponding commutator. +The degree-two terms of individual factors lie in Q after off. In +the comparison order, the first-order blocks are u DA and v DB, so +their cross term is diagonal. The remaining within-block terms lie +in Q. Therefore a diagonal endpoint requires + +```text +sum_ij C_ij q_ij = 0 modulo Q. (3) +``` + +The rank-eight lemma, applied to each quadratic monomial separately, +makes all nine q_ij the same polynomial q. + +For each i,j, q_ij lies in `E_i F_j`, the span of products of one +element of E_i and one element of F_j. The basis in Section 2 shows +that the intersection of these nine spaces is precisely span(uv). +Indeed a private variable of any one type is absent from the product +space for another type on that side. The only remaining monomial is +uv. Hence `q=epsilon*u*v`, where epsilon is zero or one. + +Fix i,j. The call variables within Ai are a basis of E_i; those within +Bj are a basis of F_j. Their pairwise products are independent because +E_i and F_j lie in disjoint variable spaces. Their complete sum is uv, +by (1). Thus the coefficient of every call pair in q_ij is epsilon. +If epsilon is zero, every Ai call precedes every Bj call. If epsilon +is one, every Bj call precedes every Ai call. The same epsilon applies +to all nine pairs. This proves the two-block chronology at every length. + +## 5. Exact totals and full endpoints + +Degree one alone does not give exact equality of exponent totals. +Let the three exact A totals be S_i and the three exact B totals T_j. +After collecting calls within each block, its operator is + +```text +FA = I + sum_i ([S_i]-1)Ai, +FB = I + sum_j ([T_j]-1)Bj. (4) +``` + +Suppose A precedes B, so the full map is FB FA. The two A-private +rows of FB are identity rows. They leave the corresponding rows of +FA unchanged. The private off-diagonal entries in those rows are +`[S_0]+[S_2]` and `[S_1]+[S_2]`. Diagonality forces all three monomials +equal. Distinct group elements are linearly independent in F2[H], so +S0=S1=S2 exactly. + +The B-private columns of FA are identity columns. Thus the corresponding +columns of FB FA equal those of FB. Their private off-diagonal entries +force T0=T1=T2 by the same argument. If B precedes A, exchange the +roles of rows, columns and triples. The conclusion is unchanged. + +Equation (4) now gives `FA=I+([S]-1)DA` and `FB=I+([T]-1)DB`. +These operators are diagonal, commute, and have the stated full endpoint. +Their common coordinate has monomial `[S][T]=[S+T]`. Every spectator +is fixed at each call. This proves necessity, sufficiency and the +disjoint paid-subset rank bound in Section 1. + +## 6. Exact checks and limits + +The checker tests all 511 nonempty subsets of the nine commutators, +including reduction modulo Q. Only the full subset vanishes. This +corroborates the direct rank lemma; it is not the unbounded proof. + +Five multiplicity domains contain 68760 distinct type orders, with +1584 passing orders. Each has both a degree-two check and a full +original-coordinate Laurent product. The exponents use the universal +exact common-total lattice, with four relations. Every passing word +has the predicted full endpoint. Every other word has an off-diagonal +entry. A separate multinomial count gives each passing count. These +finite checks do not enumerate every saturated lattice with the same +modulo-two reduction; the written proof covers that distinction. + +Twenty-four larger fixtures include repeated calls, both block orders, +coordinate permutations, and up to twelve unused spectators. They +check the actual paid exponent rank and all ambient columns. Moving +one call across the block boundary changes an explicit input column. + +The controls also check two nonzero-even total changes at the same +four-relation rank. Degree two misses these changes; the full endpoint +rejects them. A larger ambient exponent group can hide an interleaving +after all labels are doubled; the correct paid-generated coordinates +reject it. At five relations, an interleaved diagonal word exists with +three zero calls. At six relations, an interleaved identity has every +call nonzero. These are boundary controls, not rank-saving constructions +or a classification above four relations. Omitted-type and wrong-hub- +target controls change the full map. + +The exact six-type alphabet, all types present, original diagonal +endpoint, paid-generated group and four-relation limit are essential +scope restrictions. This does not classify other even maximizers or +arbitrary ambient embeddings. It does not supply a native word, +physical storage, restoration, a complete recursive invoice, or a +selected-assumption discharge. The selected kappa and all five +assumptions remain unchanged. Full predecessor suites, selected cold +replay, native/physical replay, Lean, Docker, independent human and +formal-kernel review were not run. diff --git a/research/shared-hub-triple-word-obstruction/README.md b/research/shared-hub-triple-word-obstruction/README.md new file mode 100644 index 0000000000..13cd2e1f00 --- /dev/null +++ b/research/shared-hub-triple-word-obstruction/README.md @@ -0,0 +1,86 @@ +# Full-endpoint words on the shared-hub six-projector pool + +**Scoped negative proof; no new kappa.** The exceptional complete pool in +[PR #7707](https://github.com/CrocSwap/integer-mult-bounds/pull/7707) +has two orthogonal normal triples that share one coordinate. Its sixth +projector is outside the preceding bridge-family theorem. This package +settles its word question at the actual four-dimensional pattern budget. + +For every word that uses all six types and has at most four saturated +exponent relations in the paid-generated torsion-free group, a full +original-coordinate diagonal monomial endpoint forces two blocks: +all calls from one triple, then all calls from the other. The three +totals in each triple must be exactly equal. If those totals are S and T, +the five targets are `(S,S,S+T,T,T)`. Each target is a sum of a disjoint +subset of paid exponents, so total target rank cannot exceed paid rank. + +Read [PROOF.md](PROOF.md), [RESULT.json](RESULT.json), +[verify.py](verify.py) and [CREDITS.md](CREDITS.md). The proof covers +arbitrary repetitions, coordinate permutations and unused spectators. +It excludes extra or omitted types, arbitrary changes of ambient basis, +larger relation budgets and other maximizing pools. The exact alphabet is + +```text +(6,5), (5,6), (7,7), (12,20), (20,12), (28,28). +``` + +Pairs give binary image and covector masks on coordinates 0 through 4. +The paid factors are `I+([a]-1)P` over F2[H]. The endpoint requirement +applies to every ambient input. It does not assume clean spectator state. + +## Reproduce + +Use CPython 3.12 and its standard library: + +```sh +python3 -B scripts/research_package.py --package research/shared-hub-triple-word-obstruction +``` + +The registered normal and optimized commands print: + +```text +PASS_SHARED_HUB_TRIPLE_WORD_OBSTRUCTION +68760 complete Laurent words; 1584 two-block endpoints +24 larger fixtures; disjoint paid-subset targets and all boundary controls pass +``` + +The five exhaustive multiplicity domains have lengths six through nine. +Each word has a degree-two and full Laurent check. Independent multinomial +counts agree with each passing count. The commutator check tests all 511 +nonempty subsets and finds exactly the one dependence used by the proof. +Twenty-four larger fixtures reach 17 ambient coordinates and 15 calls. +They include both block orders and coordinate permutations. Every target +is reconstructed from its assigned paid subset. Every crossed-boundary +mutant changes a recorded input column. + +The controls distinguish parity from exact exponent equality, and the +paid-generated exponent group from a larger ambient group. At five +relations, an interleaved diagonal control has three zero calls. At six +relations, an interleaved identity has all calls nonzero. These controls +do not prove any rank saving above four relations. Omitted-type and +wrong-common-coordinate target controls also fail their endpoint checks. + +The unbounded conclusion rests on the written proof. The finite word +census uses the universal exact common-total lattice, not every integral +lattice with its modulo-two reduction. Full predecessor suites, selected +cold replay, native/physical replay, Lean, Docker, independent human and +formal-kernel review were not run. The adapted checker is not independent +review of its sources. The selected kappa remains `0.00363005817` and all +five assumptions remain. No complete recursive invoice is supplied. + +## Open next questions + +Other complete pools can attain the same geometric maximum. To test one, +state its exact alphabet and relation budget, derive its first-order +kernel, and check a full endpoint before claiming a saving. The present +two-triple commutator lemma need not hold there. Source-specific evidence +must justify a new round; another parameter or seed is not enough. + +A larger relation budget on this pool also changes the problem. The +control identities show that the two-block conclusion can fail, but +they save no rank. A useful next step needs an explicit nonzero paid +profile and full target bill. Native cost and supplier admission would +remain additional obligations. No follow-up is reserved. + +Prepared by Ali Romman with substantial OpenAI Codex assistance. +Apache-2.0. Exact predecessor credit is in CREDITS.md. diff --git a/research/shared-hub-triple-word-obstruction/RESULT.json b/research/shared-hub-triple-word-obstruction/RESULT.json new file mode 100644 index 0000000000..89780e8df8 --- /dev/null +++ b/research/shared-hub-triple-word-obstruction/RESULT.json @@ -0,0 +1,1139 @@ +{ + "controls": { + "five_relations": { + "endpoint": [ + [ + [ + 0 + ], + 65 + ], + [ + [ + 1 + ], + 17043456 + ] + ], + "paid_exponents": [ + [ + 0 + ], + [ + 1 + ], + [ + 0 + ], + [ + 1 + ], + [ + 0 + ], + [ + 1 + ] + ], + "word": [ + 0, + 3, + 1, + 4, + 2, + 5 + ], + "zero_calls": 3 + }, + "nonzero_even_total_0": { + "exponent": [ + 1, + 0 + ], + "input_column": 0, + "output_mask": 2 + }, + "nonzero_even_total_3": { + "exponent": [ + 0, + 1 + ], + "input_column": 4, + "output_mask": 12 + }, + "omitted_type": { + "exponent": [ + 0, + 0 + ], + "input_column": 3, + "output_mask": 28 + }, + "six_relation_nonzero_identity": { + "paid_exponents": [ + [ + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0 + ], + [ + 0, + 0, + 1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 0, + 0, + 0, + 0, + 0, + -1 + ], + [ + 0, + 0, + -1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + -1, + 0 + ], + [ + 0, + -1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + -1, + 0, + 0 + ], + [ + -1, + 0, + 0, + 0, + 0, + 0 + ] + ], + "word": [ + 0, + 3, + 1, + 4, + 2, + 5, + 5, + 2, + 4, + 1, + 3, + 0 + ] + }, + "wrong_ambient_group": { + "exponent": [ + 0, + 0 + ], + "input_column": 0, + "output_mask": 14 + }, + "wrong_hub_target": { + "exponent": [ + 1, + 0 + ], + "input_column": 2, + "output_mask": 4 + } + }, + "geometry": { + "cross_quotient_rank": 8, + "cross_quotient_vectors": [ + 180768, + 5251360, + 5432096, + 213010, + 6299658, + 6512666, + 246322, + 7348522, + 7594810 + ], + "cross_relation_masks": [ + 511 + ], + "pattern_rank": 4 + }, + "larger_fixtures": [ + { + "calls": 12, + "coordinates": [ + 0, + 1, + 2, + 3, + 4 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 3, + "output_mask": 1 + }, + "multiplicities": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "reverse_blocks": false, + "width": 5 + }, + { + "calls": 12, + "coordinates": [ + 0, + 1, + 2, + 3, + 4 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 8 + }, + "multiplicities": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "reverse_blocks": true, + "width": 5 + }, + { + "calls": 13, + "coordinates": [ + 0, + 1, + 2, + 3, + 4 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 3, + "output_mask": 2 + }, + "multiplicities": [ + 3, + 1, + 2, + 2, + 4, + 1 + ], + "reverse_blocks": false, + "width": 5 + }, + { + "calls": 13, + "coordinates": [ + 0, + 1, + 2, + 3, + 4 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 16 + }, + "multiplicities": [ + 3, + 1, + 2, + 2, + 4, + 1 + ], + "reverse_blocks": true, + "width": 5 + }, + { + "calls": 15, + "coordinates": [ + 0, + 1, + 2, + 3, + 4 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 3, + "output_mask": 2 + }, + "multiplicities": [ + 4, + 3, + 2, + 1, + 2, + 3 + ], + "reverse_blocks": false, + "width": 5 + }, + { + "calls": 15, + "coordinates": [ + 0, + 1, + 2, + 3, + 4 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 24 + }, + "multiplicities": [ + 4, + 3, + 2, + 1, + 2, + 3 + ], + "reverse_blocks": true, + "width": 5 + }, + { + "calls": 12, + "coordinates": [ + 6, + 0, + 4, + 2, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 2, + "output_mask": 64 + }, + "multiplicities": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "reverse_blocks": false, + "width": 7 + }, + { + "calls": 12, + "coordinates": [ + 6, + 0, + 4, + 2, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 4 + }, + "multiplicities": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "reverse_blocks": true, + "width": 7 + }, + { + "calls": 13, + "coordinates": [ + 6, + 0, + 4, + 2, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 2, + "output_mask": 1 + }, + "multiplicities": [ + 3, + 1, + 2, + 2, + 4, + 1 + ], + "reverse_blocks": false, + "width": 7 + }, + { + "calls": 13, + "coordinates": [ + 6, + 0, + 4, + 2, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 32 + }, + "multiplicities": [ + 3, + 1, + 2, + 2, + 4, + 1 + ], + "reverse_blocks": true, + "width": 7 + }, + { + "calls": 15, + "coordinates": [ + 6, + 0, + 4, + 2, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 2, + "output_mask": 1 + }, + "multiplicities": [ + 4, + 3, + 2, + 1, + 2, + 3 + ], + "reverse_blocks": false, + "width": 7 + }, + { + "calls": 15, + "coordinates": [ + 6, + 0, + 4, + 2, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 36 + }, + "multiplicities": [ + 4, + 3, + 2, + 1, + 2, + 3 + ], + "reverse_blocks": true, + "width": 7 + }, + { + "calls": 12, + "coordinates": [ + 1, + 7, + 9, + 0, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 2 + }, + "multiplicities": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "reverse_blocks": false, + "width": 11 + }, + { + "calls": 12, + "coordinates": [ + 1, + 7, + 9, + 0, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 1, + "output_mask": 1 + }, + "multiplicities": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "reverse_blocks": true, + "width": 11 + }, + { + "calls": 13, + "coordinates": [ + 1, + 7, + 9, + 0, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 128 + }, + "multiplicities": [ + 3, + 1, + 2, + 2, + 4, + 1 + ], + "reverse_blocks": false, + "width": 11 + }, + { + "calls": 13, + "coordinates": [ + 1, + 7, + 9, + 0, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 1, + "output_mask": 32 + }, + "multiplicities": [ + 3, + 1, + 2, + 2, + 4, + 1 + ], + "reverse_blocks": true, + "width": 11 + }, + { + "calls": 15, + "coordinates": [ + 1, + 7, + 9, + 0, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 0, + "output_mask": 128 + }, + "multiplicities": [ + 4, + 3, + 2, + 1, + 2, + 3 + ], + "reverse_blocks": false, + "width": 11 + }, + { + "calls": 15, + "coordinates": [ + 1, + 7, + 9, + 0, + 5 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 1, + "output_mask": 33 + }, + "multiplicities": [ + 4, + 3, + 2, + 1, + 2, + 3 + ], + "reverse_blocks": true, + "width": 11 + }, + { + "calls": 12, + "coordinates": [ + 16, + 3, + 8, + 11, + 1 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 11, + "output_mask": 65536 + }, + "multiplicities": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "reverse_blocks": false, + "width": 17 + }, + { + "calls": 12, + "coordinates": [ + 16, + 3, + 8, + 11, + 1 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 3, + "output_mask": 2048 + }, + "multiplicities": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "reverse_blocks": true, + "width": 17 + }, + { + "calls": 13, + "coordinates": [ + 16, + 3, + 8, + 11, + 1 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 11, + "output_mask": 8 + }, + "multiplicities": [ + 3, + 1, + 2, + 2, + 4, + 1 + ], + "reverse_blocks": false, + "width": 17 + }, + { + "calls": 13, + "coordinates": [ + 16, + 3, + 8, + 11, + 1 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 3, + "output_mask": 2 + }, + "multiplicities": [ + 3, + 1, + 2, + 2, + 4, + 1 + ], + "reverse_blocks": true, + "width": 17 + }, + { + "calls": 15, + "coordinates": [ + 16, + 3, + 8, + 11, + 1 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 11, + "output_mask": 8 + }, + "multiplicities": [ + 4, + 3, + 2, + 1, + 2, + 3 + ], + "reverse_blocks": false, + "width": 17 + }, + { + "calls": 15, + "coordinates": [ + 16, + 3, + 8, + 11, + 1 + ], + "crossed_boundary_witness": { + "exponent": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "input_column": 3, + "output_mask": 2050 + }, + "multiplicities": [ + 4, + 3, + 2, + 1, + 2, + 3 + ], + "reverse_blocks": true, + "width": 17 + } + ], + "status": "PASS_SHARED_HUB_TRIPLE_WORD_OBSTRUCTION", + "words": { + "domains": [ + { + "multiplicities": [ + 1, + 1, + 1, + 1, + 1, + 1 + ], + "orders": 720, + "passing": 72 + }, + { + "multiplicities": [ + 2, + 1, + 1, + 1, + 1, + 1 + ], + "orders": 2520, + "passing": 144 + }, + { + "multiplicities": [ + 2, + 1, + 1, + 2, + 1, + 1 + ], + "orders": 10080, + "passing": 288 + }, + { + "multiplicities": [ + 2, + 2, + 1, + 1, + 1, + 1 + ], + "orders": 10080, + "passing": 360 + }, + { + "multiplicities": [ + 2, + 2, + 1, + 2, + 1, + 1 + ], + "orders": 45360, + "passing": 720 + } + ], + "order_status_sha256": "3b9500fd4ac71eb9960b30aa6d978f76bcbaba2aadfdd80fda67a8bf1772001b", + "total_orders": 68760, + "total_passing": 1584 + } +} diff --git a/research/shared-hub-triple-word-obstruction/SOURCES.json b/research/shared-hub-triple-word-obstruction/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/shared-hub-triple-word-obstruction/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + ] +} diff --git a/research/shared-hub-triple-word-obstruction/TASK.json b/research/shared-hub-triple-word-obstruction/TASK.json new file mode 100644 index 0000000000..33d32acb6e --- /dev/null +++ b/research/shared-hub-triple-word-obstruction/TASK.json @@ -0,0 +1,77 @@ +{ + "schema_version": 1, + "task_id": "bit-helper-contract", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "bit-helper-contract", + "question": "Can a changed G20 helper path or independent-target split improve the complete BIT moment without losing its physical endpoint?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "research/g20-helper-split/README.md", + "research/g20-conjugation-admission/README.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "A full boundary contract and paid profile; unchanged scalar counts alone are insufficient. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "First read #5679/#5708 and their audits as pending component proposals. Choose one uncovered helper group/cut on an exact word; compare arbitrary-input native action, targets, owned storage, both orientations and full signed bill. Stop if the gain is only a scalar count or repaid by lost targets. Do not rerun the frozen #5609 common-frame domain without changing its hypothesis.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "G20", + "helper split", + "5679", + "5708", + "independent target" + ], + "existing_checks": [ + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "changed", + "actual_scope": "All-length full-endpoint word classification for the exact six-projector shared-hub pool with all types present and at most four saturated exponent relations.", + "scope_change_reason": "The extra sixth projector in PR7707 is excluded from PR7710 and changes the first-order relations. This audit resolves that named paid-word gap.", + "bottleneck_link": "An image maximum cannot supply a BIT gain unless a legal word produces a favorable paid/target rank bill.", + "budget_minutes": 60, + "stop_rule": "Stop at the exact-pool chronology and endpoint theorem with bounded controls. No further geometric extension or native implementation.", + "outcome": "completed", + "evidence": "PROOF.md; RESULT.json; 511 commutator subsets, 68760 full Laurent words, 24 larger fixtures and boundary controls.", + "author": "Ali Romman", + "ai_assistance": "Substantial OpenAI Codex assistance. Prior binary, rank, Laurent and augmentation methods are adapted and credited. This is not an independent source review.", + "open_questions": [ + { + "question": "Can another exact maximizing pool, or a larger relation budget, give a favorable full rank bill?", + "why_it_matters": "The theorem applies only to the named six-member pool and four relations.", + "first_step": "Specify the alphabet and relation lattice, then give a nonzero paid profile and full ambient target.", + "blocked_by": "The boundary controls show interleaving, not rank saving or native realization." + } + ] +} diff --git a/research/shared-hub-triple-word-obstruction/VERIFY.json b/research/shared-hub-triple-word-obstruction/VERIFY.json new file mode 100644 index 0000000000..09ff041b1d --- /dev/null +++ b/research/shared-hub-triple-word-obstruction/VERIFY.json @@ -0,0 +1,34 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Check the cross-commutator kernel, every small full Laurent word, disjoint paid-subset allocation, larger full ambient fixtures and boundary failures." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Check the cross-commutator kernel, every small full Laurent word, disjoint paid-subset allocation, larger full ambient fixtures and boundary failures." + } + ] +} diff --git a/research/shared-hub-triple-word-obstruction/verify.py b/research/shared-hub-triple-word-obstruction/verify.py new file mode 100644 index 0000000000..52461fd834 --- /dev/null +++ b/research/shared-hub-triple-word-obstruction/verify.py @@ -0,0 +1,338 @@ +"""Exact shared-hub triple word checks. + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +Matrix, rank, degree-two and Laurent routines adapt Ali Romman's PR7695, +which retains CubeJerry's PR6782 and Ali Romman's PR7694 methods. +This is author-checked work, not independent source review. +""" +from fractions import Fraction +from math import factorial +from pathlib import Path +import hashlib +import json + +PAIRS = ((6, 5), (5, 6), (7, 7), (12, 20), (20, 12), (28, 28)) + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def basis(values): + pivots = {} + for value in values: + while value: + bit = value.bit_length() - 1 + if bit in pivots: + value ^= pivots[bit] + else: + pivots[bit] = value + break + return tuple(pivots[i] for i in sorted(pivots, reverse=True)) + + +def reduce_vector(value, pivots): + for row in pivots: + value = min(value, value ^ row) + return value + + +def outer(x, y, width): + return sum(y << (i * width) for i in range(width) if x >> i & 1) + + +def identity(width): + return sum(1 << (i * width + i) for i in range(width)) + + +def left_project(pair, matrix, width): + x, y = pair + row, mask = 0, (1 << width) - 1 + while y: + bit = y & -y + row ^= (matrix >> ((bit.bit_length() - 1) * width)) & mask + y ^= bit + return outer(x, row, width) + + +def rational_rank(rows): + pivots = {} + for original in rows: + row = [Fraction(x) for x in original] + for col in sorted(pivots): + coefficient = row[col] + if coefficient: + row = [x - coefficient * y for x, y in zip(row, pivots[col])] + nonzero = next((i for i, x in enumerate(row) if x), None) + if nonzero is not None: + lead = row[nonzero] + pivots[nonzero] = [x / lead for x in row] + return len(pivots) + + +def quadratic(order, exps, products): + coefficients = {} + supports = [[i for i, x in enumerate(row) if x % 2] for row in exps] + for j in range(len(order)): + for i in range(j): + matrix = products[order[j], order[i]] + if matrix: + for a in supports[i]: + for b in supports[j]: + monomial = (min(a, b), max(a, b)) + coefficients[monomial] = coefficients.get(monomial, 0) ^ matrix + return {key: value for key, value in coefficients.items() if value} + + +def laurent(order, exps, pairs, width): + """Multiply the full matrices with exact integer exponent tuples.""" + zero = (0,) * len(exps[0]) + out = {zero: identity(width)} + for kind, exponent in zip(order, exps): + new = {} + for key, matrix in out.items(): + projected = left_project(pairs[kind], matrix, width) + new[key] = new.get(key, 0) ^ matrix ^ projected + shifted = tuple(x + y for x, y in zip(key, exponent)) + new[shifted] = new.get(shifted, 0) ^ projected + out = {key: value for key, value in new.items() if value} + return out + + +def orders(counts): + remaining = list(counts) + word = [] + def visit(): + if len(word) == sum(counts): + yield tuple(word) + else: + for kind, number in enumerate(remaining): + if number: + remaining[kind] -= 1 + word.append(kind) + yield from visit() + word.pop() + remaining[kind] += 1 + yield from visit() + + +def exponents(order): + dimension = len(order) - 4 + out = [None] * len(order) + free = 2 + for kind in range(6): + slots = [i for i, value in enumerate(order) if value == kind] + total = [0] * dimension + total[kind // 3] = 1 + for slot in slots[:-1]: + row = [0] * dimension + row[free] = 1 + out[slot] = tuple(row) + total[free] -= 1 + free += 1 + out[slots[-1]] = tuple(total) + require(free == dimension, 'all quotient variables allocated') + return out + + +def endpoint(exps, width): + zero = (0,) * len(exps[0]) + u = (1, 0) + zero[2:] + v = (0, 1) + zero[2:] + uv = (1, 1) + zero[2:] + out = {u: (1 << 0) | (1 << (width + 1)), + uv: 1 << (2 * width + 2), + v: (1 << (3 * width + 3)) | (1 << (4 * width + 4))} + if width > 5: + out[zero] = sum(1 << (i * width + i) for i in range(5, width)) + return out + + +def two_blocks(order): + groups = [x // 3 for x in order] + return sum(a != b for a, b in zip(groups, groups[1:])) == 1 + + +def product_table(width): + mask = ((1 << (width * width)) - 1) ^ identity(width) + matrices = [outer(*p, width) for p in PAIRS] + q = basis([p & mask for p in matrices]) + products = {(i, j): reduce_vector(left_project(PAIRS[i], matrices[j], width) & mask, q) + for i in range(6) for j in range(6)} + return matrices, q, products + + +def geometry(): + matrices, q, products = product_table(5) + require(len(q) == 4, 'pattern dimension four') + for i in range(6): + for j in range(6): + if i // 3 == j // 3: + require(left_project(PAIRS[i], matrices[j], 5) == (matrices[i] if i == j else 0), + 'each triple is orthogonal') + cs = [products[i, j] ^ products[j, i] for i in range(3) for j in range(3, 6)] + relations = [] + for mask in range(1, 512): + value = 0 + for i, c in enumerate(cs): + if mask >> i & 1: + value ^= c + if not value: + relations.append(mask) + require(relations == [511], 'only the sum of all cross-commutators vanishes') + return {'pattern_rank': 4, 'cross_quotient_rank': len(basis(cs)), + 'cross_relation_masks': relations, 'cross_quotient_vectors': cs} + + +def word_census(): + domains = [(1, 1, 1, 1, 1, 1), (2, 1, 1, 1, 1, 1), + (2, 1, 1, 2, 1, 1), (2, 2, 1, 1, 1, 1), (2, 2, 1, 2, 1, 1)] + matrices, q, products = product_table(5) + mask = ((1 << 25) - 1) ^ identity(5) + rows = [] + digest = hashlib.sha256() + for counts in domains: + seen = passed = 0 + for order in orders(counts): + exps = exponents(order) + degree2 = not quadratic(order, exps, products) + actual = laurent(order, exps, PAIRS, 5) + predicted = two_blocks(order) + diagonal = not any(value & mask for value in actual.values()) + require(degree2 == predicted == diagonal, 'exact word classification') + if predicted: + require(actual == endpoint(exps, 5), 'full monomial endpoint') + seen += 1 + passed += predicted + digest.update(bytes(order) + bytes([predicted])) + expected = 2 * factorial(sum(counts[:3])) * factorial(sum(counts[3:])) + for count in counts: + expected //= factorial(count) + total = factorial(sum(counts)) + for count in counts: + total //= factorial(count) + require((seen, passed) == (total, expected), 'independent multinomial counts') + rows.append({'multiplicities': counts, 'orders': seen, 'passing': passed}) + return {'domains': rows, 'order_status_sha256': digest.hexdigest(), + 'total_orders': sum(r['orders'] for r in rows), + 'total_passing': sum(r['passing'] for r in rows)} + + +def embed_vector(value, coordinates): + return sum(1 << coordinates[i] for i in range(5) if value >> i & 1) + + +def difference_column(actual, expected, width): + for exponent in sorted(set(actual) | set(expected)): + difference = actual.get(exponent, 0) ^ expected.get(exponent, 0) + if difference: + column = next(j for j in range(width) + if any(difference >> (i * width + j) & 1 for i in range(width))) + return {'exponent': exponent, 'input_column': column, + 'output_mask': sum(1 << i for i in range(width) + if difference >> (i * width + column) & 1)} + raise ValueError('expected an actual input difference') + + +def larger_fixtures(): + rows = [] + counts_list = [(2, 2, 2, 2, 2, 2), (3, 1, 2, 2, 4, 1), (4, 3, 2, 1, 2, 3)] + for width, coordinates in [(5, (0, 1, 2, 3, 4)), (7, (6, 0, 4, 2, 5)), + (11, (1, 7, 9, 0, 5)), (17, (16, 3, 8, 11, 1))]: + pairs = tuple((embed_vector(x, coordinates), embed_vector(y, coordinates)) for x, y in PAIRS) + for counts in counts_list: + a = tuple(k for repeat in range(max(counts)) for k in (2, 0, 1) if counts[k] > repeat) + b = tuple(k for repeat in range(max(counts)) for k in (4, 5, 3) if counts[k] > repeat) + for reverse in [False, True]: + order = b + a if reverse else a + b + exps = exponents(order) + require(rational_rank(exps) == len(order) - 4, 'actual paid group rank') + zero = (0,) * len(exps[0]) + expected = {} + for i in range(width): + e = zero + if i in coordinates: + slot = coordinates.index(i) + e = ((1, 0) if slot < 2 else (0, 1) if slot > 2 else (1, 1)) + zero[2:] + expected[e] = expected.get(e, 0) | (1 << (i * width + i)) + allocations = [(0,), (1,), (2, 5), (3,), (4,)] + assigned = [] + for slot, kinds in enumerate(allocations): + indices = [i for i, kind in enumerate(order) if kind in kinds] + assigned.extend(indices) + total = tuple(sum(exps[i][j] for i in indices) for j in range(len(zero))) + target = ((1, 0) if slot < 2 else (0, 1) if slot > 2 else (1, 1)) + zero[2:] + require(total == target, 'exact disjoint paid subset for each target') + require(sorted(assigned) == list(range(len(order))), 'each paid call assigned once') + actual = laurent(order, exps, pairs, width) + require(actual == expected, 'all original and spectator inputs') + cut = len(b) if reverse else len(a) + mutated = list(order) + mutated[cut - 1], mutated[cut] = mutated[cut], mutated[cut - 1] + mutant_exps = list(exps) + mutant_exps[cut - 1], mutant_exps[cut] = mutant_exps[cut], mutant_exps[cut - 1] + witness = difference_column(laurent(mutated, mutant_exps, pairs, width), expected, width) + rows.append({'width': width, 'coordinates': coordinates, 'multiplicities': counts, + 'reverse_blocks': reverse, 'calls': len(order), + 'crossed_boundary_witness': witness}) + return rows + + +def boundary_controls(): + legal = (0, 1, 2, 3, 4, 5) + exps = exponents(legal) + expected = endpoint(exps, 5) + _, _, products = product_table(5) + controls = {} + for kind in [0, 3]: + changed = list(exps) + row = list(changed[kind]); row[kind // 3] += 2; changed[kind] = tuple(row) + require(rational_rank(changed) == 2, 'even-total control keeps four relations') + require(not quadratic(legal, changed, products), 'quadratic quotient alone misses exact total') + actual = laurent(legal, changed, PAIRS, 5) + controls['nonzero_even_total_' + str(kind)] = difference_column(actual, expected, 5) + interleaved = (0, 3, 1, 4, 2, 5) + proper = exponents(interleaved) + doubled = [tuple(2 * x for x in e) for e in proper] + require(quadratic(interleaved, proper, products), 'correct paid group rejects interleaving') + require(not quadratic(interleaved, doubled, products), 'wrong ambient group hides degree two') + controls['wrong_ambient_group'] = difference_column(laurent(interleaved, doubled, PAIRS, 5), + laurent(legal, [tuple(2*x for x in e) for e in exps], PAIRS, 5), 5) + five_exps = [(0,) if k < 3 else (1,) for k in interleaved] + actual = laurent(interleaved, five_exps, PAIRS, 5) + mask = ((1 << 25) - 1) ^ identity(5) + require(not any(m & mask for m in actual.values()), 'five-relation interleaved diagonal control') + require(6 - rational_rank(five_exps) == 5, 'five relations, three zero calls') + controls['five_relations'] = {'word': interleaved, 'paid_exponents': five_exps, + 'endpoint': sorted(actual.items()), 'zero_calls': 3} + palindrome = (0, 3, 1, 4, 2, 5, 5, 2, 4, 1, 3, 0) + inverse_exps = [] + for i, kind in enumerate(palindrome): + row = [0] * 6; row[kind] = 1 if i < 6 else -1; inverse_exps.append(tuple(row)) + require(len(palindrome) - rational_rank(inverse_exps) == 6, 'six relations') + require(laurent(palindrome, inverse_exps, PAIRS, 5) == {(0,) * 6: identity(5)}, + 'interleaved identity with every call nonzero') + controls['six_relation_nonzero_identity'] = {'word': palindrome, 'paid_exponents': inverse_exps} + omitted = laurent(legal[:-1], exps[:-1], PAIRS, 5) + controls['omitted_type'] = difference_column(omitted, expected, 5) + wrong_target = dict(expected) + hub = 1 << 12 + wrong_target[(1, 1)] ^= hub + wrong_target.pop((1, 1)) + wrong_target[(1, 0)] ^= hub + controls['wrong_hub_target'] = difference_column(expected, wrong_target, 5) + return controls + + +def compute(): + return {'status': 'PASS_SHARED_HUB_TRIPLE_WORD_OBSTRUCTION', + 'geometry': geometry(), 'words': word_census(), + 'larger_fixtures': larger_fixtures(), 'controls': boundary_controls()} + +if __name__ == '__main__': + actual = json.loads(json.dumps(compute())) + expected = json.loads(Path(__file__).with_name('RESULT.json').read_text()) + require(actual == expected, 'exact committed receipt') + print(actual['status']) + print('68760 complete Laurent words; 1584 two-block endpoints') + print('24 larger fixtures; disjoint paid-subset targets and all boundary controls pass')