From 72dd421c4e5cad2d898ae8326c6bdd7a4bbdd46c Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Wed, 14 Oct 2026 02:32:53 -0500 Subject: [PATCH 1/3] research: bound mixed affine target triple in three registers --- .../EXPECTED.json | 83 ++++ .../OVERLAP.json | 52 +++ .../README.md | 150 +++++++ .../SOURCES.json | 36 ++ .../TASK.json | 60 +++ .../VERIFY.json | 23 ++ .../verify.py | 368 ++++++++++++++++++ 7 files changed, 772 insertions(+) create mode 100644 research/bit-affine-mixed-target-triple-seed818dbf/EXPECTED.json create mode 100644 research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json create mode 100644 research/bit-affine-mixed-target-triple-seed818dbf/README.md create mode 100644 research/bit-affine-mixed-target-triple-seed818dbf/SOURCES.json create mode 100644 research/bit-affine-mixed-target-triple-seed818dbf/TASK.json create mode 100644 research/bit-affine-mixed-target-triple-seed818dbf/VERIFY.json create mode 100644 research/bit-affine-mixed-target-triple-seed818dbf/verify.py diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/EXPECTED.json b/research/bit-affine-mixed-target-triple-seed818dbf/EXPECTED.json new file mode 100644 index 0000000000..a3d06abcbf --- /dev/null +++ b/research/bit-affine-mixed-target-triple-seed818dbf/EXPECTED.json @@ -0,0 +1,83 @@ +{ + "controls": { + "all_generator_matrix_and_inverse_checks": 84, + "independent_dense_product_checks": 3, + "omitted_direct_call_checks": 6, + "wrong_label_check": true, + "wrong_target_check": true + }, + "coordinate_labels": { + "a": 1, + "b": 5, + "h": 13, + "t_x": 7 + }, + "direct_cost": 6, + "direct_word": [ + { + "label": "a", + "u": 1, + "v": 1 + }, + { + "label": "b", + "u": 2, + "v": 2 + }, + { + "label": "a", + "u": 4, + "v": 4 + }, + { + "label": "b", + "u": 4, + "v": 4 + }, + { + "label": "a", + "u": 4, + "v": 4 + }, + { + "label": "t_x", + "u": 4, + "v": 4 + } + ], + "displacement_ranks": { + "a": 1, + "b": 1, + "h": 2 + }, + "exact_minimum_claim": "six in this 84-generator alphabet", + "group_order": 24, + "layer_counts": [ + 1, + 84, + 4697, + 232720 + ], + "layer_sha256_in_bfs_order": [ + "044dde6d6a730099716e4e63b541be349bed3cb7645c2ec7681092fba7fbbe61", + "92062806bd0e0df4024b166d7a0cd0c762c6ad190a29a5e9b240fbe4fc215108", + "5064d7162057625a1f047261ce7c244f2cdfe2fbada42fcfe97c2445c63ab654", + "76e82cb9484516e0750f5a775a7d29d4f324ea1fd32b4c0215f9290da0570d2e" + ], + "left_join_probes": 4782, + "minimum_in_paid_alphabet_through_direct_cost": 6, + "model": "Mat_3(F2[AGL_2(F2)])", + "paid_generators": 84, + "paid_projectors": 28, + "radius": 3, + "rank_relaxation_lower_bound": 4, + "schema_version": 1, + "scope": "formal all-dirty register identities in the stated paid alphabet; no supplier or kappa claim", + "seed": "818dbf90f2581f79a4e4150cdd77e415", + "shortest_hit_through_five": null, + "target": [ + "a", + "b", + "h=a*b*a*t_x" + ] +} diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json b/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json new file mode 100644 index 0000000000..0a2b051da7 --- /dev/null +++ b/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json @@ -0,0 +1,52 @@ +{ + "schema_version": 1, + "checked_at_utc": "2026-10-14T07:32Z", + "seed": "818dbf90f2581f79a4e4150cdd77e415", + "search_terms": [ + "AGL2 mixed affine target", + "heterogeneous affine targets", + "three-register affine label", + "diag([a],[b],[h])", + "a*b*a*t_x" + ], + "methods": { + "repository_helper": "python3.12 scripts/find_overlap.py ... --refresh --json; discussion snapshot completed pagination", + "open_pull_requests": "gh pr list --repo CrocSwap/integer-mult-bounds --state open --limit 1000 with titles and full bodies", + "discussion_cross_check": "Fetched rendered Discussion #1317 page directly after helper refresh hit the API rate limit" + }, + "coverage": { + "helper_discussion_snapshot_at": "2026-10-14T07:28:35Z", + "helper_discussion_pagination_complete": true, + "helper_discussion_records": 351, + "direct_open_pr_count": 396, + "direct_open_pr_search_matching_terms": [1696], + "direct_discussion_page_rechecked_at": "2026-10-14T07:31Z" + }, + "nearest_work": [ + { + "reference": "PR #1696", + "status": "open", + "distinction": "Exactly three registers and one each of a,b,aba in F2[GL2(F2)]; this package changes the address group and third target to h=aba*t_x in F2[AGL2(F2)]." + }, + { + "reference": "Discussion #1317 claim and finding, adjacent two-target scope", + "status": "active claim with bounded result posted", + "distinction": "Two registers with diag([h],[h]) and four paid affine labels; this package has three registers, target diag([a],[b],[h]), and only a,b,t_x labels." + }, + { + "reference": "PR #1333", + "status": "merged predecessor", + "distinction": "General displacement-rank theorem for the complete rank-one affine-label alphabet; this package fixes a three-label alphabet and resolves a particular target gap by exact enumeration." + }, + { + "reference": "PR #1414, #1491, #1541, #1567", + "status": "mixed merged/open predecessor set", + "distinction": "Repeated coordinate swaps or mixed GL3 targets; neither uses this affine target and label set." + } + ], + "warnings": [ + "The helper's open-PR refresh failed because this gh version rejects --slurp; the direct paginated gh pr list succeeded.", + "The helper's Discussion refresh encountered GitHub API rate limiting; its latest fully paginated cache was cross-checked against the rendered live Discussion #1317 page." + ], + "result": "No exact matching active Discussion claim or open PR body was found in the checked scope. Search results are overlap leads, not a novelty certificate." +} diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/README.md b/research/bit-affine-mixed-target-triple-seed818dbf/README.md new file mode 100644 index 0000000000..e2d6b0542c --- /dev/null +++ b/research/bit-affine-mixed-target-triple-seed818dbf/README.md @@ -0,0 +1,150 @@ +# A mixed affine target triple needs six calls in a restricted label alphabet + +**Seed:** `818dbf90f2581f79a4e4150cdd77e415` + +**Track/task:** `bit-mechanisms` / `bit-new-register-model` + +**Priority revision:** 3 + +**Base:** `0b1cccf86e2f5132ed286a26ef0a681a495740ea` + +**Selected-record SHA256:** `10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32` + +## Result + +In the exact three-register formal model below, the target + +\[ + \operatorname{diag}([a],[b],[h]),\qquad h=a b a t_x, +\] + +has paid-call cost **six**, even when arbitrary free binary changes of register +basis are allowed. A complete radius-three search found no representation with +five or fewer paid calls. The direct six-call word is + +```text +D_(e0 e0^T)(a), D_(e1 e1^T)(b), +D_(e2 e2^T)(a), D_(e2 e2^T)(b), +D_(e2 e2^T)(a), D_(e2 e2^T)(t_x) +``` + +The target-specific homogeneous displacement-rank lower bound is four: +`rho(a)=rho(b)=1`, while `h(x0,x1)=(x1,x0+1)` has `rho(h)=2`. Thus the +experiment closes a two-call gap for this fixed label set. It is a scoped +negative result about register mixing, not a new general affine theorem, a +supplier construction, or a new conditional multiplication bound. + +## Exact model and complete charge + +Let `G = AGL_2(F2)` and `R = F2[G]` be the formal, noncommutative group +algebra. Group elements act on all four points of `F2^2`; multiplication is +composition with the rightmost map acting first. A register state is a +`3 x 3` matrix over `R`, so equality means equality of every formal group +algebra coefficient. This is the arbitrary-dirty-input contract: no register +is assumed zero, copied clean, or discarded. + +The source labels are exactly + +```text +a(x0,x1) = (x0+x1,x1) +b(x0,x1) = (x0,x0+x1) +t_x(x0,x1) = (x0+1,x1) +``` + +Each occurrence of + +\[ +D_N(g)=I+([g]-1)N,\qquad N=uv^T,\quad u,v\ne0,\quad v^Tu=1, +\] + +costs one paid call. There are exactly 28 binary rank-one idempotents `N` +and three labels, hence 84 paid generators. All three labels are involutions, +so each paid generator is its own inverse. + +Arbitrary `B in GL_3(F2)` scalar mixing is free. It does not enlarge the +normalized paid alphabet: move each `B` through the paid calls, conjugating +each `N` to another rank-one idempotent; all 28 are already included. The +augmentation `[g] -> 1` sends each paid call and the required target to the +identity, so the total scalar map in a successful word must be `I`. This is +the same normalization principle proved in the pinned +[binary affine register bound](../binary-affine-register-bound/PROOF.md). + +For the optimistic charge screen, the direct bill is six calls. The +homogeneous displacement rank gives the lower bound four because +`[A-I | b]` has rank one for `a,b` and rank two for `h`. Every paid call has +rank-one displacement in this representation. The full rank-one affine-label +alphabet has a general theorem in the pinned predecessor; this experiment +restricts the available paid address labels to `{a,b,t_x}` and asks whether +dirty-register mixing can still reduce the direct bill to five. Extra address +labels, precision, hosting, frame conversion, source access, and supplier +interfaces are outside this finite model, so the answer does not translate to +the selected `kappa`. + +## Exhaustive evidence + +`verify.py` stores each of the nine matrix entries as a 24-bit coefficient +vector, one bit for each element of `AGL_2(F2)`. It performs a breadth-first +search of the complete right-multiplication ball through radius three, then +checks every canonical prefix through radius two against the radius-three +ball. A word of length at most five must split into such a prefix and suffix. +For prefix `U` and target `T`, the join checks whether `U^-1 T` lies in the +right ball. The prefix gates are applied by left multiplication in forward +word order, which yields `U^-1 T` because each gate is involutive. + +The completed layers contain `1, 84, 4,697, 232,720` distinct formal states. +All `4,782` joins were checked and none hit the target. Since the explicit +six-call word replays to `T`, the minimum in this stated paid alphabet is +exactly six. The search does not quotient by a point-action representation; +it retains all 24 formal basis coefficients. + +Controls also check all 84 generator matrices and involutions, compare three +products with an independent dense group-algebra matrix multiplier, remove +each direct call in turn, and reject a wrong affine label and wrong target. +`EXPECTED.json` records deterministic breadth-first layer digests as well as +the state counts and control totals. + +## Reproduce + +From the repository root, with Python 3.12 and no third-party dependencies: + +```sh +python3.12 scripts/research_package.py \ + --package research/bit-affine-mixed-target-triple-seed818dbf +``` + +Expected marker: + +```text +PASS_BIT_AFFINE_MIXED_TARGET_TRIPLE group=24 generators=84 layers=1,84,4697,232720 probes=4782 minimum=6 hit=False +PASS_REGISTERED_RESEARCH_PACKAGE research/bit-affine-mixed-target-triple-seed818dbf outcome=negative-result +``` + +Source commits, Git blobs, and SHA256 pins for the selected record, task +catalogue, and predecessor results are in [SOURCES.json](SOURCES.json). +The selected record was used only as the current frontier/provenance pin; it +was not changed. + +## Overlap and attribution + +Overlap was checked against open PRs and fully paginated active Discussion +claims. The scope is distinct from the two-coordinate-swap packages, the +mixed-`GL_3` target-pair work, and the concurrent two-copy and five-helper +`R439` claims. The nearby claim for two identical `h` targets is also a +different target multiset and register count. The exact claim and its expiry +are recorded in Discussion +[#1317](https://github.com/CrocSwap/integer-mult-bounds/discussions/1317#discussioncomment-18918291). + +This package builds on the affine rank argument in +`research/binary-affine-register-bound/PROOF.md` and the coordinate CNOT +formal-register model in `research/coordinate-cnot-register-bound/PROOF.md`. +It does not claim either result as new. Prepared by Cinna Davis +(@1337isnot1337), with substantial OpenAI Codex assistance in the scoped +experiment design, verifier, exact-search implementation, and package draft. + +## Open next questions + +Can another three-label subset of the nine affine rank-one maps produce a +dirty-register compression for a mixed target triple? A bounded next step is +to enumerate those label subsets and select targets whose direct label-word +bill exceeds the homogeneous-rank lower bound. This cycle deliberately fixed +`{a,b,t_x}` and did not search other alphabets. diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/SOURCES.json b/research/bit-affine-mixed-target-triple-seed818dbf/SOURCES.json new file mode 100644 index 0000000000..92ca203a24 --- /dev/null +++ b/research/bit-affine-mixed-target-triple-seed818dbf/SOURCES.json @@ -0,0 +1,36 @@ +{ + "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/binary-affine-register-bound/PROOF.md", + "usage": "input", + "git_blob": "b1152a39b559f7a058489ec74231488e4f8edd83", + "sha256": "36a33434222798434b0a17476ae5f9bc8a2a3891871c46e77cc50ce2e132206b" + }, + { + "path": "research/binary-affine-register-bound/verify.py", + "usage": "input", + "git_blob": "41c7838c064d916456f94f2e73c171278997d5c9", + "sha256": "3d61e3e033208b3c06a0a4df26c6c53edeb7ccd3417ac0d86359df03692c4ec8" + }, + { + "path": "research/coordinate-cnot-register-bound/PROOF.md", + "usage": "input", + "git_blob": "68fee5b5ccff5329e27300e40dcbd483640dd6b7", + "sha256": "bcee89f92dcce8253bd7eae6e924ddff598c900da81979c6171a412f03d765e1" + } + ] +} diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/TASK.json b/research/bit-affine-mixed-target-triple-seed818dbf/TASK.json new file mode 100644 index 0000000000..fe4068553c --- /dev/null +++ b/research/bit-affine-mixed-target-triple-seed818dbf/TASK.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "task_id": "bit-new-register-model", + "priority_revision": 3, + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "original_card": { + "id": "bit-new-register-model", + "question": "Can an explicitly larger or nonabelian register model escape the scoped three-register obstruction?", + "starting_points": [ + "research/bit-three-register-lower-bound/README.md", + "certificates/selected-result.json" + ], + "methods": [ + "Construct the smallest exact identity in a newly specified legal operation alphabet.", + "Derive a target-specific relaxation bound for that same explicit alphabet." + ], + "acceptance_gate": "Name the changed hypothesis, all counted roles and a uniform identity; finite column tests alone do not certify it.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read Model section 1 of the three-register bound and identify the exact excluded free operations.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Write a complete operation alphabet outside one named premise and price a baseline before searching identities.", + "bottleneck_link": "A small-width completed saving changes the bit primitive; a finite-address identity alone is insufficient.", + "allowed_variations": [ + "Choose a fixed larger register count or a specified nonabelian operation family." + ], + "scope_change_triggers": [ + "Remaining inside the already-excluded three-register abelian model." + ], + "overlap_terms": [ + "three-register", + "nonabelian", + "group algebra" + ] + }, + "scope_status": "refined", + "actual_scope": "In the formal three-register model over F2[AGL_2(F2)], can arbitrary free GL_3(F2) mixing reduce the six-call target diag([a],[b],[a*b*a*t_x]) to five calls when each paid label is restricted to a, b, or t_x?", + "scope_change_reason": "After overlap review, the unrestricted affine rank theorem already settles the full rank-one affine-label alphabet. The experiment fixes the physically narrower three-label source alphabet and tests whether nonabelian dirty-register mixing exploits the remaining two-call gap above the rank relaxation.", + "bottleneck_link": "A five-call identity would save one paid bit primitive in this explicit address-label model; the result is a scoped mechanism screen only and does not map to the selected rational-address supplier or change kappa.", + "budget_minutes": 60, + "stop_rule": "Enumerate the complete formal matrix ball through radius three for the 84 paid generators, then test every canonical left prefix through radius two against the radius-three ball. Stop after all 4,782 joins; do not enlarge the alphabet or search radius.", + "outcome": "negative-result", + "evidence": "The exact join found no target word of length at most five. The complete ball layer counts are 1, 84, 4,697, 232,720; all 4,782 left-prefix joins were checked. The direct six-call word replays exactly, so six is the minimum in this stated alphabet.", + "author": "Cinna Davis (@1337isnot1337), with substantial OpenAI Codex assistance", + "ai_assistance": "OpenAI Codex assisted with scope refinement, verifier implementation, exact-search design, and package drafting. The author reviewed the model, charge accounting, code, and result.", + "open_questions": [ + { + "question": "Can a different three-element affine rank-one label set over AGL_2(F2) produce a dirty-register compression for a mixed target triple?", + "why_it_matters": "This would distinguish a property of the chosen source labels from a broader obstruction to register-mixing savings.", + "first_step": "Enumerate the 3-label subsets of the nine affine rank-one elements and select target triples whose direct label-word bill exceeds the homogeneous-rank lower bound.", + "blocked_by": "This cycle fixed the source labels to a, b, and t_x; a wider catalogue search needs a separate seed, overlap check, and cost screen." + } + ] +} diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/VERIFY.json b/research/bit-affine-mixed-target-triple-seed818dbf/VERIFY.json new file mode 100644 index 0000000000..89c353e05e --- /dev/null +++ b/research/bit-affine-mixed-target-triple-seed818dbf/VERIFY.json @@ -0,0 +1,23 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "certificates/selected-result.json", + "research/binary-affine-register-bound/PROOF.md", + "research/binary-affine-register-bound/verify.py", + "research/coordinate-cnot-register-bound/PROOF.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Complete radius-three formal group-algebra ball, all radius-two/radius-three joins, exact six-call positive word, all 84 generator inverses, independent dense multiplication controls, six call-omission controls, wrong-label and wrong-target controls" + } + ] +} diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/verify.py b/research/bit-affine-mixed-target-triple-seed818dbf/verify.py new file mode 100644 index 0000000000..c1f4aa8374 --- /dev/null +++ b/research/bit-affine-mixed-target-triple-seed818dbf/verify.py @@ -0,0 +1,368 @@ +#!/usr/bin/env python3 +"""Exhaust the five-call ball for a three-register AGL_2(F2) target.""" + +from __future__ import annotations + +import argparse +import hashlib +import itertools +import json +import sys +from pathlib import Path + + +PACKAGE = Path(__file__).resolve().parent +GROUP_ORDER = 24 +MASK = (1 << GROUP_ORDER) - 1 +SLOT_BITS = GROUP_ORDER +NREG = 3 +NGEN = 84 +IDENTITY = (1 << 0) | (1 << (SLOT_BITS * 4)) | (1 << (SLOT_BITS * 8)) + + +def affine(matrix: tuple[tuple[int, int], tuple[int, int]], shift: tuple[int, int], + points: tuple[tuple[int, int], ...]) -> tuple[int, ...]: + result = [] + point_index = {point: i for i, point in enumerate(points)} + for x, y in points: + image = ((matrix[0][0] * x ^ matrix[0][1] * y) ^ shift[0], + (matrix[1][0] * x ^ matrix[1][1] * y) ^ shift[1]) + result.append(point_index[image]) + return tuple(result) + + +def build_group(): + # Points are encoded by the ordered pairs (x0,x1), with x0 in bit zero. + points = ((0, 0), (1, 0), (0, 1), (1, 1)) + elements = tuple(itertools.permutations(range(4))) + ids = {p: i for i, p in enumerate(elements)} + multiplication = tuple(tuple(ids[tuple(p[q[i]] for i in range(4))] + for q in elements) for p in elements) + identity = ids[tuple(range(4))] + a = ids[affine(((1, 1), (0, 1)), (0, 0), points)] + b = ids[affine(((1, 0), (1, 1)), (0, 0), points)] + tx = ids[affine(((1, 0), (0, 1)), (1, 0), points)] + h = multiplication[multiplication[multiplication[a][b]][a]][tx] + direct_h = ids[affine(((0, 1), (1, 0)), (0, 1), points)] + assert h == direct_h + assert len({a, b, tx}) == 3 + assert all(multiplication[g][g] == identity for g in (a, b, tx)) + assert multiplication[a][b] != multiplication[b][a] + return elements, multiplication, identity, a, b, tx, h + + +ELEMENTS, GMUL, GID, A, B, TX, H = build_group() + + +def projectors() -> list[tuple[int, int]]: + result = [] + for u in range(1, 8): + for v in range(1, 8): + if ((u & v).bit_count() & 1) == 1: + result.append((u, v)) + return result + + +PROJECTORS = projectors() +GENERATORS = tuple((u, v, g) for u, v in PROJECTORS for g in (A, B, TX)) +GENERATOR_ID = {gate: i for i, gate in enumerate(GENERATORS)} +assert len(ELEMENTS) == GROUP_ORDER and len(PROJECTORS) == 28 +assert len(GENERATORS) == NGEN and len(GENERATOR_ID) == NGEN + + +def f2_rank(vectors: tuple[int, ...]) -> int: + pivots: dict[int, int] = {} + for value in vectors: + while value: + pivot = value.bit_length() - 1 + if pivot in pivots: + value ^= pivots[pivot] + else: + pivots[pivot] = value + break + return len(pivots) + + +def displacement_rank(label: int) -> int: + # From the point action recover [A-I | b], using 0, e0, e1. + points = ((0, 0), (1, 0), (0, 1), (1, 1)) + image0 = points[ELEMENTS[label][0]] + image_e0 = points[ELEMENTS[label][1]] + image_e1 = points[ELEMENTS[label][2]] + b = image0[0] | (image0[1] << 1) + col0 = ((image_e0[0] ^ image0[0] ^ 1) + | ((image_e0[1] ^ image0[1]) << 1)) + col1 = ((image_e1[0] ^ image0[0]) + | ((image_e1[1] ^ image0[1] ^ 1) << 1)) + return f2_rank((col0, col1, b)) + + +RANK_A, RANK_B, RANK_H = (displacement_rank(g) for g in (A, B, H)) +assert (RANK_A, RANK_B, RANK_H) == (1, 1, 2) + + +def get_entry(state: int, row: int, col: int) -> int: + return (state >> (SLOT_BITS * (NREG * row + col))) & MASK + + +def translated(mask: int, label: int, side: str) -> int: + """Multiply each group basis term by [label] on the requested side.""" + result = 0 + while mask: + low = mask & -mask + element = low.bit_length() - 1 + product = GMUL[element][label] if side == "right" else GMUL[label][element] + result |= 1 << product + mask ^= low + return result + + +def multiply_gate_right(state: int, code: int) -> int: + u, v, label = GENERATORS[code] + result = state + for row in range(NREG): + row_sum = 0 + for k in range(NREG): + if (u >> k) & 1: + row_sum ^= get_entry(state, row, k) + correction = row_sum ^ translated(row_sum, label, "right") + for col in range(NREG): + if (v >> col) & 1: + result ^= correction << (SLOT_BITS * (NREG * row + col)) + return result + + +def multiply_gate_left(state: int, code: int) -> int: + u, v, label = GENERATORS[code] + result = state + for col in range(NREG): + col_sum = 0 + for k in range(NREG): + if (v >> k) & 1: + col_sum ^= get_entry(state, k, col) + correction = col_sum ^ translated(col_sum, label, "left") + for row in range(NREG): + if (u >> row) & 1: + result ^= correction << (SLOT_BITS * (NREG * row + col)) + return result + + +def encode_diagonal(labels: tuple[int, int, int]) -> int: + value = 0 + for i, label in enumerate(labels): + value |= (1 << label) << (SLOT_BITS * (NREG * i + i)) + return value + + +def replay(codes: tuple[int, ...]) -> int: + value = IDENTITY + for code in codes: + value = multiply_gate_right(value, code) + return value + + +def decode_path(code: int, length: int) -> tuple[int, ...]: + result = [0] * length + for i in range(length - 1, -1, -1): + result[i] = code & 127 + code >>= 7 + return tuple(result) + + +def digest_layer(layer: list[int]) -> str: + digest = hashlib.sha256() + for state in layer: + digest.update(state.to_bytes(27, "little")) + return digest.hexdigest() + + +def explicit_gate_state(code: int) -> int: + u, v, label = GENERATORS[code] + delta = (1 << label) ^ (1 << GID) + state = IDENTITY + for row in range(NREG): + if (u >> row) & 1: + for col in range(NREG): + if (v >> col) & 1: + state ^= delta << (SLOT_BITS * (NREG * row + col)) + return state + + +def exact_small_matmul(left: int, right: int) -> int: + """Independent formal matrix/group-algebra product for control cases.""" + result = 0 + for i in range(NREG): + for j in range(NREG): + entry = 0 + for k in range(NREG): + x = get_entry(left, i, k) + y = get_entry(right, k, j) + while x: + xb = x & -x + gx = xb.bit_length() - 1 + yy = y + while yy: + yb = yy & -yy + gy = yb.bit_length() - 1 + entry ^= 1 << GMUL[gx][gy] + yy ^= yb + x ^= xb + result |= entry << (SLOT_BITS * (NREG * i + j)) + return result + + +def join_search(target: int): + layers = [[IDENTITY]] + paths = {IDENTITY: (0, 0)} # matrix -> (shortest depth, packed generator word) + for depth in range(1, 4): + next_layer = [] + for state in layers[-1]: + prev_code = paths[state][1] + for code in range(NGEN): + child = multiply_gate_right(state, code) + if child not in paths: + paths[child] = (depth, (prev_code << 7) | code) + next_layer.append(child) + layers.append(next_layer) + + probe_count = 0 + hits: list[tuple[int, tuple[int, ...]]] = [] + for depth in range(3): + for prefix_state in layers[depth]: + prefix_code = paths[prefix_state][1] + prefix = decode_path(prefix_code, depth) + remainder = target + # Left multiplication in this order yields prefix^{-1} * target; + # every paid generator is an involution. + for code in prefix: + remainder = multiply_gate_left(remainder, code) + probe_count += 1 + found = paths.get(remainder) + if found is not None: + suffix_depth, suffix_code = found + suffix = decode_path(suffix_code, suffix_depth) + candidate = prefix + suffix + assert replay(candidate) == target + hits.append((len(candidate), candidate)) + + best = min(hits, default=None, key=lambda hit: (hit[0], hit[1])) + return layers, probe_count, best + + +def label_name(g: int) -> str: + return {A: "a", B: "b", TX: "t_x"}[g] + + +def gate_label(code: int) -> dict[str, object]: + u, v, g = GENERATORS[code] + return {"u": u, "v": v, "label": label_name(g)} + + +def run() -> dict[str, object]: + direct_codes = tuple(GENERATOR_ID[(1 << i, 1 << i, g)] + for i, g in ((0, A), (1, B), (2, A), (2, B), (2, A), (2, TX))) + target = encode_diagonal((A, B, H)) + direct = replay(direct_codes) + assert direct == target + + # Check all paid gates' exact matrices and involution property, plus an + # independent dense product implementation on representative states. + gate_checks = 0 + for code in range(NGEN): + gate = explicit_gate_state(code) + assert multiply_gate_right(IDENTITY, code) == gate + assert multiply_gate_left(IDENTITY, code) == gate + assert multiply_gate_right(gate, code) == IDENTITY + assert multiply_gate_left(gate, code) == IDENTITY + gate_checks += 1 + independent_product_checks = 0 + for x, y in ((direct_codes[:1], direct_codes[1:2]), + (direct_codes[2:4], direct_codes[4:6]), + (direct_codes[:3], direct_codes[3:])): + left, right = replay(x), replay(y) + assert exact_small_matmul(left, right) == replay(x + y) + independent_product_checks += 1 + + # Each direct-call omission and a wrong affine label must fail the endpoint. + omission_controls = 0 + for i in range(len(direct_codes)): + assert replay(direct_codes[:i] + direct_codes[i + 1:]) != target + omission_controls += 1 + wrong_target = encode_diagonal((A, B, A)) + assert direct != wrong_target + wrong_label_codes = list(direct_codes) + wrong_label_codes[-1] = GENERATOR_ID[(1 << 2, 1 << 2, A)] + assert replay(tuple(wrong_label_codes)) != target + + layers, probes, best = join_search(target) + if best is None: + minimum = 6 + assert direct == target + else: + minimum = best[0] + assert minimum <= 5 + assert replay(best[1]) == target + + # The direct six-call word and rank-four relaxation bound are both exact + # statements about this paid alphabet; the exhaustive join decides whether + # the former can be improved by register mixing. + layer_counts = [len(layer) for layer in layers] + return { + "schema_version": 1, + "seed": "818dbf90f2581f79a4e4150cdd77e415", + "model": "Mat_3(F2[AGL_2(F2)])", + "group_order": len(ELEMENTS), + "coordinate_labels": {"a": A, "b": B, "t_x": TX, "h": H}, + "paid_projectors": len(PROJECTORS), + "paid_generators": NGEN, + "target": ["a", "b", "h=a*b*a*t_x"], + "direct_word": [gate_label(c) for c in direct_codes], + "direct_cost": len(direct_codes), + "displacement_ranks": {"a": RANK_A, "b": RANK_B, "h": RANK_H}, + "rank_relaxation_lower_bound": RANK_A + RANK_B + RANK_H, + "radius": 3, + "layer_counts": layer_counts, + "layer_sha256_in_bfs_order": [digest_layer(layer) for layer in layers], + "left_join_probes": probes, + "shortest_hit_through_five": None if best is None else { + "cost": best[0], "word": [gate_label(c) for c in best[1]]}, + "minimum_in_paid_alphabet_through_direct_cost": minimum, + "exact_minimum_claim": ("six in this 84-generator alphabet" if best is None + else "the recorded word length is exact locally"), + "controls": { + "all_generator_matrix_and_inverse_checks": gate_checks, + "independent_dense_product_checks": independent_product_checks, + "omitted_direct_call_checks": omission_controls, + "wrong_target_check": True, + "wrong_label_check": True, + }, + "scope": "formal all-dirty register identities in the stated paid alphabet; no supplier or kappa claim", + } + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--emit", action="store_true", help="write EXPECTED.json from the current exact replay") + args = parser.parse_args() + result = run() + expected_path = PACKAGE / "EXPECTED.json" + rendered = json.dumps(result, indent=2, sort_keys=True) + "\n" + if args.emit: + expected_path.write_text(rendered, encoding="utf-8", newline="\n") + else: + expected = json.loads(expected_path.read_text(encoding="utf-8")) + if expected != result: + raise SystemExit("FAIL: replay differs from EXPECTED.json") + print("PASS_BIT_AFFINE_MIXED_TARGET_TRIPLE " + f"group={len(ELEMENTS)} generators={NGEN} layers=" + f"{','.join(map(str, result['layer_counts']))} probes={result['left_join_probes']} " + f"minimum={result['minimum_in_paid_alphabet_through_direct_cost']} " + f"hit={result['shortest_hit_through_five'] is not None}") + + +if __name__ == "__main__": + try: + main() + except (AssertionError, OSError, ValueError, KeyError) as exc: + print(f"FAIL_BIT_AFFINE_MIXED_TARGET_TRIPLE {exc}", file=sys.stderr) + raise From 55e94b85082d95310dcdb1f93c156b890c5a773b Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Wed, 14 Oct 2026 02:34:34 -0500 Subject: [PATCH 2/3] research: distinguish current affine overlap --- .../OVERLAP.json | 20 ++++++++++++------- .../README.md | 14 ++++++++----- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json b/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json index 0a2b051da7..cfa62fde6d 100644 --- a/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json +++ b/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json @@ -1,6 +1,6 @@ { "schema_version": 1, - "checked_at_utc": "2026-10-14T07:32Z", + "checked_at_utc": "2026-10-14T07:33Z", "seed": "818dbf90f2581f79a4e4150cdd77e415", "search_terms": [ "AGL2 mixed affine target", @@ -11,16 +11,17 @@ ], "methods": { "repository_helper": "python3.12 scripts/find_overlap.py ... --refresh --json; discussion snapshot completed pagination", - "open_pull_requests": "gh pr list --repo CrocSwap/integer-mult-bounds --state open --limit 1000 with titles and full bodies", + "open_pull_requests": "gh api --paginate --method GET repos/CrocSwap/integer-mult-bounds/pulls -f state=open -f per_page=100, retaining titles and full bodies", "discussion_cross_check": "Fetched rendered Discussion #1317 page directly after helper refresh hit the API rate limit" }, "coverage": { "helper_discussion_snapshot_at": "2026-10-14T07:28:35Z", "helper_discussion_pagination_complete": true, "helper_discussion_records": 351, - "direct_open_pr_count": 396, - "direct_open_pr_search_matching_terms": [1696], - "direct_discussion_page_rechecked_at": "2026-10-14T07:31Z" + "direct_open_pr_count": 402, + "direct_open_pr_search_matching_terms": [1711], + "direct_open_pr_relevant_nearby": [1696, 1711], + "direct_discussion_page_rechecked_at": "2026-10-14T07:33Z" }, "nearest_work": [ { @@ -33,6 +34,11 @@ "status": "active claim with bounded result posted", "distinction": "Two registers with diag([h],[h]) and four paid affine labels; this package has three registers, target diag([a],[b],[h]), and only a,b,t_x labels." }, + { + "reference": "PR #1711", + "status": "open", + "distinction": "Two-register endpoints diag([h],[h]) and diag([h],[h^-1]) with four paid labels a,b,t_x,t_y and 24 generators; this package has three registers, endpoint diag([a],[b],[h]), and the restricted three-label alphabet a,b,t_x with 84 generators." + }, { "reference": "PR #1333", "status": "merged predecessor", @@ -45,8 +51,8 @@ } ], "warnings": [ - "The helper's open-PR refresh failed because this gh version rejects --slurp; the direct paginated gh pr list succeeded.", + "The helper's open-PR refresh failed because this gh version rejects --slurp; the direct paginated REST request succeeded.", "The helper's Discussion refresh encountered GitHub API rate limiting; its latest fully paginated cache was cross-checked against the rendered live Discussion #1317 page." ], - "result": "No exact matching active Discussion claim or open PR body was found in the checked scope. Search results are overlap leads, not a novelty certificate." + "result": "The open search found PR #1711 as nearby but not exact overlap; the complete Discussion snapshot and live thread showed no competing claim for this exact three-register target and three-label alphabet. Search results are overlap leads, not a novelty certificate." } diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/README.md b/research/bit-affine-mixed-target-triple-seed818dbf/README.md index e2d6b0542c..9c159d9600 100644 --- a/research/bit-affine-mixed-target-triple-seed818dbf/README.md +++ b/research/bit-affine-mixed-target-triple-seed818dbf/README.md @@ -127,11 +127,15 @@ was not changed. ## Overlap and attribution Overlap was checked against open PRs and fully paginated active Discussion -claims. The scope is distinct from the two-coordinate-swap packages, the -mixed-`GL_3` target-pair work, and the concurrent two-copy and five-helper -`R439` claims. The nearby claim for two identical `h` targets is also a -different target multiset and register count. The exact claim and its expiry -are recorded in Discussion +claims. Open PR #1711 studies two-register endpoints `diag([h],[h])` and +`diag([h],[h^-1])` with the four-label alphabet `{a,b,t_x,t_y}` (24 +generators). This result instead uses exactly three registers, target tuple +`(a,b,h)`, and the restricted alphabet `{a,b,t_x}` (84 generators). The +adjacent claim for two identical `h` targets is the same two-register, +four-label scope as #1711. PR #1696 studies the related but linear target +`(a,b,aba)` in `GL_2(F2)`. The two-coordinate-swap packages and mixed-`GL_3` +target-pair work also change the target or address group. The exact claim and +its expiry are recorded in Discussion [#1317](https://github.com/CrocSwap/integer-mult-bounds/discussions/1317#discussioncomment-18918291). This package builds on the affine rank argument in From fdbcd61eea435f9f8d497290a1db6513bb769d51 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Wed, 14 Oct 2026 02:35:33 -0500 Subject: [PATCH 3/3] research: refresh affine overlap evidence --- .../OVERLAP.json | 12 ++++++++---- .../README.md | 8 ++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json b/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json index cfa62fde6d..74e05d285d 100644 --- a/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json +++ b/research/bit-affine-mixed-target-triple-seed818dbf/OVERLAP.json @@ -1,6 +1,6 @@ { "schema_version": 1, - "checked_at_utc": "2026-10-14T07:33Z", + "checked_at_utc": "2026-10-14T07:35Z", "seed": "818dbf90f2581f79a4e4150cdd77e415", "search_terms": [ "AGL2 mixed affine target", @@ -12,16 +12,20 @@ "methods": { "repository_helper": "python3.12 scripts/find_overlap.py ... --refresh --json; discussion snapshot completed pagination", "open_pull_requests": "gh api --paginate --method GET repos/CrocSwap/integer-mult-bounds/pulls -f state=open -f per_page=100, retaining titles and full bodies", - "discussion_cross_check": "Fetched rendered Discussion #1317 page directly after helper refresh hit the API rate limit" + "discussion_cross_check": "Searched GitHub Discussions for repository-scoped AGL2, then fetched the current rendered Discussion #1317 page after helper refresh hit the API rate limit" }, "coverage": { "helper_discussion_snapshot_at": "2026-10-14T07:28:35Z", "helper_discussion_pagination_complete": true, "helper_discussion_records": 351, - "direct_open_pr_count": 402, + "direct_open_pr_count": 403, "direct_open_pr_search_matching_terms": [1711], "direct_open_pr_relevant_nearby": [1696, 1711], - "direct_discussion_page_rechecked_at": "2026-10-14T07:33Z" + "repository_discussion_search": "repo:CrocSwap/integer-mult-bounds AGL2", + "repository_discussion_search_results": 1, + "repository_discussion_search_result": "Discussion #1317", + "direct_discussion_page_rechecked_at": "2026-10-14T07:35Z", + "direct_discussion_page_comment_count": 17 }, "nearest_work": [ { diff --git a/research/bit-affine-mixed-target-triple-seed818dbf/README.md b/research/bit-affine-mixed-target-triple-seed818dbf/README.md index 9c159d9600..de5b82f157 100644 --- a/research/bit-affine-mixed-target-triple-seed818dbf/README.md +++ b/research/bit-affine-mixed-target-triple-seed818dbf/README.md @@ -126,8 +126,12 @@ was not changed. ## Overlap and attribution -Overlap was checked against open PRs and fully paginated active Discussion -claims. Open PR #1711 studies two-register endpoints `diag([h],[h])` and +The final refresh covered all 403 open PRs and a repository-scoped `AGL2` +Discussion search, which returned only #1317. The most recent complete +paginated discussion snapshot had 351 records at 07:28 UTC; a later helper +refresh hit GitHub's GraphQL rate limit, so I cross-checked the current +rendered thread and repository search page. Open PR #1711 studies two-register +endpoints `diag([h],[h])` and `diag([h],[h^-1])` with the four-label alphabet `{a,b,t_x,t_y}` (24 generators). This result instead uses exactly three registers, target tuple `(a,b,h)`, and the restricted alphabet `{a,b,t_x}` (84 generators). The