From ca8bef7d5152cbdfc96f3f12cdd958a953bd5708 Mon Sep 17 00:00:00 2001 From: Hanson Sun <182361798+bbMisk@users.noreply.github.com> Date: Tue, 13 Oct 2026 22:55:26 -0400 Subject: [PATCH] Research: extend signed connector floor to all unit complex phases --- .../CERTIFICATE.json | 263 ++++++++++++++ .../OVERLAP.json | 133 ++++++++ .../README.md | 314 +++++++++++++++++ .../SOURCES.json | 110 ++++++ .../TASK.json | 92 +++++ .../VALIDATION.json | 46 +++ .../VERIFY.json | 47 +++ .../independent.py | 195 +++++++++++ .../test_package.py | 98 ++++++ .../verify.py | 322 ++++++++++++++++++ 10 files changed, 1620 insertions(+) create mode 100644 research/complex-unit-phase-connector-seed39/CERTIFICATE.json create mode 100644 research/complex-unit-phase-connector-seed39/OVERLAP.json create mode 100644 research/complex-unit-phase-connector-seed39/README.md create mode 100644 research/complex-unit-phase-connector-seed39/SOURCES.json create mode 100644 research/complex-unit-phase-connector-seed39/TASK.json create mode 100644 research/complex-unit-phase-connector-seed39/VALIDATION.json create mode 100644 research/complex-unit-phase-connector-seed39/VERIFY.json create mode 100644 research/complex-unit-phase-connector-seed39/independent.py create mode 100644 research/complex-unit-phase-connector-seed39/test_package.py create mode 100644 research/complex-unit-phase-connector-seed39/verify.py diff --git a/research/complex-unit-phase-connector-seed39/CERTIFICATE.json b/research/complex-unit-phase-connector-seed39/CERTIFICATE.json new file mode 100644 index 0000000000..2648325617 --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/CERTIFICATE.json @@ -0,0 +1,263 @@ +{ + "all_ones_positive_census": { + "full_covers": 216, + "mask_stream_sha256": "548cf49f68139b45d929b46b0a6a7d49cc4c905ecc34e8efb260721723723c82", + "paths": 720, + "row_mask_histogram": { + "0": 504, + "7": 216 + } + }, + "assignment_seed": 39, + "cheapest_fixture_operator": "A0", + "complete_leaf_counts": { + "A0": 308, + "A1": 320, + "A2": 332, + "B0": 356, + "B1": 380, + "B2": 404 + }, + "factor_lengths": { + "A0": 2, + "A1": 3, + "A2": 4, + "B0": 5, + "B1": 6, + "B2": 7 + }, + "gauged_words": 18, + "matrix": [ + [ + 1, + 1, + 1 + ], + [ + 1, + 1, + -1 + ], + [ + 1, + -1, + 0 + ] + ], + "minimum_complete_queries": 14, + "nonunit_13_query_control": [ + [ + "B", + 0, + [ + -2, + 0 + ] + ], + [ + "A", + 2, + [ + -1, + 0 + ] + ], + [ + "B", + 0, + [ + 1, + 0 + ] + ], + [ + "B", + 1, + [ + -1, + 0 + ] + ], + [ + "A", + 1, + [ + -1, + 0 + ] + ], + [ + "A", + 2, + [ + 1, + 0 + ] + ], + [ + "B", + 2, + [ + -1, + 0 + ] + ], + [ + "A", + 0, + [ + -1, + 0 + ] + ], + [ + "B", + 0, + [ + 1, + 0 + ] + ], + [ + "B", + 1, + [ + 1, + 0 + ] + ], + [ + "A", + 1, + [ + 1, + 0 + ] + ], + [ + "B", + 2, + [ + 1, + 0 + ] + ], + [ + "A", + 0, + [ + 1, + 0 + ] + ] + ], + "odd_unit_phase_positive_control": "Five queries restore the root and add -omega*A0*B0*x0 to y0.", + "orbit_matrices": 288, + "orbit_word_checks": 1728, + "schema_version": 1, + "scope": "Written unit-phase reduction plus exact finite checks; no physical supplier, new kappa or proof-assistant theorem.", + "semantic_controls": 172, + "signed_census": { + "full_covers": 0, + "mask_stream_sha256": "ed1aebf55ef87b7e75af8bffb014b8a3f3398cc2a5a23acf52a97603caf33727", + "paths": 720, + "row_mask_histogram": { + "0": 72, + "1": 84, + "2": 84, + "3": 48, + "4": 264, + "5": 84, + "6": 84 + } + }, + "status": "PASS_COMPLEX_UNIT_PHASE_CONNECTOR", + "unit_triangle_censuses": { + "0:-1": { + "full_covers": 0, + "mask_stream_sha256": "18ccd47376cea9797c8e37d3dd7d0c5bf6f14179a37cca4e0c2fd51cfe902aac", + "paths": 5040, + "row_mask_histogram": { + "0": 1512, + "1": 588, + "2": 588, + "3": 168, + "4": 1680, + "5": 252, + "6": 252 + } + }, + "0:1": { + "full_covers": 0, + "mask_stream_sha256": "9bc9fe4c59d1404ab118ddd079fc1b89e300a79331b8f5371617638d62a56076", + "paths": 5040, + "row_mask_histogram": { + "0": 1512, + "1": 588, + "2": 588, + "3": 168, + "4": 1680, + "5": 252, + "6": 252 + } + }, + "1:-1": { + "full_covers": 0, + "mask_stream_sha256": "75a9cb0f18bceeaa84893ed005ec6696292823298c2e3f6cc9f7be7833460a5b", + "paths": 5040, + "row_mask_histogram": { + "0": 1512, + "1": 588, + "2": 588, + "3": 168, + "4": 1680, + "5": 252, + "6": 252 + } + }, + "1:1": { + "full_covers": 0, + "mask_stream_sha256": "0a7d010bdc43cfde92141ce723d4066faccadb53fd28c04cb8879b8baf733966", + "paths": 5040, + "row_mask_histogram": { + "0": 1512, + "1": 588, + "2": 588, + "3": 168, + "4": 1680, + "5": 252, + "6": 252 + } + }, + "2:-1": { + "full_covers": 0, + "mask_stream_sha256": "01406e61d655d785e5c73ead55c8e05dcaeabf3513bcf4e80dd5c6485e314e85", + "paths": 5040, + "row_mask_histogram": { + "0": 1064, + "1": 588, + "2": 588, + "3": 112, + "4": 2072, + "5": 308, + "6": 308 + } + }, + "2:1": { + "full_covers": 0, + "mask_stream_sha256": "a23c41f4a7abc24f123d8a79c44e7a984a51360eedd7ff08fa83fc57280d6c25", + "paths": 5040, + "row_mask_histogram": { + "0": 1064, + "1": 588, + "2": 588, + "3": 112, + "4": 2072, + "5": 308, + "6": 308 + } + } + }, + "unit_triangle_paths": 30240, + "weighted_minimum": "2*sum(c_F)+2*min(c_F)" +} diff --git a/research/complex-unit-phase-connector-seed39/OVERLAP.json b/research/complex-unit-phase-connector-seed39/OVERLAP.json new file mode 100644 index 0000000000..86e37be4a4 --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/OVERLAP.json @@ -0,0 +1,133 @@ +{ + "initial": { + "status": "POSSIBLE_OVERLAP_NOT_A_NOVELTY_CERTIFICATE", + "searched_at": "2026-10-14T02:28:04.247189+00:00", + "terms": [ + "unit-modulus", + "unit phase", + "phase-only", + "signed connector" + ], + "coverage": { + "open_prs": { + "fetched_at": "2026-10-14T02:27:45.294089+00:00", + "complete_pagination": true, + "records": 781 + }, + "discussions": { + "fetched_at": "2026-10-14T02:28:04.203959+00:00", + "complete_pagination": true, + "records": 200 + } + }, + "local_records": 327, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "matches_total": 12 + }, + "nearest_work": [ + { + "pr": 1526, + "head": "1fb85dc6813b88483f4f0a359ccd722376acd292", + "distinction": "Paid root doubling/halving changes magnitudes; no executable dependency." + }, + { + "pr": 1349, + "head": "8adb25ce6d2090de170e241a170668e8fd7cf5a2", + "distinction": "Finite-characteristic F3 comparison; no executable dependency." + }, + { + "pr": 1490, + "head": "db410cbd344bcf58f754689ae893d4c31a01f32d", + "distinction": "Different Gaussian helper-gauge model; no executable dependency." + } + ], + "final": { + "status": "POSSIBLE_OVERLAP_NOT_A_NOVELTY_CERTIFICATE", + "searched_at": "2026-10-14T02:47:25.336121+00:00", + "terms": [ + "unit-modulus", + "unit phase", + "phase-only", + "signed connector" + ], + "coverage": { + "open_prs": { + "fetched_at": "2026-10-14T02:47:00.944513+00:00", + "complete_pagination": true, + "records": 713 + }, + "discussions": { + "fetched_at": "2026-10-14T02:47:25.291531+00:00", + "complete_pagination": true, + "records": 213 + } + }, + "local_records": 329, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "matches_total": 14, + "relevant_matches": [ + { + "kind": "discussion", + "number": 1540, + "title": "CLAIM: four-query signed connector with one restored source port (seed26)", + "head": null, + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1540" + }, + { + "kind": "pr", + "number": 1349, + "title": "Independent verification: exact F3 signed connector minimum is thirteen", + "head": "8adb25ce6d2090de170e241a170668e8fd7cf5a2", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/1349" + }, + { + "kind": "pr", + "number": 692, + "title": "Independent verification: weighted-stride closures and bilinear dual (no kappa)", + "head": "c5b53a5e80372a1fae9830d8dcf21aaabce3f729", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/692" + }, + { + "kind": "pr", + "number": 1155, + "title": "Research note: restoration coalescing across a recursion batch (read-free + composable-family boundary; no new kappa)", + "head": "9821c6e9388f3fc097e94b72be9fa7b41a849527", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/1155" + }, + { + "kind": "pr", + "number": 803, + "title": "Research: degree-controlled cyclic inverse bound by root reflection (no new kappa)", + "head": "d213ac12d4a1ab8f717d942e844df318ceb395fb", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/803" + }, + { + "kind": "pr", + "number": 1490, + "title": "Scoped negative result: common rounding of Gaussian helper gauges", + "head": "db410cbd344bcf58f754689ae893d4c31a01f32d", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/1490" + } + ], + "assessment": "No same-scope unit-phase connector result was found in this bounded metadata search. Nearest signed-connector, finite-field, dyadic-scaling and Gaussian-gauge work is credited; source-code diffs and arbitrary nested files are outside coverage." + }, + "refreshed_main": "c5108f0f68d482e5712a8e26a5978d47762dfc16", + "main_change_assessment": "Only historical provenance path docs/research/pr-ledger.md changed among package pins. All live inputs, selected certificate, source manifest and review are unchanged. The package remains based on its recorded assignment commit.", + "manual_followup": { + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1539", + "claim_created_at": "2026-10-14T02:28:16Z", + "claim_updated_at": "2026-10-14T02:50:37Z", + "claim_body_sha256": "d5142dca746b54575055f6d25e6569ba528115a82527c16d460057ad96a12b5b", + "discovery": "Discussion1540 linked the phase-alphabet claim, which was missed by the literal search terms. The published PR1551 body and exact README were then read.", + "published_result": { + "pr": 1551, + "head": "be8768d5fd8e9e7a1f714424f25b34b0e807daa0", + "usage": "Concurrent finite sixth-root exclusion. This package adds all complex unit phases, arbitrary unit root rotations, and a geometric collapse; finite sixth-root evidence is independent corroboration. No executable dependency.", + "readme_path": "research/sixth-root-connector-seed29/README.md", + "readme_sha256": "24f343aee17fd7aa80239ac2db98c328636b2856c078d8379ab261529164ef95" + }, + "assessment": "Substantial overlap in the six-phase finite census; preserve predecessor priority there. Distinct contributions are the continuous-phase normalization and geometric collapse theorem, the root-rotation extension, and independently authored exact implementations." + } +} diff --git a/research/complex-unit-phase-connector-seed39/README.md b/research/complex-unit-phase-connector-seed39/README.md new file mode 100644 index 0000000000..3221be5d4c --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/README.md @@ -0,0 +1,314 @@ +# All unit complex phases inherit the signed connector minimum + +**Scoped negative result; no new kappa.** Ross Richardson's +[PR944](https://github.com/CrocSwap/integer-mult-bounds/pull/944) signed connector +still requires **fourteen complete child queries** when every query may carry +an arbitrary exact complex coefficient of modulus one. Any number of unit +rotations of the dirty root is also allowed, even free in the lower-bound +relaxation. The result covers the canonical matrix and its 288 signed/permuted +variants. It extends the operation alphabet; it does not rerun a larger search +inside the predecessor's signed alphabet. + +For positive fixed complete prices `c_F`, common to all phases of operator F, +the exact minimum remains + +``` +2 sum_F c_F + 2 min_F c_F. +``` + +The attaining words are the six existing repairs from +[@martinxxx9's PR1088](https://github.com/CrocSwap/integer-mult-bounds/pull/1088), +retained unchanged. The new evidence is the continuous-phase reduction, the +thirteen-query exclusion and a separately implemented triangle-collapse check. +Concurrent [PR1551](https://github.com/CrocSwap/integer-mult-bounds/pull/1551) +establishes the finite sixth-root case. This contribution independently +corroborates that case and adds the whole unit circle, arbitrary unit root +rotations, and a geometric collapse to the older signed obstruction. Priority +for the sixth-root result is not claimed here. +An explicit thirteen-query **nonunit** control succeeds: replacing the first +two adjacent `B0-` calls in PR944's canonical word by one `B0^{-2}` preserves +the map. Thus this result does not extend to arbitrary magnitudes. + +## Reproduce + +From the repository root, with Python 3.12 and the standard library: + +```sh +python3.12 scripts/research_package.py --package research/complex-unit-phase-connector-seed39 +``` + +Expected final marker: +`PASS_REGISTERED_RESEARCH_PACKAGE research/complex-unit-phase-connector-seed39 outcome=negative-result`. +The registered commands check [CERTIFICATE.json](CERTIFICATE.json), independently +recompute the finite domains and reject damaged packages. For a direct replay: + +```sh +python3 -I -O -B research/complex-unit-phase-connector-seed39/verify.py +python3 -I -O -B research/complex-unit-phase-connector-seed39/independent.py +``` + +These report 720 signed paths, 30,240 normalized triangle paths, 1,728 attaining +orbit words, 172 semantic controls, and 444 dense forward/inverse pairs. The +written reduction below addresses all unit complex phases; finite phase samples +alone would not prove that statement. This is not a proof-assistant theorem. + +## Exact interface and optimistic budget + +There are seven distinct length-L rows `x0,x1,x2,y0,y1,y2,z` over C, all with +arbitrary incoming contents. The fixed maps `A_i,B_j` are complex-linear and +need not commute or be invertible. The required endpoint is + +``` +x_j unchanged; z unchanged; +y_i += sum_j M_ij A_i B_j x_j, + +M = [[1,1,1], [1,1,-1], [1,-1,0]]. +``` + +The allowed complete calls are `B_j^b: z += b B_j x_j` and +`A_i^a: y_i += a A_i z`, with `|a|=|b|=1`, independently chosen at every +occurrence. Optional root passes are `z *= rho`, with `|rho|=1`. These are +exact constants, central in the complex-linear maps. The source rows are +immutable. Each child restores its own scratch and prescribed head positions; +its increment is independent of old target contents. All seven data rows are +excluded from child scratch. Only final outputs may be observed. + +The straight-line word must work for arbitrary admissible maps and inputs. +There are no extra connectors, source/output rotations, source mutations, +combined queries, direct products, free copies, overwrites, conjugate-linear +readers or other data operations. Special maps and restricted input states are +outside the generic lower bound. Rounded arithmetic is outside this exact model. + +The proposed saving was one complete child: fourteen to thirteen. The favorable +budget prices a phase-bearing query exactly as its signed counterpart and grants +root rotations for free. Since even this relaxation requires fourteen, no +implementation of these phase operations with additional nonnegative costs can +give that query saving. This rejects this mechanism, not other helper inventories +or a different selected-supplier construction. Actual phase preparation, scalar +multiplication, storage, traversal, frame and precision costs are not declared free +in an implementation. + +## Proof of the fourteen-query floor + +**1. Remove root rotations.** Let `p_t` be their cumulative product. In the +moving coordinate `w=p_t^{-1}z`, a B call has coefficient `b/p_t`, and an A call +has coefficient `a*p_t`. Both remain unit. Restoring arbitrary incoming z +forces the final product to equal one. Consequently any word with root rotations +gives a word with the same number of A/B queries and no rotations. This is an +algebraic relaxation for the lower bound, not an uncharged implementation pass. + +**2. Every active operator occurs at least twice.** In a word without rotations, +restoration of z gives zero sum of the coefficients of each B_j. Elimination of +`A_i z_initial` gives zero sum for each A_i. Every row and column of M is active, +so one occurrence is impossible. These statements already follow by setting the +maps to identities and varying the independent source and root inputs. Thus +fewer than twelve queries cannot work. Two unit coefficients with sum zero are +opposites. + +**3. Twelve queries reduce to signed queries.** Each B_j then has a pair `b_j,-b_j` +and visits coefficient values `0,b_j`; each A_i has a pair `a_i,-a_i`. A nonzero +entry `M_ij` forces `a_i*b_j` to be 1 or -1, because that output's two readouts +differ in coordinate j by `b_j` or `-b_j`. The bipartite support graph of M is +connected. Propagating these relations gives a unit `a` such that every +`a_i/a` and `a*b_j` is a sign. Rescale the bookkeeping coordinate by a; all +queries become signed and the requested M is unchanged. + +There are `6! = 720` labeled signed B paths, containing each `B_j+` and `B_j-` +once. A row can be read with its two A calls exactly when it is a difference +of two visited source-prefix vertices. No path supports all three rows of M. +The original PR944 certificate supplies that exclusion; both new implementations +recompute it. The histogram below records the bit mask of supported rows: + +| Row mask | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | +|---|---:|---:|---:|---:|---:|---:|---:|---:| +| Signed paths | 72 | 84 | 84 | 48 | 264 | 84 | 84 | 0 | + +**4. A thirteen-query word has one triple and five pairs.** First suppose B_j +is tripled. Delete its column from the support graph. For this M the remaining +graph is still connected and contains every output vertex, for each j=0,1,2. +Applying the preceding relations to the two paired source operators again +makes all A coefficients and both other B pairs signed, using one unit coordinate +rescaling. The three coefficients `u,v,w` of B_j remain unit and satisfy +`u+v+w=0`. + +They cannot be collinear over R: three collinear unit numbers are signs of one +unit number, and an odd number of signs cannot sum to zero. In their actual +order the B_j coordinate visits the triangle `0,u,u+v,0`. Any nonzero difference +between its three vertices is one of `+-u,+-v,+-w`. At least one output uses +column j, so a required difference is 1 or -1. One triangle side is therefore +real of length one. The other sides cannot be parallel to it. + +Collapse the third vertex onto either endpoint of that real side, then translate +the initial image to zero. Every zero or real unit difference used by a readout +is preserved: the only nonzero real differences are the chosen side; equal +vertices remain equal. Around the three-step triangle, the collapsed path has +exactly two nonzero increments, +1 and -1, and one zero increment. Drop that +zero query. Keeping all readouts at their corresponding boundaries gives a +twelve-query signed word for M, contrary to step 3. + +Alternatively, `u+v+w=0` with unit lengths is an equilateral triangle. After +one side is real of length one, its increments are precisely +`sigma*(1,omega,omega^2)`, where `sigma=+-1`, +`omega^2+omega+1=0`. The other four source increments are the two signed pairs. +Thus `3 choices of j * 2 signs * 7! = 30,240` labeled paths exhaust the +normalized case. Both exact implementations find zero full covers; +`independent.py` additionally performs and checks all 30,240 collapses. This +finite census supports the geometric argument with a separate route to exclusion. + +If an A operator is tripled, reverse chronology and exchange A/B roles. An +original ordered pair B_j before A_i becomes a new source A_i before a new +readout B_j; its scalar product is unchanged. Balanced sums preserve root +restoration and dirt cancellation, and the coefficient matrix transposes. +Since this M is symmetric, the resulting word is the already excluded tripled-B +case. No noncommuting operator factors have been commuted: this is a statement +about the universal coefficient word in renamed roles. + +**5. Attainment and prices.** PR1088 supplies a fourteen-query word for each +choice of the repeated operator, with four occurrences there and two elsewhere. +They use only signs and so belong to the larger alphabet. For any correct word +write the occurrence counts as `n_F=2+e_F`, where `e_F>=0` and `sum e_F>=2`. +Positive fixed prices imply +`sum n_F*c_F >= 2 sum c_F + 2 min c_F`. Repeating a cheapest operator attains +equality without rotations. Nonnegative root-rotation charges do not change it. +The same conclusion holds when other unit phases cost extra relative to these +signed complete prices. It need not hold for sign-, phase-, state- or word-dependent +prices that violate that comparison. + +Row/column permutations and sign changes preserve the extended alphabet and +its operation counts, so the result passes to all 288 matrices in the existing +orbit. The verifier replays all six attaining words for each matrix. + +## Complete cost and what the result does not establish + +A complete fixed-port price `c_F(L)` includes coefficient/source access, the +entire child, its target updates, phase/sign work, scratch restoration, frame +adapters, head return and per-call dispatch. Charge reusable preparation `P_F`, +initial admission/layout `I`, and any additional instruction emission/storage +`E` separately. The optimal fixed-price bill is + +``` +I + sum_F P_F + E + 2 sum_F c_F(L) + 2 min_F c_F(L). +``` + +Phase-specific preparation or root rotations add their actual bills; no helper +is silently introduced. A port- or word-dependent implementation must price +its actual invocations rather than apply this fixed-price formula. + +For the predecessor's balanced dirty factor lowering, split an ordered product +F into R followed by S, borrow a distinct dirty row w, and execute +`R(x,w); S(w,y); inverse(R); inverse(S)`. The complete recurrence is + +``` +C([f]) = complete leaf cost + leaf dispatch, +C(F) = 2 C(R) + 2 C(S) + node dispatch, +h([f]) = 0; h(F) = 1 + max(h(R),h(S)). +``` + +Every inverse includes all its leaves. Source access and restoration are included +in each complete leaf. Peak borrowed storage is one root row plus the largest +child depth, with data ports excluded from scratch. This is the inherited +factor-length recurrence, not an input-size contraction or a new physical compiler. + +Seed `39 mod 6 = 3` places the shortest product at A0 in B0,B1,B2,A0,A1,A2 +order, giving lengths `[5,6,7,2,3,4]`. With unit leaf prices and separately charged +dispatch, preparation and physical access, the complete expansions have + +| Repeated operator | B0 | B1 | B2 | A0 | A1 | A2 | +|---|---:|---:|---:|---:|---:|---:| +| Leaf queries | 356 | 380 | 404 | 308 | 320 | 332 | + +All six expansions restore all ten incoming rows in the free noncommutative +module; all literal inverses restore too. Four length-L dirty rows, including +the root, are borrowed. The 308 count is an inherited fourteen-query construction +with a seed-selected tariff, not a new scalar saving or runtime measurement. +The magnitude-two thirteen-query control requires its own complete lowering and +is not assigned a free single-query implementation here. + +No occurrence of this abstract connector in the selected supplier is supplied. +Selected-call realization, owner/whole-call hosting, frames, coefficient/phase +preparation, precision and rounded linearity, tape compilation, all-size recurrence +and outer analytic transfer remain unresolved or inherited. No selected cold +replay, improved paid rank profile, larger kappa, unconditional multiplication +theorem, or independent human review is claimed. + +## Evidence, provenance and overlap + +Base: `ef5f39403610d231a0c27e8a6b4f08c10209bcd6`; OS-random assignment seed **39**, +complex-supplier track. [TASK.json](TASK.json) records all three candidate tasks, +the local claim and the scope change from the broad helper-inventory card to +this optimistic complex circuit question. There was no pinned sprint issue. +Source hashes, Git blobs and predecessor heads are in [SOURCES.json](SOURCES.json). +The selected context is reviewed PR1094 at +`0fc329d0bec93ca7cd288eaea1295172e8789810`, kappa +`836330098538459/500000000000000000`. Its source manifest leads to +`research/complex-t16-rare-pattern-exchanges`, with unchanged PR589 bit ancestry. +The selected binding check is orientation evidence, not a fresh circuit replay. + +`verify.py` uses integer coefficients in the basis `(1,omega)`, a full +prefix-difference census, and free operator words on arbitrary incoming rows. +`independent.py` imports no primary or predecessor executable: it uses doubled +real/imaginary integer coordinates, recursive position assignment, grouping by +imaginary parts, explicit triangle collapse, and separate rational dense arithmetic +on noncommuting maps of sizes two and three. These are separate implementations +authored in the same AI-assisted session. The dense checks are finite fixtures. +The all-size identity and exclusion rely on the written linear-algebra reduction. + +Controls delete and change signs of every gate in all six attaining words, +reject a missing final root rotation, distinguish characteristic zero from F3, +and accept the exact nonunit thirteen-query map while rejecting it from the +unit alphabet. A five-query unit-phase word restores the root and adds a +nonreal output, explicitly preventing reuse of the signed evenness argument. +Package tests additionally reject source/certificate damage and +run a read-only relocated copy. No floating point or solver is used. + +The closest concurrent result is +[PR1551](https://github.com/CrocSwap/integer-mult-bounds/pull/1551), head +`be8768d5fd8e9e7a1f714424f25b34b0e807daa0`, published from +[Discussion1539](https://github.com/CrocSwap/integer-mult-bounds/discussions/1539). +Its finite sixth-root alphabet excludes root scaling and exhausts 291,600 +source paths. This package covers every complex unit coefficient and unit root +rotations by support-graph normalization, then proves the thirteen-query +exclusion geometrically. Only the 720 signed paths are needed for that proof; +the normalized 30,240-path census and explicit collapses are additional +corroboration. Its code was authored before the concurrent package was found +and imports none of it. These distinctions, not a different seed, justify the +separate contribution. The final literal-term search missed Discussion1539; +following Discussion1540's link found it, and its published proof was inspected +before submission. No novelty guarantee is inferred from that search. + +Another concurrent comparison is +[PR1526](https://github.com/CrocSwap/integer-mult-bounds/pull/1526) at +`1fb85dc6813b88483f4f0a359ccd722376acd292`: paid doubling/halving changes magnitude +and reaches thirteen child calls plus two root scans. This package explains why +phase-only root passes cannot supply that saving. It does not claim that earlier +construction or depend on its implementation. [PR1349](https://github.com/CrocSwap/integer-mult-bounds/pull/1349) +at `8adb25ce6d2090de170e241a170668e8fd7cf5a2` instead changes the field to F3; +three equal signs can cancel there. [PR1490](https://github.com/CrocSwap/integer-mult-bounds/pull/1490) +at `db410cbd344bcf58f754689ae893d4c31a01f32d` prices Gaussian helper gauges in a +different selected-word model. [OVERLAP.json](OVERLAP.json) retains search coverage +and limits; absence of a match is not proof of novelty. + +## Open next questions + +Can magnitude-changing calls be compiled at a complete cost that beats this +fourteen-query bill in an actual complex supplier? This matters because phase +changes alone are now excluded in this model. PR1526 is an existing concrete +starting point: compare its two complete scaling scans and coefficient precision +against the one child it removes on a specified fixed-port backend. The blocker +is a selected supplier instance and complete physical/precision admission, not +more phase samples. Do not reopen this unit-only domain with a denser phase grid. + +## Credit + +Ross Richardson's PR944 (`5dbcfbc63f646de5a1354f6b9760ec03837233f0`) supplies the +signed obstruction, interface, canonical word and dirty lowering. @martinxxx9's +PR1088 (`b0396aad724fec58630fbd4d13a809c562f18d9e`) supplies the six weighted +repairs; both are incorporated in the base review ledger. Earlier connector +credit remains with Richardson's PR934, CubeJerry's PR889, Chafik Boukhalfa's +PR628 and the retained framework. The concurrent results above retain their +separate credit. No predecessor package is modified or reattributed. + +Prepared by **Hanson Sun (@bbMisk)** with substantial **OpenAI Codex assistance** +in reasoning, implementation, verification and prose. New work is Apache-2.0. +The mathematical claims were checked against the sources and replay evidence; +this is not independent human review or proof-assistant verification. diff --git a/research/complex-unit-phase-connector-seed39/SOURCES.json b/research/complex-unit-phase-connector-seed39/SOURCES.json new file mode 100644 index 0000000000..0830589070 --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/SOURCES.json @@ -0,0 +1,110 @@ +{ + "schema_version": 1, + "base_commit": "ef5f39403610d231a0c27e8a6b4f08c10209bcd6", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "c05fafaa25ba95b2d5af86b1800427198e3d20eb", + "sha256": "89b5928bc92c81e2647b6d702a7ad85a6795b8f44e2eb267b2ff3145d8f2b2ce" + }, + { + "path": "research/signed-connector-obstruction/CERTIFICATE.json", + "usage": "input", + "git_blob": "2d047548111241783bd977115318317f0ad23302", + "sha256": "2930f0ae2c77cf94eadc9f065fe8d034249e5e607b9eb4e8f581d1c60f5e763b" + }, + { + "path": "research/signed-connector-obstruction/README.md", + "usage": "input", + "git_blob": "f07370732c8bbe6c49b502308a657a6eb94a019e", + "sha256": "76e20674799a7b35dfb5908e7df5cab53f17482da2bfd25db576ba0000dade83" + }, + { + "path": "research/weighted-signed-connector-seed58/CERTIFICATE.json", + "usage": "input", + "git_blob": "abaa49bf8b1724461ba11fa37aa1df5e73ddf7bf", + "sha256": "30291599facabc902e85bda418e587d7af37760875b86f88607dbf2c9f38cbeb" + }, + { + "path": "research/weighted-signed-connector-seed58/README.md", + "usage": "input", + "git_blob": "cb3a42764fa80041c79e0419b80c3e87b6d254a2", + "sha256": "53cfd7805b48ddf8143e1120de74845d287e4806be9669e61989c0ad45b985ec" + }, + { + "path": "docs/research/community-batch1099-review.md", + "usage": "provenance", + "git_blob": "6cb6ec061a071a06a2d18cd4dc3e9a2b05d28099", + "sha256": "7e76d2c38e5fce30587835b7251df1430488ae4dd372611ef69a3f03f476b6cb" + }, + { + "path": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "usage": "provenance", + "git_blob": "6a75493790b4eff9c4a98051ef8b01d6aad0d5a8", + "sha256": "79b3de5db3dbcb9829789ba58e9e45758926031e2a7d80667a08429d369be53b" + }, + { + "path": "research/community-frontier1094-audit/ASSEMBLY.json", + "usage": "provenance", + "git_blob": "5fd676df060f3b450782fdf5ff5f6beb63a5eeb0", + "sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045" + }, + { + "path": "research/complex-t16-rare-pattern-exchanges/README.md", + "usage": "provenance", + "git_blob": "f205b7132243aedcb2aa85110a44f0c8cd1e4fe1", + "sha256": "da542711a6a3eb01ce1ebdf8f28a748e6195512687f61d003b95ac5ff281a7b2" + }, + { + "path": "docs/research/pr-ledger.md", + "usage": "provenance", + "git_blob": "08cd1b607893d00e0aa235409a4ff75de64b59c7", + "sha256": "194ce66f92dacffde801916f47fc7f35eb9345df8d78400fabe8a7d30d2a6d44" + } + ], + "predecessors": [ + { + "pr": 944, + "head": "5dbcfbc63f646de5a1354f6b9760ec03837233f0", + "author": "Ross Richardson", + "usage": "Retained interface, signed obstruction and canonical word; local files pinned above." + }, + { + "pr": 1088, + "head": "b0396aad724fec58630fbd4d13a809c562f18d9e", + "author": "martinxxx9", + "usage": "Retained six weighted repair words; local files pinned above." + } + ], + "comparison_only": [ + { + "pr": 1526, + "head": "1fb85dc6813b88483f4f0a359ccd722376acd292", + "usage": "Paid root doubling/halving changes magnitudes; no executable dependency." + }, + { + "pr": 1349, + "head": "8adb25ce6d2090de170e241a170668e8fd7cf5a2", + "usage": "Finite-characteristic F3 comparison; no executable dependency." + }, + { + "pr": 1490, + "head": "db410cbd344bcf58f754689ae893d4c31a01f32d", + "usage": "Different Gaussian helper-gauge model; no executable dependency." + }, + { + "pr": 1551, + "head": "be8768d5fd8e9e7a1f714424f25b34b0e807daa0", + "usage": "Concurrent finite sixth-root exclusion. This package adds all complex unit phases, arbitrary unit root rotations, and a geometric collapse; finite sixth-root evidence is independent corroboration. No executable dependency.", + "readme_path": "research/sixth-root-connector-seed29/README.md", + "readme_sha256": "24f343aee17fd7aa80239ac2db98c328636b2856c078d8379ab261529164ef95" + } + ] +} diff --git a/research/complex-unit-phase-connector-seed39/TASK.json b/research/complex-unit-phase-connector-seed39/TASK.json new file mode 100644 index 0000000000..3c4507d83f --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/TASK.json @@ -0,0 +1,92 @@ +{ + "schema_version": 1, + "task_id": "complex-new-helper-inventory", + "priority_revision": 2, + "base_commit": "ef5f39403610d231a0c27e8a6b4f08c10209bcd6", + "original_card": { + "id": "complex-new-helper-inventory", + "question": "Can a new local cost interface change the deficit-to-recursive-cost ratio beyond current packing?", + "starting_points": [ + "research/heterogeneous-owner-assembly/README.md", + "certificates/selected-result.json" + ], + "methods": [ + "Propose a changed helper inventory and derive an optimistic exact moment.", + "Design a small completed instance and independently verify its endpoint and rank bill." + ], + "acceptance_gate": "A new physically realizable contract, not another mixture already covered by the frozen catalogue.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the frozen catalogue bound exclusions and select one genuinely different helper endpoint inventory.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Write the complete optimistic child histogram and reject it immediately if even the relaxation has insufficient headroom.", + "bottleneck_link": "Helper inventory changes can improve the moment; repacking a covered cost interface cannot evade its scoped bound.", + "allowed_variations": [ + "Narrow to one changed boundary or helper type with explicit counts." + ], + "scope_change_triggers": [ + "Mixing only providers already inside the pinned catalogue." + ], + "overlap_terms": [ + "helper inventory", + "heterogeneous-owner", + "mutable leaver" + ] + }, + "scope_status": "changed", + "actual_scope": "Can arbitrary unit-modulus complex query coefficients and paid unit root rotations lower the fixed signed 3-by-3 dirty connector below fourteen complete child queries?", + "scope_change_reason": "The assigned complex-supplier track permits one circuit study. This is an optimistic interface exclusion before constructing a physical helper inventory, not achievement of the catalogue physical-realization gate.", + "bottleneck_link": "Tests whether exact phases alone remove one recursive child from a fixed complex connector. If even free unit rotations cannot reduce fourteen children, stop that mechanism; no selected supplier instance or moment improvement is claimed.", + "budget_minutes": 50, + "stop_rule": "Exhaust 720 signed six-source-call paths and at most 30240 normalized unit-triangle seven-source-call paths, plus exact reductions; stop if phases cannot beat fourteen. Reserve final quarter for verification.", + "outcome": "negative-result", + "evidence": "README.md supplies the continuous unit-phase reduction. CERTIFICATE.json records 720 signed paths, 30240 normalized unit-triangle paths, 1728 attaining orbit words, 172 semantic controls and complete factor expansions. independent.py checks all triangle collapses and 444 dense forward/inverse pairs; test_package.py checks six on-disk rejections, relocation and read-only replay.", + "author": "Hanson Sun (@bbMisk)", + "ai_assistance": "Substantial OpenAI Codex assistance in reasoning, implementation, verification and prose; no independent human review.", + "open_questions": [ + { + "question": "Can a magnitude-changing connector be realized at a lower complete cost in a specified selected complex supplier?", + "why_it_matters": "Unit query phases and root rotations cannot remove the fourteenth child in this model. Changing magnitudes escapes the proved restriction.", + "first_step": "Use existing PR1526 as the candidate and price both complete scaling scans, precision and ports against its saved child on one actual backend; do not repeat a unit-phase grid search.", + "blocked_by": "No selected-supplier connector instance or complete physical/precision admission is provided here." + } + ], + "assignment_seed": 39, + "assignment_track": "complex supplier", + "claim": { + "started_utc": "2026-10-14T02:21:57Z", + "recorded_utc": "2026-10-14T02:28:18.069232+00:00", + "expected_finish_utc": "2026-10-14T03:12:00Z", + "coordination": "No pinned sprint coordination issue existed; claim recorded locally per the user request. Recent PRs and discussions read." + }, + "candidates": [ + { + "index": 0, + "question": "Arbitrary unit-modulus query phases on PR944 canonical signed connector", + "decision": "selected by seed 39 mod 3 = 0; continuous phase relaxation distinct from paid magnitude scaling" + }, + { + "index": 1, + "question": "Unequal complete prices for mutable-source connector", + "decision": "deferred: adjacent PR1524 uniform-price theorem and a different characteristic-two interface" + }, + { + "index": 2, + "question": "Gaussian phases on selected-word helper gauges", + "decision": "deferred: overlapping PR1490 Gaussian gauge analysis" + } + ], + "concurrent_overlap": { + "pr": 1551, + "claim": 1539, + "head": "be8768d5fd8e9e7a1f714424f25b34b0e807daa0", + "scope_distinction": "Concurrent finite sixth-root exclusion. This package adds all complex unit phases, arbitrary unit root rotations, and a geometric collapse; finite sixth-root evidence is independent corroboration. No executable dependency.", + "outcome": "Scope retained; explicit independent corroboration and broader continuous/root-rotation theorem, without a sixth-root priority claim." + } +} diff --git a/research/complex-unit-phase-connector-seed39/VALIDATION.json b/research/complex-unit-phase-connector-seed39/VALIDATION.json new file mode 100644 index 0000000000..832c5a0b17 --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/VALIDATION.json @@ -0,0 +1,46 @@ +{ + "schema_version": 1, + "verified_utc": "2026-10-14T02:54:27.695837+00:00", + "base_commit": "ef5f39403610d231a0c27e8a6b4f08c10209bcd6", + "platform": "macOS-27.0.1-arm64-arm-64bit-Mach-O", + "registered_python": "3.12.13", + "additional_python": "3.14.6", + "checks": [ + { + "command": "python3.12 scripts/research_package.py --package research/complex-unit-phase-connector-seed39", + "exit_code": 0, + "coverage": "All three registered commands, including optimized checks, source pins and six disk rejection controls." + }, + { + "command": "python3 -B research/complex-unit-phase-connector-seed39/verify.py", + "exit_code": 0, + "coverage": "Normal additional-interpreter direct primary replay." + }, + { + "command": "python3 -B research/complex-unit-phase-connector-seed39/independent.py", + "exit_code": 0, + "coverage": "Normal additional-interpreter independent census, collapse and dense replay." + }, + { + "command": "python3.12 -B -m unittest discover -s tests -p 'test_research_*.py'", + "exit_code": 0, + "tests": 20, + "skips": 0 + }, + { + "command": "python3.12 -B scripts/verify_selected_result.py", + "exit_code": 0, + "coverage": "Selected record, exact kappa, source inventory and proof supplements; no construction replay." + } + ], + "not_run": [ + "Selected full cold replay (unrelated package; no supplier admission)", + "Native or fixed-tape compiler", + "Proof assistant", + "Independent human review", + "Hosted CI at packaging time" + ], + "scope": "Written scoped theorem with exact finite reduction/checks; all package executable checks are local and AI-assisted.", + "final_semantic_controls": 172, + "final_scope_review": "Read concurrent PR1551 at be8768d5fd8e9e7a1f714424f25b34b0e807daa0 and credited its sixth-root result; this theorem additionally treats all unit complex phases and arbitrary unit root rotations." +} diff --git a/research/complex-unit-phase-connector-seed39/VERIFY.json b/research/complex-unit-phase-connector-seed39/VERIFY.json new file mode 100644 index 0000000000..9e2f6da4ef --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/VERIFY.json @@ -0,0 +1,47 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/signed-connector-obstruction/CERTIFICATE.json", + "research/signed-connector-obstruction/README.md", + "research/weighted-signed-connector-seed58/CERTIFICATE.json", + "research/weighted-signed-connector-seed58/README.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Exact signed/triangle censuses, free noncommutative words, full recursive leaf invoices, rotations and semantic controls" + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/independent.py" + ], + "timeout_seconds": 120, + "checks": "Separate integer-coordinate census, every triangle collapse and exact dense dirty forward/inverse replay" + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/test_package.py" + ], + "timeout_seconds": 120, + "checks": "Read-only relocation, deterministic regeneration, source drift and five certificate corruption controls" + } + ] +} diff --git a/research/complex-unit-phase-connector-seed39/independent.py b/research/complex-unit-phase-connector-seed39/independent.py new file mode 100644 index 0000000000..fad2612133 --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/independent.py @@ -0,0 +1,195 @@ +#!/usr/bin/env python3 +"""Separate integer-coordinate census, collapse check and dense exact replay. + +No imports from verify.py or predecessor executables. Authored in the same +AI-assisted session; implementation independence is not independent human review. +Hanson Sun / OpenAI Codex, Apache-2.0. +""" +from collections import Counter, defaultdict +from fractions import Fraction +import json +from pathlib import Path +import random + +PACKAGE = Path(__file__).resolve().parent +REPO = PACKAGE.parents[1] +TARGET = ((1,1,1), (1,1,-1), (1,-1,0)) + + +def check(condition, message): + if not condition: + raise ValueError(message) + + +def cover(vertices): + # Coordinates are (2*Re(z), 2*Im(z)/sqrt(3)); requested rows are real. + groups = defaultdict(set) + for p in vertices: + groups[p[1::2]].add(p[::2]) + answer = 0 + for i, row in enumerate(TARGET): + if any(tuple(v[k]+2*row[k] for k in range(3)) in group + for group in groups.values() for v in group): + answer |= 1 << i + return answer + + +def count_paths(repeated=None, sign=1): + steps = [(j, 2*s, 0) for j in range(3) if j != repeated for s in (-1, 1)] + if repeated is not None: + steps += [(repeated, 2*sign, 0), (repeated, -sign, sign), (repeated, -sign, -sign)] + totals = Counter() + collapse_count = 0 + + def visit(unused, path, current): + nonlocal collapse_count + if not unused: + check(current == (0,)*6, 'open source tour') + mask = cover(path) + totals[mask] += 1 + if repeated is not None: + j = repeated + triangle = {p[2*j:2*j+2] for p in path} + check(len(triangle) == 3, 'not three triangle vertices') + edges = [(a,b) for a in triangle for b in triangle + if b[0]-a[0] == 2 and b[1] == a[1]] + check(len(edges) == 1, 'real side is not unique') + low, high = edges[0] + # Merge the third vertex into low. Subtract the initial image. + images = {p: int(p == high) for p in triangle} + start = images[(0,0)] + reduced = [] + for p in path: + q = list(p) + q[2*j] = 2*(images[p[2*j:2*j+2]] - start) + q[2*j+1] = 0 + reduced.append(tuple(q)) + changes = [tuple(b[k]-a[k] for k in range(6)) + for a,b in zip(reduced, reduced[1:]) if a != b] + expected = {tuple(2*s if k == 2*j else 0 for k in range(6)) + for j in range(3) for s in (-1,1)} + check(len(changes) == 6 and set(changes) == expected, 'collapse is not a signed six-step tour') + check(mask & ~cover(reduced) == 0, 'collapse lost a required real difference') + collapse_count += 1 + return + for k in range(len(steps)): + if unused & (1 << k): + j, a, b = steps[k] + following = list(current) + following[2*j] += a + following[2*j+1] += b + following = tuple(following) + visit(unused ^ (1 << k), path + [following], following) + + visit((1 << len(steps))-1, [(0,)*6], (0,)*6) + return {str(k):v for k,v in sorted(totals.items())}, collapse_count + + +# Independent arithmetic: a+b*sqrt(-3), with exact rational a,b. +def plus(x, y): + return x[0]+y[0], x[1]+y[1] + + +def times(x, y): + return x[0]*y[0]-3*x[1]*y[1], x[0]*y[1]+x[1]*y[0] + + +def minus(x): + return -x[0], -x[1] + + +def conjugate(x): + return x[0], -x[1] + + +def matrix_vector(matrix, vector): + out = [] + for row in matrix: + acc = (0,0) + for coefficient, value in zip(row, vector): + acc = plus(acc, times(coefficient, value)) + out.append(acc) + return out + + +def run_dense(program, incoming, matrices): + state = [list(v) for v in incoming] + for kind, index, scalar in program: + if kind == 'Z': + state[6] = [times(scalar, v) for v in state[6]] + continue + source, target = (index, 6) if kind == 'B' else (6, 3+index) + delta = matrix_vector(matrices[kind+str(index)], state[source]) + state[target] = [plus(old, times(scalar, d)) for old,d in zip(state[target], delta)] + return state + + +def desired(incoming, matrices): + out = [list(v) for v in incoming] + for i in range(3): + for j in range(3): + v = matrix_vector(matrices['A'+str(i)], matrix_vector(matrices['B'+str(j)], incoming[j])) + out[3+i] = [plus(old, times((TARGET[i][j],0), value)) for old,value in zip(out[3+i],v)] + return out + + +def dense_checks(): + data = json.loads((REPO/'research/weighted-signed-connector-seed58/CERTIFICATE.json').read_text()) + rng = random.Random(39) + cases = 0 + noncommuting_banks = 0 + for width in (2,3): + matrices = {name:[[(rng.randrange(-2,3), rng.randrange(-1,2)) for _ in range(width)] + for _ in range(width)] for name in data['witnesses']} + basis = [[(int(i==j),0) for i in range(width)] for j in range(width)] + check(any(matrix_vector(matrices['A0'], matrix_vector(matrices['B0'],v)) != + matrix_vector(matrices['B0'], matrix_vector(matrices['A0'],v)) for v in basis), + 'dense controls need noncommuting maps') + noncommuting_banks += 1 + inputs = [] + for k in range(7*width): + rows = [[(0,0)]*width for _ in range(7)] + rows[k//width][k%width] = (1,0) + inputs.append(rows) + inputs.append([[(rng.randrange(-3,4),rng.randrange(-3,4)) for _ in range(width)] for _ in range(7)]) + for raw in data['witnesses'].values(): + word = [(k,j,(s,0)) for k,j,s in raw] + phase = (Fraction(-1,7), Fraction(4,7)) + p = (1,0) + gauged = [] + for kind,j,c in word: + p = times(p,phase) + gauged += [('Z',0,phase), (kind,j,times(c,p if kind=='B' else conjugate(p)))] + gauged.append(('Z',0,conjugate(p))) + for program in (word,gauged): + undo = [(k,j,conjugate(c) if k=='Z' else minus(c)) for k,j,c in reversed(program)] + for incoming in inputs: + out = run_dense(program,incoming,matrices) + check(out == desired(incoming,matrices), 'dense arbitrary-dirty endpoint failed') + check(run_dense(undo,out,matrices) == incoming, 'dense inverse failed') + cases += 1 + return cases,noncommuting_banks + + +def main(): + receipt = json.loads((PACKAGE/'CERTIFICATE.json').read_text()) + check(receipt['matrix'] == [list(row) for row in TARGET], 'wrong target') + histogram, _ = count_paths() + check(histogram == receipt['signed_census']['row_mask_histogram'], 'signed census mismatch') + check(sum(histogram.values()) == 720 and histogram.get('7',0)==0, 'signed coverage failed') + collapsed = 0 + for column in range(3): + for sign in (-1,1): + histogram,n = count_paths(column,sign) + check(histogram == receipt['unit_triangle_censuses'][str(column)+':'+str(sign)]['row_mask_histogram'], + 'unit triangle census mismatch') + check(sum(histogram.values()) == 5040 and histogram.get('7',0)==0, 'unit triangle coverage failed') + collapsed += n + cases,banks = dense_checks() + check(collapsed==30240, 'incomplete triangle collapse coverage') + print('PASS_INDEPENDENT_UNIT_PHASE signed_paths=720 triangle_collapses='+str(collapsed) + +' dense_forward_inverse_pairs='+str(cases)+' noncommuting_banks='+str(banks)) + + +if __name__ == '__main__': + main() diff --git a/research/complex-unit-phase-connector-seed39/test_package.py b/research/complex-unit-phase-connector-seed39/test_package.py new file mode 100644 index 0000000000..ed5d82ac42 --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/test_package.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +"""Relocation, immutability and on-disk failure controls for this package only. + +Hanson Sun, with substantial OpenAI Codex assistance. Apache-2.0. +""" +import hashlib +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parents[1] +REL = PACKAGE.relative_to(ROOT) + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def run(root, script='verify.py', expected=None, extra=()): + result = subprocess.run([sys.executable,'-I','-O','-B',str(root/REL/script),*extra], + cwd=root, capture_output=True, text=True, timeout=60) + if expected is None: + require(result.returncode==0, result.stdout+result.stderr) + else: + require(result.returncode!=0 and expected in result.stderr, + 'failure control did not reject for '+expected+': '+result.stdout+result.stderr) + return result.stdout + + +def inventory(root): + return {str(p.relative_to(root)):hashlib.sha256(p.read_bytes()).hexdigest() + for p in root.rglob('*') if p.is_file()} + + +def main(): + pins = json.loads((PACKAGE/'SOURCES.json').read_text()) + with tempfile.TemporaryDirectory(prefix='unit-phase-package-') as directory: + root=Path(directory) + shutil.copytree(PACKAGE,root/REL) + for record in pins['files']: + if record['usage']=='input': + destination=root/record['path'] + destination.parent.mkdir(parents=True,exist_ok=True) + shutil.copy2(ROOT/record['path'],destination) + initial=inventory(root) + run(root) + run(root,'independent.py') + regenerated=json.loads(run(root,extra=('--emit-certificate',))) + certificate=root/REL/'CERTIFICATE.json' + original=certificate.read_bytes() + require(regenerated==json.loads(original),'relocated regeneration differs') + require(inventory(root)==initial,'verification modified a file') + negative=0 + for key,bad in [('minimum_complete_queries',13),('unit_triangle_paths',30239), + ('weighted_minimum','2*sum(c_F)+min(c_F)'),('semantic_controls',0)]: + changed=json.loads(original) + changed[key]=bad + certificate.write_text(json.dumps(changed)) + run(root,expected='certificate drift') + certificate.write_bytes(original) + negative+=1 + changed=json.loads(original) + changed['unit_triangle_censuses']['0:1']['row_mask_histogram']['7']=1 + certificate.write_text(json.dumps(changed)) + run(root,'independent.py',expected='unit triangle census mismatch') + certificate.write_bytes(original) + negative+=1 + source=root/'research/signed-connector-obstruction/CERTIFICATE.json' + saved=source.read_bytes() + source.write_bytes(saved+b' ') + run(root,expected='source drift') + source.write_bytes(saved) + negative+=1 + require(inventory(root)==initial,'controls failed to restore copied inputs') + all_paths=list(root.rglob('*')) + try: + for p in all_paths: + p.chmod(0o555 if p.is_dir() else 0o444) + root.chmod(0o555) + run(root) + run(root,'independent.py') + require(inventory(root)==initial,'read-only replay changed contents') + finally: + root.chmod(0o755) + for p in all_paths: + if p.is_dir(): + p.chmod(0o755) + print('PASS_UNIT_PHASE_PACKAGE relocation=1 deterministic_regeneration=1 ' + 'read_only=1 disk_rejections='+str(negative)) + + +if __name__=='__main__': + main() diff --git a/research/complex-unit-phase-connector-seed39/verify.py b/research/complex-unit-phase-connector-seed39/verify.py new file mode 100644 index 0000000000..16e65129ac --- /dev/null +++ b/research/complex-unit-phase-connector-seed39/verify.py @@ -0,0 +1,322 @@ +#!/usr/bin/env python3 +"""Exact finite certificates supporting the unit-phase connector theorem. + +Hanson Sun, with substantial OpenAI Codex assistance. Apache-2.0. +The continuum reduction is written in README.md; this is not a proof assistant. +No predecessor implementation is imported. Python 3.10+, standard library. +""" +import argparse +from collections import Counter +from fractions import Fraction as F +import hashlib +import itertools as it +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +M = ((1, 1, 1), (1, 1, -1), (1, -1, 0)) +ZERO, ONE, OMEGA = (0, 0), (1, 0), (0, 1) + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +# Exact Q(omega), omega^2 + omega + 1 = 0. No floating-point phases. +def add(x, y): + return (x[0] + y[0], x[1] + y[1]) + + +def neg(x): + return (-x[0], -x[1]) + + +def mul(x, y): + a, b = x + c, d = y + return (a*c - b*d, a*d + b*c - b*d) + + +def conj(x): + return (x[0] - x[1], -x[1]) + + +def norm(x): + a, b = x + return a*a - a*b + b*b + + +def source_pins(): + src = json.loads((HERE / 'SOURCES.json').read_text()) + for row in src['files']: + if row['usage'] == 'input': + p = ROOT / row['path'] + require(p.is_file() and not p.is_symlink(), 'missing source: ' + str(p)) + require(hashlib.sha256(p.read_bytes()).hexdigest() == row['sha256'], + 'source drift: ' + row['path']) + return src + + +def connected_without(column=None): + vertices = {('A', i) for i in range(3)} | {('B', j) for j in range(3) if j != column} + reached = {('A', 0)} + while True: + nxt = set(reached) + for i, j in it.product(range(3), repeat=2): + if j != column and M[i][j] and ({('A', i), ('B', j)} & reached): + nxt.update((('A', i), ('B', j))) + if nxt == reached: + return reached == vertices + reached = nxt + + +def source_census(symbols, matrix=M): + """All distinct labeled permutations; record attainable requested row sets.""" + histogram = Counter() + digest = hashlib.sha256() + targets = [tuple(v for a in row for v in (a, 0)) for row in matrix] + require(len(set(symbols)) == len(symbols), 'census symbols must be distinct') + for word in it.permutations(sorted(symbols)): + q = [0] * 6 + vertices = [tuple(q)] + for j, a, b in word: + q[2*j] += a + q[2*j+1] += b + vertices.append(tuple(q)) + require(q == [0]*6, 'source path not restored') + differences = {tuple(v[k]-u[k] for k in range(6)) + for u in vertices for v in vertices} + mask = sum(1 << i for i, row in enumerate(targets) if row in differences) + histogram[mask] += 1 + digest.update(bytes([mask])) + return {'paths': sum(histogram.values()), + 'row_mask_histogram': {str(k): v for k, v in sorted(histogram.items())}, + 'full_covers': histogram[7], 'mask_stream_sha256': digest.hexdigest()} + + +def inverse(word): + return [(kind, j, conj(c) if kind == 'Z' else neg(c)) for kind, j, c in reversed(word)] + + +def free_run(word, rows=7, primitive=False): + """Free noncommutative module: (incoming row, operator word) -> coefficient.""" + state = [{(r, ()): ONE} for r in range(rows)] + for kind, index, c in word: + if kind == 'Z': + state[6] = {key: mul(c, value) for key, value in state[6].items()} + continue + if primitive: + src, dst = index + op = kind + elif kind == 'B': + src, dst, op = index, 6, 'B' + str(index) + else: + require(kind == 'A', 'unknown query') + src, dst, op = 6, 3 + index, 'A' + str(index) + require(src != dst and 0 <= src < rows and 0 <= dst < rows, 'aliased or missing port') + for (input_row, operators), value in list(state[src].items()): + key = (input_row, (op,) + operators) + updated = add(state[dst].get(key, ZERO), mul(c, value)) + if updated == ZERO: + state[dst].pop(key, None) + else: + state[dst][key] = updated + return state + + +def expected(matrix=M, factor_names=None, rows=7): + state = [{(r, ()): ONE} for r in range(rows)] + for i, j in it.product(range(3), repeat=2): + if not matrix[i][j]: + continue + ops = ('A'+str(i), 'B'+str(j)) + if factor_names is not None: + ops = tuple(reversed(factor_names['A'+str(i)])) + tuple(reversed(factor_names['B'+str(j)])) + state[3+i][(j, ops)] = (matrix[i][j], 0) + return state + + +def valid(word, matrix=M, unit=True): + return ((not unit or all(norm(c) == 1 for _, _, c in word)) + and free_run(word) == expected(matrix)) + + +def root_gauge(word, phase): + """Insert unit root rotations and conjugate queries; preserve the same map.""" + require(norm(phase) == 1, 'gauge must be unit') + result, p = [], ONE + for kind, j, c in word: + result.append(('Z', 0, phase)) + p = mul(phase, p) + result.append((kind, j, mul(c, p if kind == 'B' else conj(p)))) + result.append(('Z', 0, conj(p))) + return result + + +def normalized(word): + p, result = ONE, [] + for kind, j, c in word: + require(norm(c) == 1, 'nonunit query or rotation') + if kind == 'Z': + p = mul(c, p) + else: + result.append((kind, j, mul(c, conj(p) if kind == 'B' else p))) + require(p == ONE, 'unrestored root phase') + return result + + +def product_word(names, src, dst, depth=0): + if len(names) == 1: + return [(names[0], (src, dst), ONE)] + middle = len(names) // 2 + work = 7 + depth + left = product_word(names[:middle], src, work, depth+1) + right = product_word(names[middle:], work, dst, depth+1) + return left + right + inverse(left) + inverse(right) + + +def leaves(n): + return 1 if n == 1 else 2*leaves(n//2) + 2*leaves(n-n//2) + + +def orbit_words(witnesses): + """One exact transformation for each distinct signed/permuted target.""" + targets = {} + for rp, cp in it.product(it.permutations(range(3)), repeat=2): + for rs, cs in it.product(it.product((-1, 1), repeat=3), repeat=2): + matrix = tuple(tuple(rs[i]*cs[j]*M[rp[i]][cp[j]] for j in range(3)) for i in range(3)) + if matrix not in targets: + row_inverse = {old: new for new, old in enumerate(rp)} + col_inverse = {old: new for new, old in enumerate(cp)} + transformed = [] + for word in witnesses.values(): + new = [] + for kind, j, c in word: + k = (col_inverse if kind == 'B' else row_inverse)[j] + sign = cs[k] if kind == 'B' else rs[k] + new.append((kind, k, mul((sign, 0), c))) + transformed.append(new) + targets[matrix] = transformed + return targets + + +def evidence(): + source_pins() + signed_source = json.loads((ROOT / 'research/signed-connector-obstruction/CERTIFICATE.json').read_text()) + weighted = json.loads((ROOT / 'research/weighted-signed-connector-seed58/CERTIFICATE.json').read_text()) + require(tuple(map(tuple, signed_source['canonical']['matrix'])) == M, 'source matrix mismatch') + require(tuple(map(tuple, weighted['matrix'])) == M, 'weighted source matrix mismatch') + require(all(connected_without(j) for j in (None, 0, 1, 2)), 'support graph reduction fails') + require(M == tuple(zip(*M)), 'transpose reduction requires this symmetric representative') + require(add(add(ONE, OMEGA), (-1, -1)) == ZERO, 'unit triangle sum') + require(all(norm(c) == 1 for c in (ONE, OMEGA, (-1, -1))), 'unit triangle norms') + + signed = source_census([(j, s, 0) for j in range(3) for s in (-1, 1)]) + require(signed['paths'] == 720 and signed['full_covers'] == 0, 'twelve-query exclusion failed') + all_ones = ((1,1,1),)*3 + positive = ([('A',i,(-1,0)) for i in range(3)] + [('B',j,ONE) for j in range(3)] + + [('A',i,ONE) for i in range(3)] + [('B',j,(-1,0)) for j in range(3)]) + positive_census = source_census([(j,s,0) for j in range(3) for s in (-1,1)], all_ones) + require(len(positive)==12 and valid(positive, all_ones) and positive_census['full_covers']>0, + 'twelve-query positive control failed') + triangles = {} + for j, sign in it.product(range(3), (-1, 1)): + symbols = [(k, s, 0) for k in range(3) if k != j for s in (-1, 1)] + symbols += [(j, sign, 0), (j, 0, sign), (j, -sign, -sign)] + census = source_census(symbols) + require(census['paths'] == 5040 and census['full_covers'] == 0, 'thirteen-query exclusion failed') + triangles[str(j) + ':' + str(sign)] = census + + witnesses = {name: [(kind, j, (s, 0)) for kind, j, s in w] + for name, w in weighted['witnesses'].items()} + require(set(witnesses) == {'A0','A1','A2','B0','B1','B2'}, 'six attaining profiles required') + controls = 0 + gauges = [OMEGA, (F(3, 7), F(8, 7)), (F(-5, 7), F(3, 7))] + gauge_checks = 0 + factor_lengths = dict(zip(('B0','B1','B2','A0','A1','A2'), (5,6,7,2,3,4))) + factor_names = {name: [name+'f'+str(i) for i in range(n)] for name, n in factor_lengths.items()} + leaf_counts = {} + for name, word in witnesses.items(): + require(valid(word), 'invalid attaining word: ' + name) + counts = Counter(kind+str(j) for kind, j, _ in word) + require(counts == Counter({k: 4 if k == name else 2 for k in witnesses}), 'wrong cost profile') + require(free_run(word+inverse(word)) == [{(r, ()): ONE} for r in range(7)], 'root inverse failed') + for phase in gauges: + gauged = root_gauge(word, phase) + require(valid(gauged) and normalized(gauged) == word, 'root normalization failed') + require(free_run(gauged+inverse(gauged)) == [{(r, ()): ONE} for r in range(7)], 'gauged inverse failed') + gauge_checks += 1 + for k in range(len(word)): + require(not valid(word[:k]+word[k+1:]), 'deleted query escaped') + changed = word[:] + kind, j, c = changed[k] + changed[k] = (kind, j, neg(c)) + require(not valid(changed), 'phase sign error escaped') + controls += 2 + lowered = [] + for kind, j, c in word: + src, dst = (j, 6) if kind == 'B' else (6, 3+j) + child = product_word(factor_names[kind+str(j)], src, dst) + lowered.extend(child if c == ONE else inverse(child)) + require(free_run(lowered, rows=10, primitive=True) == expected(factor_names=factor_names, rows=10), + 'noncommutative leaf endpoint/restoration failed') + require(free_run(lowered+inverse(lowered), rows=10, primitive=True) == + [{(r, ()): ONE} for r in range(10)], 'leaf inverse failed') + leaf_counts[name] = len(lowered) + predicted = 2*sum(leaves(n) for n in factor_lengths.values()) + 2*leaves(factor_lengths[name]) + require(len(lowered) == predicted, 'unpaid leaf') + + orbit = orbit_words(witnesses) + require(len(orbit) == 288, 'wrong signed/permuted orbit') + for matrix, words in orbit.items(): + for word in words: + require(valid(word, matrix), 'orbit witness failure') + # Exact nonunit control: fuse the predecessor's two adjacent B0- calls. + original = [(k, j, (s, 0)) for k, j, s in signed_source['canonical']['word']] + require(original[:2] == [('B', 0, (-1, 0))]*2, 'nonunit control source changed') + nonunit = [('B', 0, (-2, 0))] + original[2:] + require(len(nonunit) == 13 and valid(nonunit, unit=False) and not valid(nonunit), + 'nonunit boundary control failed') + require(not valid(root_gauge(witnesses['A0'], OMEGA)[:-1]), 'unrestored rotation escaped') + require(free_run([('B',0,ONE)]*3)[6].get((0,('B0',))) == (3,0), 'characteristic-three leak') + controls += 3 + # Odd restored unit-phase words are legal; no signed-parity shortcut applies. + odd = [('B',0,ONE), ('A',0,ONE), ('B',0,OMEGA), ('A',0,(-1,0)), ('B',0,(-1,-1))] + odd_expected = [{(r, ()): ONE} for r in range(7)] + odd_expected[3][(0,('A0','B0'))] = (0,-1) + require(all(norm(c)==1 for _,_,c in odd) and free_run(odd)==odd_expected + and free_run(odd+inverse(odd))==[{(r, ()): ONE} for r in range(7)], + 'odd unit-phase positive control failed') + controls += 1 + return {'schema_version': 1, 'status': 'PASS_COMPLEX_UNIT_PHASE_CONNECTOR', + 'assignment_seed': 39, 'matrix': [list(r) for r in M], + 'signed_census': signed, 'unit_triangle_censuses': triangles, + 'all_ones_positive_census': positive_census, + 'unit_triangle_paths': sum(x['paths'] for x in triangles.values()), + 'minimum_complete_queries': 14, 'weighted_minimum': '2*sum(c_F)+2*min(c_F)', + 'orbit_matrices': len(orbit), 'orbit_word_checks': 6*len(orbit), + 'gauged_words': gauge_checks, 'semantic_controls': controls, + 'odd_unit_phase_positive_control': 'Five queries restore the root and add -omega*A0*B0*x0 to y0.', + 'nonunit_13_query_control': [[k,j,list(c)] for k,j,c in nonunit], + 'factor_lengths': factor_lengths, 'complete_leaf_counts': dict(sorted(leaf_counts.items())), + 'cheapest_fixture_operator': min(leaf_counts, key=leaf_counts.get), + 'scope': 'Written unit-phase reduction plus exact finite checks; no physical supplier, new kappa or proof-assistant theorem.'} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--emit-certificate', action='store_true', help='print regenerated evidence without comparing the committed certificate') + args = parser.parse_args() + result = evidence() + if args.emit_certificate: + print(json.dumps(result, indent=2, sort_keys=True)) + else: + require(json.loads((HERE / 'CERTIFICATE.json').read_text()) == result, 'certificate drift') + print('PASS_COMPLEX_UNIT_PHASE_CONNECTOR signed_paths=720 triangle_paths=30240 ' + 'minimum_queries=14 orbit_words=1728 controls=' + str(result['semantic_controls']) + ' no_new_kappa') + + +if __name__ == '__main__': + main()