From 308ebc7405303bb7ed91b012bb705949c6091a16 Mon Sep 17 00:00:00 2001 From: kyzer1023 <36684609+kyzer1023@users.noreply.github.com> Date: Thu, 15 Oct 2026 14:18:58 +0800 Subject: [PATCH] research: certify the QQ16 66-port family threshold --- research/qq16-owner-separation/README.md | 290 + research/qq16-owner-separation/RESULT.json | 7046 +++++++++++++++++ research/qq16-owner-separation/SOURCES.json | 42 + research/qq16-owner-separation/TASK.json | 152 + research/qq16-owner-separation/VERIFY.json | 45 + .../qq16-owner-separation/test_integrity.py | 71 + research/qq16-owner-separation/verify.py | 333 + 7 files changed, 7979 insertions(+) create mode 100644 research/qq16-owner-separation/README.md create mode 100644 research/qq16-owner-separation/RESULT.json create mode 100644 research/qq16-owner-separation/SOURCES.json create mode 100644 research/qq16-owner-separation/TASK.json create mode 100644 research/qq16-owner-separation/VERIFY.json create mode 100644 research/qq16-owner-separation/test_integrity.py create mode 100644 research/qq16-owner-separation/verify.py diff --git a/research/qq16-owner-separation/README.md b/research/qq16-owner-separation/README.md new file mode 100644 index 0000000000..1e83924936 --- /dev/null +++ b/research/qq16-owner-separation/README.md @@ -0,0 +1,290 @@ +# QQ16: full-owner separation and a sharp 66-port family threshold + +**Scoped exact result; no supplier or new kappa.** The common-axis witness +family of Adam Gall's PR2093 and commdata2338's PR2326 has **66 independent +original A-input defects across the whole owner array**. Any fixed set of +fewer than **66 ordinary source-port reads** leaves a nonzero defect in this +family invisible. A specified set of 66 removes this family. This does not +prove full controller recovery with 66 reads. + +The finite certificate is a **74-by-74 integer minor** with determinant + +```text +36317027395115679744. +``` + +Its rows are evaluations at actual owners: identity and a subset of the +stage-1 routes for ports 0 through 15. Together with an exact matching +upper bound, it proves rank 74 for the full-owner observation map. It +does not assume that distinct formal bit functions are independent. + +This answers PR2326's second open question for its stated coefficient +family. The original nine-port necessary bound used only the identity +owner. The full-owner calculation was developed as a complementary +independent method after seeing +[EdDiboi's parity-subspace claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/2205#discussioncomment-18941914). +Our [claim and finding](https://github.com/CrocSwap/integer-mult-bounds/discussions/2205#discussioncomment-18942020) +share the evidence in the same investigation thread. Neither the witness +family nor the threshold question is claimed as new here. + +## Contract and notation + +Keep the fixed QQ16 `F0/B_1_2` pair, the A/T/U partition, the ordinary +19-event schedule, and the selected/completed-X/history observation +contract. The first maps and ordinary schedule are unchanged. Permit +homogeneous linear selected-field controls after complete F0, which may +read a fixed set S of ordinary coordinates, including their entire owner +arrays and arbitrary owner mixing, but leave ordinary fields unchanged. +Subsequent homogeneous selected-only controls are also allowed. There +is no earlier input-dependent record, ordinary preprocessing, or read of +the final former-Y endpoint. Each source coordinate counts once regardless +of how many times or at how many owners it is read. Dense ordinary queries +and adaptive choices of source coordinates are outside this statement. + +Let `r_p` be column p of the actual 8-by-112 matrix R, let `U` be its 96 +ordinary ports, and let `b_p` be the first local chart axis. Let G be the +regular owner group from the retained QQ16 construction. Only actual +registered routes and their identity are used below. Define rational-valued +functions, constant in every tensor payload coordinate, + +```text +f_b(d) = bit_0(d b) in {0,1}, d in G, +h_p(d) = c_p f_(b_p)(d), c in Q^96, +V = ker(R_U), dim V = 88, +H(c)(d) = sum_(p in U) r_p c_p f_(b_p)(d) = B0 h(d). +``` + +The claimed dimension is over Q for this 96-parameter family. It is +**not a dimension per owner, a rank-unit charge, or a general transcript +width lower bound**. A dense eight-component old-chart observation can +detect these 66 directions across its whole array without contradiction. + +The exact source check gives `R_U R_U^T = 48 I` and `R_A R_A^T = 4 I`. +Thus `rank R_U = 8` and the selected injection at chart zero is invertible. +The verifier reads R from the pinned, reviewed QQ16 packet. It does not +claim to rederive that packet's complete native construction. + +## Why this is a hidden-input family + +The actual routes satisfy + +```text +rho_s(p) b_p = e_(9+8(s-1)), 1 <= s <= 8. +``` + +Because route action reads the owner at `d rho_s(p)`, for every c in V, + +```text +B_s h(d) = (R_U c) f_(e_(9+8(s-1)))(d) = 0, s=1,...,8. +``` + +All payload translations act trivially on these payload-constant fields. +The verifier checks the route identities and binds every one of the 1,008 +port/stage matrices to the actual QQ16 registry. This establishes the +all-owner cancellation by an identity, rather than by sampled owners. + +Initialize pair 0 as in the credited predecessor, with every other pair zero: + +```text +X_U=h, Y_U=0, +X_A=-P_(0,A) H(c), Y_A=-X_A, +X_T=Y_T=0. +``` + +The full initial query is zero. The ordered F0 identities give +`X_U=Y_U=h`, with every selected field zero. When `c_s=0` for s in S, +all permitted ordinary reads are also zero, so the allowed controls keep +this state unchanged. At B1, both `B1 h` and `B2 h` are zero; its output +is exactly `Y_(0,U)=h`, every other field zero. The retained tail leaves +only final `X_(0,U)=h`, carrying the former-Y native type. Every selected +field, completed-X descendant, and all five forward histories are zero. + +The written ordered argument is inherited from PR2093/PR2326. The new +checker independently replays its reduced symbolic ordinary trajectory +and checks it against the pinned QQ16 evidence and the actual hosted-call +schedule. It does not execute the native child kernels. Any `H(c) != 0` +therefore gives an original A-input defect that these observations cannot +distinguish from zero. Multiplication by the invertible selected section +`-P_(0,A)` preserves its dimension. Rational coefficients may all be +scaled to integers without changing indistinguishability. + +## Exact rank of the whole owner map + +Group the ordinary ports by their identical first axes. For each occurring +axis b define + +```text +C_b = {p in U : b_p=b}, +L_b(c) = sum_(p in C_b) r_p c_p, +L(c) = (L_b(c))_b. +``` + +Then `H(c)(d)=sum_b f_b(d)L_b(c)`, so H factors through L. The column +groups have disjoint coefficient supports; their ranks add. The exact +source census in [RESULT.json](RESULT.json) has 47 groups: + +- The axis-2 group has 30 ports and rank eight. +- Every other group's columns are linearly independent, with 66 ports + and total rank 66 across those groups. + +Consequently `rank L=74` and `rank H<=74` for the entire owner group. + +For a matching lower bound, take the 17 actual owners + +```text +d = I, rho_1(0), rho_1(1), ..., rho_1(15). +``` + +Form the 136-by-96 integer matrix E with entries + +```text +E_((d,k),p) = R_(k,p) bit_0(d b_p), 0 <= k < 8. +``` + +Rational row reduction selects 74 original rows and 74 original columns. +Their integer Bareiss determinant is the displayed nonzero value; every +division in the determinant calculation is checked. The receipt contains +all selected owner/component labels, ports, and minor entries, so the +certificate can be checked independently without trusting row selection. +The verifier reconstructs those entries from the pinned sources. + +Evaluation factors through H. Therefore + +```text +74 = rank E <= rank H <= rank L = 74. +``` + +In particular `ker H=ker L`, of dimension 22. Also +`R_U c=sum_b L_b(c)`, so `ker H` is contained in V. It follows that + +```text +dim H(V) = dim V - dim ker H = (96-8)-(96-74) = 66. +``` + +The checker additionally verifies `rank([E;R_U])=74`, an independent finite +check of the kernel containment used by this calculation. The 22-dimensional +kernel is exactly the redundancy inside the axis-2 group. An assumption +that H separates every nonzero coefficient vector would be false. + +## The sharp coordinate threshold for this family + +Fix any S of k accessed ports and put `V_S=V intersect {c_s=0 : s in S}`. +These are at most k scalar conditions on V, even when the controller gets +an entire owner array at each port: each array is just `c_s f_(b_s)` in +this family. Therefore `codim_V V_S<=k`. Choose a complement W to V_S +inside V. Since `H(V)=H(V_S)+H(W)`, + +```text +dim H(V_S) >= dim H(V) - dim W >= 66-k. +``` + +For every k<66 this leaves a nonzero original selected-input defect, +invisible through the full retained schedule. Even if all implementations +and reads cost zero, this class of controller cannot restore it. + +The bound is attained **for eliminating this particular family**. Leave +unread exactly the axis-2 group + +```text +[44,45,48,49,50,51,52,53,54,55,56,58,59,60,61,62, + 63,64,65,66,67,68,69,70,71,72,73,74,75,77] +``` + +and read its 66-port complement in U. Every `f_(b_p)` is nonzero at one +of the certified owners. Thus a zero read transcript imposes `c_s=0` +on all 66 read ports. The remaining vector obeys + +```text +H(c)(d) = f_2(d) R_U c = 0, c in V_S. +``` + +It has no original A defect. Differences between any two members of this +linear family satisfy the same argument, so the read transcript determines +the original A value within the family. No claim is made about a legal +decoder, its retention, physical bill, or other input families. The checker +also removes one tap from this attaining set: the resulting 65-tap case +has exactly one remaining defect, as required. + +## Reproduction and checked scope + +From the repository root, using Python 3.12 or later and its standard library: + +```sh +python3 -I -B scripts/research_package.py --package research/qq16-owner-separation +python3 -I -O -B research/qq16-owner-separation/verify.py +``` + +Expected direct output: + +```text +PASS_QQ16_OWNER_SEPARATION rank=74 defect=66 sharp_family_taps=66 controls=12 no_new_kappa +``` + +Replay authenticates every consumed source, reconstructs the exact rank +certificate, and compares the whole canonical receipt including scalar +types. It is read-only; `--emit-result NEW_PATH` creates a new receipt +exclusively. All checks stay active under `-O`. + +Controls cover a singular separating minor, wrong determinant, payload-only +owner action, an unregistered route, a wrong common axis, confusing the +identity owner with the full array, incorrect F2 bank binding, an omitted +cancelling bridge, source corruption, JSON type corruption, and the false +65-tap sufficiency assertion. The F2 bank mutation is caught by source-call +binding; this particular zero-X trajectory alone would not detect it. + +On native Windows, the complete registered replay passed with CPython +3.12.14, including normal and optimized runs and three isolated integrity +tests. The latter check a relocated positive replay, a corrupted receipt, +and a corrupted source manifest without changing frozen inputs. CPython +3.14.6 reproduces the exact receipt. These are local results; hosted CI is +reported separately in the PR. + +The proof is a scoped rational linear-algebra argument with exact finite +source evidence. It is not a proof-assistant formalization, independent +human review, native execution, complete supplier replay, all-size or +precision proof. Native hosting, legal final reads, arbitrary-input +controller recovery and a complete invoice remain unproved. The selected +frontier and frozen inputs are untouched. + +## Provenance and credit + +Scientific base: canonical main `0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`, +priority revision 4. The task picker selected `recursive-interfaces`, nonce +`19ff9482038bcc5873e8a54d230d4e65`. Source hashes and Git blobs are in +[SOURCES.json](SOURCES.json); [TASK.json](TASK.json) records the scoped +assignment, live-overlap coverage, and verification environment. + +- **commdata2338 / PR2326**, exact inspected head + `fb7d64cd4a51c49bc56920305b0aca64011a420c`: coordinate-access contract, + identity-owner bounds, and the sharp-threshold open question. +- **Adam Gall / PR2093**, head `8b21a900eb520e4f11ea177b310f66316f8e8983`: + common-axis bit-function witness, its initial A cancellation and retained + tail. Its source was read through PR2326's byte-retained reference; no + predecessor executable is imported or vendored here. +- **Ali Romman / PR1969**: the QQ16 local maps, packet, route semantics, + original lost-query witness and retained schedule. +- **Cinna Davis / PR2216 and PR2268**: the shear and ordinary-tap repair + question. **EdDiboi**: concurrent parity-subspace threshold investigation; + our different finite certificate was shared before submission. +- Retained construction and compiler authors, with notices in the + unchanged [QQ16 package](../joint-query/NOTICE.md). + +New code and proof prepared by kyzer1023 with substantial OpenAI Codex +assistance for derivation, implementation, checking and writing. Apache-2.0. +Author-checked only; source reuse and the concurrent investigation are +explicit. There is no change to supplier admission or kappa. + +## Open next questions + +1. **Does one dense old-chart read close the remaining full controller + kernel?** This family is detected by `B0 X_U`, so further coordinate + tapping is a poor route around this particular obstruction. First fix + the exact read and retention cut, then test the complete ordered kernel + as in PR2174. Other input families, native access and final retention + remain blockers. +2. **Does the attaining 66-port set fail on a different input family?** + Family elimination alone is not controller recovery. First apply the + full F0/B1 kernel calculation with that exact observation set, retaining + the actual final-cut contract. The enormous owner representation and + missing physical implementation preclude a supplier claim from this + local calculation. diff --git a/research/qq16-owner-separation/RESULT.json b/research/qq16-owner-separation/RESULT.json new file mode 100644 index 0000000000..da2fd3f34d --- /dev/null +++ b/research/qq16-owner-separation/RESULT.json @@ -0,0 +1,7046 @@ +{ + "65_tap_remaining_defect": 1, + "archive_members": { + "t16/global/base/split-centres/GLOBAL-TEMPLATE.json.gz": "a179dad87651aba340a5a8ddbcd86a8e757cad87b8a1f8bad48106fbecd38518", + "t16/global/base/work/complex-nine-native/DATA-PHASES.json": "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa" + }, + "attaining_taps": [ + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 22, + 23, + 24, + 25, + 26, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 38, + 39, + 40, + 41, + 42, + 43, + 78, + 79, + 80, + 82, + 83, + 84, + 85, + 86, + 88, + 89, + 90, + 91, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109 + ], + "attaining_unread_ports": [ + 44, + 45, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 77 + ], + "coefficient_kernel_dimension": 22, + "common_kernel_dimension": 88, + "group_rank_upper_bound": 74, + "groups": [ + { + "axis": 2, + "basis_ports": [ + 44, + 45, + 48, + 49, + 50, + 54, + 58, + 77 + ], + "ports": [ + 44, + 45, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 77 + ], + "rank": 8 + }, + { + "axis": 13, + "basis_ports": [ + 25 + ], + "ports": [ + 25 + ], + "rank": 1 + }, + { + "axis": 14, + "basis_ports": [ + 6 + ], + "ports": [ + 6 + ], + "rank": 1 + }, + { + "axis": 21, + "basis_ports": [ + 1, + 26 + ], + "ports": [ + 1, + 26 + ], + "rank": 2 + }, + { + "axis": 25, + "basis_ports": [ + 31 + ], + "ports": [ + 31 + ], + "rank": 1 + }, + { + "axis": 37, + "basis_ports": [ + 2 + ], + "ports": [ + 2 + ], + "rank": 1 + }, + { + "axis": 38, + "basis_ports": [ + 8 + ], + "ports": [ + 8 + ], + "rank": 1 + }, + { + "axis": 42, + "basis_ports": [ + 12 + ], + "ports": [ + 12 + ], + "rank": 1 + }, + { + "axis": 49, + "basis_ports": [ + 35 + ], + "ports": [ + 35 + ], + "rank": 1 + }, + { + "axis": 50, + "basis_ports": [ + 16 + ], + "ports": [ + 16 + ], + "rank": 1 + }, + { + "axis": 69, + "basis_ports": [ + 3, + 28 + ], + "ports": [ + 3, + 28 + ], + "rank": 2 + }, + { + "axis": 70, + "basis_ports": [ + 9 + ], + "ports": [ + 9 + ], + "rank": 1 + }, + { + "axis": 73, + "basis_ports": [ + 32 + ], + "ports": [ + 32 + ], + "rank": 1 + }, + { + "axis": 74, + "basis_ports": [ + 13 + ], + "ports": [ + 13 + ], + "rank": 1 + }, + { + "axis": 82, + "basis_ports": [ + 17 + ], + "ports": [ + 17 + ], + "rank": 1 + }, + { + "axis": 97, + "basis_ports": [ + 38 + ], + "ports": [ + 38 + ], + "rank": 1 + }, + { + "axis": 133, + "basis_ports": [ + 4, + 29 + ], + "ports": [ + 4, + 29 + ], + "rank": 2 + }, + { + "axis": 134, + "basis_ports": [ + 10 + ], + "ports": [ + 10 + ], + "rank": 1 + }, + { + "axis": 137, + "basis_ports": [ + 33 + ], + "ports": [ + 33 + ], + "rank": 1 + }, + { + "axis": 138, + "basis_ports": [ + 14 + ], + "ports": [ + 14 + ], + "rank": 1 + }, + { + "axis": 146, + "basis_ports": [ + 18 + ], + "ports": [ + 18 + ], + "rank": 1 + }, + { + "axis": 161, + "basis_ports": [ + 39 + ], + "ports": [ + 39 + ], + "rank": 1 + }, + { + "axis": 193, + "basis_ports": [ + 41 + ], + "ports": [ + 41 + ], + "rank": 1 + }, + { + "axis": 194, + "basis_ports": [ + 22 + ], + "ports": [ + 22 + ], + "rank": 1 + }, + { + "axis": 253, + "basis_ports": [ + 84, + 97, + 102, + 106, + 109 + ], + "ports": [ + 84, + 97, + 102, + 106, + 109 + ], + "rank": 5 + }, + { + "axis": 254, + "basis_ports": [ + 91 + ], + "ports": [ + 91 + ], + "rank": 1 + }, + { + "axis": 261, + "basis_ports": [ + 5, + 30 + ], + "ports": [ + 5, + 30 + ], + "rank": 2 + }, + { + "axis": 262, + "basis_ports": [ + 11 + ], + "ports": [ + 11 + ], + "rank": 1 + }, + { + "axis": 265, + "basis_ports": [ + 34 + ], + "ports": [ + 34 + ], + "rank": 1 + }, + { + "axis": 266, + "basis_ports": [ + 15 + ], + "ports": [ + 15 + ], + "rank": 1 + }, + { + "axis": 274, + "basis_ports": [ + 19 + ], + "ports": [ + 19 + ], + "rank": 1 + }, + { + "axis": 289, + "basis_ports": [ + 40 + ], + "ports": [ + 40 + ], + "rank": 1 + }, + { + "axis": 321, + "basis_ports": [ + 42 + ], + "ports": [ + 42 + ], + "rank": 1 + }, + { + "axis": 322, + "basis_ports": [ + 23 + ], + "ports": [ + 23 + ], + "rank": 1 + }, + { + "axis": 381, + "basis_ports": [ + 83, + 96, + 101, + 105, + 108 + ], + "ports": [ + 83, + 96, + 101, + 105, + 108 + ], + "rank": 5 + }, + { + "axis": 382, + "basis_ports": [ + 90 + ], + "ports": [ + 90 + ], + "rank": 1 + }, + { + "axis": 385, + "basis_ports": [ + 43 + ], + "ports": [ + 43 + ], + "rank": 1 + }, + { + "axis": 386, + "basis_ports": [ + 24 + ], + "ports": [ + 24 + ], + "rank": 1 + }, + { + "axis": 445, + "basis_ports": [ + 82, + 95, + 100, + 104, + 107 + ], + "ports": [ + 82, + 95, + 100, + 104, + 107 + ], + "rank": 5 + }, + { + "axis": 446, + "basis_ports": [ + 89 + ], + "ports": [ + 89 + ], + "rank": 1 + }, + { + "axis": 477, + "basis_ports": [ + 94, + 99, + 103 + ], + "ports": [ + 94, + 99, + 103 + ], + "rank": 3 + }, + { + "axis": 478, + "basis_ports": [ + 88 + ], + "ports": [ + 88 + ], + "rank": 1 + }, + { + "axis": 493, + "basis_ports": [ + 80, + 93, + 98 + ], + "ports": [ + 80, + 93, + 98 + ], + "rank": 3 + }, + { + "axis": 501, + "basis_ports": [ + 79 + ], + "ports": [ + 79 + ], + "rank": 1 + }, + { + "axis": 502, + "basis_ports": [ + 86 + ], + "ports": [ + 86 + ], + "rank": 1 + }, + { + "axis": 505, + "basis_ports": [ + 78 + ], + "ports": [ + 78 + ], + "rank": 1 + }, + { + "axis": 506, + "basis_ports": [ + 85 + ], + "ports": [ + 85 + ], + "rank": 1 + } + ], + "nonzero_chart_routes_checked": 896, + "ordinary_ports": [ + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 22, + 23, + 24, + 25, + 26, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 77, + 78, + 79, + 80, + 82, + 83, + 84, + 85, + 86, + 88, + 89, + 90, + 91, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109 + ], + "ordinary_rank": 8, + "original_A_defect_dimension": 66, + "owner_evaluation_count": 17, + "owner_evaluation_rank": 74, + "packet_route_bindings": 1008, + "rejecting_controls": [ + "duplicated separating row", + "wrong determinant", + "payload-only owner action", + "unregistered route", + "wrong common axis", + "identity-owner rank substituted", + "66 directions mislabeled per owner", + "wrong F2 bank", + "missing cancelling bridge", + "source corruption", + "receipt number changed to boolean", + "65 taps claimed sufficient" + ], + "schema": "qq16-owner-separation-v1", + "scope": "Coefficient-family result across the whole owner array, not per owner; fixed maps/schedule; no full controller, native tariff, supplier or kappa claim.", + "separating_minor": { + "determinant": "36317027395115679744", + "matrix": [ + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + -1, + 1, + 1, + 1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + -1, + 0, + 0, + 0, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + -1, + -1, + -1 + ], + [ + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + -1, + -1, + 1, + 0, + 0 + ], + [ + 0, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 0, + 0, + -1, + 1, + 0, + 0, + -1, + 1, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + -1, + 0, + 1, + -1 + ], + [ + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + -1, + -1, + -1, + 0, + -1, + -1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 1, + 1 + ], + [ + -1, + -1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + -1, + 0, + -1, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + -1, + 0, + 0, + -1, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 1, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + -1, + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + -1, + -1, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + -1, + 0, + 0, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 1, + -1, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + -1, + 0, + -1, + -1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + -1, + 0, + 0, + 1, + 1, + 1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 1, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + -1, + 0, + 0, + 1, + 1, + 0, + -1, + -1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + -1, + 1, + 0, + 0, + -1, + 1, + 0, + 0, + -1, + 1, + 1, + -1, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + -1, + 0, + -1, + -1, + 1, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 1, + 1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 1, + 1, + 1, + 1, + 0, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 0, + -1, + 0, + 0, + 1, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + -1, + 1, + 0, + 0, + 1, + -1, + 1, + -1, + 0, + 0, + 0, + 0, + -1, + 1, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + -1, + 0, + 0, + -1, + -1, + 0, + -1, + -1, + 0, + -1, + -1, + -1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 0, + 0, + -1, + -1, + 1, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0 + ], + [ + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 1, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0 + ], + [ + -1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + -1, + -1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0 + ], + [ + 0, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + -1, + 1, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 0, + 0, + -1, + 1, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + -1, + -1, + -1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + -1, + 0, + -1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + -1, + 0, + 0, + 1, + 1, + 1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 1, + 1, + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + 1, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + -1, + 0 + ], + [ + -1, + 0, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0 + ], + [ + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + -1, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0 + ], + [ + -1, + -1, + 0, + 0, + -1, + 1, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + 0, + 1, + 1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 1, + 0, + 1, + 1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + -1 + ], + [ + -1, + 0, + -1, + 0, + 0, + 1, + 1, + 0, + -1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + -1 + ], + [ + 0, + 1, + 1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + -1, + 0, + 0, + -1, + 0, + 0, + -1, + -1, + 0, + -1, + 0, + -1, + 0, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + -1, + 1, + 1, + 1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + -1, + -1, + -1 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + -1, + -1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + -1, + -1, + 1, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + -1, + 0, + 1, + -1 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 1, + 1 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + -1, + 0, + 0, + -1, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 1, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + -1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + -1, + 1, + 1, + 1, + 0, + 0, + 0 + ], + [ + -1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + -1, + -1, + 1, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 0, + 0, + -1, + 1, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + -1, + 0, + 1, + -1 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ], + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + -1, + -1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + -1, + -1, + 1, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 1, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + -1, + 0, + 1, + -1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + -1, + 0, + 1, + 1, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + -1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + -1, + 1, + 0, + 1, + 0, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0, + -1, + -1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + -1, + 1, + 1, + 0, + 0, + 0, + 0 + ] + ], + "ports": [ + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 22, + 23, + 24, + 25, + 26, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 48, + 49, + 50, + 54, + 58, + 77, + 78, + 79, + 80, + 82, + 83, + 84, + 85, + 86, + 88, + 89, + 90, + 91, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109 + ], + "rows": [ + [ + "identity", + 0 + ], + [ + "identity", + 1 + ], + [ + "identity", + 2 + ], + [ + "identity", + 3 + ], + [ + "identity", + 4 + ], + [ + "identity", + 5 + ], + [ + "identity", + 6 + ], + [ + "identity", + 7 + ], + [ + 0, + 0 + ], + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 0, + 3 + ], + [ + 0, + 4 + ], + [ + 0, + 5 + ], + [ + 0, + 6 + ], + [ + 0, + 7 + ], + [ + 1, + 0 + ], + [ + 1, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 1, + 4 + ], + [ + 1, + 5 + ], + [ + 1, + 6 + ], + [ + 1, + 7 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ], + [ + 2, + 2 + ], + [ + 2, + 3 + ], + [ + 2, + 4 + ], + [ + 2, + 5 + ], + [ + 2, + 6 + ], + [ + 2, + 7 + ], + [ + 3, + 0 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 3, + 7 + ], + [ + 4, + 0 + ], + [ + 4, + 1 + ], + [ + 4, + 2 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 4, + 6 + ], + [ + 4, + 7 + ], + [ + 5, + 0 + ], + [ + 5, + 1 + ], + [ + 5, + 2 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 5, + 6 + ], + [ + 6, + 0 + ], + [ + 6, + 1 + ], + [ + 6, + 2 + ], + [ + 6, + 3 + ], + [ + 6, + 4 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ], + [ + 6, + 7 + ], + [ + 7, + 0 + ], + [ + 7, + 1 + ], + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 7, + 5 + ], + [ + 8, + 0 + ], + [ + 8, + 4 + ], + [ + 8, + 5 + ], + [ + 13, + 2 + ], + [ + 14, + 2 + ], + [ + 15, + 2 + ] + ] + }, + "sharp_family_coordinate_threshold": 66, + "source_hashes": { + "research/community-frontier1042-audit/selected-replay.tar.gz": "22c3f4dce4b897a1d423d1388801933e288b6a6b1906cb15e1b16a5eb68db754", + "research/joint-query/certificate.json.gz": "a5ed85fac5ebf3c091482a113ab0d351eb5a7892fe2841a35e16017ec1ff49f7", + "research/joint-query/evidence/JOINT-QUERY-TRANSFER.md": "9e13e73ebf3192a6548798c2f1d13bd4d83957e8db0dc34de12b1a5311a52a75", + "research/joint-query/evidence/QQ16-SELECTED-WITNESS.json": "e35e5868a1322e406191079c0675975b139692ba50b1e2e5fb8a40b6480519f4" + }, + "status": "PASS_QQ16_OWNER_SEPARATION", + "tail_trajectory": [ + { + "coefficient": 1, + "dst": 0, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + -1, + 0, + 0, + 0, + 0 + ], + "src": 1 + }, + { + "kind": "local", + "ordinary": [ + 0, + 1, + 0, + -1, + 0, + 0, + 0, + 0 + ], + "stage": 2 + }, + { + "coefficient": -1, + "dst": 0, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "src": 1 + }, + { + "kind": "local", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "stage": 3 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "src": 2 + }, + { + "kind": "local", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "stage": 4 + }, + { + "coefficient": -1, + "dst": 1, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "src": 2 + }, + { + "kind": "local", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "stage": 5 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "src": 3 + }, + { + "kind": "local", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "stage": 6 + }, + { + "coefficient": -1, + "dst": 2, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "src": 3 + }, + { + "kind": "local", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "stage": 7 + }, + { + "kind": "local", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "stage": 8 + }, + { + "coefficient": 1, + "dst": 3, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "src": 2 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "src": 1 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "ordinary": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "src": 0 + }, + { + "kind": "terminal", + "ordinary": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + ] +} diff --git a/research/qq16-owner-separation/SOURCES.json b/research/qq16-owner-separation/SOURCES.json new file mode 100644 index 0000000000..30b80ff300 --- /dev/null +++ b/research/qq16-owner-separation/SOURCES.json @@ -0,0 +1,42 @@ +{ + "schema_version": 1, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "e8870e5917057d59b730eb14721a778639eca050", + "sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7" + }, + { + "path": "research/community-frontier1042-audit/selected-replay.tar.gz", + "usage": "input", + "git_blob": "6f4dc6fe7631d8aacf8081fcaecf32197181685b", + "sha256": "22c3f4dce4b897a1d423d1388801933e288b6a6b1906cb15e1b16a5eb68db754" + }, + { + "path": "research/joint-query/certificate.json.gz", + "usage": "input", + "git_blob": "c6e876d8b48d768214deee265ade428f8983b566", + "sha256": "a5ed85fac5ebf3c091482a113ab0d351eb5a7892fe2841a35e16017ec1ff49f7" + }, + { + "path": "research/joint-query/evidence/JOINT-QUERY-TRANSFER.md", + "usage": "input", + "git_blob": "a6805c58f23132f9420efebf90f5b7e863c2e179", + "sha256": "9e13e73ebf3192a6548798c2f1d13bd4d83957e8db0dc34de12b1a5311a52a75" + }, + { + "path": "research/joint-query/evidence/QQ16-SELECTED-WITNESS.json", + "usage": "input", + "git_blob": "5082d791d0b993492cbc5bf61ac3b69e82c96f3f", + "sha256": "e35e5868a1322e406191079c0675975b139692ba50b1e2e5fb8a40b6480519f4" + } + ] +} diff --git a/research/qq16-owner-separation/TASK.json b/research/qq16-owner-separation/TASK.json new file mode 100644 index 0000000000..540568430d --- /dev/null +++ b/research/qq16-owner-separation/TASK.json @@ -0,0 +1,152 @@ +{ + "schema_version": 1, + "task_id": "joint-query-controller", + "priority_revision": 4, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "original_card": { + "id": "joint-query-controller", + "question": "Can one explicitly changed QQ16 interface recover the missing chart query and close a two-call controller within a favorable full budget?", + "starting_points": [ + "research/joint-query/README.md", + "research/joint-query/evidence/QQ16-SELECTED-WITNESS.md", + "research/joint-query/evidence/JOINT-QUERY-TRANSFER.md", + "docs/research/community-efficient1000-review.md" + ], + "methods": [ + "Add one explicitly priced ordinary-to-selected observation and derive the ordered two-call map and inverse.", + "Change the first local pair or retained state, then test the existing lost-observation witness and price all new operations." + ], + "acceptance_gate": "Name the changed premise of the fixed F0/B1 observation obstruction. Show exactly which query is recovered, legal native reads and restoration, and a full favorable budget including cover maps, helpers and endpoints. Local inverse identities alone do not close the global controller.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the fixed-first-pair QQ16 witness before designing a controller. The checked #1969 local words do not evade that witness or supply global placement.", + "scope": "Source-bound orientation only. Read the named package and review before relying on its local evidence; this command is not its replay or supplier admission." + }, + "first_experiment": "Apply the existing witness to one proposed extra observation or changed first pair. If it still loses the required record, stop. Otherwise derive one ordered two-call identity and charge the added read, chart maps and restoration before extending to more stages.", + "bottleneck_link": "The native local words exist; retained query information and its physical access are the missing link to a composed recursive interface.", + "allowed_variations": [ + "One paid query, one changed first pair, or one precisely specified affine helper state.", + "A counterexample or lower bound for that exact proposed repair." + ], + "scope_change_triggers": [ + "Retaining the fixed first pair and ordinary schedule while allowing only homogeneous selected-only control, already excluded by the witness.", + "Treating cover-map counts as zero-cost physical address operations." + ], + "overlap_terms": [ + "QQ16", + "joint-query", + "changing-chart controller", + "selected observation", + "1969" + ] + }, + "scope_status": "refined", + "actual_scope": "Exact rank of the full-owner map c -> B0 h on the credited QQ16 common-axis family, its 66-dimensional original-A defect, and the sharp 66 fixed-port threshold for eliminating that family.", + "scope_change_reason": "Take PR2326 open question 2; complement the active parity-subspace investigation with actual routed-owner evaluations, rather than repeat its identity-owner deletion bound.", + "bottleneck_link": "Determine how much ordinary coordinate access is required even to eliminate the known QQ16 information-loss family before pricing a controller.", + "budget_minutes": 60, + "stop_rule": "Stop at an exact full-owner rank certificate and its scoped consequence, or a precise rank obstruction; reserve final quarter for validation and handoff.", + "outcome": "completed", + "evidence": "RESULT.json: exact rational rank 74 and a 74-by-74 integer minor of determinant 36317027395115679744; matching formal-group upper bound; original-A defect 66; attaining 66-port set; all 1008 source route bindings and reduced 19-event schedule; 12 rejecting controls. README.md gives the scoped proof.", + "author": "kyzer1023, with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance for derivation, implementation, validation and writing; no independent human review claimed.", + "open_questions": [ + { + "question": "Does one dense old-chart record close the remaining full controller kernel?", + "why_it_matters": "B0 X_U detects this entire family; a new controller must address other inputs and physical retention.", + "first_step": "Fix the read/retention cut and test the complete ordered kernel, using the PR2174 observation contract as context. A concurrent claim now addresses the shear plus one B0 read: https://github.com/CrocSwap/integer-mult-bounds/discussions/2205#discussioncomment-18942212.", + "blocked_by": "Other input families, native read access, final retention and a complete invoice remain unproved." + }, + { + "question": "Does the attaining 66-port set fail on a different input family?", + "why_it_matters": "Eliminating the common-axis family is not full selected-input recovery.", + "first_step": "Test the exact complement of the axis-2 group against the complete F0/B1 ordered kernel with the retained final observation contract.", + "blocked_by": "The full owner representation and physical implementation are not supplied by this certificate." + } + ], + "selection": { + "nonce": "19ff9482038bcc5873e8a54d230d4e65", + "track": "recursive-interfaces", + "scope_key": "0e34adbc1dd119161c3a" + }, + "overlap": { + "predecessor_pr": 2326, + "predecessor_head": "fb7d64cd4a51c49bc56920305b0aca64011a420c", + "parallel_claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2205#discussioncomment-18941914", + "distinction": "Independent full-owner separating evaluations, not parity-subspace deletion enumeration.", + "entry_coverage": { + "open_prs": 552, + "open_prs_fetched_at": "2026-10-15T05:56:45.284933+00:00", + "discussion_records": 1063, + "discussions_fetched_at": "2026-10-15T05:59:38.381811+00:00", + "complete_pagination": true, + "limits": "Titles/bodies and indexed local notes; not every code diff. No-match is not a novelty certificate." + }, + "final_coverage": { + "open_prs": 564, + "open_prs_fetched_at": "2026-10-15T06:13:48.516587+00:00", + "discussion_records": 1078, + "discussions_fetched_at": "2026-10-15T06:16:43.032143+00:00", + "complete_pagination": true, + "warnings": [], + "findings": "Same active parity-subspace claim, our own claim/finding, and a distinct dense-record claim; no public competing full-owner certificate found in this coverage." + } + }, + "cost_screen": "Grant all permitted reads, selected control, frames, hosting, precision and restoration free: k<66 still fails for some input. No completed supplier or new moment is claimed; 66 is a source-port count, not a native cost.", + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2205#discussioncomment-18942020", + "finding_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2205#discussioncomment-18942071", + "predecessors": [ + { + "pr": 2326, + "head": "fb7d64cd4a51c49bc56920305b0aca64011a420c", + "role": "Coordinate-access contract and sharp-threshold question; inspected, no executable dependency." + }, + { + "pr": 2093, + "head": "8b21a900eb520e4f11ea177b310f66316f8e8983", + "role": "Common-axis family and tail; code inspected through its retained PR2326 reference, not imported." + }, + { + "pr": 1969, + "role": "QQ16 maps and packet on main; runtime input pins in SOURCES.json." + }, + { + "pr": 2216, + "role": "Selected shear question; context only." + }, + { + "pr": 2268, + "role": "Ordinary source tap and full-kernel handoff; context only." + } + ], + "validation": { + "initial_runtime": "3.14.6 (tags/v3.14.6:c63aec6, Jun 10 2026, 10:26:10) [MSC v.1944 64 bit (AMD64)]", + "platform": "Windows-11-10.0.26200-SP0", + "executed": [ + "python -I -B research/qq16-owner-separation/verify.py --emit-result research/qq16-owner-separation/RESULT.json", + "uv run --no-project --python 3.12 python -I -B scripts/research_package.py --package research/qq16-owner-separation", + "python -I -O -B research/qq16-owner-separation/verify.py", + "git diff --check" + ], + "not_run": [ + "Full supplier cold replay", + "Native child kernels", + "Proof-assistant formalization", + "Independent human review" + ], + "registered_runtime": "CPython 3.12.14, Windows x86_64; normal/optimized exact replays and three isolated integrity tests passed.", + "direct_runtime": "CPython 3.14.6, Windows x86_64; normal/optimized exact receipts agree.", + "result": "rank=74 defect=66 sharp_family_taps=66; 12 in-verifier controls; three integrity tests passed; all frozen inputs unchanged." + }, + "freshness": { + "upstream_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "priority_revision": 4, + "checked_at_utc": "2026-10-15T06:13:48Z", + "change": "No upstream or PR2326 head change since entry." + } +} diff --git a/research/qq16-owner-separation/VERIFY.json b/research/qq16-owner-separation/VERIFY.json new file mode 100644 index 0000000000..1bd1a54bdf --- /dev/null +++ b/research/qq16-owner-separation/VERIFY.json @@ -0,0 +1,45 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/community-frontier1042-audit/selected-replay.tar.gz", + "research/joint-query/certificate.json.gz", + "research/joint-query/evidence/JOINT-QUERY-TRANSFER.md", + "research/joint-query/evidence/QQ16-SELECTED-WITNESS.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Authenticated inputs, exact rational and integer rank certificate, matching group upper bound, sharp family threshold, route/schedule binding and 12 rejecting controls." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Same exact proof evidence and failure controls with Python assertions disabled." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/test_integrity.py" + ], + "timeout_seconds": 120, + "checks": "Relocated optimized replay preserves package bytes; altered recorded rank and altered source manifest fail closed." + } + ] +} diff --git a/research/qq16-owner-separation/test_integrity.py b/research/qq16-owner-separation/test_integrity.py new file mode 100644 index 0000000000..37931952d0 --- /dev/null +++ b/research/qq16-owner-separation/test_integrity.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +"""Check fail-closed receipt/pin handling in an isolated package copy. + +No frozen input is edited. kyzer1023 with OpenAI Codex assistance, Apache-2.0. +""" +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parents[1] +BOOTSTRAP = """ +import importlib.util +from pathlib import Path +import sys +spec = importlib.util.spec_from_file_location('subject', sys.argv[1]) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +module.ROOT = Path(sys.argv[2]) +sys.argv = [sys.argv[1]] +module.main() +""" + + +class IntegrityTests(unittest.TestCase): + def run_copy(self, change): + with tempfile.TemporaryDirectory(prefix="qq16-owner-integrity-") as directory: + copied = Path(directory) / "package" + shutil.copytree(PACKAGE, copied, ignore=shutil.ignore_patterns("__pycache__")) + change(copied) + before = {p.name: p.read_bytes() for p in copied.iterdir() if p.is_file()} + process = subprocess.run( + [sys.executable, "-I", "-O", "-B", "-c", BOOTSTRAP, + str(copied / "verify.py"), str(ROOT)], + capture_output=True, text=True, timeout=60) + after = {p.name: p.read_bytes() for p in copied.iterdir() if p.is_file()} + self.assertEqual(before, after, "replay must not rewrite evidence") + return process + + def test_relocated_positive(self): + process = self.run_copy(lambda _: None) + self.assertEqual(process.returncode, 0, process.stderr) + self.assertIn("PASS_QQ16_OWNER_SEPARATION", process.stdout) + + def test_wrong_recorded_rank(self): + def corrupt(package): + path = package / "RESULT.json" + result = json.loads(path.read_text(encoding="utf-8")) + result["owner_evaluation_rank"] = 73 + path.write_text(json.dumps(result), encoding="utf-8") + process = self.run_copy(corrupt) + self.assertNotEqual(process.returncode, 0) + self.assertIn("complete canonical receipt equality", process.stderr) + + def test_wrong_source_manifest(self): + def corrupt(package): + path = package / "SOURCES.json" + result = json.loads(path.read_text(encoding="utf-8")) + next(row for row in result["files"] if row["usage"] == "input")["sha256"] = "0" * 64 + path.write_text(json.dumps(result), encoding="utf-8") + process = self.run_copy(corrupt) + self.assertNotEqual(process.returncode, 0) + self.assertIn("declared input pins", process.stderr) + + +if __name__ == "__main__": + unittest.main() diff --git a/research/qq16-owner-separation/verify.py b/research/qq16-owner-separation/verify.py new file mode 100644 index 0000000000..adb224155a --- /dev/null +++ b/research/qq16-owner-separation/verify.py @@ -0,0 +1,333 @@ +#!/usr/bin/env python3 +"""Exact full-owner rank certificate for the credited QQ16 kernel family. + +No predecessor Python is imported. All checks remain active under -O. +kyzer1023 with substantial OpenAI Codex assistance; Apache-2.0. +""" +import argparse +from fractions import Fraction as Q +import gzip +from hashlib import sha256 +from io import BytesIO +import json +from pathlib import Path +import tarfile + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parents[1] +ARCHIVE = "research/community-frontier1042-audit/selected-replay.tar.gz" +PACKET = "research/joint-query/certificate.json.gz" +WITNESS = "research/joint-query/evidence/QQ16-SELECTED-WITNESS.json" +PROOF = "research/joint-query/evidence/JOINT-QUERY-TRANSFER.md" +PINS = { + ARCHIVE: "22c3f4dce4b897a1d423d1388801933e288b6a6b1906cb15e1b16a5eb68db754", + PACKET: "a5ed85fac5ebf3c091482a113ab0d351eb5a7892fe2841a35e16017ec1ff49f7", + WITNESS: "e35e5868a1322e406191079c0675975b139692ba50b1e2e5fb8a40b6480519f4", + PROOF: "9e13e73ebf3192a6548798c2f1d13bd4d83957e8db0dc34de12b1a5311a52a75", +} +MEMBERS = { + "t16/global/base/work/complex-nine-native/DATA-PHASES.json": + "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa", + "t16/global/base/split-centres/GLOBAL-TEMPLATE.json.gz": + "a179dad87651aba340a5a8ddbcd86a8e757cad87b8a1f8bad48106fbecd38518", +} +A = [0, 7, 20, 27, 36, 46, 57, 111] +T = [21, 37, 47, 76, 81, 87, 92, 110] +U = [p for p in range(112) if p not in A + T] +IDENTITY = tuple(1 << j for j in range(73)) +MINOR_DETERMINANT = 36317027395115679744 + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")) + + +def authenticate(raw, expected, label): + require(sha256(raw).hexdigest() == expected, "source hash: " + label) + return raw + + +def load_sources(): + sources = json.loads((PACKAGE / "SOURCES.json").read_text(encoding="utf-8")) + require({r["path"]: r["sha256"] for r in sources["files"] + if r["usage"] == "input"} == PINS, "declared input pins") + raw = {name: authenticate((ROOT / name).read_bytes(), pin, name) + for name, pin in PINS.items()} + members = {} + with tarfile.open(fileobj=BytesIO(raw[ARCHIVE]), mode="r:gz") as archive: + for name, pin in MEMBERS.items(): + matches = [m for m in archive.getmembers() if m.name == name] + require(len(matches) == 1 and matches[0].isfile(), "unique archive member") + data = authenticate(archive.extractfile(matches[0]).read(), pin, name) + members[name.rsplit("/", 1)[-1]] = json.loads( + gzip.decompress(data) if name.endswith(".gz") else data) + return (json.loads(gzip.decompress(raw[PACKET])), members["DATA-PHASES.json"], + members["GLOBAL-TEMPLATE.json.gz"], json.loads(raw[WITNESS])) + + +def rref(matrix): + """Rational reduction; transposing selects independent original rows.""" + a = [list(map(Q, row)) for row in matrix] + require(bool(a) and bool(a[0]) and all(len(row) == len(a[0]) for row in a), + "nonempty rectangular matrix") + pivots = [] + for col in range(len(a[0])): + k = len(pivots) + pivot = next((i for i in range(k, len(a)) if a[i][col]), None) + if pivot is None: + continue + a[k], a[pivot] = a[pivot], a[k] + scale = a[k][col] + a[k] = [x / scale for x in a[k]] + for i in range(len(a)): + if i != k and a[i][col]: + scale = a[i][col] + a[i] = [x - scale * y for x, y in zip(a[i], a[k])] + pivots.append(col) + if len(pivots) == len(a): + break + return a, pivots + + +def rank(matrix): + return len(rref(matrix)[1]) + + +def determinant(matrix): + """Integer Bareiss determinant, with every exact division checked.""" + a = [row[:] for row in matrix] + n = len(a) + require(n > 0 and all(len(row) == n for row in a), "square minor") + require(all(type(x) is int for row in a for x in row), "integer minor") + previous, sign = 1, 1 + for k in range(n - 1): + pivot_row = next((i for i in range(k, n) if a[i][k]), None) + if pivot_row is None: + return 0 + if pivot_row != k: + a[k], a[pivot_row] = a[pivot_row], a[k] + sign = -sign + pivot = a[k][k] + for i in range(k + 1, n): + for j in range(k + 1, n): + value, remainder = divmod(a[i][j] * pivot - a[i][k] * a[k][j], previous) + require(remainder == 0, "Bareiss exact division") + a[i][j] = value + a[i][k] = 0 + previous = pivot + return sign * a[-1][-1] + + +def action(columns, vector): + result = 0 + while vector: + bit = vector & -vector + result ^= columns[bit.bit_length() - 1] + vector ^= bit + return result + + +def route(basis, stage): + columns = [] + for vector in IDENTITY: + for i, axis in enumerate(basis): + difference = axis ^ (1 << (9 + 8 * (stage - 1) + i)) + if (vector & difference).bit_count() & 1: + vector ^= difference + columns.append(vector) + return tuple(columns) + + +def check_route(columns, basis, stage, registered): + require(columns in registered, "route absent from QQ16 packet") + require(all(action(columns, v) == IDENTITY[i] for i, v in enumerate(columns)), + "route involution") + if stage: + require(all(action(columns, b) == 1 << (9 + 8 * (stage - 1) + i) + for i, b in enumerate(basis)), "common-axis route") + + +def groups_certificate(R, bases): + groups = {} + for p in U: + groups.setdefault(bases[p][0], []).append(p) + records = [] + for axis, ports in sorted(groups.items()): + _, pivots = rref([[R[k][p] for p in ports] for k in range(8)]) + records.append({"axis": axis, "ports": ports, "rank": len(pivots), + "basis_ports": [ports[j] for j in pivots]}) + return records + + +def tail_certificate(recipe, previous): + """Symbolic h-multipliers, using B_s h=0 for every s=1,...,8.""" + require(recipe[:2] == [{"kind": "local", "pair": 0, "reverse": False, "stage": 0}, + {"kind": "local", "pair": 0, "reverse": True, "stage": 1}], + "fixed first pair") + banks = [[0, 1], [0, 0], [0, 0], [0, 0]] + records = [] + for event in recipe[2:]: + kind = event["kind"] + if kind == "bridge": + s, t, c = event["src"], event["dst"], event["coefficient"] + banks[t][0] += c * banks[s][0] + banks[s][1] -= c * banks[t][1] + record = dict(event) + elif kind == "local": + require(1 <= event["stage"] <= 8, "nonzero later chart") + x, y = banks[event["pair"]] + banks[event["pair"]] = [x - y, y] if event["reverse"] else [x, y + x] + record = {"kind": "local", "stage": event["stage"]} + else: + require(kind == "terminal" and all(x == 0 for x, _ in banks), + "zero completed-X descendants") + banks = [[y, -x] for x, y in banks] + record = {"kind": "terminal"} + record["ordinary"] = [x for pair in banks for x in pair] + records.append(record) + require(records == previous["trajectory_after_B1"], "pinned full tail trajectory") + require(banks == [[1, 0], [0, 0], [0, 0], [0, 0]], "former-Y endpoint") + return records + + +def reject(name, operation, controls): + try: + operation() + except ValueError: + controls.append(name) + else: + raise ValueError("control did not reject: " + name) + + +def check_call_bindings(recipe, calls): + scheduled = {(e["stage"], e["pair"], "backward" if e["reverse"] else "forward") + for e in recipe if e["kind"] == "local"} + require(scheduled == {(c["stage"], c["pair"], c["orientation"]) for c in calls}, + "recipe and hosted-call binding") + + +def build_result(): + packet, phases, template, previous = load_sources() + require((packet["A_ports"], packet["T_ports"], packet["U_ports"]) == (A, T, U), + "actual QQ16 partition") + rational = [[Q(row.get(str(p), "0")) for p in range(112)] for row in packet["R_rows"]] + require(len(rational) == 8 and all(x.denominator == 1 for row in rational for x in row), + "integral source centre matrix") + R = [[int(x) for x in row] for row in rational] + RU = [[row[p] for p in U] for row in R] + for ports, scale in ((U, 48), (A, 4)): + require(all(sum(R[i][p] * R[j][p] for p in ports) == (scale if i == j else 0) + for i in range(8) for j in range(8)), "ordinary/selected Gram") + require(phases["m"] == 73 and len(phases["recipes"]) == 112, "phase geometry") + registered = {tuple(row["owner_right_matrix_columns"]) for row in packet["map_registry"].values()} + bases, routes = [], [] + for p, record in enumerate(phases["recipes"]): + basis = tuple(record["idle_children"][0]["orthogonal_axes"][:8]) + local = (record["q"],) + basis + require(record["port"] == p and len(local) == 9 and all(0 < x < 512 for x in local), + "local chart dimensions") + require(all(((x & y).bit_count() & 1) == (i == j) + for i, x in enumerate(local) for j, y in enumerate(local)), "orthonormal chart") + port_routes = [IDENTITY] + [route(basis, s) for s in range(1, 9)] + for s, columns in enumerate(port_routes): + check_route(columns, basis, s, registered) + bases.append(basis) + routes.append(port_routes) + groups = groups_certificate(R, bases) + upper = sum(g["rank"] for g in groups) + require(upper == 74 and len(groups) == 47, "formal group rank bound") + + # Fixed actual owners suffice; no independence of formal bit functions assumed. + owners = [("identity", IDENTITY)] + [(p, routes[p][1]) for p in range(16)] + labels, evaluations = [], [] + for owner, columns in owners: + for k in range(8): + labels.append([owner, k]) + evaluations.append([R[k][p] * (action(columns, bases[p][0]) & 1) for p in U]) + require(all(any(action(columns, bases[p][0]) & 1 for _, columns in owners) for p in U), + "every coordinate function has a nonzero owner evaluation") + _, selected_rows = rref(list(map(list, zip(*evaluations)))) + selected = [evaluations[i] for i in selected_rows] + _, selected_columns = rref(selected) + require(len(selected_rows) == len(selected_columns) == upper, "matching lower and upper ranks") + minor = [[row[j] for j in selected_columns] for row in selected] + exact_det = determinant(minor) + require(exact_det == MINOR_DETERMINANT, "exact separating determinant") + require(rank(RU) == 8 and rank(evaluations + RU) == upper, "R factors through owner evaluations") + large = next(g for g in groups if g["axis"] == 2) + require(len(large["ports"]) == 30 and large["rank"] == 8, "attaining unread group") + require(all(g["rank"] == len(g["ports"]) for g in groups if g["axis"] != 2), + "no other within-axis coefficient redundancy") + taps = [p for p in U if p not in large["ports"]] + require(len(taps) == 66, "attaining set size") + indices = [U.index(p) for p in large["ports"]] + require(rank([[row[j] for j in indices] for row in evaluations]) == 8, "single-axis sufficiency") + trajectory = tail_certificate(template["recipe"], previous) + check_call_bindings(template["recipe"], template["calls"]) + + controls = [] + broken = [row[:] for row in minor] + broken[-1] = broken[0][:] + reject("duplicated separating row", lambda: require(determinant(broken) != 0, "singular minor"), controls) + reject("wrong determinant", lambda: require(exact_det == MINOR_DETERMINANT + 1, "determinant"), controls) + reject("payload-only owner action", lambda: check_route(IDENTITY, bases[0], 1, registered), controls) + reject("unregistered route", lambda: check_route(routes[0][1], bases[0], 1, {IDENTITY}), controls) + reject("wrong common axis", lambda: check_route(routes[0][1], (bases[0][1],) + bases[0][1:], 1, registered), controls) + reject("identity-owner rank substituted", lambda: require(rank(evaluations[:8]) == upper, "identity rank"), controls) + reject("66 directions mislabeled per owner", lambda: require(rank(evaluations[:8]) >= 66, "per-owner outputs"), controls) + wrong_recipe = [dict(e) for e in template["recipe"]] + next(e for e in wrong_recipe if e["kind"] == "local" and e["stage"] == 2)["pair"] = 1 + reject("wrong F2 bank", lambda: check_call_bindings(wrong_recipe, template["calls"]), controls) + missing = [e for e in template["recipe"] if e != + {"kind": "bridge", "src": 1, "dst": 0, "coefficient": -1}] + reject("missing cancelling bridge", lambda: tail_certificate(missing, previous), controls) + reject("source corruption", lambda: authenticate(b"changed", PINS[PACKET], PACKET), controls) + reject("receipt number changed to boolean", lambda: require(canonical({"rank": 1}) == + canonical({"rank": True}), "JSON scalar type"), controls) + remaining = large["ports"] + [taps[0]] + indices = [U.index(p) for p in remaining] + survivor_rank = rank([[row[j] for j in indices] for row in evaluations]) + require(survivor_rank == 9 and rank([[R[k][p] for p in remaining] for k in range(8)]) == 8, + "65-tap boundary retains exactly one defect") + reject("65 taps claimed sufficient", lambda: require(survivor_rank == 8, "one defect survives"), controls) + return { + "schema": "qq16-owner-separation-v1", "status": "PASS_QQ16_OWNER_SEPARATION", + "source_hashes": PINS, "archive_members": MEMBERS, "ordinary_ports": U, + "ordinary_rank": 8, "common_kernel_dimension": 88, "groups": groups, + "group_rank_upper_bound": upper, "owner_evaluation_rank": 74, + "owner_evaluation_count": len(owners), + "separating_minor": {"rows": [labels[i] for i in selected_rows], + "ports": [U[j] for j in selected_columns], + "determinant": str(exact_det), "matrix": minor}, + "coefficient_kernel_dimension": 22, "original_A_defect_dimension": 66, + "sharp_family_coordinate_threshold": 66, "attaining_taps": taps, + "attaining_unread_ports": large["ports"], "65_tap_remaining_defect": 1, + "nonzero_chart_routes_checked": 896, "packet_route_bindings": 1008, + "tail_trajectory": trajectory, "rejecting_controls": controls, + "scope": "Coefficient-family result across the whole owner array, not per owner; fixed maps/schedule; no full controller, native tariff, supplier or kappa claim.", + } + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--emit-result", type=Path, help="Create a receipt exclusively; never overwrite") + args = parser.parse_args() + result = build_result() + if args.emit_result: + with args.emit_result.open("x", encoding="utf-8") as handle: + json.dump(result, handle, indent=2, sort_keys=True) + handle.write("\n") + else: + expected = json.loads((PACKAGE / "RESULT.json").read_text(encoding="utf-8")) + require(canonical(result) == canonical(expected), "complete canonical receipt equality") + print(result["status"] + " rank=74 defect=66 sharp_family_taps=66 controls=" + + str(len(result["rejecting_controls"])) + " no_new_kappa") + + +if __name__ == "__main__": + main()