diff --git a/research/orthogonal-bridge-family-obstruction/CREDITS.md b/research/orthogonal-bridge-family-obstruction/CREDITS.md new file mode 100644 index 0000000000..acdabbac72 --- /dev/null +++ b/research/orthogonal-bridge-family-obstruction/CREDITS.md @@ -0,0 +1,49 @@ +# Attribution and source pins + +Ali Romman prepared this bridge-family proof and its checks with substantial +OpenAI Codex assistance. New work is Apache-2.0. This is not an 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 +[two-link construction and complete-pool exception](https://github.com/aliromman/integer-mult-bounds/blob/57e24923b609d2588b83321f530fa2a1e75ed364/research/edge-matching-even-attainment/PROOF.md). +That geometry and its image maximum remain prior results. The new result +concerns paid words on the named alphabet and its stated family extension. +The sixth projector and other +maximizing pools remain outside this theorem. + +Ali Romman's [PR #7695](https://github.com/CrocSwap/integer-mult-bounds/pull/7695), +head `996c002d82420141c19797e4e3b699ed88aee330`, supplies the +[Boolean diagonal partition, augmentation method and target matching](https://github.com/aliromman/integer-mult-bounds/blob/996c002d82420141c19797e4e3b699ed88aee330/research/orthogonal-basis-bridge-obstruction/PROOF.md). +Its [checker](https://github.com/aliromman/integer-mult-bounds/blob/996c002d82420141c19797e4e3b699ed88aee330/research/orthogonal-basis-bridge-obstruction/verify.py) +supplies the adapted binary matrix, exact rank, degree-two and Laurent +routines. The partition, exponent allocation, endpoint and census code +is adapted to a variable number of bridge types and both parities. Source code is copied +into this self-contained checker; no predecessor module is imported. + +The new proof computes the exact bridge-family star kernel, separates the +independent bridge-variable sets, and removes all collected blocks +from the full endpoint. Mutual commutation permits literal interleaving; +the one-bridge consecutive-block conclusion is not asserted here. + +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 proof](https://github.com/CubeJerry/integer-mult-bounds/blob/685457252b51b9c7932ece363365bdf0b12c9c31/research/bit-three-relation-core/FIVE-CORE-WORD.md) +and [original Laurent recurrence](https://github.com/CubeJerry/integer-mult-bounds/blob/685457252b51b9c7932ece363365bdf0b12c9c31/research/bit-three-relation-core/independent_five_word.py). +Ali Romman's [PR #7694](https://github.com/CrocSwap/integer-mult-bounds/pull/7694), +head `96b8b22f5925c4cf4514ed27575f465ebc95e51a`, supplies the +[edge-family extension](https://github.com/aliromman/integer-mult-bounds/blob/96b8b22f5925c4cf4514ed27575f465ebc95e51a/research/extremal-core-word-obstruction/PROOF.md) +used by PR #7695. Its contribution remains prior work. + +The [retained geometric credits](https://github.com/aliromman/integer-mult-bounds/blob/57e24923b609d2588b83321f530fa2a1e75ed364/research/edge-matching-even-attainment/CREDITS.md) +identify unpaidmoon's normal triples and alternative dimension-five pool, +Nick Petalas's links and one-edge bound, and the earlier pattern-fiber +work. Those geometric results are not counted as new here. Douglas +Colkitt and the repository contributors supplied the research framework, +task catalogue and package tools. + +SOURCES.json binds the main-branch provenance at +`e54523517d0f03e58352e647c403a5af3e525a57`. The unmerged consumed proof +and code commits are explicit above; they are not represented as +ancestors of main. Their complete replay suites were not rerun. diff --git a/research/orthogonal-bridge-family-obstruction/PROOF.md b/research/orthogonal-bridge-family-obstruction/PROOF.md new file mode 100644 index 0000000000..7c51252903 --- /dev/null +++ b/research/orthogonal-bridge-family-obstruction/PROOF.md @@ -0,0 +1,279 @@ +# An orthogonal fresh-bridge family cannot save paid rank + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +This is an all-width, all-length scalar-word proof with finite checks. +Independent human and formal-kernel review are not claimed. + +## 1. Alphabet and theorem + +Let E be an old coordinate space of dimension `N>=1`. Choose +`X in GL_N(F2)`. Its columns x_i and dual covectors y_i give the +orthogonal projectors `P_i=x_i y_i^T`. Put `h_x=sum_i x_i` and +`h_y=sum_i y_i`. Take b new, literal coordinate axes f_p, with `b>=1`. +Every projector is zero on any additional spectator coordinates. + +Use the following binary matrix and its row covectors z_p: + +```text +Z = I_b + (N modulo 2) J_b, +B_p = (h_x+f_p)(h_y+z_p)^T, p=1,...,b. +``` + +The pairings are `h_y h_x+Z_pq = N+Z_pq = delta_pq` over F2. +Thus all bridges are idempotent and `B_p B_q=0` for p different from q. +Their scalar calls commute. Require Z to be invertible, equivalently +`N*b` even. For even N, Z is the identity. For odd N and even b, +`Z^2=I_b`. If N and b are both odd, Z kills the nonzero all-one vector +and has rank b-1. That case is excluded. + +At b=2 these are the two links of the attaining family in +[PR #7707](https://github.com/CrocSwap/integer-mult-bounds/pull/7707), +[source construction](https://github.com/aliromman/integer-mult-bounds/blob/57e24923b609d2588b83321f530fa2a1e75ed364/research/edge-matching-even-attainment/PROOF.md), +extended here to an arbitrary old basis X and any permitted b. + +A word has m calls `I+([A_j]-1)P_type(j)` over `R=F2[H]`. The group +H is the torsion-free abelian group generated by the paid exponents +A_j. Every old type and every bridge type occur. There are no other types. +Let k be the actual off-diagonal pattern dimension of this alphabet, +and let `L=kernel(Z^m -> H)` be the saturated relation lattice. +Assume `rank(L)<=k` and a full ambient diagonal monomial endpoint. + +**Theorem.** No old call lies between the first and last occurrence +of any bridge type. By commuting only calls of different bridge types, +each type can be put in one block. Each block has exponent sum zero +and can be deleted on the full ambient space. Each physical target +exponent is then a sum of a disjoint subset of old paid exponents. +For rational address matrices, total target rank is at most total +paid rank. + +Calls of one bridge type need not be consecutive in the literal word. For +example, `B1, B2, B1, B2` can be a cancelling bridge segment. +The theorem does not cover additional types, a larger relation budget, +arbitrary fresh embeddings or every pool that attains the image bound. +It gives no native supplier or complete multiplication invoice. + +## 2. The inherited partition and linear kernel + +The Boolean partition argument of +[PR #7695](https://github.com/CrocSwap/integer-mult-bounds/pull/7695), +[pinned proof](https://github.com/aliromman/integer-mult-bounds/blob/996c002d82420141c19797e4e3b699ed88aee330/research/orthogonal-basis-bridge-obstruction/PROOF.md), +applies to every N. Define + +```text +K_X = {c in F2^N : X diag(c) X^-1 is diagonal}. +``` + +It is a unital algebra under coordinatewise product. Indices that +have the same value in every member form d blocks. Products of +separating members, or their complements, give each block indicator. +Thus K_X consists exactly of the block-constant vectors and has +dimension d. The sum of the P_i in a block C is a diagonal projection +on an original coordinate set S_C of size `|C|`. These sets partition E. + +The old pattern dimension is `N-d`. Each bridge has a distinct +nonzero fresh row against the old columns. Those rows make its pattern +independent of the old patterns and of all other bridge patterns. Hence +`k=N-d+b`. + +Give every call its own variable `u_j=T_j-1`. Write U_i for the sum +of variables of old type i, and L_p for the total of bridge type p. +First-order diagonality gives the following k independent forms: + +```text +L_p = 0 for every bridge type p, +U_i+U_ref(C) = 0 for each nonreference old type i in block C. +``` + +Every type occurs, so these forms are independent in the call +variables. Since H is paid-generated and free abelian, the defining +integer exact sequence splits. The substitution kernel on degree one +over F2 is `L/2L`, of dimension `rank(L)`. The assumed upper bound +therefore makes its dimension exactly k and gives the entire kernel. + +The associated graded algebra of R at augmentation is `Sym(H/2H)`. +Its substitution kernel is the ideal generated by these linear forms. +This is a statement about the associated graded algebra, not a claim +that all Laurent relations are linear. The method comes from +CubeJerry's [PR #6782](https://github.com/CrocSwap/integer-mult-bounds/pull/6782), +[five-core word proof](https://github.com/CubeJerry/integer-mult-bounds/blob/685457252b51b9c7932ece363365bdf0b12c9c31/research/bit-three-relation-core/FIVE-CORE-WORD.md), +and its extensions credited in PR #7695. + +## 3. The exact star kernel + +Change the old basis by X^-1 for the proof. Keep every f_p as its actual +coordinate axis. The old projectors become E_ii, and all old bridge +factors become the all-one vector of length N. The restricted physical +endpoint has an old block in +`A=X^-1 Diag(F2^N) X`, extended to R, and a fresh diagonal block. +Every binary matrix in A is idempotent. + +Let Q be the span of all `off(B_p)` and `A_off`, and put +`K_i,p=off(B_p E_ii+E_ii B_p)`. The dimension of Q is `N-d+b=k`. +Consider a dependence modulo Q: + +```text +sum_(i,p) c_i,p K_i,p = sum_p alpha_p off(B_p)+off(A0), +A0 in A. +``` + +Fresh row p against the old columns forces `c_i,p=alpha_p` for every i. +If N is odd, b is even and at least two. In each fresh row p, every +fresh off-diagonal entry on the right is alpha_p. The stars and A0 +have zero entries there. Every alpha_p is zero. Thus all Nb stars +are independent modulo Q. + +If N is even, the fresh block of each bridge is diagonal and gives no +further condition. The old block of the left side vanishes. Therefore +`off(A0)=(sum_p alpha_p)off(J_N)`. If the coefficient were one, A0 +would have the form `J_N+D` for binary diagonal D. Since N is even, +`J_N^2=0`. The diagonal of `(J_N+D)^2` is diag(D), while the diagonal +of `J_N+D` is one plus diag(D). This contradicts idempotence of A0. +Hence `sum_p alpha_p=0`. + +Conversely, every coefficient family `c_i,p=alpha_p` with +`sum_p alpha_p=0` gives a star combination in Q. The old blocks cancel, +and the cross rectangles are those of `sum_p alpha_p B_p`. Thus the +kernel has dimension b-1, with generators given by the sum of the stars +of bridge 1 and one other bridge. The star rank is `Nb-b+1`. +At b=1 this recovers the prior one-bridge independence. At b>1 the +dependences must be retained. + +## 4. Independent bridge variables force the chronology + +Project the universal word's off-diagonal terms to the quotient by Q. +Its terms of degree zero and one vanish before exponent substitution. +Nonlinear parts of that substitution cannot change its degree-two term. +Old/old products are diagonal. Products of different bridge types +are zero. Products of one bridge with itself are in Q. + +Only old/bridge products remain. Modulo L_p, the bridge prefix and +suffix at an old call are equal. The projected degree-two expression +is `sum_(i,p) K_i,p q_i,p`, where + +```text +q_i,p = sum over old calls j of type i + u_j times the sum of bridge-p variables before call j. +``` + +In the polynomial ring modulo the full linear-kernel ideal, odd N +gives `q_i,p=0`. For even N, q_i,p is independent of i for each p, +and `sum_p q_i,p=0` for every fixed i. This follows from the exact +star kernel. The statement holds coefficient by +coefficient in the binary star map, so it remains valid over the +quotient polynomial ring. + +Eliminate the last variable of every bridge using its L_p. Fix an +old type i. Make i the reference for its partition block. In each +other type of that block, eliminate one call variable using equality +with U_i. In each other block, choose a reference and eliminate one +call variable in every nonreference type. Every needed call exists. +These substitutions fix all variables still present in the q_i,p +for this i, and eliminate all remaining kernel forms. + +For odd N, each resulting polynomial is zero. For even N, their sum +over p is zero. Each polynomial uses only bridge-p variables, in +addition to the old type-i variables. Every term contains a bridge +variable. These monomial sets are disjoint. Every polynomial is zero +separately. This also covers a bridge with only one occurrence, +whose eliminated polynomial is already zero. + +Distinct old calls have distinct remaining variables. The coefficient +of each such variable is its bridge prefix after the last bridge +variable has been eliminated. A proper, nonempty chronological prefix +is a nonzero sum of the first bridge variables. It cannot be zero. +Thus no old call is between the first and last call of any bridge type. + +Each bridge type lies in one segment that contains only bridge calls. +All bridge types commute, so each can be collected within that +segment without crossing an old call. There are at most b resulting +bridge blocks, possibly with old maps between them. + +## 5. Every block vanishes on the full ambient space + +Let a block of type p have exponent total Z_p. Since Bp is idempotent, +its product is `I+([Z_p]-1)Bp`. Old maps are invertible on E and fix +the fresh coordinates. + +Consider the last-acting bridge block p. Since Z is invertible, there +is a binary fresh vector v with `z_p(v)=1` and `z_q(v)=0` for every +q different from p. Before block p, every old map and every other block +fixes v. Block p produces old component `([Z_p]-1)h_x`. The old map +after it is invertible. A full diagonal endpoint sends a fresh vector +to a fresh vector, so this old component must be zero. The nonzero +binary vector h_x then gives `[Z_p]=1`, hence `Z_p=0` in H. +Delete that block. Repeat the same argument for the last remaining +bridge block. Every bridge total is zero. + +These are identities for the original fixed ambient projectors, not +only for their restrictions to a selected image. The deletion therefore +holds on every input column, with all spectators retained. No free +physical change of basis is asserted. + +After deletion the old endpoint is `X diag([T_i]) X^-1`, where T_i +is the total paid exponent of old type i. For each monomial label, +its binary mask of types belongs to K_X. Therefore T_i is constant +on each partition block C. All original coordinates of S_C receive +this common label. Match them bijectively to the `|C|` old types in C. +Each target exponent is the sum of the calls of its matched type; +different targets use disjoint subsets. Fresh and unused coordinates +have identity and receive the empty subset. + +Rank subadditivity for rational address matrices now gives +`sum target ranks <= sum old paid ranks <= sum all paid ranks`. +The bridge calls remain charged in the original word. + +## 6. Scope of the even-image corollary + +Take the t unit pairs and r normal triples of PR #7707, with `t+r>0`. +Their old image and covector vectors are dual bases, with `N=2t+3r` +and `d=t+r`. The named alphabet with two fresh links has +`k=t+2r+2`, `nu=t` and `n=2t+3r+2`. This theorem excludes rank saving +for words that use every member of that named alphabet and have at +most k saturated exponent relations. + +The source proves that this alphabet is the complete pool except at +`(t,r)=(0,1)`. In that case the complete pool also contains `(28,28)`. +Its off-pattern is `off(B1)+off(B2)`. If that extra type is allowed, +the two first-order equations couple to its total instead of setting +both bridge totals to zero. It is outside the theorem. Other even +maximizers, including the different pool in unpaidmoon's +[PR #7094](https://github.com/CrocSwap/integer-mult-bounds/pull/7094), +are not included without a separate equivalence proof. + +## 7. Verification and limits + +The checker enumerates all 20335 bases in GL_N(F2) for N=1,2,3,4. +For every permitted b from one through four, it checks their Boolean +partitions, physical coordinate multiplicities, actual pattern ranks and +star kernels. This gives 81002 basis/bridge-count checks. Twelve finite +word domains cover 55250 type orders. Their degree-two tests and full +original-coordinate Laurent products agree. Exactly 10148 pass. +A separate count assigns each bridge species to one of the N+1 gaps +between old calls. In each gap it counts all multiset interleavings, +then sums over assignments and multiplies by N!. At b=2 this reduces +to `N! (N+1) (N+binomial(h1+h2,h1))`. + +Fifteen larger fixtures through old dimension ten and up to six bridges +include repeated old calls, three calls of one bridge, interleavings and +unused spectators. Deletion preserves their complete endpoints. +Removing one bridge call changes an explicit arbitrary fresh input. +Twenty wrong-parity links fail idempotence. Identifying the two free +bridge variables adds an exponent relation and hides one quadratic +rejection; the full Laurent endpoint still rejects that word. This +control checks why the independent-variable step needs its premise. +The exceptional sixth projector is checked as an excluded extra type. +Twelve odd-N, odd-b controls have an explicit nonzero common-kernel +vector on the fresh coordinates. Their singular Z is rejected. + +Two further controls separate exact exponent statements from parity. +Doubling all exponent vectors hides degree two in a larger ambient +group, but does not repair the full endpoint. This tests why the proof +uses the paid-generated group. A nonzero even bridge total retains +the allowed relation rank and passes degree two in a collected word, +but its full endpoint fails. The exact block-deletion argument is needed. + +The all-width and all-length conclusions use the written proof. +Finite tests do not enumerate all words or all old bases. No selected +cold replay, complete predecessor replay, native/physical implementation, +Lean, Docker, independent human or formal-kernel review was run. All +five selected assumptions remain. No new kappa is claimed. diff --git a/research/orthogonal-bridge-family-obstruction/README.md b/research/orthogonal-bridge-family-obstruction/README.md new file mode 100644 index 0000000000..65a87db2b0 --- /dev/null +++ b/research/orthogonal-bridge-family-obstruction/README.md @@ -0,0 +1,105 @@ +# No rank saving for the orthogonal fresh-bridge family + +An arbitrary old orthogonal binary projector basis plus the prescribed +family of b orthogonal fresh-coordinate links cannot save paid rank under +the stated relation budget. Use `Z=I_b+(N modulo 2)J_b` for the fresh +covectors and require `N*b` even, so Z is invertible. At b=2 these are +the links from [PR #7707](https://github.com/CrocSwap/integer-mult-bounds/pull/7707). +Every type must occur. The exponent group must be paid-generated, +torsion-free and abelian. The saturated relation rank must be at most +the actual pattern dimension k, and the full ambient endpoint must be +diagonal monomial. No additional projector type is allowed. + +No old call can lie between the first and last occurrence of any bridge +type. All bridge types commute, so their calls can interleave. Each type +can be collected into one block without crossing an old call. All block +totals are zero, and deleting them preserves every ambient input. Each +physical target exponent is then a sum of a disjoint paid subset. Rank +subadditivity gives total target rank at most paid rank. No new kappa follows. + +PROOF.md states the all-width and all-length theorem. RESULT.json records +the finite checks. The star rank is Nb for odd old dimension and `Nb-b+1` +for even old dimension. Independent sets of bridge variables force the +chronology despite the b-1 star dependences in the even case. The actual +pattern dimension is `k=N-d+b`, where d is the old Boolean partition size. + +The named pair/triple attaining alphabets of PR #7707 are covered when +all their members occur and the relation budget holds. At (k,nu,n)=(4,0,5), +the source's complete pool has a sixth projector. That extra type changes +the first-order equations and is excluded. Other even maximizers, larger +relation budgets and arbitrary fresh embeddings are outside the theorem. +The old geometric maximum remains a source result. + +## Reproduction + +Use CPython 3.12 and the standard library from the repository root: + +```sh +python3 -B scripts/research_package.py --package research/orthogonal-bridge-family-obstruction +``` + +For a standalone package: + +```sh +python3 -I -W error -B research/orthogonal-bridge-family-obstruction/verify.py +python3 -I -W error -B -O research/orthogonal-bridge-family-obstruction/verify.py +``` + +Both modes print: + +```text +PASS_ORTHOGONAL_BRIDGE_FAMILY_OBSTRUCTION +20335 bases; 81002 basis/bridge checks; 55250 full Laurent words; 10148 passing orders +15 larger fixtures; all bridge totals vanish in the stated class. +``` + +The basis census covers all GL_N(F2) for N=1,2,3,4, with actual physical +partitions and star quotients. For each permitted b from one through four, +this gives 81002 basis/bridge-count checks. All 55250 word orders have +degree-two and complete Laurent checks. A separate gap count confirms +the 10148 passing orders. Fifteen larger fixtures through old dimension +ten and up to six bridges include repeated old calls, three calls of one +bridge, literal interleavings and unused spectators. Complete deletion +and physical target labels agree. + +Removing a bridge call changes an arbitrary fresh-input column. Twenty +wrong-parity links fail idempotence. Identifying bridge variables adds a +relation and hides a quadratic rejection, but the full endpoint still +fails. The sixth-projector control checks its changed first-order kernel. +Twelve odd-N, odd-b fixtures have explicit common-kernel vectors and are +rejected for their singular fresh pairing. Two further controls separate +exact exponent totals from parity and check use of the paid-generated +group. These controls do not assert that a larger class saves rank. + +The source routines and proof methods are adapted, with explicit pins in +CREDITS.md. Their full suites were not rerun. No selected cold replay, +native or physical implementation, Lean, Docker, human or formal-kernel +review was run. All five selected assumptions remain. The result supplies +no complete multiplication invoice and changes no selected frontier. + +## Task and overlap + +Base: current main `e54523517d0f03e58352e647c403a5af3e525a57`, priority +revision 8. The `bit-helper-contract` card is narrowed to this full-endpoint +word obligation. The selected binding check passed. Live handoffs, +source-reference intake and phrase searches found no competing claim +for this bridge-family word theorem. The complete closed cache and its +updated-order delta were checked. Sparse local and unpublished work +remain limitations. The [claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19710858) +records the original two-link task and its explicit generalization within +the same result. This is a bounded proof continuation, not a new native +construction. + +## Open next questions + +1. Can the exceptional six-projector pool support a saving? Start with its + coupled first-order totals. The present bridge-variable separation + does not apply. Keep the actual relation rank and full endpoint. +2. Do other even maximizing pools or specified extra relations admit a + legal word? State the exact alphabet and paid/target invoice first. + Failure of this theorem's hypotheses is not evidence of a saving. + +Prepared by Ali Romman with substantial OpenAI Codex assistance under +Apache-2.0. Credit CubeJerry for the original chronology and Laurent +methods, Ali Romman for the consumed arbitrary-basis extension and +two-link geometry, and the earlier contributors named in CREDITS.md. diff --git a/research/orthogonal-bridge-family-obstruction/RESULT.json b/research/orthogonal-bridge-family-obstruction/RESULT.json new file mode 100644 index 0000000000..d15d925f36 --- /dev/null +++ b/research/orthogonal-bridge-family-obstruction/RESULT.json @@ -0,0 +1,778 @@ +{ + "bases": [ + { + "N": 1, + "bases": 1, + "basis_bridge_checks": 2, + "bridge_counts": [ + 2, + 4 + ], + "certificate_sha256": "bf75be098c85b87b9d14b33831f672248293024a190d9abce5042dfa466aacd7", + "partitions": { + "(2, (1,))": 1, + "(4, (1,))": 1 + } + }, + { + "N": 2, + "bases": 6, + "basis_bridge_checks": 24, + "bridge_counts": [ + 1, + 2, + 3, + 4 + ], + "certificate_sha256": "fbe2dd1d2af4bde2753fbd64b730597c65adb018f833e16c63a8a41365989dd1", + "partitions": { + "(1, (1, 1))": 2, + "(1, (2,))": 4, + "(2, (1, 1))": 2, + "(2, (2,))": 4, + "(3, (1, 1))": 2, + "(3, (2,))": 4, + "(4, (1, 1))": 2, + "(4, (2,))": 4 + } + }, + { + "N": 3, + "bases": 168, + "basis_bridge_checks": 336, + "bridge_counts": [ + 2, + 4 + ], + "certificate_sha256": "fc452bfd0e089249f099a3ad8ac1c457ff8bcd1d3409c10081efade45b21e564", + "partitions": { + "(2, (1, 1, 1))": 6, + "(2, (1, 2))": 36, + "(2, (3,))": 126, + "(4, (1, 1, 1))": 6, + "(4, (1, 2))": 36, + "(4, (3,))": 126 + } + }, + { + "N": 4, + "bases": 20160, + "basis_bridge_checks": 80640, + "bridge_counts": [ + 1, + 2, + 3, + 4 + ], + "certificate_sha256": "b31fee92326e31948d8718058149a8dbecb97e4b0a2cc80f5ba6177ed2ef1754", + "partitions": { + "(1, (1, 1, 1, 1))": 24, + "(1, (1, 1, 2))": 288, + "(1, (1, 3))": 2016, + "(1, (2, 2))": 288, + "(1, (4,))": 17544, + "(2, (1, 1, 1, 1))": 24, + "(2, (1, 1, 2))": 288, + "(2, (1, 3))": 2016, + "(2, (2, 2))": 288, + "(2, (4,))": 17544, + "(3, (1, 1, 1, 1))": 24, + "(3, (1, 1, 2))": 288, + "(3, (1, 3))": 2016, + "(3, (2, 2))": 288, + "(3, (4,))": 17544, + "(4, (1, 1, 1, 1))": 24, + "(4, (1, 1, 2))": 288, + "(4, (1, 3))": 2016, + "(4, (2, 2))": 288, + "(4, (4,))": 17544 + } + } + ], + "controls": { + "even_nonzero_bridge_total_control": { + "full_endpoint_rejected": true, + "order": [ + 0, + 1, + 2, + 2, + 3, + 3 + ], + "relation_rank": 3 + }, + "extra_sixth_projector": { + "off_pattern": "off(B1)+off(B2)", + "outside_named_alphabet": true, + "pair": [ + 28, + 28 + ] + }, + "larger_ambient_group_false_positive": { + "all_exponents_doubled": true, + "full_endpoint_rejected": true + }, + "merged_bridge_variable_false_positive": { + "mutant_full_endpoint_rejected": true, + "mutant_relation_rank": 4, + "order": [ + 2, + 3, + 0, + 1, + 2, + 3 + ], + "valid_relation_rank": 3 + }, + "singular_fresh_pairing_controls": [ + { + "N": 1, + "b": 1, + "common_kernel_vector": 2 + }, + { + "N": 1, + "b": 3, + "common_kernel_vector": 14 + }, + { + "N": 1, + "b": 5, + "common_kernel_vector": 62 + }, + { + "N": 3, + "b": 1, + "common_kernel_vector": 8 + }, + { + "N": 3, + "b": 3, + "common_kernel_vector": 56 + }, + { + "N": 3, + "b": 5, + "common_kernel_vector": 248 + }, + { + "N": 5, + "b": 1, + "common_kernel_vector": 32 + }, + { + "N": 5, + "b": 3, + "common_kernel_vector": 224 + }, + { + "N": 5, + "b": 5, + "common_kernel_vector": 992 + }, + { + "N": 7, + "b": 1, + "common_kernel_vector": 128 + }, + { + "N": 7, + "b": 3, + "common_kernel_vector": 896 + }, + { + "N": 7, + "b": 5, + "common_kernel_vector": 3968 + } + ], + "wrong_parity_links_rejected": 20 + }, + "domains": [ + { + "N": 1, + "b": 2, + "bridge_calls": [ + 2, + 2 + ], + "counts": { + "orders": 30, + "passing": 14 + }, + "full_laurent": true, + "groups": [ + [ + 0 + ] + ], + "k": 2, + "name": "coordinate1" + }, + { + "N": 2, + "b": 2, + "bridge_calls": [ + 2, + 2 + ], + "counts": { + "orders": 180, + "passing": 48 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1 + ] + ], + "k": 3, + "name": "edge2" + }, + { + "N": 3, + "b": 2, + "bridge_calls": [ + 2, + 2 + ], + "counts": { + "orders": 1260, + "passing": 216 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1, + 2 + ] + ], + "k": 4, + "name": "normal3" + }, + { + "N": 3, + "b": 2, + "bridge_calls": [ + 2, + 2 + ], + "counts": { + "orders": 1260, + "passing": 216 + }, + "full_laurent": true, + "groups": [ + [ + 0 + ], + [ + 1 + ], + [ + 2 + ] + ], + "k": 2, + "name": "coordinate3" + }, + { + "N": 4, + "b": 2, + "bridge_calls": [ + 2, + 2 + ], + "counts": { + "orders": 10080, + "passing": 1200 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1, + 2, + 3 + ] + ], + "k": 5, + "name": "quad4" + }, + { + "N": 4, + "b": 2, + "bridge_calls": [ + 2, + 2 + ], + "counts": { + "orders": 10080, + "passing": 1200 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1 + ], + [ + 2, + 3 + ] + ], + "k": 4, + "name": "two_edges" + }, + { + "N": 2, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "counts": { + "orders": 420, + "passing": 72 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1 + ] + ], + "k": 3, + "name": "edge2_three_calls" + }, + { + "N": 3, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "counts": { + "orders": 3360, + "passing": 312 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1, + 2 + ] + ], + "k": 4, + "name": "normal3_three_calls" + }, + { + "N": 2, + "b": 1, + "bridge_calls": [ + 3 + ], + "counts": { + "orders": 20, + "passing": 6 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1 + ] + ], + "k": 2, + "name": "edge2_one_bridge" + }, + { + "N": 4, + "b": 1, + "bridge_calls": [ + 3 + ], + "counts": { + "orders": 840, + "passing": 120 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1, + 2, + 3 + ] + ], + "k": 4, + "name": "quad4_one_bridge" + }, + { + "N": 2, + "b": 3, + "bridge_calls": [ + 2, + 2, + 2 + ], + "counts": { + "orders": 5040, + "passing": 768 + }, + "full_laurent": true, + "groups": [ + [ + 0, + 1 + ] + ], + "k": 4, + "name": "edge2_three_bridges" + }, + { + "N": 1, + "b": 4, + "bridge_calls": [ + 2, + 2, + 2, + 2 + ], + "counts": { + "orders": 22680, + "passing": 5976 + }, + "full_laurent": true, + "groups": [ + [ + 0 + ] + ], + "k": 4, + "name": "coordinate1_four_bridges" + } + ], + "larger_checks": [ + { + "N": 1, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 1, + "k": 2, + "name": "coordinate1", + "old_calls": 2, + "omitted_bridge_changes_columns": [ + 2 + ], + "target_blocks": [ + 1 + ], + "width": 5 + }, + { + "N": 2, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 0, + "k": 3, + "name": "edge2", + "old_calls": 3, + "omitted_bridge_changes_columns": [ + 2 + ], + "target_blocks": [ + 3 + ], + "width": 6 + }, + { + "N": 3, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 0, + "k": 4, + "name": "normal3", + "old_calls": 4, + "omitted_bridge_changes_columns": [ + 4 + ], + "target_blocks": [ + 7 + ], + "width": 7 + }, + { + "N": 4, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 0, + "k": 5, + "name": "quad4", + "old_calls": 5, + "omitted_bridge_changes_columns": [ + 4 + ], + "target_blocks": [ + 15 + ], + "width": 8 + }, + { + "N": 5, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 0, + "k": 5, + "name": "edge_triple5", + "old_calls": 6, + "omitted_bridge_changes_columns": [ + 6 + ], + "target_blocks": [ + 3, + 28 + ], + "width": 9 + }, + { + "N": 6, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 0, + "k": 6, + "name": "two_triples6", + "old_calls": 7, + "omitted_bridge_changes_columns": [ + 6 + ], + "target_blocks": [ + 7, + 56 + ], + "width": 10 + }, + { + "N": 7, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 7, + "k": 2, + "name": "coordinate7", + "old_calls": 8, + "omitted_bridge_changes_columns": [ + 8 + ], + "target_blocks": [ + 1, + 2, + 4, + 8, + 16, + 32, + 64 + ], + "width": 11 + }, + { + "N": 8, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 0, + "k": 9, + "name": "orthogonal8", + "old_calls": 9, + "omitted_bridge_changes_columns": [ + 8 + ], + "target_blocks": [ + 255 + ], + "width": 12 + }, + { + "N": 9, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 9, + "k": 2, + "name": "coordinate9", + "old_calls": 10, + "omitted_bridge_changes_columns": [ + 10 + ], + "target_blocks": [ + 1, + 2, + 4, + 8, + 16, + 32, + 64, + 128, + 256 + ], + "width": 13 + }, + { + "N": 10, + "b": 2, + "bridge_calls": [ + 3, + 2 + ], + "coordinate_old_types": 0, + "k": 11, + "name": "orthogonal10", + "old_calls": 11, + "omitted_bridge_changes_columns": [ + 10 + ], + "target_blocks": [ + 1023 + ], + "width": 14 + }, + { + "N": 2, + "b": 3, + "bridge_calls": [ + 3, + 2, + 2 + ], + "coordinate_old_types": 0, + "k": 4, + "name": "edge2_three_bridges", + "old_calls": 3, + "omitted_bridge_changes_columns": [ + 2 + ], + "target_blocks": [ + 3 + ], + "width": 7 + }, + { + "N": 4, + "b": 1, + "bridge_calls": [ + 3 + ], + "coordinate_old_types": 0, + "k": 4, + "name": "quad4_one_bridge", + "old_calls": 5, + "omitted_bridge_changes_columns": [ + 4 + ], + "target_blocks": [ + 15 + ], + "width": 7 + }, + { + "N": 1, + "b": 4, + "bridge_calls": [ + 3, + 2, + 2, + 2 + ], + "coordinate_old_types": 1, + "k": 4, + "name": "coordinate1_four_bridges", + "old_calls": 2, + "omitted_bridge_changes_columns": [ + 2, + 3, + 4 + ], + "target_blocks": [ + 1 + ], + "width": 7 + }, + { + "N": 3, + "b": 4, + "bridge_calls": [ + 3, + 2, + 2, + 2 + ], + "coordinate_old_types": 0, + "k": 6, + "name": "normal3_four_bridges", + "old_calls": 4, + "omitted_bridge_changes_columns": [ + 4, + 5, + 6 + ], + "target_blocks": [ + 7 + ], + "width": 9 + }, + { + "N": 2, + "b": 6, + "bridge_calls": [ + 3, + 2, + 2, + 2, + 2, + 2 + ], + "coordinate_old_types": 0, + "k": 7, + "name": "edge2_six_bridges", + "old_calls": 3, + "omitted_bridge_changes_columns": [ + 2 + ], + "target_blocks": [ + 3 + ], + "width": 10 + } + ], + "status": "PASS_ORTHOGONAL_BRIDGE_FAMILY_OBSTRUCTION" +} diff --git a/research/orthogonal-bridge-family-obstruction/SOURCES.json b/research/orthogonal-bridge-family-obstruction/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/orthogonal-bridge-family-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/orthogonal-bridge-family-obstruction/TASK.json b/research/orthogonal-bridge-family-obstruction/TASK.json new file mode 100644 index 0000000000..4e06d59a20 --- /dev/null +++ b/research/orthogonal-bridge-family-obstruction/TASK.json @@ -0,0 +1,83 @@ +{ + "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": "Full ambient word obstruction for an arbitrary old orthogonal binary basis and b prescribed orthogonal fresh-coordinate bridges with independent fresh covectors, at the actual pattern relation budget.", + "scope_change_reason": "The two-link paid-word question from PR7707 led to a common proof for the stated bridge family. The claim records the generalization within this one result.", + "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 scoped all-length theorem and bounded exact word checks; do not extend to extra types, singular fresh pairings or a native implementation.", + "outcome": "completed", + "evidence": "PROOF.md; RESULT.json; 20335 old bases, 81002 basis/bridge-count checks, 55250 full Laurent words, fifteen larger fixtures and boundary controls.", + "author": "Ali Romman", + "ai_assistance": "Substantial OpenAI Codex assistance. Prior binary, Laurent, partition and augmentation methods are adapted and attributed; this is not an independent source review.", + "open_questions": [ + { + "question": "Can the exceptional six-projector pool save rank?", + "why_it_matters": "Its extra pattern changes the bridge-total constraints and is outside this theorem.", + "first_step": "Derive the coupled first-order kernel for the actual six-type alphabet.", + "blocked_by": "The independent bridge-variable argument does not transfer." + }, + { + "question": "Can a different even maximizer or a specified larger relation budget support a legal word?", + "why_it_matters": "The obstruction is source-class specific, not universal.", + "first_step": "State the exact projector alphabet, relation lattice, full endpoint and signed bill.", + "blocked_by": "A full word and native realization remain unsupplied." + } + ] +} diff --git a/research/orthogonal-bridge-family-obstruction/VERIFY.json b/research/orthogonal-bridge-family-obstruction/VERIFY.json new file mode 100644 index 0000000000..2d75732b88 --- /dev/null +++ b/research/orthogonal-bridge-family-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 both parity star kernels for the permitted bridge counts, all small old bases, complete Laurent words, full ambient deletion, physical targets and boundary controls." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Check both parity star kernels for the permitted bridge counts, all small old bases, complete Laurent words, full ambient deletion, physical targets and boundary controls." + } + ] +} diff --git a/research/orthogonal-bridge-family-obstruction/verify.py b/research/orthogonal-bridge-family-obstruction/verify.py new file mode 100644 index 0000000000..80d11d6fb7 --- /dev/null +++ b/research/orthogonal-bridge-family-obstruction/verify.py @@ -0,0 +1,443 @@ +"""Exact checks for the prescribed orthogonal fresh-bridge family. + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +Binary, rank, quadratic and Laurent routines adapt PR7695 and its +credited CubeJerry PR6782 and Ali Romman PR7694 sources. The proof +and checker are author-checked, not an independent source review. +""" +from collections import Counter +from fractions import Fraction +from math import factorial +from pathlib import Path +import hashlib +import itertools +import json + + +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 dual(xs): + n = len(xs) + require(len(basis(xs)) == n, 'invertible old image basis') + return tuple(next(y for y in range(1, 1 << n) + if [(y & x).bit_count() % 2 for x in xs] == [int(i == j) for j in range(n)]) + for i in range(n)) + + +def frame(xs, b, with_products=False): + N, ys = len(xs), dual(xs) + require(N >= 1 and b >= 1, 'positive old and fresh dimensions') + width, diagonal = N + b, identity(N + b) + old = [outer(x, y, width) for x, y in zip(xs, ys)] + kernel, diagonal_sums = [], {} + for mask in range(1 << N): + matrix = 0 + for i, value in enumerate(old): + if mask >> i & 1: + matrix ^= value + if not matrix & ~diagonal: + kernel.append(mask) + diagonal_sums[mask] = matrix + signatures = {} + for i in range(N): + signatures.setdefault(tuple(mask >> i & 1 for mask in kernel), []).append(i) + groups = list(signatures.values()) + indicators = [sum(1 << i for i in group) for group in groups] + require(len(kernel) == 1 << len(groups) and all(mask in kernel for mask in indicators), + 'Boolean partition is complete') + active = [sum((diagonal_sums[mask] >> (j * width + j) & 1) << j for j in range(N)) + for mask in indicators] + require(all(mask.bit_count() == len(group) for mask, group in zip(active, groups)), + 'physical target multiplicity') + require(sum(active) == (1 << N) - 1 + and all(not a & b for a, b in itertools.combinations(active, 2)), + 'physical supports partition the old coordinates') + hx = hy = 0 + for x, y in zip(xs, ys): + hx ^= x + hy ^= y + z = tuple((1 << p) ^ ((1 << b) - 1 if N % 2 else 0) for p in range(b)) + require(len(basis(z)) == b, 'independent fresh covectors') + pairs = list(zip(xs, ys)) + [(hx | (1 << (N + p)), hy | (z[p] << N)) for p in range(b)] + require(all((x & y).bit_count() % 2 for x, y in pairs), 'all types idempotent') + require(all((pairs[N + p][1] & pairs[N + q][0]).bit_count() % 2 == int(p == q) + for p in range(b) for q in range(b)), + 'the bridges are mutually orthogonal') + k = N - len(groups) + b + require(len(basis(outer(x, y, width) & ~diagonal for x, y in pairs)) == k, + 'actual ambient pattern dimension') + allowed = [outer(sum(((ys[i] >> j) & 1) << i for i in range(N)), + sum(((xs[i] >> j) & 1) << i for i in range(N)), width) & ~diagonal + for j in range(N)] + ones = (1 << N) - 1 + normalized = [(1 << i, 1 << i) for i in range(N)] + [ + (ones | (1 << (N + p)), ones | (z[p] << N)) for p in range(b)] + bridges = [outer(*pair, width) for pair in normalized[N:]] + Q = basis([matrix & ~diagonal for matrix in bridges] + allowed) + require(len(Q) == k, 'endpoint quotient dimension') + stars = [reduce_vector((left_project(normalized[i], bridges[p], width) + ^ left_project(normalized[N + p], outer(*normalized[i], width), width)) + & ~diagonal, Q) for p in range(b) for i in range(N)] + star_rank = len(basis(stars)) + require(star_rank == N * b - (b - 1 if N % 2 == 0 else 0), 'parity-dependent star rank') + if N % 2 == 0: + for p in range(1, b): + total = 0 + for i in range(N): + total ^= stars[i] ^ stars[p * N + i] + require(total == 0, 'even bridge-pair star dependence') + products = {(i, j): reduce_vector(left_project(a, outer(*b, width), width) & ~diagonal, Q) + for i, a in enumerate(normalized) for j, b in enumerate(normalized)} if with_products else {} + return {'N': N, 'b': b, 'xs': tuple(xs), 'ys': ys, 'groups': groups, 'active': active, + 'k': k, 'star_rank': star_rank, 'pairs': pairs, 'products': products, + 'coordinate_old_types': sum(not matrix & ~diagonal for matrix in old)} + + +def census(N): + counts = Counter() + digest = hashlib.sha256() + bridge_counts = [b for b in range(1, 5) if N * b % 2 == 0] + distinct = 0 + for xs in itertools.permutations(range(1, 1 << N), N): + if len(basis(xs)) != N: + continue + distinct += 1 + for b in bridge_counts: + row = frame(xs, b) + counts[str((b, tuple(sorted(map(len, row['groups'])))))] += 1 + record = {name: row[name] for name in ['b', 'xs', 'ys', 'groups', 'active', 'k', 'star_rank']} + digest.update((json.dumps(record, sort_keys=True) + '\n').encode()) + require(distinct == {1: 1, 2: 6, 3: 168, 4: 20160}[N], 'complete basis census') + require(sum(counts.values()) == distinct * len(bridge_counts), 'all valid fresh dimensions') + return {'N': N, 'bases': distinct, 'basis_bridge_checks': sum(counts.values()), + 'bridge_counts': bridge_counts, 'partitions': dict(sorted(counts.items())), + 'certificate_sha256': digest.hexdigest()} + + +def type_orders(N, hs): + counts = [1] * N + list(hs) + size = sum(counts) + def walk(prefix): + if len(prefix) == size: + yield tuple(prefix) + return + for kind, count in enumerate(counts): + if count: + counts[kind] -= 1 + prefix.append(kind) + yield from walk(prefix) + prefix.pop() + counts[kind] += 1 + yield from walk([]) + + +def gap_count(N, hs): + total = 0 + for assignment in itertools.product(range(N + 1), repeat=len(hs)): + ways = 1 + for gap in range(N + 1): + multiplicities = [h for h, chosen in zip(hs, assignment) if chosen == gap] + interleavings = factorial(sum(multiplicities)) + for h in multiplicities: + interleavings //= factorial(h) + ways *= interleavings + total += ways + return factorial(N) * total + + +def allocate(order, groups, b): + N = sum(map(len, groups)) + positions = {kind: [i for i, value in enumerate(order) if value == kind] for kind in range(N + b)} + require(all(positions.values()), 'every type occurs') + dependent = {positions[kind][-1] for kind in range(N, N + b)} + for group in groups: + dependent.update(positions[kind][-1] for kind in group[1:]) + free = [i for i in range(len(order)) if i not in dependent] + r = len(free) + exps = [[0] * r for _ in order] + for j, pos in enumerate(free): + exps[pos][j] = 1 + for group in groups: + total = [sum(exps[pos][j] for pos in positions[group[0]]) for j in range(r)] + for kind in group[1:]: + pos = positions[kind][-1] + exps[pos] = [total[j] - sum(exps[other][j] for other in positions[kind] if other != pos) + for j in range(r)] + for kind in range(N, N + b): + pos = positions[kind][-1] + exps[pos] = [-sum(exps[other][j] for other in positions[kind][:-1]) for j in range(r)] + require(len(dependent) == N - len(groups) + b, 'exact relation count') + require(all(tuple(int(i == j) for i in range(r)) in map(tuple, exps) for j in range(r)), + 'paid exponents generate the full free group') + return [tuple(row) for row in exps] + + +def chronology(order, N, b): + for kind in range(N, N + b): + positions = [i for i, value in enumerate(order) if value == kind] + if any(value < N for value in order[positions[0]:positions[-1] + 1]): + return False + return True + + +def endpoint(row, order, exps, width): + N, r = row['N'], len(exps[0]) + totals = [tuple(sum(value[j] for kind, value in zip(order, exps) if kind == i) + for j in range(r)) for i in range(N)] + expected = {(0,) * r: sum(1 << (i * width + i) for i in range(N, width))} + for group, active in zip(row['groups'], row['active']): + require(all(totals[i] == totals[group[0]] for i in group), 'equal block totals') + mask = sum(1 << (i * width + i) for i in range(N) if active >> i & 1) + label = totals[group[0]] + expected[label] = expected.get(label, 0) ^ mask + return {key: value for key, value in expected.items() if value} + + +def domain(name, xs, hs): + b = len(hs) + row = frame(xs, b, True) + N, width = row['N'], row['N'] + b + counts = Counter() + for order in type_orders(N, hs): + exps = allocate(order, row['groups'], b) + legal = chronology(order, N, b) + require((not quadratic(order, exps, row['products'])) == legal, 'quadratic chronology') + actual = laurent(order, exps, row['pairs'], width) + expected = endpoint(row, order, exps, width) + require((actual == expected) == legal, 'full ambient endpoint') + if not legal: + require(any(value & ~identity(width) for value in actual.values()), + 'failed chronology gives a nondiagonal word') + counts['orders'] += 1 + counts['passing'] += legal + expected_count = factorial(N + sum(hs)) + for h in hs: + expected_count //= factorial(h) + require(counts['orders'] == expected_count, 'all multiset orders') + require(counts['passing'] == gap_count(N, hs), 'independent gap count') + order = next(type_orders(N, hs)) + exps = allocate(order, row['groups'], b) + require(len(exps) - rational_rank(exps) == row['k'], 'actual saturated relation rank') + return {'name': name, 'N': N, 'b': b, 'k': row['k'], 'groups': row['groups'], 'bridge_calls': hs, + 'full_laurent': True, 'counts': dict(counts)} + + +def larger_checks(): + fixtures = [('coordinate1', (1,)), ('edge2', (1, 3)), ('normal3', (6, 5, 7)), + ('quad4', (14, 13, 11, 7)), ('edge_triple5', (1, 3, 24, 20, 28)), + ('two_triples6', (6, 5, 7, 48, 40, 56)), + ('coordinate7', tuple(1 << i for i in range(7))), + ('orthogonal8', tuple(255 ^ (1 << i) for i in range(8))), + ('coordinate9', tuple(1 << i for i in range(9))), + ('orthogonal10', tuple(1023 ^ (1 << i) for i in range(10)))] + results = [] + fixtures = [(name, xs, 2) for name, xs in fixtures] + [ + ('edge2_three_bridges', (1, 3), 3), ('quad4_one_bridge', (14, 13, 11, 7), 1), + ('coordinate1_four_bridges', (1,), 4), ('normal3_four_bridges', (6, 5, 7), 4), + ('edge2_six_bridges', (1, 3), 6)] + for name, xs, b in fixtures: + row = frame(xs, b, True) + N, width = row['N'], row['N'] + b + 2 + old = (0, 0) + tuple(range(1, N)) + middle = tuple(range(N, N + b)) * 2 + (N,) + order = old[:len(old)//2] + middle + old[len(old)//2:] + exps = allocate(order, row['groups'], b) + require(len(exps) - rational_rank(exps) == row['k'], 'repeated calls retain exact relation rank') + require(chronology(order, N, b), 'interleaving contains no old call') + require(not quadratic(order, exps, row['products']), 'interleaving quadratic endpoint') + actual = laurent(order, exps, row['pairs'], width) + kept = [(kind, exponent) for kind, exponent in zip(order, exps) if kind < N] + deleted = laurent([kind for kind, _ in kept], [exponent for _, exponent in kept], row['pairs'], width) + require(actual == deleted == endpoint(row, order, exps, width), + 'full ambient deletion and target multiplicities') + omitted = order.index(N) + wrong = laurent(order[:omitted] + order[omitted + 1:], exps[:omitted] + exps[omitted + 1:], row['pairs'], width) + delta = [wrong.get(key, 0) ^ actual.get(key, 0) for key in wrong.keys() | actual.keys()] + changed = [j for j in range(N, N + b) if any(any(value >> (i * width + j) & 1 for i in range(width)) for value in delta)] + require(changed, 'an omitted bridge changes an arbitrary fresh input') + require(any(value < N for value in order) and (b == 1 or middle != tuple(sorted(middle))), 'literal bridge interleaving') + results.append({'name': name, 'N': N, 'b': b, 'width': width, 'k': row['k'], + 'old_calls': len(old), 'bridge_calls': [3] + [2] * (b - 1), + 'coordinate_old_types': row['coordinate_old_types'], + 'target_blocks': row['active'], 'omitted_bridge_changes_columns': changed}) + return results + + +def controls(): + row = frame((1, 3), 2, True) + order = (2, 3, 0, 1, 2, 3) + exps = allocate(order, row['groups'], 2) + require(quadratic(order, exps, row['products']), 'independent bridge variables reject an old interposition') + merged = [tuple([x[0] + x[1]] + list(x[2:])) for x in exps] + require(len(exps) - rational_rank(exps) == row['k'], 'valid relation budget') + require(len(merged) - rational_rank(merged) == row['k'] + 1, 'merged variables add a relation') + require(not quadratic(order, merged, row['products']), 'merged variables hide the quadratic rejection') + wrong = laurent(order, merged, row['pairs'], 4) + require(any(value & ~identity(4) for value in wrong.values()), 'the false positive fails the full endpoint') + doubled = [tuple(2 * value for value in exponent) for exponent in exps] + require(not quadratic(order, doubled, row['products']), 'a larger ambient exponent group hides degree two') + require(any(value & ~identity(4) for value in laurent(order, doubled, row['pairs'], 4).values()), + 'doubling exponents does not repair the full endpoint') + collected = (0, 1, 2, 2, 3, 3) + warped = allocate(collected, row['groups'], 2) + warped[3] = warped[2] + require(len(warped) - rational_rank(warped) == row['k'], 'parity-preserving warp retains relation rank') + require(not quadratic(collected, warped, row['products']), 'a nonzero even bridge total passes degree two') + require(any(value & ~identity(4) for value in laurent(collected, warped, row['pairs'], 4).values()), + 'the full endpoint rejects a nonzero even bridge total') + normal = frame((6, 5, 7), 2) + extra = (28, 28) + require(extra not in normal['pairs'] and (extra[0] & extra[1]).bit_count() % 2, + 'the sixth projector is an additional idempotent') + pattern = outer(*extra, 5) & ~identity(5) + bridge_sum = outer(*normal['pairs'][3], 5) ^ outer(*normal['pairs'][4], 5) + require(pattern == bridge_sum & ~identity(5), 'the sixth pattern couples the two bridge totals') + require(all((extra[0] & y).bit_count() % 2 == 0 and (extra[1] & x).bit_count() % 2 == 0 + for x, y in normal['pairs'][3:]), 'the sixth projector is orthogonal to both bridges') + wrong_parity = 0 + for N in range(1, 11): + z = (1, 2) if N % 2 else (2, 1) + ones = (1 << N) - 1 + for p in range(2): + x, y = ones | (1 << (N + p)), ones | (z[p] << N) + require((x & y).bit_count() % 2 == 0, 'wrong fresh pairing must fail idempotence') + wrong_parity += 1 + singular = [] + for N in (1, 3, 5, 7): + for b in (1, 3, 5): + z = tuple(((1 << b) - 1) ^ (1 << p) for p in range(b)) + require(len(basis(z)) == b - 1, 'odd/odd fresh rank defect') + kernel = ((1 << b) - 1) << N + ones = (1 << N) - 1 + pairs = [(1 << i, 1 << i) for i in range(N)] + [ + (ones | (1 << (N + p)), ones | (z[p] << N)) for p in range(b)] + require(all((y & kernel).bit_count() % 2 == 0 for _, y in pairs), 'actual common-kernel vector') + rejected = False + try: + frame(tuple(1 << i for i in range(N)), b) + except ValueError as error: + rejected = str(error) == 'independent fresh covectors' + require(rejected, 'singular pairing is outside the theorem') + singular.append({'N': N, 'b': b, 'common_kernel_vector': kernel}) + return {'merged_bridge_variable_false_positive': {'order': order, 'valid_relation_rank': row['k'], + 'mutant_relation_rank': row['k'] + 1, 'mutant_full_endpoint_rejected': True}, + 'extra_sixth_projector': {'pair': extra, 'off_pattern': 'off(B1)+off(B2)', + 'outside_named_alphabet': True}, + 'larger_ambient_group_false_positive': {'all_exponents_doubled': True, 'full_endpoint_rejected': True}, + 'even_nonzero_bridge_total_control': {'order': collected, 'relation_rank': row['k'], + 'full_endpoint_rejected': True}, + 'singular_fresh_pairing_controls': singular, + 'wrong_parity_links_rejected': wrong_parity} + + +def compute(): + bases = [census(N) for N in range(1, 5)] + fixtures = [('coordinate1', (1,)), ('edge2', (1, 3)), ('normal3', (6, 5, 7)), + ('coordinate3', (1, 2, 4)), ('quad4', (14, 13, 11, 7)), + ('two_edges', (1, 3, 4, 12))] + domains = [] + for name, xs in fixtures: + result = domain(name, xs, (2, 2)) + domains.append(result) + for name, xs in [('edge2_three_calls', (1, 3)), ('normal3_three_calls', (6, 5, 7))]: + result = domain(name, xs, (3, 2)) + domains.append(result) + for name, xs, hs in [('edge2_one_bridge', (1, 3), (3,)), + ('quad4_one_bridge', (14, 13, 11, 7), (3,)), + ('edge2_three_bridges', (1, 3), (2, 2, 2)), + ('coordinate1_four_bridges', (1,), (2, 2, 2, 2))]: + result = domain(name, xs, hs) + domains.append(result) + return {'status': 'PASS_ORTHOGONAL_BRIDGE_FAMILY_OBSTRUCTION', 'bases': bases, 'domains': domains, 'larger_checks': larger_checks(), 'controls': controls()} + +if __name__ == '__main__': + actual = json.loads(json.dumps(compute())) + expected = json.loads(Path(__file__).with_name('RESULT.json').read_text()) + require(actual == expected, 'committed exact receipt') + print(actual['status']) + print('20335 bases; 81002 basis/bridge checks; 55250 full Laurent words; 10148 passing orders') + print('15 larger fixtures; all bridge totals vanish in the stated class.')