diff --git a/research/dirty-output-delta-seed-b9eac2/CLAIM.md b/research/dirty-output-delta-seed-b9eac2/CLAIM.md new file mode 100644 index 0000000000..175e5341ea --- /dev/null +++ b/research/dirty-output-delta-seed-b9eac2/CLAIM.md @@ -0,0 +1,14 @@ +# Coordination claim + +CLAIM — recursive interfaces, task `persistent-boundary`, OS seed +`b9eac2d3a75de38afddcefd49be54627`. + +- Exact base: `0b1cccf86e2f5132ed286a26ef0a681a495740ea`; priority revision 3; selected record SHA-256 `10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32`. +- Object: two same-input calls each add `2f` into distinct arbitrary dirty targets `D1,D2`, for a rank-8 scalar child `f(x,y)=sum(i=0..7) x_i*y_i`. +- Question: can a child result be reused across both accumulators by repeating `NEG(D1); ADD(D2,D1); NEG(D1); child_plus(D1); ADD(D2,D1)` twice? The changed interface is a paired-output dirty-target contract; the child profile changes from four rank-8 invocations to two, with eight scalar ADD/NEG gates charged. +- Method/domain: prove the integer map for all dirty `D1,D2` and all integer `f`, instantiate the rank-8 length-eight dot product, check all 65,536 Boolean source pairs and a finite dirty-target grid, and exercise omission/order/sign controls. Compare the exact paired moment `4 phi_8` with `2 phi_8 + 8 phi_1` at the selected complex endpoint, pessimistically charging each scalar gate as a rank-1 unit. Stop if the complete bill is not favorable or the dirty contract fails. +- Nearest work: PR #1410 persists an order-four frame while retaining ten child calls; PR #1522 shares a BIT source tour across outputs. This changes recursive-child multiplicity through the dirty target difference identity. The latest overlap refresh at 2026-10-14 07:38 UTC covered 404 open PRs and returned no direct match for recursive-child output reuse / dirty accumulator difference. Discussion API refreshes at 07:30 and 07:38 UTC were rate-limited, leaving the 352-record cache; read-only inspection of current board #1163 found no matching posted claim. Posting this claim also failed through GraphQL because of the API rate limit; the REST Discussions comment route returned 404. This local card is the workflow fallback. +- Expected artifact: source-pinned package `research/dirty-output-delta-seed-b9eac2/`, exact map/cost evidence, meaningful negative controls; no selected κ or supplier-admission claim. +- Claim expires: **2026-10-14 09:30 UTC**. The Discussion post was not accepted because GitHub's GraphQL API was rate-limited; this file was kept as the local fallback. + +DONE: [PR #1717](https://github.com/CrocSwap/integer-mult-bounds/pull/1717) contains the source-pinned local mechanism, exact affine check, 589,824 finite cases, two failure controls, and rationally enclosed surrogate moment screen. No selected supplier admission or κ improvement is claimed. The Python 3.12 package-wrapper replay and hosted CI remain pending; direct optimized replay, metadata/source pins, and selected-record check passed locally. diff --git a/research/dirty-output-delta-seed-b9eac2/README.md b/research/dirty-output-delta-seed-b9eac2/README.md new file mode 100644 index 0000000000..0f4ca3d10f --- /dev/null +++ b/research/dirty-output-delta-seed-b9eac2/README.md @@ -0,0 +1,124 @@ +# Dirty output delta sharing at rank eight + +**Scoped recursive-interface construction. No new selected bound or \(\kappa\) is claimed.** + +## Construction + +Let one child implement the scalar additive map + +\[ + (D,x,y)\longmapsto (D+f(x,y),x,y),\qquad + f(x,y)=\sum_{i=0}^{7}x_i y_i, +\] + +with a dirty scalar target `D`. For two same-input outputs with arbitrary dirty +targets `D1,D2`, repeat the following five-step wrapper twice: + +```text +NEG(D1); ADD(D2,D1); NEG(D1); child_plus(D1); ADD(D2,D1) +``` + +One repetition starts from `(u,v)`, temporarily forms `(−u,v−u)`, restores the +first target, adds `f` to it, then adds that updated target into the second. +The result is `(u+f,v+f)`. Thus two repetitions give +`(D1+2f,D2+2f)` for arbitrary integers `D1,D2,f`. This is an exact affine +identity; the symbolic row calculation and finite fixture do not assume clean +targets or nonnegative dirty values. + +## Invoice and moment screen + +Two separate outputs need four rank-eight child calls. The paired wrapper needs +two rank-eight calls, four scalar ADDs and four scalar NEGs, with no extra +temporary register. Its exact integer map was checked on all 65,536 ordered +Boolean source pairs and all nine `(D1,D2) in {-1,0,1}^2` dirty-target pairs +(589,824 combined cases). Two failure controls, omitting the restoring NEG and +omitting the final ADD, both fail on the witness `(D1,D2,f)=(2,5,3)`. + +At the selected complex endpoint +`a = 67018507072324140917/40000000000000000000000`, let +`phi_r = (r/73)^(1-a)`. The replay uses the repository's rational outward +enclosures and certifies the strict comparison + +```text +baseline: 4 phi_8 +candidate: 2 phi_8 + 8 phi_1 +``` + +The certified baseline lower endpoint is approximately `0.4399830566696027`; +the candidate upper endpoint is approximately `0.3303711890451098`, giving at +least a 24.9127% reduction in this normalized screen. The candidate assigns +all eight scalar gates one rank-one recursive unit each. This is an explicit +surrogate charge; it is **not** a validated selected-supplier price for scalar +gates, nor proof that this wrapper is admitted by the selected supplier. Source +access and frame schedule are held fixed because both calls use identical +inputs. The physical precision/tape contract and the availability of a +dirty-target additive child remain unresolved. + +The exact prefix coefficient L1 maximum over `(D1,D2,f)` is 3, equal to the +final output rows; the temporary difference row `D2-D1` has L1 norm 2. A +fixed-width implementation may therefore require one extra transient guard +bit relative to a one-row bound. This pilot has no physical word or tape, so it +does not establish that such precision is available. + +## Scope, provenance, and limitations + +Assignment: OS seed `b9eac2d3a75de38afddcefd49be54627`, track +`recursive-interfaces`, task `persistent-boundary`, priority revision 3, base +`0b1cccf86e2f5132ed286a26ef0a681a495740ea`. The selected-record hash is +`10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32`. +Source blobs and hashes are in [SOURCES.json](SOURCES.json). The selected +assembly pins the complex endpoint; the pinned `ceiling.py` supplies exact +rational interval arithmetic for the moment screen. + +Nearest predecessors are PR #1410 (same-source phase persistence while +retaining ten child calls) and PR #1522 (BIT source-tour sharing across +outputs). This construction instead reduces recursive child multiplicity by +reusing one dirty output delta across two targets. It refines the original +`persistent-boundary` card from eliminating a restored boundary operation to +sharing a child result through a paired dirty-output contract. The 07:38 UTC +refresh covered 404 open PRs and found no direct PR match; read-only inspection +of the current coordination board found no matching claim. The Discussion API +refresh was rate-limited, so the cached claim snapshot remains older. Claim +posting also hit that GraphQL rate limit; the local card and exact refresh +record are in [CLAIM.md](CLAIM.md). + +Submitted for review in [PR #1717](https://github.com/CrocSwap/integer-mult-bounds/pull/1717), this is a **new local mechanism**, not an assembled supplier, a +conditional theorem bound, or a change to the selected frontier. It assumes a +rank-eight child with the additive dirty-target contract and identical source +inputs across the two outputs. It does not provide an implementation of that +child in the selected complex circuit, charge all supplier-specific interface +transfers, prove fixed-precision fit, or establish a new recursive profile. + +## Reproduce + +From the repository root: + +```sh +python3 scripts/research_package.py --package research/dirty-output-delta-seed-b9eac2 --check-only +python3.12 scripts/research_package.py --package research/dirty-output-delta-seed-b9eac2 +``` + +The registered verifier exhaustively checks the finite source/target fixture, +symbolically checks the affine map, checks the exact gate count and two +negative controls, validates the selected-record and assembly pins, and proves +the moment comparison using rational enclosures. + +## Open next questions + +- Does a named selected complex supplier expose a rank-eight child with this + additive dirty-target contract on the same source inputs? This is required + before the local child-call reduction can enter the binding profile. First + step: map one candidate supplier's actual two output boundaries to the + `child_plus(D)` contract. Blocker: no selected physical supplier has been + shown to expose this exact paired interface. +- Does the temporary `D2-D1` row fit the supplier's precision and tape bounds? + First step: propagate the exact prefix row coefficients through that named + supplier. Blocker: the pilot has no supplier realization or tape schedule. + +## Credit + +Prepared by Cinna Davis with substantial OpenAI Codex assistance in scoping, +algebra, implementation, exact verification, source handling and exposition. +PR #1391 supplies the related rank-eight dirty-target interface context, but +the paired-delta wrapper and its two-output map are new here. New work is +Apache-2.0; retain all predecessor attribution and notices. diff --git a/research/dirty-output-delta-seed-b9eac2/SOURCES.json b/research/dirty-output-delta-seed-b9eac2/SOURCES.json new file mode 100644 index 0000000000..fd2e2bff59 --- /dev/null +++ b/research/dirty-output-delta-seed-b9eac2/SOURCES.json @@ -0,0 +1,48 @@ +{ + "schema_version": 1, + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "input", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "06c96f5579bb67ed1b86d334e78fbed7da6945f1", + "sha256": "6686ad58f1fbdbc87134a78901b60fd53a20d3984355e91defbbebc9e9fa8075" + }, + { + "path": "research/community-frontier1094-audit/ASSEMBLY.json", + "usage": "input", + "git_blob": "5fd676df060f3b450782fdf5ff5f6beb63a5eeb0", + "sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045" + }, + { + "path": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "usage": "input", + "git_blob": "6a75493790b4eff9c4a98051ef8b01d6aad0d5a8", + "sha256": "79b3de5db3dbcb9829789ba58e9e45758926031e2a7d80667a08429d369be53b" + }, + { + "path": "research/complex-local-word-ceiling/ceiling.py", + "usage": "input", + "git_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "sha256": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + }, + { + "path": "research/z4-persistent-pair-seed57/README.md", + "usage": "input", + "git_blob": "001929a89cd64f4bbb0d4194c6bde96f45b7ded2", + "sha256": "6dda7d5b83b41c71d73711401edbc146271a546a518ef6b038b0bdbb6578d405" + }, + { + "path": "research/z4-persistent-pair-seed57/inputs/PR1391-CERTIFICATE.json", + "usage": "input", + "git_blob": "0132b117d90f1a7a97c40af3e38503c117604e00", + "sha256": "2a6ac306ddc6f58514b89f680d8ff3027b4195e2754574f8f04ac1f17785c9d3" + } + ] +} diff --git a/research/dirty-output-delta-seed-b9eac2/TASK.json b/research/dirty-output-delta-seed-b9eac2/TASK.json new file mode 100644 index 0000000000..12d2832c76 --- /dev/null +++ b/research/dirty-output-delta-seed-b9eac2/TASK.json @@ -0,0 +1,93 @@ +{ + "schema_version": 1, + "task_id": "persistent-boundary", + "priority_revision": 3, + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "original_card": { + "id": "persistent-boundary", + "question": "Can a specified pair of consecutive calls eliminate a restoration that the next call reconstructs?", + "starting_points": [ + "research/heterogeneous-owner-assembly/README.md", + "certificates/selected-result.json" + ], + "methods": [ + "Write typed entry/exit contracts and a contracting multitype recurrence.", + "Derive a lower bound for the compulsory transitions of one proposed typed interface." + ], + "acceptance_gate": "Show actual eliminated work and legal composition; changing a scalar recurrence into a matrix is insufficient.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Find a concrete consecutive-call boundary in the selected review and list its entry/exit obligations.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Specify two call types and one operation actually removed by composition; derive the normalized recurrence.", + "bottleneck_link": "Eliminating compulsory boundary work can lower recursive cost beyond packing gains.", + "allowed_variations": [ + "A two-type pilot or one explicit deferred restoration." + ], + "scope_change_triggers": [ + "Rewriting the old scalar recurrence as a matrix without eliminating work." + ], + "overlap_terms": [ + "persistent boundary", + "deferred restoration", + "multitype" + ] + }, + "actual_scope": "For two same-input calls that each add twice the same rank-8 scalar child f into separate dirty targets D1 and D2, test whether the child result can be shared through the existing D1 target: repeat NEG(D1), ADD(D2,D1), NEG(D1), child_plus(D1), ADD(D2,D1) twice. The proposed map is (D1,D2)->(D1+2f,D2+2f), with D1,D2 arbitrary and no extra temporary.", + "scope_change_reason": "Refined the card to an explicit two-output dirty-target wrapper because the broad boundary question had no supplier-specific restoration instance established within this bounded cycle. The new scope tests a concrete local mechanism that removes two of four same-input rank-eight child invocations under a named additive child contract, while leaving supplier adoption as an open follow-up.", + "assignment_seed": "b9eac2d3a75de38afddcefd49be54627", + "track": "recursive-interfaces", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "catalogue_priority_revision": 3, + "chooser_suggestions": [ + "coverage-law-change", + "connector-alphabet-change", + "centre-path-sharing" + ], + "selection_rationale": "The coverage-law suggestion overlaps the live plane-port claim in Discussion 1587; the connector-alphabet suggestion overlaps the completed DUO extension in PR 1531; the centre-sharing suggestion overlaps the adjacent-call center-register question and selected-stage findings in Discussion 1516 and PRs 1664/1684. This is a distinct persistent-boundary construction: reuse one recursive child output across two dirty accumulators, changing the child-call profile rather than only the frame schedule.", + "predecessors": [ + { + "pr": 1391, + "head": "6ce8017e4c27c8b220b6c3a27a53bb18f138212a", + "role": "rank-8 child interface and dirty-target convention" + }, + { + "pr": 1410, + "head": "5b1c00b9f2770aabaa0085539405757f7818a14a", + "role": "same-source two-call phase persistence, retaining all ten child invocations" + }, + { + "pr": 1522, + "head": "04379bb9bf8d394891df9b48edbfa79882aedae2", + "role": "related but distinct BIT source-tour sharing across outputs" + } + ], + "scope_status": "refined", + "bottleneck_link": "If admitted to the complex supplier, sharing this output would replace four rank-8 child calls by two per paired output, reducing the binding-side child moment; the extra scalar target gates and the changed two-output contract are priced separately.", + "budget_minutes": 60, + "stop_rule": "Only the rank-8 length-eight dot-product child, two arbitrary dirty scalar targets, and two consecutive same-input outputs are in scope. Stop if the exact dirty map fails, if the required additive child contract is unavailable, or if the fully charged moment with the scalar gates is not below two separate calls. Do not infer supplier admission from this pilot.", + "outcome": "partial", + "evidence": "Exact symbolic affine execution proves (D1,D2)->(D1+2f,D2+2f) for arbitrary integer dirty targets and child value. Positive fixture covers all 65,536 Boolean source pairs with all 9 target pairs (589,824 combined cases); controls omitting the restoring NEG and final ADD both reject the witness (2,5,3). Invoice: baseline 4 rank-8 calls; candidate 2 rank-8 calls plus 4 ADD and 4 NEG gates, no extra temporary. Using exact outward rational enclosures at selected a=67018507072324140917/40000000000000000000000 and charging each gate one phi_1 unit, candidate upper 0.3303711890451098 < baseline lower 0.4399830566696027 (at least 24.9127% lower in this surrogate screen). The source/frame schedule is held fixed. This is a local mechanism only: the selected supplier's dirty-child interface, transfer bill, tape and precision admission are not established; the endpoint is not a new kappa.", + "author": "Cinna Davis", + "ai_assistance": "Substantial OpenAI Codex assistance in task scoping, algebra, implementation, exact verification, source handling and exposition.", + "open_questions": [ + { + "question": "Does a named complex supplier expose a rank-8 child with the same source and two aligned output accumulators across consecutive calls?", + "why_it_matters": "Only a legal caller with the required same-input and dirty-target contract can transfer this local reduction to the binding complex profile.", + "first_step": "Inspect one candidate supplier's typed call boundary and list the two output rows, source frames and restoration requirements.", + "blocked_by": "No selected-supplier admission is part of this finite rank-8 pilot." + }, + { + "question": "Can the transient D2-D1 row fit the selected precision and tape bounds?", + "why_it_matters": "The exact map is integer-valued, but a physical fixed-width caller may need one extra transient guard bit.", + "first_step": "Compute the exact prefix row-L1 and peak magnitude for a pinned supplier instance.", + "blocked_by": "The current experiment is a generic dot-product child with no selected tape realization." + } + ] +} diff --git a/research/dirty-output-delta-seed-b9eac2/VERIFY.json b/research/dirty-output-delta-seed-b9eac2/VERIFY.json new file mode 100644 index 0000000000..19c3ff7a74 --- /dev/null +++ b/research/dirty-output-delta-seed-b9eac2/VERIFY.json @@ -0,0 +1,27 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "certificates/selected-result.json", + "research/community-frontier1094-audit/ASSEMBLY.json", + "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "research/complex-local-word-ceiling/ceiling.py", + "research/z4-persistent-pair-seed57/README.md", + "research/z4-persistent-pair-seed57/inputs/PR1391-CERTIFICATE.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Exact symbolic dirty-output map; 589824 positive cases; two mutation controls; selected source pins; rationally enclosed fully itemized local moment comparison." + } + ] +} diff --git a/research/dirty-output-delta-seed-b9eac2/verify.py b/research/dirty-output-delta-seed-b9eac2/verify.py new file mode 100644 index 0000000000..f54b6bedc8 --- /dev/null +++ b/research/dirty-output-delta-seed-b9eac2/verify.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python3 +"""Verify a paired dirty-output wrapper around a rank-eight scalar child. + +All map and gate calculations are exact integers/rationals. The only imported +module provides the repository's outward-rounded rational enclosures for +(r/73)^(1-a). +""" +from fractions import Fraction as Q +import hashlib +import itertools +import json +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +sys.path.insert(0, str(ROOT / "research" / "complex-local-word-ceiling")) +import ceiling # noqa: E402 + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def dot8(x, y): + require(len(x) == 8 and len(y) == 8, "rank-eight inputs required") + return sum(a * b for a, b in zip(x, y)) + + +def paired_wrapper(d1, d2, f): + """Run two repetitions using only ADD, NEG, and the dirty child-plus call.""" + counts = {"ADD": 0, "NEG": 0, "child_rank8": 0} + for _ in range(2): + d1 = -d1 + counts["NEG"] += 1 + d2 = d2 + d1 + counts["ADD"] += 1 + d1 = -d1 + counts["NEG"] += 1 + d1 = d1 + f + counts["child_rank8"] += 1 + d2 = d2 + d1 + counts["ADD"] += 1 + return (d1, d2), counts + + +def separate_calls(d1, d2, f): + """Each dirty target receives two independent rank-eight child calls.""" + return (d1 + f + f, d2 + f + f) + + +def affine_wrapper(): + """Symbolically execute rows in variables (D1,D2,f), over Q.""" + rows = [[Q(1), Q(0), Q(0)], [Q(0), Q(1), Q(0)]] + prefix_l1 = max(sum(abs(c) for c in row) for row in rows) + difference_l1 = None + for _ in range(2): + rows[0] = [-v for v in rows[0]] + prefix_l1 = max(prefix_l1, sum(abs(c) for c in rows[0])) + rows[1] = [a + b for a, b in zip(rows[1], rows[0])] + difference_l1 = sum(abs(c) for c in rows[1]) + prefix_l1 = max(prefix_l1, difference_l1) + rows[0] = [-v for v in rows[0]] + prefix_l1 = max(prefix_l1, sum(abs(c) for c in rows[0])) + rows[0][2] += 1 + prefix_l1 = max(prefix_l1, sum(abs(c) for c in rows[0])) + rows[1] = [a + b for a, b in zip(rows[1], rows[0])] + prefix_l1 = max(prefix_l1, sum(abs(c) for c in rows[1])) + return rows, prefix_l1, difference_l1 + + +def mutated(d1, d2, f, fault): + """Small incorrect variants used as negative controls.""" + for _ in range(2): + d1 = -d1 + d2 = d2 + d1 + if fault != "omit_restore_neg": + d1 = -d1 + d1 = d1 + f + if fault != "omit_final_add": + d2 = d2 + d1 + return d1, d2 + + +def verify_map_and_controls(): + expected_rows = [[Q(1), Q(0), Q(2)], [Q(0), Q(1), Q(2)]] + rows, prefix_l1, difference_l1 = affine_wrapper() + require(rows == expected_rows, "symbolic affine map is not (D1+2f,D2+2f)") + require(prefix_l1 == 3, "unexpected prefix coefficient L1 maximum") + require(difference_l1 == 2, "temporary D2-D1 difference has unexpected L1") + + witness = (2, 5, 3) + expected = separate_calls(*witness) + require(expected == (8, 11), "positive witness setup changed") + for fault in ("omit_restore_neg", "omit_final_add"): + require(mutated(*witness, fault) != expected, + "negative control unexpectedly implements the target map: " + fault) + + source_pairs = target_pairs = 0 + values = tuple(itertools.product((0, 1), repeat=8)) + dirty_values = tuple(itertools.product(range(-1, 2), repeat=2)) + for x in values: + for y in values: + f = dot8(x, y) + for d1, d2 in dirty_values: + got, counts = paired_wrapper(d1, d2, f) + require(got == separate_calls(d1, d2, f), + "finite positive map check failed") + require(counts == {"ADD": 4, "NEG": 4, "child_rank8": 2}, + "gate/child invoice changed") + target_pairs += 1 + source_pairs += 1 + require(source_pairs == 65_536, "Boolean source-pair census incomplete") + require(target_pairs == 589_824, "dirty-target grid census incomplete") + return source_pairs, target_pairs + + +def verify_moment_screen(): + record_path = ROOT / "certificates" / "selected-result.json" + record_bytes = record_path.read_bytes() + record = json.loads(record_bytes) + require(hashlib.sha256(record_bytes).hexdigest() == + "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "selected record does not match the cycle pin") + assembly_path = ROOT / record["certificate"] + assembly_bytes = assembly_path.read_bytes() + require(hashlib.sha256(assembly_bytes).hexdigest() == record["certificate_sha256"], + "selected assembly hash mismatch") + assembly = json.loads(assembly_bytes) + a = Q(assembly["complex_lower"]) + require(a == Q(67018507072324140917, 40000000000000000000000), + "complex endpoint changed from the pinned cycle value") + + phi8 = ceiling.child_cost(8, 73, a) + phi1 = ceiling.child_cost(1, 73, a) + baseline = (4 * phi8[0], 4 * phi8[1]) + candidate = (2 * phi8[0] + 8 * phi1[0], + 2 * phi8[1] + 8 * phi1[1]) + require(candidate[1] < baseline[0], + "rank-eight sharing fails the conservative scalar-gate moment screen") + return a, phi8, phi1, baseline, candidate + + +def main(): + source_pairs, target_pairs = verify_map_and_controls() + a, phi8, phi1, baseline, candidate = verify_moment_screen() + ratio = Q(baseline[0] - candidate[1], baseline[0]) + print("PASS_DIRTY_OUTPUT_DELTA") + print("map=(D1+2f,D2+2f); affine_prefix_L1_max=3; temporary_D2-D1_L1=2") + print(f"boolean_source_pairs={source_pairs} dirty_target_cases={target_pairs}") + print("invoice=4 rank8 baseline; 2 rank8 + 4 ADD + 4 NEG candidate") + print(f"selected_a={a}") + print(f"phi8_enclosure=[{float(phi8[0]):.16g},{float(phi8[1]):.16g}]") + print(f"phi1_enclosure=[{float(phi1[0]):.16g},{float(phi1[1]):.16g}]") + print(f"baseline_lower={float(baseline[0]):.16g} candidate_upper={float(candidate[1]):.16g}") + print(f"certified_screen_saving_fraction_lower={float(ratio):.8%}") + print("controls=PASS omit_restore_neg,omit_final_add") + + +if __name__ == "__main__": + main()