From f7f4fdfc8e9498d9b2e3c36ddaf8897800e5d407 Mon Sep 17 00:00:00 2001 From: Nick Petalas Date: Tue, 27 Oct 2026 16:21:07 +0000 Subject: [PATCH 1/2] feat(research): save a four-call boundary adapter --- .../README.md | 186 ++++++++++++++ .../SOURCES.json | 24 ++ .../TASK.json | 111 +++++++++ .../VERIFY.json | 36 +++ .../verify.py | 233 ++++++++++++++++++ 5 files changed, 590 insertions(+) create mode 100644 research/four-call-productive-observations/README.md create mode 100644 research/four-call-productive-observations/SOURCES.json create mode 100644 research/four-call-productive-observations/TASK.json create mode 100644 research/four-call-productive-observations/VERIFY.json create mode 100644 research/four-call-productive-observations/verify.py diff --git a/research/four-call-productive-observations/README.md b/research/four-call-productive-observations/README.md new file mode 100644 index 0000000000..1109df11eb --- /dev/null +++ b/research/four-call-productive-observations/README.md @@ -0,0 +1,186 @@ +# A four-call partial-observation saving with two nonzero output updates + +This contribution was produced by Nick Petalas. Apache-2.0. + +**Finite exact certificate with a scoped algebraic proof.** Four fixed children +need exactly **two** paid adapters under partial observation, versus **three** +when both outputs are observed at every boundary. Their final endpoint is +`(x+a, y+a, a, b)` on arbitrary dirty input `(x,y,a,b)`. Both output-update rows +are nonzero. The complete fixed-child bills are **10 versus 11 XORs**. + +This answers Open next question 2 of commdata2338's +[PR #2020](https://github.com/CrocSwap/integer-mult-bounds/pull/2020), at +`f4f8d2afdd3fec60c7739dcd826497e9738f80c1`. Its length-at-most-three census +and model are cited premises, not replayed deliverables. The new result is +one sharp four-call instance. No new kappa or supplier is claimed. + +## Contract + +Keep #2020's four coordinates `(d0,d1,w0,w1)`, all initially arbitrary. +A compulsory child `(o,s,t)` performs these two XORs in order: + +```text +d[o] ^= w[s] +w[t] ^= w[1-t] +``` + +An adapter is one of the two workspace shears or one of the four XORs from +workspace into an output. Each costs one. Arbitrary finite adapter words may +occur before the first child and after any child. The children are indivisible +and their order is fixed. Outputs cannot feed workspace or each other. There +are no free operations, clean helpers, copies, erasures or extra coordinates. + +The eager reference undoes each child's workspace shear immediately. At an +interior observation, only the specified outputs must match this reference. +At the end, both outputs and both original workspace coordinates must match. +The full-observation comparator has the same adapter alphabet and may also +retain noncanonical workspace between children. + +Use the child sequence + +```text +(0,0,0), (1,0,1), (1,0,0), (1,0,0). +``` + +Observe both outputs after children 1 and 3, and only `d0` after child 2. +The final boundary observes the complete state. Thus only one output at one +interior boundary is hidden. The two workspace shear directions both occur. + +## Attaining words + +Put `U: w0 ^= w1` and `L: w1 ^= w0`. The partial-observation word uses +`L` after child 2 and `U` after child 4, with no entry adapter. + +| Completed boundary | Candidate state | Required eager outputs | +| --- | --- | --- | +| Child 1 | `(x+a, y, a+b, b)` | both: `(x+a,y)` | +| Child 2, then L | `(x+a, y+a+b, a+b, b)` | only `d0=x+a` | +| Child 3 | `(x+a, y, a, b)` | both: `(x+a,y)` | +| Child 4, then U | `(x+a, y+a, a, b)` | complete state | + +For full observation, use `U` after child 1, `L` after child 2, and +`d1 ^= w1` after child 4. After child 3, workspace is `(a+b,b)` and the +outputs are `(x+a,y)`. Child 4 restores workspace to `(a,b)` but leaves +`d1=y+a+b`; its final output adapter removes b. This costs three adapters +and satisfies every full observation. Eager execution costs four adapters. + +## Why the minima are exact + +Every workspace shear is an odd permutation of the three nonzero vectors +of `F2^2`. Four child shears have even parity. Since data adapters do not +change workspace, any program restoring workspace must use an even number +of workspace adapters. With no workspace adapter, the four child shears +`U,L,U,U` have a nonidentity product. Thus at least two adapters are required +even under partial observation. The displayed word attains two. + +Suppose a full-observation program had at most two adapters. The same parity +argument and nonidentity product force exactly two workspace adapters and +no data adapters. With no data adapters, the full observations force the +workspace row read by each child to equal the incoming a. Child 1 is the only +writer of d0. The observations of d1 after children 2 and 3, and at the final +boundary, force that same reader row a for children 2, 3 and 4. + +Each of children 1, 3 and 4 applies U after its read. Immediately afterward, +the first workspace row differs from a by the nonzero second workspace row. +Workspace remains invertible, so this difference cannot vanish. Restoring +the required first row therefore needs an adapter in each of three disjoint +gaps: between children 1 and 2, between children 3 and 4, and after child 4. +Two workspace adapters cannot cover them. Hence full observation needs at +least three total adapters; the full-observation word attains three. + +This proof is an identity over every vector space over a characteristic-two +field. In particular, it holds coordinatewise on dirty binary streams. +The independent finite checks below establish the same minima directly. + +## Evidence and reproduction + +`verify.py` enumerates every boundary placement and every ordered adapter +word of lengths 0, 1 and 2. There are respectively +`1`, `5*6=30` and `binom(6,2)*6^2=540` schedules, including entry preparation, +repeated gates and two gates in the same gap. Every shorter program is in +this list. No full-observation schedule succeeds; exactly two of the +two-adapter schedules satisfy partial observation, and none shorter does. + +A coefficient-row interpreter and a separately written literal Boolean +interpreter agree on every one of the 571 schedules. The latter executes +each schedule on all 16 dirty inputs under both observation contracts, +giving 18,272 complete executions. Three attaining words add 48 executions. +Six semantic controls include a newly observed hidden output, missing final +restoration, a moved adapter, a clean-input false positive and its dirty +counterexample, and forbidden output-to-workspace feedback. + +From the repository root, using CPython 3.12 and its standard library: + +```sh +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/four-call-productive-observations/verify.py +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/four-call-productive-observations +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/four-call-productive-observations --check-source-history +``` + +Use the reviewer's Python 3.12 path in place of the local interpreter path. +The registered commands repeat the verifier normally and with `-O`. Both +print `PASS_FOUR_CALL_PRODUCTIVE_OBSERVATIONS partial=2 full=3 xor=10/11`. +The verifier emits a generated JSON receipt bound to SHA256 hashes of all +five package files and the pinned source contract. It writes nothing to the +checkout. Local replay used CPython 3.12.15 on macOS 27.0.1 arm64. + +The predecessor README is the only declared external input. Its byte hash +authenticates the cited contract, without running predecessor mathematics. +The catalogue and selected record are historical provenance. Exact base, +Git blobs and SHA256 pins are in [SOURCES.json](SOURCES.json). + +## Limits and expansion decision + +This is a fixed-call interface result. The two update rows are equal, so the +net update has rank one. Both outputs receive the incoming a. +If the children can be opened or replaced, two direct XORs implement the +same final endpoint. Ten is therefore not an unrestricted circuit minimum. + +The comparison charges eight compulsory child XORs and every adapter. It has +no source-bound recursive caller, native frame maps, ownership/stock schedule, +tape movement, precision bound, compiler closure or outer invoice. Those costs +remain unspecified. No selected cold replay, Lean proof, independent human +review or full multiplication theorem is claimed. + +The search stopped at its first improving four-call instance. Its initial +test hid d1 at all three interior cuts. Inspecting the attaining word showed +that it already meets the stronger observations after children 1 and 3, so +the certificate uses those stronger observations. No four-call census or +further construction search was run. Stop this contribution at the witness; +a physical expansion needs a named caller and a complete favorable bill. + +Power of Ten rule 3 has a managed-runtime deviation. Python allocates tuples, +lists and integers during verification. Four coordinates, four-by-four +coefficient matrices, five gaps, at most four adapters per positive word, +571 shorter schedules streamed one at a time, and 16 inputs bound live +mathematical data. Functions stay below +60 physical lines; all loops have these finite bounds. There is no recursive +search, dynamic code, network use or subprocess in the scientific verifier. + +## Open next questions + +- Can a four-call instance save adapters when its two final update rows are + linearly independent? This would remove the rank-one limitation. First + restrict #2020's model to rank-two net updates and seek one witness. The + present result leaves that domain unsearched and unreserved. +- Does a real mandatory child chain permit this single hidden-output cut? + First bind the actual observer, child and dirty-return contracts, then + charge their full physical invoice. No qualifying caller is supplied here. + +## Credit and scope + +commdata2338's #2020 supplies the model, independent earlier census and the +explicit four-call question. Aaron Wang / navinor's #1155, Adam Gall's +`observer-safe-restoration`, and Sagar Thakrar's +`reader-restoration-cuts-seed53` supply the restoration and observation +lineage credited by #2020. Cinna Davis's #1930 studies a different +output-to-source prefix-chain contract. None of their files or credit lines +is changed or copied into this package. + +The new contribution is the four-call witness, its two sharp minima and +their direct exhaustive check. The `coverage-law-change` card is marked +changed in [TASK.json](TASK.json): this is an abstract boundary-cost side +result, rather than a new productive target split on the selected word. +The [advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19221578) +records that scope. Publication and archive intake do not establish supplier +admission or change the selected frontier. diff --git a/research/four-call-productive-observations/SOURCES.json b/research/four-call-productive-observations/SOURCES.json new file mode 100644 index 0000000000..957a9ce97e --- /dev/null +++ b/research/four-call-productive-observations/SOURCES.json @@ -0,0 +1,24 @@ +{ + "schema_version": 1, + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "581f8d87008354eb5b869f7ed9de1317ad837ce8", + "sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/partial-observation-boundaries/README.md", + "usage": "input", + "git_blob": "06692e56721422d797f0f8f7d2be5a29428d2ae7", + "sha256": "72ddf7a70241b4b02749361149287772dc39def8d86ec6ffd5eddeaf2470609c" + } + ] +} diff --git a/research/four-call-productive-observations/TASK.json b/research/four-call-productive-observations/TASK.json new file mode 100644 index 0000000000..f48b6eb465 --- /dev/null +++ b/research/four-call-productive-observations/TASK.json @@ -0,0 +1,111 @@ +{ + "schema_version": 1, + "task_id": "coverage-law-change", + "priority_revision": 8, + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "original_card": { + "id": "coverage-law-change", + "question": "Can a completed call earn more independent productive target credit without an offsetting paid bill?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "A source-bound arbitrary-input identity and legal producer/consumer boundary with the complete paid and productive target invoice, including restoration, ownership, native alignment and extra charges. Price under the actual current model; historical ceiling.py assumptions must be established before use. A favorable optimistic relaxation keeps a route open but is not a completed supplier. A scoped local result remains useful; expansion requires the family-level budget gate.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Use #5599 as a completed positive control, then choose one uncovered cut/module beyond an applicable frozen exclusion. Derive independence, saturation and chronological availability rather than counting rational rank alone. Price target credits and all new jobs together, then check compiler and actual caller compatibility. Stop on a nonphysical credit or an unfavorable complete relaxation.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "target credit", + "helper split", + "coverage law" + ], + "existing_checks": [ + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Answer PR #2020 Open next question 2 with one exact four-call partial-observation saving whose two final output-update rows are nonzero.", + "scope_change_reason": "The current card concerns actual productive target splitting. This bounded abstract boundary-cost side result answers an explicit predecessor handoff and does not claim a selected supplier or recursive saving.", + "bottleneck_link": "A hidden intermediate output can eliminate paid boundary work even when both final outputs change; actual caller and complete physical cost remain necessary.", + "budget_minutes": 60, + "stop_rule": "Stop at the first improving four-call instance. Prove its exact minima and package it; do not complete the four-call census or extend the search.", + "outcome": "completed", + "evidence": "verify.py proves minima 2 and 3 by attaining words and complete shorter-word exclusion. Two interpreters agree on all 571 schedules; 18272 literal shorter-program executions, 48 positive executions and six semantic controls pass.", + "author": "Nick Petalas", + "ai_assistance": "Independent human and formal proof-kernel review are unclaimed.", + "open_questions": [ + { + "question": "Can a four-call rank-two net-update instance save adapters under partial observation?", + "why_it_matters": "Removes the equal-update-row limitation of the present witness.", + "first_step": "Restrict the unchanged model to independent final update rows and seek one exact witness.", + "blocked_by": "Unsearched; no physical caller is supplied." + }, + { + "question": "Does a real mandatory child chain admit this hidden-output boundary?", + "why_it_matters": "Needed before turning the scalar interface saving into an admitted recursive gain.", + "first_step": "Bind actual observers, children and dirty-return contracts and price the complete physical invoice.", + "blocked_by": "No source-bound caller, native maps or complete physical bill are supplied." + } + ], + "source_question": { + "pull_request": 2020, + "author": "commdata2338", + "head": "f4f8d2afdd3fec60c7739dcd826497e9738f80c1", + "question": 2 + }, + "claim_type": "finite exact certificate with a scoped algebraic proof", + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19221578", + "environment": { + "python": "CPython 3.12.15", + "platform": "macOS 27.0.1 arm64", + "dependencies": "standard library only" + }, + "coordination": { + "upstream_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "priority_revision": 8, + "overlap_open_prs": 341, + "overlap_open_prs_fetched_at": "2026-10-27T16:10:13.962251+00:00", + "overlap_discussion_records": 5525, + "overlap_discussions_fetched_at": "2026-10-27T16:11:23.435724+00:00", + "remote_pagination_complete": true, + "local_notes_complete": false, + "merged_search_terms": [ + "partial observation", + "partial-observation-boundaries", + "four-call adapter", + "both final output rows" + ], + "limitation": "Metadata and README searches do not cover every diff or unpublished work.", + "precommit_refresh_utc": "2026-10-27T16:21:00Z", + "precommit_upstream_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810" + } +} diff --git a/research/four-call-productive-observations/VERIFY.json b/research/four-call-productive-observations/VERIFY.json new file mode 100644 index 0000000000..4e5bdc6284 --- /dev/null +++ b/research/four-call-productive-observations/VERIFY.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/partial-observation-boundaries/README.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Both exact minima; all 571 shorter schedules; separate coefficient and Boolean interpreters; all dirty inputs; positive words; six semantic controls; generated file-hash receipt." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "The same finite certificate with Python assertions disabled." + } + ] +} diff --git a/research/four-call-productive-observations/verify.py b/research/four-call-productive-observations/verify.py new file mode 100644 index 0000000000..39898931d7 --- /dev/null +++ b/research/four-call-productive-observations/verify.py @@ -0,0 +1,233 @@ +#!/usr/bin/env python3 +"""Certify one four-call partial-observation saving on arbitrary dirty inputs. + +Produced by Nick Petalas. Apache-2.0. +""" + +import hashlib +import json +import sys +from itertools import combinations_with_replacement, product +from pathlib import Path + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parent.parent +SOURCE = "research/partial-observation-boundaries/README.md" +SOURCE_HASH = "72ddf7a70241b4b02749361149287772dc39def8d86ec6ffd5eddeaf2470609c" +# Coordinate order is d0, d1, w0, w1. Each gate is (destination, source). +ADAPTERS = ((2, 3), (3, 2), (0, 2), (0, 3), (1, 2), (1, 3)) +CHILDREN = ((0, 0, 0), (1, 0, 1), (1, 0, 0), (1, 0, 0)) +PARTIAL_MASKS = (3, 1, 3, 3) +FULL_MASKS = (3, 3, 3, 3) +# Five gaps: before child 1 and after children 1, 2, 3, 4. +PARTIAL_WORD = ((), (), ((3, 2),), (), ((2, 3),)) +FULL_WORD = ((), ((2, 3),), ((3, 2),), (), ((1, 3),)) +EAGER_WORD = ((), ((2, 3),), ((3, 2),), ((2, 3),), ((2, 3),)) +FINAL_ROWS = (5, 6, 4, 8) + + +def require(condition, message): + """Retain mathematical checks when Python assertions are disabled.""" + if not condition: + raise ValueError(message) + + +def validate_schedule(schedule): + require(len(schedule) == 5, "a schedule must have five gaps") + require(sum(map(len, schedule)) <= 4, "adapter count exceeds fixture bound") + require( + all(gate in ADAPTERS for gap in schedule for gate in gap), + "gate lies outside the six-adapter alphabet", + ) + + +def matrix_trace(schedule): + """Propagate all four independent input coefficients simultaneously.""" + validate_schedule(schedule) + rows = [1, 2, 4, 8] + for destination, source in schedule[0]: + rows[destination] ^= rows[source] + trace = [] + for index, (output, source, target) in enumerate(CHILDREN): + rows[output] ^= rows[2 + source] + rows[2 + target] ^= rows[3 - target] + for destination, source in schedule[index + 1]: + rows[destination] ^= rows[source] + trace.append(tuple(rows)) + return tuple(trace) + + +def reference_rows(): + rows = [1, 2, 4, 8] + trace = [] + for output, source, _target in CHILDREN: + rows[output] ^= 1 << (2 + source) + trace.append(tuple(rows)) + return tuple(trace) + + +def matrix_accepts(trace, masks): + require(len(trace) == len(masks) == 4, "four boundaries are required") + expected = reference_rows() + observed = all( + not (mask & (1 << output)) or row[output] == wanted[output] + for row, wanted, mask in zip(trace, expected, masks, strict=True) + for output in range(2) + ) + return observed and trace[-1] == expected[-1] + + +def literal_accepts(schedule, masks, initial): + """Separate interpreter on bits, with explicit indivisible child bodies.""" + d0, d1, w0, w1 = initial + registers = [d0, d1, w0, w1] + expected = [d0, d1] + good = True + for gap in range(5): + if gap: + if gap == 1: + registers[0] ^= registers[2] + registers[2] ^= registers[3] + expected[0] ^= w0 + else: + registers[1] ^= registers[2] + expected[1] ^= w0 + if gap == 2: + registers[3] ^= registers[2] + else: + registers[2] ^= registers[3] + for destination, source in schedule[gap]: + registers[destination] = (registers[destination] + registers[source]) % 2 + if gap: + for output in range(2): + if masks[gap - 1] & (1 << output): + good = good and registers[output] == expected[output] + return good and registers == [*expected, w0, w1] + + +def schedules_of_size(count): + require(count in (0, 1, 2), "only the complete shorter-word domain is used") + for gaps in combinations_with_replacement(range(5), count): + for gates in product(ADAPTERS, repeat=count): + schedule = [[] for _ in range(5)] + for gap, gate in zip(gaps, gates, strict=True): + schedule[gap].append(gate) + yield tuple(tuple(gap) for gap in schedule) + + +def check_shorter_words(): + counts = [] + partial_hits = [] + executions = 0 + inputs = tuple(product((0, 1), repeat=4)) + for count in range(3): + seen = hits = 0 + for schedule in schedules_of_size(count): + trace = matrix_trace(schedule) + partial = matrix_accepts(trace, PARTIAL_MASKS) + full = matrix_accepts(trace, FULL_MASKS) + bit_partial = bit_full = True + for initial in inputs: + bit_partial &= literal_accepts(schedule, PARTIAL_MASKS, initial) + bit_full &= literal_accepts(schedule, FULL_MASKS, initial) + executions += 2 + require( + partial == bit_partial and full == bit_full, + "coefficient and literal interpreters disagree", + ) + require( + not full, "a full-observation word with at most two adapters exists" + ) + require( + not partial or count == 2, "partial observation uses fewer than two" + ) + hits += partial + seen += 1 + counts.append(seen) + partial_hits.append(hits) + require(counts == [1, 30, 540], "shorter-word enumeration is incomplete") + return counts, partial_hits, executions + + +def check_controls(): + trace = matrix_trace(PARTIAL_WORD) + require(not matrix_accepts(trace, FULL_MASKS), "the hidden output was not tested") + require( + trace[1][1] ^ reference_rows()[1][1] == 8, + "the hidden second-boundary error must equal incoming w1", + ) + omitted = (*PARTIAL_WORD[:-1], ()) + require( + not matrix_accepts(matrix_trace(omitted), PARTIAL_MASKS), + "missing final workspace restoration was accepted", + ) + moved = ((), (), (), PARTIAL_WORD[2], PARTIAL_WORD[4]) + require( + not matrix_accepts(matrix_trace(moved), PARTIAL_MASKS), + "moving the first adapter past child 3 was accepted", + ) + require( + literal_accepts(PARTIAL_WORD, FULL_MASKS, (0, 0, 0, 0)), + "the clean-input false-positive control changed", + ) + require( + not literal_accepts(PARTIAL_WORD, FULL_MASKS, (0, 0, 0, 1)), + "a dirty input must expose the hidden-output error", + ) + try: + matrix_trace(((), (), ((2, 0),), (), ())) + except ValueError as error: + require("alphabet" in str(error), "invalid gate failed for the wrong reason") + else: + raise ValueError("output-to-workspace feedback was accepted") + return 6 + + +def main(): + require(not sys.argv[1:], "the verifier takes no arguments") + with (ROOT / SOURCE).open("rb") as stream: + source = stream.read(32769) + require(len(source) <= 32768, "source contract exceeds the declared size bound") + require( + hashlib.sha256(source).hexdigest() == SOURCE_HASH, + "the pinned predecessor contract changed", + ) + require(reference_rows()[-1] == FINAL_ROWS, "both output updates must be w0") + for schedule, masks in ( + (PARTIAL_WORD, PARTIAL_MASKS), + (FULL_WORD, FULL_MASKS), + (EAGER_WORD, FULL_MASKS), + ): + require(matrix_accepts(matrix_trace(schedule), masks), "positive word failed") + for initial in product((0, 1), repeat=4): + require(literal_accepts(schedule, masks, initial), "dirty input failed") + counts, hits, executions = check_shorter_words() + controls = check_controls() + files = ("README.md", "SOURCES.json", "TASK.json", "VERIFY.json", "verify.py") + hashes = { + name: hashlib.sha256((PACKAGE / name).read_bytes()).hexdigest() + for name in files + } + receipt = { + "claim_type": "finite exact certificate with a scoped algebraic proof", + "partial_adapter_minimum": 2, + "full_adapter_minimum": 3, + "complete_xor_bills": {"partial": 10, "full": 11, "eager": 12}, + "shorter_word_counts_by_adapter_count": counts, + "partial_hits_by_adapter_count": hits, + "full_hits_through_two_adapters": 0, + "literal_shorter_program_executions": executions, + "literal_positive_program_executions": 48, + "semantic_controls": controls, + "partial_coefficient_trace": matrix_trace(PARTIAL_WORD), + "full_coefficient_trace": matrix_trace(FULL_WORD), + "python": sys.version.split()[0], + "source_sha256": SOURCE_HASH, + "package_sha256": hashes, + } + print(json.dumps(receipt, sort_keys=True, indent=2)) + print("PASS_FOUR_CALL_PRODUCTIVE_OBSERVATIONS partial=2 full=3 xor=10/11") + + +if __name__ == "__main__": + main() From 8a3fcbcbc6dd83f3f1af3e34df700847f35c9645 Mon Sep 17 00:00:00 2001 From: Nick Petalas Date: Tue, 27 Oct 2026 16:22:17 +0000 Subject: [PATCH 2/2] docs(research): record the exact overlap snapshot time --- research/four-call-productive-observations/TASK.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/four-call-productive-observations/TASK.json b/research/four-call-productive-observations/TASK.json index f48b6eb465..c30822a80d 100644 --- a/research/four-call-productive-observations/TASK.json +++ b/research/four-call-productive-observations/TASK.json @@ -105,7 +105,7 @@ "both final output rows" ], "limitation": "Metadata and README searches do not cover every diff or unpublished work.", - "precommit_refresh_utc": "2026-10-27T16:21:00Z", + "precommit_refresh_utc": "2026-10-27T16:20:26.099078+00:00", "precommit_upstream_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810" } }