From 2f2cf0b227bc54ce0b95d165b5f90ec82d7c4686 Mon Sep 17 00:00:00 2001 From: CubeJerry <80299683+CubeJerry@users.noreply.github.com> Date: Fri, 30 Oct 2026 23:05:49 +0800 Subject: [PATCH] Classify full-column P104 wire entry and exact cleanup queries Prepared for @CubeJerry with OpenAI Codex assistance. Credit Nick Petalas PR6261, Matarener PR6217 and the retained P104 lineage. No new kappa. --- .../p104-correlated-entry-completion/PROOF.md | 208 ++++++++++++++++++ .../README.md | 85 +++++++ .../SOURCES.json | 46 ++++ .../TASK.json | 92 ++++++++ .../VERIFY.json | 61 +++++ .../p104-correlated-entry-completion/model.py | 207 +++++++++++++++++ .../test_controls.py | 81 +++++++ .../verify.py | 165 ++++++++++++++ 8 files changed, 945 insertions(+) create mode 100644 research/p104-correlated-entry-completion/PROOF.md create mode 100644 research/p104-correlated-entry-completion/README.md create mode 100644 research/p104-correlated-entry-completion/SOURCES.json create mode 100644 research/p104-correlated-entry-completion/TASK.json create mode 100644 research/p104-correlated-entry-completion/VERIFY.json create mode 100644 research/p104-correlated-entry-completion/model.py create mode 100644 research/p104-correlated-entry-completion/test_controls.py create mode 100644 research/p104-correlated-entry-completion/verify.py diff --git a/research/p104-correlated-entry-completion/PROOF.md b/research/p104-correlated-entry-completion/PROOF.md new file mode 100644 index 0000000000..890d1e815b --- /dev/null +++ b/research/p104-correlated-entry-completion/PROOF.md @@ -0,0 +1,208 @@ +# Full-column entry and the exact cleanup query at the 11/19 meeting + +Prepared for @CubeJerry by coordinated OpenAI Codex research worker B, +with a separate assisted mathematical check. Apache-2.0. + +## 1. Exact scope + +Matarener's PR6217 studies the P104 "lives as wires" architecture. Nick +Petalas's PR6261 at `1866c2f3ee2d4cf5bf3e8f008883a6605ab10ed3` proves a +correlated-dirt entry condition and supplies a four-event **response +projection**, explicitly leaving other public columns and cleanup open. +Nothing here contradicts that qualified claim. + +Keep its meeting x=11, y=19, z=487, seven-frame G=ker(11) intersect ker(19), +and six-frames H0=G intersect ker(455), H1=G intersect ker(56). Let X have +104 independent live coordinates. On the 24 ports in G the required Gram/2 +rows are c+e and c-e, where e is supported only at z and every other entry +of c is nonzero. Write U=P(H0), V=P(H1), a=c restricted to U, d=c restricted +to V. Exact reconstruction gives disjoint U,V of sizes 16,8 with z in U, +a+d=c, and Gram(11,19)=1, Gram(11,487)=1, Gram(19,487)=-1. Thus 2eX=X487. + +Let Y be the partner's independent original symbol and h the helper's. +The demanded responses are P=Y+(c+e)X and W=(c-e)X. This is a common-chart +linear boundary, not an identified selected-caller subword. The exact +fixture retains all 104 X columns, all 104 Y columns and h; unrelated +columns remain spectators. Componentwise validity for vector-valued fields +does not certify native frame implementations. + +## 2. The sole h-free arrival has a forced ratio + +Work over a field of characteristic different from two. Consider three +arrivals with exactly two nonzero h coefficients, no further reads, +allocation or erasure. Suppose linear processing produces P and W. If +the sole h-free arrival is R0=kY+A0X with support(A0)<23, necessarily + + k != 0, A0=2k e. (1) + +The two dirty arrivals may also carry Y; merely copying Y into them does +not remove this condition. + +**Proof.** The h-annihilating coefficient space has dimension two. Since +P,W are independent, its image is exactly span(P,W), and the image map +is injective. Thus R0 is a nonzero alpha P+beta W. Its live part is +(alpha+beta)c+(alpha-beta)e. The support bound forces beta=-alpha. +Consequently k=alpha is nonzero and A0=2k e. QED. + +For the specialization with no other Y carriers and normalized h signs, + + R0=Y+A0X, R1=A1X-h, R2=A2X+h, + +P,W are reachable if and only if + + A0=2e, A1+A2=t(c-e), t != 0. (2) + +Every h-free/Y-free output is proportional to R1+R2, proving necessity; +normalize this sum by 1/t to obtain W, then add W to R0. This is an +arbitrary-readout statement. The two-ADD tariff below is for t=1 only. + +At a partner following the strict minimal {0}->G path, with no imported +owned live component or pre-cut X access, the live part at G is zero. +Such an entry cannot satisfy (1). A public ADD at {0} cannot supply a +nonzero live port. Extra access or a changed meeting is required. This +does not exclude every one-helper architecture. + +## 3. Full-column two-ADD attainment + +Prepare R0=Y+2eX, R1=(a-e)X-h, R2=dX+h. Their live supports have sizes +1,16,8 and lie in the same two six-frames as the predecessor. Execute + + R1 += R2 + R0 += R1. + +The endpoint is (P,W,dX+h). The triangular scalar matrix has determinant +one; reversing the two ADDs restores every arrival. Two writes are sharp +for these entries and these destination registers in the elementary +single-target ADD/SCALE alphabet: both demanded output registers differ +from their arrivals. This is not unrestricted circuit optimality. + +The singleton preparation has a named source contact. While X487 is pure +at its initial line L=span{487}, move the partner {0}->L, perform +Y += X487, then move L->G. L lies in G, so both moves are increasing. +This prepares Y+2eX and preserves X487. It does not prepare the broad +correlated arrivals. + +For a control, lift the predecessor's literal entry to (Y+eX,aX-h,dX+h). +Its original four events yield (P,W-Y,dX+h). All live and h projections +pass, but Y=1, X=h=0 gives outgoing wire -1. PR6261 explicitly claimed +only the projected response; this is a boundary discriminator, not a +counterexample to its stated theorem. + +## 4. Original h needs a new query + +No linear continuation using only P,W,H=dX+h can produce h, even if it +may temporarily rewrite both outputs. In alpha P+beta W+gamma H=h, the +Y and h coefficients force alpha=0,gamma=1. Then beta(c-e)+d=0 is +impossible: on U it forces beta=0, whereas d is nonzero on V. The pinned +fixture has rank(P,W,H)=3 and rank(P,W,H,h)=4. More local operations +cannot overcome this rowspace gap. + +There is also a direct collision, independently suggested during review. +Choose one nonzero coordinate of a and one of d. Change their X values +by 1/a_i and -1/d_j, respectively, and change h by one, leaving eX and Y +unchanged. All three observations P,W,H are unchanged, while original h +differs. The exact fixture uses only two live shifts of magnitude two and +one helper shift. Thus even an arbitrary deterministic recovery function +of those three observations cannot recover h for all original inputs. +This does not exclude access to other registers or retained history. + +Under arbitrary **field-linear** readout, one additional unchanged pure-live +query Q=qX permits restoration exactly when + + q=rho[d+lambda(c-e)], rho != 0. (3) + +Indeed d must lie in span(c-e,q), and d is not proportional to c-e. +Conversely H-Q/rho+lambda W=h is an explicit cleanup leaving P,W,Q +unchanged. On U the query is rho*lambda*(a-e); on V it is +rho*(1+lambda)*d, with every listed coordinate nonzero. Thus: + +| lambda | support | cardinality | binary span dimension | +|---|---|---:|---:| +| 0 | V | 8 | 6 | +| -1 | U | 16 | 6 | +| otherwise | U union V | 24 | 7 | + +The dimensions are exact finite properties of the pinned ports, checked +by both elimination and independent XOR-span enumeration. The support +minimum eight is sharp for this one-query contract. + +**Dyadic qualification.** Field-linear sufficiency is not a blanket dyadic +gate guarantee: q=3d satisfies (3), but its cleanup requires division by +three. For dyadic q in this particular fixture the entries of W on U and +d on V are units (+/-1/2) in Z[1/2]. Write q=rho*d+beta*W. Evaluating one +coordinate in each section determines dyadic rho and beta uniquely. +Restoring h by a dyadic linear readout requires the q coefficient -1/rho, +so rho must be a unit in Z[1/2], equivalently +/-2^k for an integer k. +Conversely this condition makes both -1/rho and lambda=beta/rho dyadic and +the displayed cleanup works. The q=d sharp attainer and all 15 tested +representatives satisfy this requirement. Coefficient bounds, native +availability and physical implementation remain separate. The entry iff +(2) likewise concerns field-linear readout; its t=1 construction is +explicitly dyadic and incurs no division. + +**Frame qualification.** If the query is a public row whose live content +is confined to its frame, with no owned-delivered live component, its +frame has dimension at least six. No frame of dimension five or below +can contain an admissible support. Pure-live alone is insufficient: an +owned descending row or an owned-delivered public component may carry +broad support at a small frame. Such mechanisms retain their own paid +preparation and ownership obligations and are not excluded here. + +## 5. Visible cost and stopping decision + +For Q=dX, cleanup is one ADD H-=Q. Counting singleton preparation, the +source-loaded calendar has four visible ADDs: one before G, two at the +meeting, one cleanup. It preserves the original Y column in the required +partner shear, restores h and preserves Q, but returns the outgoing wire W, +not that wire's original value. + +In the declared incoming frame calendar the partner pays ranks (1,6), +the first dirty carrier pays H0->G rank one, the helper pays H1->G rank +one, and the additional query pays H1->G rank one. The visible histogram +is four rank-one jobs and one rank-six job. This is conditional on those +prepared rows and frame arrivals. Source gathering, original-h +correlation, query preparation, their productive target effects, all +outgoing routes, last-wire restoration, native phases, precision, +ownership and storage are **additional**, never zero by omission. + +Splitting a hypothetical unsplit rank-seven partner move into one and six +increases its concave paid moment: 1^t+6^t-7^t>0 for 0> i & 1 else -1 for i in range(9)) + require(port.bit_count() == 7, "root weight") + zero = [i for i in range(9) if not port >> i & 1] + return tuple(3 * ((i == zero[0]) - (i == zero[1])) for i in range(9)) + + +def gram(left, right): + return Q(sum(a * b for a, b in zip(root(left), root(right))), 9) + + +def in_frame(port, normals): + return all((port & n).bit_count() % 2 == 0 for n in normals) + + +def binary_rank(vectors): + pivots = {} + for original in vectors: + value = original + while value: + top = value.bit_length() - 1 + if top not in pivots: + pivots[top] = value + break + value ^= pivots[top] + return len(pivots) + + +def xor_span(vectors): + """Independent exponential span enumeration, used only for nine-bit data.""" + out = {0} + for vector in vectors: + out |= {x ^ vector for x in tuple(out)} + return out + + +def add(left, right, coefficient=Q(1)): + require(len(left) == len(right), "row width") + return tuple(a + coefficient * b for a, b in zip(left, right)) + + +def scale(row, coefficient): + return tuple(coefficient * a for a in row) + + +def rank(rows): + if not rows: + return 0 + work = [[Q(x) for x in row] for row in rows] + width = len(work[0]) + require(all(len(row) == width for row in work), "rank row shape") + pivot = 0 + for col in range(width): + match = next((r for r in range(pivot, len(work)) if work[r][col]), None) + if match is None: + continue + work[pivot], work[match] = work[match], work[pivot] + divisor = work[pivot][col] + work[pivot] = [x / divisor for x in work[pivot]] + for r in range(len(work)): + if r != pivot and work[r][col]: + multiple = work[r][col] + work[r] = [x - multiple * y for x, y in zip(work[r], work[pivot])] + pivot += 1 + if pivot == len(work): + break + return pivot + + +def in_span(row, rows): + return rank([*rows, row]) == rank(rows) + + +def replay(rows, events): + out = list(rows) + for event in events: + require(len(event) == 4, "event shape") + operation, target, source, coefficient = event + require(type(target) is int and 0 <= target < len(out), "target index") + require(type(source) is int and 0 <= source < len(out), "source index") + if operation == "ADD": + require(target != source, "ADD alias") + out[target] = add(out[target], out[source], Q(coefficient)) + else: + require(operation == "SCALE" and coefficient != 0, "SCALE contract") + out[target] = scale(out[target], Q(coefficient)) + return out + + +def fixture(): + ps = ports() + # Input symbols: all 104 Xs, all 104 Ys, one arbitrary helper h. + width = 209 + x, y, z = 11, 19, 487 + common = [p for p in ps if in_frame(p, (x, y))] + first = [p for p in common if in_frame(p, (455,))] + second = [p for p in common if in_frame(p, (56,))] + require(len(common) == 24 and len(first) == 16 and len(second) == 8, + "section sizes") + require(set(first).isdisjoint(second) and set(first) | set(second) == set(common), + "section partition") + require(z in first, "exceptional section") + require(gram(x, y) == 1 and gram(x, z) == 1 and gram(y, z) == -1, + "triangle signs") + zero = tuple(Q(0) for _ in range(width)) + plus, minus, c, e, a, d = [list(zero) for _ in range(6)] + for p in common: + i = ps.index(p) + plus[i], minus[i] = gram(x, p) / 2, gram(y, p) / 2 + if p == z: + e[i] = plus[i] + else: + c[i] = plus[i] + (a if p in first else d)[i] = plus[i] + plus, minus, c, e, a, d = map(tuple, (plus, minus, c, e, a, d)) + require(plus == add(c, e) and minus == add(c, e, -1), "Gram response split") + Y, h = list(zero), list(zero) + Y[104 + ps.index(y)], h[-1] = Q(1), Q(1) + Y, h = tuple(Y), tuple(h) + incoming = [add(Y, e, 2), add(add(a, e, -1), h, -1), add(d, h)] + expected = [add(Y, plus), minus, add(d, h)] + return {"ports": ps, "common": common, "first": first, "second": second, + "Y": Y, "h": h, "c": c, "e": e, "a": a, "d": d, + "plus": plus, "minus": minus, "incoming": incoming, + "expected": expected} + + +MEETING = (("ADD", 1, 2, 1), ("ADD", 0, 1, 1)) +INVERSE = (("ADD", 0, 1, -1), ("ADD", 1, 2, -1)) +OLD_MEETING = (("ADD", 1, 2, 1), ("ADD", 1, 0, -1), + ("SCALE", 0, 0, 2), ("ADD", 0, 1, 1)) + + +def endpoint(rows, target): + require(rows == target, "full-column endpoint") + + +def cleanup_allowed(query, f): + # Eliminating Y and h leaves d in span(W,q). This tests the actual + # necessary-and-sufficient rowspace condition, not a support heuristic. + require(not any(query[104:]), "cleanup query must be pure live") + require(in_span(f["d"], [f["minus"], query]), "cleanup query lacks required quotient") + + +def dyadic_cleanup_coefficients(query, f): + """Admit the scalar-ring version, without treating every scale as a unit.""" + cleanup_allowed(query, f) + require(all(Q(v).denominator & (Q(v).denominator - 1) == 0 for v in query), + "query coefficient is not dyadic") + iu = f["ports"].index(f["first"][0]) + iv = f["ports"].index(f["second"][0]) + beta = query[iu] / f["minus"][iu] + rho = query[iv] / f["d"][iv] - beta + require(query == add(scale(f["d"], rho), f["minus"], beta), + "query reconstruction") + numerator = abs(rho.numerator) + denominator = rho.denominator + require(numerator != 0 and numerator & (numerator - 1) == 0 + and denominator & (denominator - 1) == 0, + "cleanup scale is not a dyadic unit") + return -1 / rho, beta / rho + + +def public_query_frame(query, ps, frame): + """Only for a public query with no owned-delivered live component.""" + require(all(p in frame for p, value in zip(ps, query[:104]) if value), + "public query support outside frame") + + +def source_hashes(): + names = ["README.md", "PROOF.md", "TASK.json", "SOURCES.json", "VERIFY.json", + "model.py", "verify.py", "test_controls.py"] + return {name: sha256((HERE / name).read_bytes()).hexdigest() for name in names} diff --git a/research/p104-correlated-entry-completion/test_controls.py b/research/p104-correlated-entry-completion/test_controls.py new file mode 100644 index 0000000000..3fa0f39e94 --- /dev/null +++ b/research/p104-correlated-entry-completion/test_controls.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +"""Meaningful rejection controls for the full-column and cleanup claims. + +Prepared for @CubeJerry with OpenAI Codex assistance. Apache-2.0. +""" +from fractions import Fraction as Q +from pathlib import Path +from runpy import run_path + +M = run_path(str(Path(__file__).with_name("model.py"))) + + +def reject(name, message, operation): + try: + operation() + except ValueError as error: + M["require"](str(error) == message, "wrong rejection reason: " + name) + return + raise ValueError("control accepted: " + name) + + +def main(): + f = M["fixture"]() + rows = f["incoming"] + expect = f["expected"] + controls = 0 + + def endpoint_case(name, altered, events=M["MEETING"]): + nonlocal controls + reject(name, "full-column endpoint", lambda: M["endpoint"](M["replay"](altered, events), expect)) + controls += 1 + + endpoint_case("old singleton normalization", [M["add"](f["Y"], f["e"]), *rows[1:]]) + endpoint_case("omit exceptional wire coefficient", [rows[0], M["add"](f["a"], f["h"], -1), rows[2]]) + endpoint_case("same-sign helper dirt", [rows[0], M["add"](M["add"](f["a"], f["e"], -1), f["h"]), rows[2]]) + endpoint_case("extra public Y in wire", [rows[0], M["add"](rows[1], f["Y"]), rows[2]]) + endpoint_case("omit second meeting write", rows, M["MEETING"][:1]) + + reject("aliased row operation", "ADD alias", lambda: M["replay"](rows, (("ADD", 1, 1, 1),))) + controls += 1 + reject("source corruption", "port source hash", lambda: M["authenticate"](b"[]\n")) + controls += 1 + reject("query is just outgoing wire", "cleanup query lacks required quotient", + lambda: M["cleanup_allowed"](f["minus"], f)) + controls += 1 + reject("query has independent dirt", "cleanup query must be pure live", + lambda: M["cleanup_allowed"](M["add"](f["d"], f["Y"]), f)) + controls += 1 + nonunit_query = M["scale"](f["d"], 3) + M["cleanup_allowed"](nonunit_query, f) # A valid field-linear query. + reject("nonunit dyadic query scaling", "cleanup scale is not a dyadic unit", + lambda: M["dyadic_cleanup_coefficients"](nonunit_query, f)) + controls += 1 + + for p in f["common"]: + query = tuple(Q(i == f["ports"].index(p)) for i in range(209)) + reject("singleton cleanup", "cleanup query lacks required quotient", + lambda query=query: M["cleanup_allowed"](query, f)) + controls += 1 + + # Every five-dimensional subframe of the exact rank-six d-span fails. + span = M["xor_span"](f["second"]) + hyperplanes = {tuple(sorted(v for v in span if not (v & n).bit_count() % 2)) + for n in range(1, 512)} + hyperplanes.discard(tuple(sorted(span))) + M["require"](len(hyperplanes) == 63, "rank-six hyperplane census") + for frame in hyperplanes: + reject("five-frame query", "public query support outside frame", + lambda frame=frame: M["public_query_frame"](f["d"], f["ports"], set(frame))) + controls += 1 + + # Positive boundaries: q=d and q=d+2W both restore h. A support restriction + # is intentionally NOT applied to an owned-delivered query in a small frame. + for query in (f["d"], M["add"](f["d"], f["minus"], 2)): + M["cleanup_allowed"](query, f) + M["public_query_frame"](f["d"], f["ports"], span) + print("PASS_P104_CORRELATED_ENTRY_CONTROLS", controls, "exact-reason rejections") + + +if __name__ == "__main__": + main() diff --git a/research/p104-correlated-entry-completion/verify.py b/research/p104-correlated-entry-completion/verify.py new file mode 100644 index 0000000000..5350d75bb4 --- /dev/null +++ b/research/p104-correlated-entry-completion/verify.py @@ -0,0 +1,165 @@ +#!/usr/bin/env python3 +"""Full-column entry, exact cleanup information and scoped frame geometry. + +Prepared for @CubeJerry with OpenAI Codex assistance. Apache-2.0. +""" +import itertools +import json +from fractions import Fraction as Q +from pathlib import Path +from runpy import run_path + +M = run_path(str(Path(__file__).with_name("model.py"))) +require = M["require"] + + +def mod_rank(rows, p): + work = [[int(x) % p for x in row] for row in rows] + i = 0 + for j in range(len(work[0])): + k = next((k for k in range(i, len(work)) if work[k][j]), None) + if k is None: + continue + work[i], work[k] = work[k], work[i] + inv = pow(work[i][j], -1, p) + work[i] = [v * inv % p for v in work[i]] + for k in range(i + 1, len(work)): + a = work[k][j] + work[k] = [(x - a * y) % p for x, y in zip(work[k], work[i])] + i += 1 + if i == len(work): + break + return i + + +def entry_census(p): + """All sparse A0 and aggregate S, not a census of physical programs.""" + pool = list(itertools.product(range(p), repeat=4)) + sparse = [row for row in pool if sum(bool(x) for x in row) < 3] + P = (1, 1, 1, 1, 1, 0) + W = (p - 1, 1, 1, 1, 0, 0) + checked = feasible = 0 + for A0 in sparse: + for S in pool: + rows = [A0 + (1, 0), (0, 0, 0, 0, 0, p - 1), S + (0, 1)] + r = mod_rank(rows, p) + actual = mod_rank(rows + [P, W], p) == r + expected = A0 == (2 % p, 0, 0, 0) and any( + S == ((-t) % p, t, t, t) for t in range(1, p)) + require(actual == expected, "independent entry classification") + checked += 1 + feasible += actual + require(feasible == p - 1, "entry equality count") + return {"field": p, "quotient_entry_cases": checked, "feasible": feasible} + + +def correlated_Y_census(): + """Check the stronger necessary ratio with Y on the two dirty arrivals.""" + p = 3 + pool = list(itertools.product(range(p), repeat=4)) + sparse = [row for row in pool if sum(bool(x) for x in row) < 3] + P, W = (1, 1, 1, 1, 1, 0), (2, 1, 1, 1, 0, 0) + checked = feasible = 0 + for k, sY in itertools.product(range(p), repeat=2): + for A0 in sparse: + for S in pool: + rows = [A0 + (k, 0), (0, 0, 0, 0, 0, 2), S + (sY, 1)] + actual = mod_rank(rows + [P, W], p) == mod_rank(rows, p) + expected = k != 0 and A0 == (2 * k % p, 0, 0, 0) and any( + S == ((2 * sY - t) % p, t, t, t) for t in range(1, p)) + require(actual == expected, "correlated-Y entry classification") + checked += 1 + feasible += actual + require(feasible == 12, "correlated-Y equality count") + return {"field": p, "quotient_entry_cases": checked, "feasible": feasible} + + +def run(): + f = M["fixture"]() + result = M["replay"](f["incoming"], M["MEETING"]) + M["endpoint"](result, f["expected"]) + require(M["replay"](result, M["INVERSE"]) == f["incoming"], "inverse endpoint") + require(all(f["incoming"][i] != result[i] for i in (0, 1)), "two-write lower bound") + require(not M["in_span"](f["h"], result), "no-query restoration obstruction") + require(M["rank"](result) == 3 and M["rank"](result + [f["h"]]) == 4, + "restoration rank gap") + iu = next(i for i, value in enumerate(f["a"]) if value) + iv = next(i for i, value in enumerate(f["d"]) if value) + collision = [Q(0)] * 209 + collision[iu], collision[iv], collision[-1] = 1 / f["a"][iu], -1 / f["d"][iv], Q(1) + require(all(sum(x * y for x, y in zip(row, collision)) == 0 for row in result), + "same-observation collision") + require(sum(x * y for x, y in zip(f["h"], collision)) == 1, + "collision separates original helper") + + # Explicit original dirty-column discriminator, not a claim that PR6261 + # promised a complete endpoint. Its response projection remains correct. + old = [M["add"](f["Y"], f["e"]), M["add"](f["a"], f["h"], -1), + M["add"](f["d"], f["h"])] + old_output = M["replay"](old, M["OLD_MEETING"]) + require(old_output[0] == f["expected"][0], "old partner control") + require(old_output[1] == M["add"](f["minus"], f["Y"], -1), "old Y leak") + require(old_output[2] == f["expected"][2], "old helper column") + require(all(old_output[i][:104] == f["expected"][i][:104] for i in range(3)), + "old projected positive control") + + frame_receipt = {} + for name, ps, n in [("first", f["first"], 6), ("second", f["second"], 6), + ("common", f["common"], 7)]: + require(M["binary_rank"](ps) == n and len(M["xor_span"](ps)) == 2 ** n, + "independent frame span") + frame_receipt[name] = {"support": len(ps), "rank": n} + + queries = [] + for lam in map(Q, (-2, -1, 0, 1, 2)): + for rho in (Q(-2), Q(1, 2), Q(1)): + query = M["scale"](M["add"](f["d"], f["minus"], lam), rho) + M["cleanup_allowed"](query, f) + require(M["dyadic_cleanup_coefficients"](query, f) == (-1 / rho, lam), + "dyadic cleanup coefficients") + events = [("ADD", 2, 3, -1 / rho)] + if lam: + events.append(("ADD", 2, 1, lam)) + final = M["replay"]([*result, query], events) + M["endpoint"](final, [result[0], result[1], f["h"], query]) + active = [p for p, value in zip(f["ports"], query[:104]) if value] + size, dim = (8, 6) if lam == 0 else ((16, 6) if lam == -1 else (24, 7)) + require(len(active) == size and M["binary_rank"](active) == dim, + "cleanup support classification") + queries.append({"lambda": str(lam), "rho": str(rho), + "support": size, "frame_dimension": dim}) + + # The source singleton is a legal same-frame row operation before growth: + # span{487} lies in G, and 2e is exactly the live X487 coordinate. + zi = f["ports"].index(487) + source = tuple(Q(i == zi) for i in range(209)) + require(source == M["scale"](f["e"], 2), "singleton source coefficient") + require(M["in_frame"](487, (11, 19)), "singleton nested frame") + prepared = M["replay"]([f["Y"], source], (("ADD", 0, 1, 1),)) + require(prepared == [f["incoming"][0], source], "singleton preparation") + + # One additional clean-query completion is exact, and counts all four + # visible scalar writes: singleton preparation, two meeting writes, cleanup. + completed = M["replay"]([*f["incoming"], f["d"]], + (*M["MEETING"], ("ADD", 2, 3, -1))) + M["endpoint"](completed, [result[0], result[1], f["h"], f["d"]]) + + return {"status": "PASS_P104_CORRELATED_ENTRY_COMPLETION", "input_columns": 209, + "meeting_ADDs": 2, "inverse_ADDs": 2, + "source_loaded_completion_visible_ADDs": 4, + "no_query_rank": 3, "rank_with_original_h": 4, + "same_observation_collision": { + "live_port_shifts": {str(f["ports"][iu]): str(collision[iu]), + str(f["ports"][iv]): str(collision[iv])}, + "original_h_shift": "1", "all_three_observed_shifts": ["0", "0", "0"]}, + "old_projection_passes_but_Y_leaks": True, + "frames": frame_receipt, "cleanup_queries": queries, + "finite_entry_census": [entry_census(3), entry_census(5)], + "correlated_Y_census": correlated_Y_census(), + "conditional_incoming_paid_ranks": {"1": 4, "6": 1}, + "complete_supplier_invoice": False, "new_kappa": False, + "source_hashes": M["source_hashes"]()} + + +if __name__ == "__main__": + print(json.dumps(run(), indent=2, sort_keys=True))