diff --git a/research/complex-global-delta-cancellation/README.md b/research/complex-global-delta-cancellation/README.md new file mode 100644 index 0000000000..f155a9a60e --- /dev/null +++ b/research/complex-global-delta-cancellation/README.md @@ -0,0 +1,43 @@ +# Defer the P112 five-plane decoder's dirty-endpoint corrections + +**Exact algebraic opportunity; no new supplier or κ.** The selected P112 labels split into 22 orthogonal five-frames and one orthogonal pair. The existing five-plane package prices one rank-one-equivalent cleanup for each of the resulting 23 block translations. This package checks a different schedule: apply every block lift to one shared nine-bit address register and defer all 23 cleanups until the end. + +Let `q_i ∈ F₂⁹` be the pinned selected labels, and let `E_g` be one block. The predecessor verifies, by exact Gaussian-dyadic replay, that + +`C_{E_g}² = X_{δ_g}`, where `δ_g = ⊕_{i∈E_g} q_i`. + +The 23 blocks partition all 112 labels, whose xor is zero. Therefore + +`∏_g C_{E_g}² = X_{⊕_g δ_g} = X_{⊕_i q_i} = I`. + +The verifier checks each local identity on all 512 address basis states, and checks that the 23 shifts xor to zero. It also confirms that their span has rank 9: the cancellation is a global relation, not pairwise cancellation. + +## Cost consequence and limit + +The existing exact local `u=5` screen has an `a` ceiling of `0.017542237243537` before charging these translations. Charging 23 rank-one-equivalent cleanup units lowers that screen to `0.016435974402421`; the optimistic allowance for all additional route, hosting, restoration and precision work drops from 157 units to 134. Deferring cleanup would recover those 23 units in this local ledger. + +This is **not a new κ**. The cancellation saves cost only if all block lifts act on the same nine-bit address register and the translations can be deferred across the block schedule. If the physical implementation materializes a separate output stream or address register for each cover class, the translations act on distinct state and do not cancel across classes. The current five-plane package has no native owner map or physical schedule that settles this condition. The result changes neither the selected record nor the multiplication bound. + +The local ledger is a planning relaxation, and one unit per translation is the predecessor's provisional price. Unknown physical costs remain unknown; they are not zero. + +## Reproduce + +From the repository root: + +```sh +python3 -B research/complex-global-delta-cancellation/verify.py +python3 scripts/research_package.py --package research/complex-global-delta-cancellation --check-only +python3.12 scripts/research_package.py --package research/complex-global-delta-cancellation +``` + +The scoped replay binds the selected source archive, five-plane candidate, predecessor source manifest and matching certificate. It checks the 23 exact local endpoint maps, their global xor, the local budget screens, and controls for a missing block and a duplicated port. It does not synthesize the shared-register physical schedule. + +## Open next questions + +Can the native source/consumer route schedule all 23 `C_E` lifts on one shared nine-bit address register, with a single deferred endpoint correction and all output streams restored? This matters because it decides whether the 23-unit margin is real. First map one five-frame block through its actual producer and consumer, then determine whether the next block continues on that same address register. The blocker is the missing owner and restoration schedule; stop if blocks require distinct live output registers. + +## Provenance and credit + +This is a changed-scope follow-up to `coverage-law-change`, using the existing selected P112 five-plane algebraic decoder. It retains the predecessor's selected-label attribution and exact pins in [SOURCES.json](SOURCES.json). The predecessor remains the source for its 16-term, charge-118 factorization and local `u=5` budget. No selected frontier update or PR claim of improved κ is made. + +Prepared by Gonzalo Mier with substantial OpenAI Codex assistance. Apache-2.0. diff --git a/research/complex-global-delta-cancellation/SOURCES.json b/research/complex-global-delta-cancellation/SOURCES.json new file mode 100644 index 0000000000..c2abd974d4 --- /dev/null +++ b/research/complex-global-delta-cancellation/SOURCES.json @@ -0,0 +1,48 @@ +{ + "schema_version": 1, + "base_commit": "d8e0f83f00191df62174b641e9fff055c357f641", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0" + }, + { + "path": "research/community-frontier1094-audit/selected-replay.tar.gz", + "usage": "input", + "git_blob": "c24daf067f9c543421d89ca2eeaa4eb78a57fb6f", + "sha256": "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6" + }, + { + "path": "research/five-plane-port-p112-seed1f7fdfe4/CANDIDATE.json", + "usage": "input", + "git_blob": "ca69901755dde5f6e8adf7dd6df936dc3ab0142d", + "sha256": "5b69c7a873f19a64ed73a1c1281d20398d2675b3281fd4fa259aed9cf91a86c0" + }, + { + "path": "research/five-plane-port-p112-seed1f7fdfe4/SOURCES.json", + "usage": "input", + "git_blob": "d46d83b4be3860da66d06b333aaf2937c03a2848", + "sha256": "68475b19da4a6f3af799425a12072391b481ede51c8b269684f238befdb04bbf" + }, + { + "path": "research/five-plane-port-p112-seed1f7fdfe4/core.py", + "usage": "input", + "git_blob": "5e1b875db8a9325a67ef9a08809cc80adc5a3927", + "sha256": "15574728d1249d2a93985de5889ee06ef7089234107c431ac7766cd5899c64a9" + }, + { + "path": "research/paired-plane-port-matching-seed6c563a/CERTIFICATE.json", + "usage": "input", + "git_blob": "7ca668d7d50c7276e89b0f6f9575e1b9f1ad9ef6", + "sha256": "4fd648f7b5178bff5441bf364d58234b7bc1a43b924bc6da03013c948f1473b1" + } + ] +} diff --git a/research/complex-global-delta-cancellation/TASK.json b/research/complex-global-delta-cancellation/TASK.json new file mode 100644 index 0000000000..448fc1c8d5 --- /dev/null +++ b/research/complex-global-delta-cancellation/TASK.json @@ -0,0 +1,72 @@ +{ + "schema_version": 1, + "task_id": "coverage-law-change", + "priority_revision": 6, + "base_commit": "d8e0f83f00191df62174b641e9fff055c357f641", + "original_card": { + "id": "coverage-law-change", + "question": "Can a template or call contract leave two or more unpaid coordinates per live family?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/complex-local-word-ceiling/README.md", + "research/idle-axis-hosting/PROOF.md", + "certificates/selected-result.json" + ], + "methods": [ + "State a replacement for the coverage identity (mass = 72W + 64N) and the contract change that realizes it, with its implementation cost.", + "Find an obstruction: show which data-endpoint obligation forces exactly one unpaid coordinate in the current template." + ], + "acceptance_gate": "An explicit replacement identity, verified on a small complete instance with dirty inputs, priced with ceiling.ceiling(unpaid=...). A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Explain where the single unpaid coordinate per family comes from in the hosted template; propose one change and price it. Ideal budget: two unpaid coordinates per family is 3.77x (levers.py).", + "bottleneck_link": "The deficit is one coordinate per family minus the centre charge; doubling unpaid coordinates per family scales it directly.", + "allowed_variations": [ + "One template change or one endpoint-contract change.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Counting a coordinate as unpaid while leaving it unadvanced in the data endpoint.", + "Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts." + ], + "overlap_terms": [ + "coverage identity", + "unpaid coordinate", + "deficit law", + "W - 64N" + ] + }, + "scope_status": "changed", + "actual_scope": "Can the exact 23 dirty-endpoint translations of the selected P112 five-plane decoder be deferred and cancelled on one common nine-bit address register?", + "scope_change_reason": "The existing five-plane decoder already has an optimistic u=5 local pass; the unpriced next gate is physical interface cost. This scoped algebraic follow-up tests whether its 23 provisionally priced endpoint cleanups can be globally deferred, without claiming a new coverage law or supplier.", + "bottleneck_link": "The five-plane local ledger permits 157 additional rank-one-equivalent units, of which 23 are provisionally assigned to block translations. Cancelling them would restore those 23 units for the still-unpriced route, hosting, restoration and precision.", + "budget_minutes": 60, + "stop_rule": "Stop the cost-saving claim if native blocks use distinct live output/address registers or if the corrections cannot be delayed across the real consumer schedule. Do not treat the recovered 23-unit local allowance as a supplier or \u03ba result.", + "outcome": "completed", + "evidence": "Pinned selected P112 labels have xor 0. The exact five-plane cover partitions the 112 labels into 23 blocks; every local C_E^2 = X_delta identity replays on all 512 address basis states, and the 23 deltas span F2^9 but xor to zero. Exact predecessor local screens reproduce a=0.017542237243537 with deferred corrections and a=0.016435974402421 when charging 23 rank-one-equivalent corrections. This is a conditional local-budget result, not a physical realization.", + "author": "Gonzalo Mier, with substantial OpenAI Codex assistance", + "ai_assistance": "OpenAI Codex assisted with the algebraic derivation, source-bound verifier, exact replay, budget comparison and documentation; no formal proof assistant or independent human review is claimed.", + "open_questions": [ + { + "question": "Can the native source/consumer schedule keep all 23 block lifts on one shared nine-bit address register until the aggregate correction is zero?", + "why_it_matters": "Only a shared register makes the 23 translations compose to the zero translation; separate output streams retain separate cleanup costs.", + "first_step": "Map one five-frame block and its consumer through the selected native owner/frame trace, then check whether the next block uses the same address register and whether restoration can be deferred.", + "blocked_by": "The predecessor has no native owner map, physical schedule or restoration receipt for the five-plane endpoint." + } + ], + "upstream_refresh": { + "canonical_main": "6f100d4bb5083f8c35d96fd95a539811c62f245c", + "priority_revision": 6, + "checked_utc": "2026-10-18T03:15:29Z", + "reviewed_changes": "Refreshed current-priorities.md, research-family-status.md and agent-procedure.md. Priority revision remains 6; the changed P104 row is unrelated. The selected record, task card and all pinned predecessor inputs are byte-identical across this base refresh.", + "overlap_refresh": "scripts/find_overlap.py --task coverage-law-change --refresh completed against 394 open PRs and 2319 discussions on 2026-10-18. A targeted offline search of that fresh cache found no phrase matches; this is not a novelty certificate. Relevant live predecessors #1900 and #2041 were rechecked, and the new result remains scoped to conditional global endpoint cancellation." + } +} diff --git a/research/complex-global-delta-cancellation/VERIFY.json b/research/complex-global-delta-cancellation/VERIFY.json new file mode 100644 index 0000000000..6d3dd3080b --- /dev/null +++ b/research/complex-global-delta-cancellation/VERIFY.json @@ -0,0 +1,24 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/community-frontier1094-audit/selected-replay.tar.gz", + "research/five-plane-port-p112-seed1f7fdfe4/CANDIDATE.json", + "research/five-plane-port-p112-seed1f7fdfe4/SOURCES.json", + "research/five-plane-port-p112-seed1f7fdfe4/core.py", + "research/paired-plane-port-matching-seed6c563a/CERTIFICATE.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Pinned selected-label xor, exact partition, 23 local Gaussian-dyadic endpoint identities over all 512 basis states, global deferred cancellation, exact predecessor local-screen comparison, rank-one budget arithmetic, and missing-block/duplicate-port controls." + } + ] +} diff --git a/research/complex-global-delta-cancellation/verify.py b/research/complex-global-delta-cancellation/verify.py new file mode 100644 index 0000000000..76d3be2630 --- /dev/null +++ b/research/complex-global-delta-cancellation/verify.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python3 +"""Exact check of deferred P112 five-plane endpoint corrections.""" +from __future__ import annotations +import hashlib +import importlib.util +import json +from fractions import Fraction as Q +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +PACKAGE = Path(__file__).resolve().parent +PREDECESSOR = ROOT / "research/five-plane-port-p112-seed1f7fdfe4" + + +def need(ok: bool, message: str) -> None: + if not ok: + raise ValueError(message) + + +def load_predecessor_core(): + spec = importlib.util.spec_from_file_location("five_plane_core", PREDECESSOR / "core.py") + need(spec is not None and spec.loader is not None, "cannot load predecessor core") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def apply_c(state: dict[int, tuple[int, int]], q: int) -> dict[int, tuple[int, int]]: + """Apply the unnormalised Gaussian-dyadic lift C_q used by the predecessor.""" + out: dict[int, tuple[int, int]] = {} + + def add(index: int, real: int, imag: int) -> None: + old_real, old_imag = out.get(index, (0, 0)) + out[index] = (old_real + real, old_imag + imag) + + for index, (real, imag) in state.items(): + add(index, real - imag, real + imag) + add(index ^ q, real + imag, imag - real) + return {index: value for index, value in out.items() if value != (0, 0)} + + +def xor_group(labels: list[int], group: list[int]) -> int: + shift = 0 + for port in group: + shift ^= labels[port] + return shift + + +def verify_partition(candidate: dict) -> list[list[int]]: + groups = candidate["groups"] + residual = candidate["residual"] + blocks = candidate["blocks"] + need(blocks == groups + [residual], "block order differs from the cover") + need(len(groups) == 22 and all(len(g) == 5 for g in groups), "expected 22 five-frames") + need(len(residual) == 2, "expected one residual pair") + flat = [port for group in blocks for port in group] + need(sorted(flat) == list(range(112)), "blocks do not partition P112") + return blocks + + +def main() -> None: + # Direct runs enforce the package's live source pins too. + source_manifest = json.loads((PACKAGE / "SOURCES.json").read_text()) + for row in source_manifest["files"]: + if row["usage"] == "input": + path = ROOT / row["path"] + need(path.is_file(), "missing input: " + row["path"]) + need(hashlib.sha256(path.read_bytes()).hexdigest() == row["sha256"], + "input hash mismatch: " + row["path"]) + + core = load_predecessor_core() + labels, _ = core.load_sources() + record = json.loads((PREDECESSOR / "CANDIDATE.json").read_text()) + candidate = record["candidate"] + blocks = verify_partition(candidate) + need(len(labels) == 112, "wrong selected label count") + + block_deltas = [xor_group(labels, group) for group in blocks] + all_labels_xor = 0 + for label in labels: + all_labels_xor ^= label + all_deltas_xor = 0 + for delta in block_deltas: + all_deltas_xor ^= delta + need(all_labels_xor == 0, "selected P112 labels no longer have zero xor") + need(all_deltas_xor == all_labels_xor, "partitioned correction xor differs from label xor") + need(core.rank_rows(block_deltas, core.DIM) == 9, "expected full-rank block correction set") + expected_deltas = [98, 70, 100, 274, 50, 506, 247, 352, 304, 56, 19, 274, + 22, 445, 152, 388, 268, 254, 463, 508, 322, 475, 235] + need(block_deltas == expected_deltas, "per-block endpoint translations changed") + + # Each local C_E^2 translation is checked on every basis address (512 states). + local_cases = 0 + for group, delta in zip(blocks, block_deltas): + for start in range(1 << core.DIM): + state = {start: (1, 0)} + for port in group + group: + state = apply_c(state, labels[port]) + expected = {start ^ delta: (1 << (2 * len(group)), 0)} + need(state == expected, "local C_E^2 endpoint identity failed") + local_cases += 1 + need(local_cases == 23 * (1 << core.DIM), "wrong local endpoint case count") + + # If these corrections share one address register, their product is one + # translation by xor(block_deltas), hence identity on every address state. + for start in range(1 << core.DIM): + destination = start + for delta in block_deltas: + destination ^= delta + need(destination == start, "deferred global endpoint correction is nonidentity") + + hist = {int(rank): int(count) for rank, count in candidate["copy_rank_histogram"].items()} + profile, centre = core.profile_for(hist) + fused_screen = core.moment_screen(profile, centre) + need(fused_screen == candidate["moment_screen_u5"], "predecessor local screen changed") + separate_profile = profile.copy() + separate_profile[1] = separate_profile.get(1, 0) + len(blocks) + separate_screen = core.moment_screen(separate_profile, centre + len(blocks)) + need(separate_screen == candidate["one_unit_per_aggregate_translation_screen"], + "separate-correction screen changed") + need(Q(fused_screen["ceiling_upper"]) > Q(separate_screen["ceiling_upper"]), + "deferring corrections did not recover local ceiling") + overhead = candidate["all_in_rank1_overhead_threshold"] + max_overhead = overhead["largest_passing"]["extra_rank1_equivalent_charge"] + need(max_overhead == 157 and max_overhead - len(blocks) == 134, + "rank-one overhead arithmetic changed") + + # Negative controls: one missing block leaves its nonzero translation behind; + # a duplicated port violates the exact cover before any algebra is applied. + missing_xor = 0 + for delta in block_deltas[:-1]: + missing_xor ^= delta + need(missing_xor != 0, "missing-block control did not expose endpoint debt") + bad_blocks = [group[:] for group in blocks] + bad_blocks[-1][0] = bad_blocks[0][0] + bad_flat = [port for group in bad_blocks for port in group] + need(sorted(bad_flat) != list(range(112)), "duplicate-port control was accepted") + + print("PASS_GLOBAL_P112_ENDPOINT_CANCELLATION", + f"blocks={len(blocks)}", f"local_basis_cases={local_cases}", + f"label_xor={all_labels_xor}", f"delta_rank=9", + f"separate_a_ceiling={separate_screen['ceiling_upper_decimal']:.12f}", + f"deferred_a_ceiling={fused_screen['ceiling_upper_decimal']:.12f}", + f"rank1_overhead={max_overhead}", + "physical_shared_register=OPEN") + + +if __name__ == "__main__": + main()