From 943c355c233649f77f018e6247e5456584ef715e Mon Sep 17 00:00:00 2001 From: Ali Romman <226877337+aliromman@users.noreply.github.com> Date: Wed, 18 Nov 2026 02:10:24 -0500 Subject: [PATCH] Classify all two-block links with nonzero fresh factors --- .../PROOF.md | 170 +++++++++++++++ .../README.md | 78 +++++++ .../RESULT.json | 118 +++++++++++ .../SOURCES.json | 18 ++ .../TASK.json | 64 ++++++ .../VERIFY.json | 34 +++ .../verify.py | 196 ++++++++++++++++++ 7 files changed, 678 insertions(+) create mode 100644 research/two-block-fresh-link-classification/PROOF.md create mode 100644 research/two-block-fresh-link-classification/README.md create mode 100644 research/two-block-fresh-link-classification/RESULT.json create mode 100644 research/two-block-fresh-link-classification/SOURCES.json create mode 100644 research/two-block-fresh-link-classification/TASK.json create mode 100644 research/two-block-fresh-link-classification/VERIFY.json create mode 100644 research/two-block-fresh-link-classification/verify.py diff --git a/research/two-block-fresh-link-classification/PROOF.md b/research/two-block-fresh-link-classification/PROOF.md new file mode 100644 index 0000000000..096fcfd94f --- /dev/null +++ b/research/two-block-fresh-link-classification/PROOF.md @@ -0,0 +1,170 @@ +# All irreducible fresh-factor links on the two fixed blocks + +Work over F2 in coordinates C={0,...,5} and F={6,...,5+r}, with r>=1. +Use the normal-form projectors from unpaidmoon's PR #7281. On the first +three coordinates their image/covector pairs are (6,5), (5,6), (7,7), +written as binary bit masks. Shift these three pairs by three coordinates +for the second block. Denote the six pairs by (u_i,v_i). +Their images form a basis of C, and `v_i dot u_j = delta_ij`. +Let H be the span of their off-diagonal patterns. Then dim H=4. +For a matrix M, off(M) sets its diagonal to zero. + +The complete pool of a pattern space P is the set of all rank-one +idempotents whose off-diagonal pattern is a **nonzero** member of P. +Diagonal-only projectors are excluded by this definition. Do not restrict +the complete pool to a proposed list of seven generators. + +Write a candidate link as `L=x*y^T`, where `y dot x=1`, +`x=u+a`, `y=v+b`, with u,v on C and a,b on F. Assume a and b are +both nonzero, and `p=off(L)` is not in H. Put `P=H+span(p)`. +The last condition excludes diagonal-only fresh projectors; it makes +P five-dimensional. No support bound is imposed inside either block. + +**Theorem.** The complete pool acts irreducibly on its joint image +if and only if + +```text +u = v = h = e2+e5, a dot b = 1. +``` + +In that case the complete pool is exactly the six block projectors and +L. Its joint image is `C + span(a)`, of dimension seven, and P contains +no matrix unit. In particular, disjoint fresh supports cannot work. +For a fixed r-dimensional fresh coordinate space there are exactly +`(2^r-1)*2^(r-1)` such links and distinct pattern spaces. Of these, +`2^(r-1)` are symmetric and `(2^r-2)*2^(r-1)` are nonsymmetric. + +The theorem includes arbitrary core supports and nonsymmetric links. +It extends the source's restricted square family and one width-eight +witness. It does not classify arbitrary five-dimensional pattern spaces, +links with a zero fresh factor, or multiple-link extensions. + +## The complete pool above H + +A nonzero off-diagonal entry in one internal block fixes a nonzero image +coordinate and a nonzero covector coordinate there. Since all cross-block +and fresh entries of H vanish, the corresponding row and column force +both factors to vanish outside that block. Both internal blocks cannot +be nonzero for one rank-one lift. + +In a three-coordinate block the nonzero patterns are + +```text +E10+E12+E20, E01+E02+E21, their sum. +``` + +The first pattern forces image bits 1 and 2 and covector bits 0 and 2 +to be one. Its zero entries force the remaining two bits to be zero. +Thus its lift is (6,5). The transpose gives (5,6). In the third pattern +all six off-diagonal entries are one, so both factors are (1,1,1). +These are the only lifts. Hence the complete pool above nonzero H +consists of the six block projectors at every ambient width. This +rederives the needed special case of the source's fiber calculation. + +## Zero core factors are reducible, including extra pool elements + +First suppose v=0. The fresh-row/core-column rectangle of every pattern +in P is zero. Every pool lift therefore has either zero fresh image +part or zero core covector part. It either maps into C or kills C. +Thus C is invariant. It lies in the joint image because the six old +images span C. It is proper because the original link has nonzero a. + +Next suppose u=0 and v is nonzero. In the nonzero coset p+H the +fresh-row/core-column rectangle is `a*v^T`, a nonzero rank-one matrix. +Over F2 its two nonzero factors are unique. Thus every coset lift has +fresh image a and core covector v. Its core-row/fresh-column rectangle +is zero, so either its core image is zero or its fresh covector is zero. +In the first case its image is exactly a; in the second case it kills a. +Every old projector also kills a. Therefore span(a) is a proper nonzero +invariant subspace of the joint image. + +These arguments use every lift of the whole coset. They do not assume +that only the original link was added. Such an assumption is false: +at width seven the link (64,69) has a unit-free pattern space whose +complete pool also contains (70,5). This pool has eight projectors. +The extra projector's covector has no fresh bit, so a pool scan restricted +to the candidate-link domain would miss it. The receipt checks this case. + +## Nonzero core factors force one new pool element + +Now assume u and v are both nonzero. Every pattern in p+H has the +unchanged cross rectangles `a*v^T` and `u*b^T`. Both are nonzero. +Their unique rank-one factorizations over F2 fix a, v, u and b. +Therefore L is the only lift above the coset, and the complete pool is +exactly the six old projectors plus L. The seven images are independent +because a is nonzero. Put V=C+span(a). + +Define `alpha_i = v_i dot x` and `beta_i = y dot u_i`. +If beta_i=0, the line span(u_i) is invariant: the old projectors act on +it diagonally and L kills it. If alpha_i=0, the subspace spanned by x +and the other five old images is invariant. Its dimension is six; the +omitted old projector kills x and the other five old images, and L maps +into span(x). Thus irreducibility requires all twelve incidences to be one. + +Since the old image and covector bases are dual, these twelve equations +force u to be the sum of the six old images and v to be the sum of the +six old covectors. Both sums equal h=e2+e5. Since `h dot h=0`, +idempotence then requires `a dot b=1`. + +Conversely suppose these conditions hold. A nonzero invariant subspace +hit by any pool covector contains that projector's image. Any old image +is sent to x by L, and x is sent to every old image by the six old +projectors. Such a subspace is all of V. If every pool covector vanishes +on a vector in V, the old covectors first force its core part to zero. +The remaining vector is a multiple of a, and `y dot a=1` forces that +multiple to be zero. There is no nonzero vector in this common kernel. +This proves irreducibility. + +## Pattern space and exact counts + +In a positive case any fresh coordinate where a is one gives a row of +p with ones at both core hubs. These two entries survive addition of +any element of H. Hence no pattern in p+H is a matrix unit. Every +nonzero pattern in H has weight at least three, so P is unit-free. +The same row proves p is outside H. Thus dim P=5 and dim V=7. + +For each of the `2^r-1` nonzero choices of a, the nonzero linear +functional `b -> a dot b` has `2^(r-1)` solutions to value one. +None is zero. These give all positive links. Symmetry is equivalent +to a=b, and `a dot a=1` means odd Hamming weight; there are +`2^(r-1)` such vectors. Subtract to obtain the nonsymmetric count. + +Two different positive links cannot define the same pattern space: +if they did, both would be lifts over the same nonzero coset of H, +contrary to the unique-lift result. These are counts in the fixed +coordinate model, not counts modulo coordinate permutations. + +In the basis of the six old images followed by a, every positive pool +has the same action: the old projectors are the first six coordinate +projectors, while the new projector has image and covector both equal +to the seven-entry all-ones vector. Thus nonsymmetric coordinate +supports do not produce a new action on the joint image in this class. +This is the source incidence pattern, now a consequence of the full +fresh-factor classification. + +## Exact verification and limits + +The verifier enumerates all 8128 rank-one idempotents at width seven +and all 32640 at width eight, including those outside the candidate-link +domain. A quotient index modulo H and a separate lookup over each of +its sixteen literal coset patterns give the same complete pools. +The candidate domain has 2079 and 18526 links, respectively. Every +negative candidate has an explicit proper invariant-subspace certificate, +checked against its complete pool. Every positive candidate has all 127 +nonzero vector orbits checked. There are one and six positives, giving +889 census orbit checks. At width eight exactly four are nonsymmetric. +A separate source positive control and a valid disjoint-fresh reducible +link are checked. Five invalid-certificate or idempotence controls pass. +The finite checks support the all-width proof; they do not replace it. + +No paid BIT word, native operator, physical supplier, complete invoice, +selected assumption discharge or new kappa is supplied. This is a +structural side result on the stated fixed blocks. A different block +geometry, a zero fresh factor or several links changes the contract. +Independent human and formal-kernel review are unclaimed. + +Prepared by Ali Romman with substantial OpenAI Codex assistance. +Credit Nick Petalas for PR #7648's witness and question and PR #5921's +fiber context; unpaidmoon for PR #7281's square family, PR #7237's +seven-projector model and PR #6921's normal-form triple. No predecessor +code was copied. New work is Apache-2.0. diff --git a/research/two-block-fresh-link-classification/README.md b/research/two-block-fresh-link-classification/README.md new file mode 100644 index 0000000000..542598dd30 --- /dev/null +++ b/research/two-block-fresh-link-classification/README.md @@ -0,0 +1,78 @@ +# Classify arbitrary-width fresh links on two binary blocks + +The one-link model in [PR #7648](https://github.com/CrocSwap/integer-mult-bounds/pull/7648) +has a complete irreducibility test when both fresh factors are nonzero. +The two core factors must both equal the sum of the fixed block hubs, +and the fresh factors must have odd inner product. Disjoint fresh +supports cannot work. With r fresh coordinates there are exactly +`(2^r-2)*2^(r-1)` nonsymmetric positive links: four at width eight. +All positive links give the same action on their seven-dimensional +joint image, despite their different coordinate supports. + +This is a scoped all-width proof with exact finite corroboration. Read +[PROOF.md](PROOF.md), [verify.py](verify.py) and [RESULT.json](RESULT.json). +The positive complete pool has seven projectors and a five-dimensional +unit-free pattern space. Some negative cases have an eighth projector, +so completeness is checked separately from the displayed generator list. +No new kappa or selected-assumption discharge is claimed. + +## Reproduce + +Use CPython 3.12 and its standard library from the repository root. + +```sh +python3.12 -I -W error -B research/two-block-fresh-link-classification/verify.py +python3.12 -I -W error -B -O research/two-block-fresh-link-classification/verify.py +python3.12 -B scripts/research_package.py --package research/two-block-fresh-link-classification +python3.12 -B scripts/check_research_commit.py --package research/two-block-fresh-link-classification --check-source-history --check-modes +``` + +Expected markers are PASS_TWO_BLOCK_FRESH_LINK_CLASSIFICATION, +PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. +The verifier scans all 40768 rank-one idempotents across widths seven +and eight. All 20605 candidate links get a complete-pool check and an +exact irreducibility or invariant-subspace certificate. It checks 889 +positive census orbits, the source witness, a valid disjoint-fresh +negative, the eight-projector degenerate case and five controls. +No predecessor scientific replay, selected cold replay, Lean or Docker +run is required or claimed. Independent human and formal-kernel review +remain open. There is no external run-time input. + +## Task and scope + +Base is canonical main `e54523517d0f03e58352e647c403a5af3e525a57`, priority +revision 8, with selected PR #7000 unchanged. The [advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19702706) +takes the released PR #7648 classification handoff. The source's square +family and single nonsymmetric witness are predecessors, not new results. +The overlap check covered open and closed PR bodies and Discussions; +sparse local notes and unpublished work remain coverage limits. + +The `bit-new-register-model` card is explicitly changed to this structural +side question. No new operation alphabet or paid BIT word is supplied, +so that original construction gate remains unmet. General five-dimensional +pattern spaces, a zero fresh image/covector factor, and multiple links +are outside the theorem. [TASK.json](TASK.json) records this boundary. + +## Open next questions + +Can an irreducible seven-dimensional image arise from a five-dimensional +pattern space that does not contain these two fixed blocks? This would +change the action rather than only its coordinate support. Start with +one complete normal-form triple and test whether a second disjoint one +is forced. No structural reduction for that broader class is supplied +here. A paid word and a complete physical invoice remain separate tasks. + +## Credit and exact sources + +Prepared by Ali Romman with substantial OpenAI Codex assistance. +Nick Petalas supplied the nonsymmetric witness and classification question +in [PR #7648's source](https://github.com/petalas/integer-mult-bounds/blob/f967555200c111925d48a46b65b124432a762b65/research/no-edge-asymmetric-block-link/README.md). +unpaidmoon supplied the square family and fixed-block model in +[PR #7281's proof](https://github.com/unpaidmoon/integer-mult-bounds/blob/0cd5324c41490b856d0e94daa8b011683fc153f6/research/no-edge-dim5-fresh-link/PROOF.md), +building on [PR #7237](https://github.com/CrocSwap/integer-mult-bounds/pull/7237) +and [PR #6921](https://github.com/CrocSwap/integer-mult-bounds/pull/6921). +The source complete-pool method credits Nick Petalas's +[PR #5921](https://github.com/CrocSwap/integer-mult-bounds/pull/5921). +The special base-pool calculation is derived again here. No predecessor +code was copied. Sources are contextual citations; the proof and executable +are self-contained. New work is Apache-2.0. diff --git a/research/two-block-fresh-link-classification/RESULT.json b/research/two-block-fresh-link-classification/RESULT.json new file mode 100644 index 0000000000..616cde6b77 --- /dev/null +++ b/research/two-block-fresh-link-classification/RESULT.json @@ -0,0 +1,118 @@ +{ + "censuses": [ + { + "all_rank_one_idempotents": 8128, + "candidate_links": 2079, + "complete_pool_sizes": { + "7": 2055, + "8": 24 + }, + "degenerate_extra_pool": [ + [ + 5, + 6 + ], + [ + 6, + 5 + ], + [ + 7, + 7 + ], + [ + 40, + 48 + ], + [ + 48, + 40 + ], + [ + 56, + 56 + ], + [ + 64, + 69 + ], + [ + 70, + 5 + ] + ], + "irreducible_links": [ + [ + 100, + 100 + ] + ], + "nonsymmetric": 0, + "outcomes": { + "irreducible": 1, + "missing incoming incidence": 30, + "missing outgoing incidence": 1922, + "zero core covector": 63, + "zero core image": 63 + }, + "symmetric": 1, + "width": 7 + }, + { + "all_rank_one_idempotents": 32640, + "candidate_links": 18526, + "complete_pool_sizes": { + "7": 18474, + "8": 52 + }, + "degenerate_extra_pool": null, + "irreducible_links": [ + [ + 100, + 100 + ], + [ + 100, + 228 + ], + [ + 164, + 164 + ], + [ + 164, + 228 + ], + [ + 228, + 100 + ], + [ + 228, + 164 + ] + ], + "nonsymmetric": 4, + "outcomes": { + "irreducible": 6, + "missing incoming incidence": 276, + "missing outgoing incidence": 17484, + "zero core covector": 382, + "zero core image": 378 + }, + "symmetric": 2, + "width": 8 + } + ], + "census_positive_orbits_checked": 889, + "rejection_controls": 5, + "source_nonsymmetric_witness": [ + 100, + 228 + ], + "status": "PASS_TWO_BLOCK_FRESH_LINK_CLASSIFICATION", + "valid_disjoint_fresh_reducible_witness": [ + 70, + 133 + ] +} diff --git a/research/two-block-fresh-link-classification/SOURCES.json b/research/two-block-fresh-link-classification/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/two-block-fresh-link-classification/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + ] +} diff --git a/research/two-block-fresh-link-classification/TASK.json b/research/two-block-fresh-link-classification/TASK.json new file mode 100644 index 0000000000..58df739ca1 --- /dev/null +++ b/research/two-block-fresh-link-classification/TASK.json @@ -0,0 +1,64 @@ +{ + "schema_version": 1, + "task_id": "bit-new-register-model", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "bit-new-register-model", + "question": "Can an explicitly larger or nonabelian register model escape the scoped three-register obstruction?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/bit-three-register-lower-bound/README.md", + "certificates/selected-result.json", + "research/bit-gl3-mixed-targets-length10/README.md", + "docs/research/community-efficient1000-review.md" + ], + "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. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Resolve the current selected review, separate complex/ordinary BIT/admitted BIT/outer budgets, and compare the card against live handoffs before starting. Historical ceilings require exact source/model equivalence.", + "scope": "Source-binding orientation only; not a scientific replay or all-size proof. Materialize selected inputs if this checkout is sparse." + }, + "first_experiment": "First compare the alphabet, role count and length with the fully replayed #1974 census and #2027 mixed-root tariff. Identify a changed premise and a legal native implementation; then price one smallest completed instance before searching larger words.", + "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.", + "Repeating the two-register GL3 census or a covered three-register length without changing a hypothesis; a formal group-algebra word without native conversion is a partial result." + ], + "overlap_terms": [ + "three-register", + "nonabelian", + "group algebra" + ] + }, + "scope_status": "changed", + "actual_scope": "Classify irreducibility of complete one-link extensions of the fixed two binary projector blocks at arbitrary width when both fresh factors are nonzero.", + "scope_change_reason": "The live PR7648 handoff asks for this arbitrary-width structural classification. This is a side result; it does not meet the original new-register-alphabet construction gate.", + "bottleneck_link": "It separates genuinely changed incidence from coordinate support changes in a BIT pattern-pool family. The proof prevents new fresh-coordinate examples from being mistaken for new joint-image actions.", + "budget_minutes": 60, + "stop_rule": "Stop at the complete fresh-factor classification; no new coordinate examples or paid-word search without a changed geometry and full cost boundary.", + "outcome": "completed", + "evidence": "PROOF.md; RESULT.json; complete width-seven/eight idempotent and candidate scans; two complete-pool methods; invariant-subspace and orbit certificates; five controls.", + "author": "Ali Romman", + "ai_assistance": "Substantial OpenAI Codex assistance; no independent human or formal-kernel review claimed.", + "open_questions": [ + { + "question": "Can an irreducible image of dimension seven at pattern dimension five avoid two disjoint normal-form blocks?", + "why_it_matters": "It can produce a different action instead of another coordinate realization of the classified family.", + "first_step": "Start with one complete normal-form triple and determine whether a second disjoint triple is forced.", + "blocked_by": "A structural reduction for arbitrary pattern spaces and a paid-word/physical caller invoice are absent." + } + ] +} diff --git a/research/two-block-fresh-link-classification/VERIFY.json b/research/two-block-fresh-link-classification/VERIFY.json new file mode 100644 index 0000000000..7463226c75 --- /dev/null +++ b/research/two-block-fresh-link-classification/VERIFY.json @@ -0,0 +1,34 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 90, + "checks": "Complete idempotent/candidate censuses, independent quotient and coset pool recovery, invariant certificates, full positive orbits, degeneracy and five controls." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 90, + "checks": "Complete idempotent/candidate censuses, independent quotient and coset pool recovery, invariant certificates, full positive orbits, degeneracy and five controls." + } + ] +} diff --git a/research/two-block-fresh-link-classification/verify.py b/research/two-block-fresh-link-classification/verify.py new file mode 100644 index 0000000000..f57d345a31 --- /dev/null +++ b/research/two-block-fresh-link-classification/verify.py @@ -0,0 +1,196 @@ +#!/usr/bin/env python3 +"""Check complete binary pools and invariant-subspace certificates. + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter, defaultdict +import json +from pathlib import Path + +ROOT = Path(__file__).resolve().parent +LEFT = ((6, 5), (5, 6), (7, 7)) +BLOCKS = LEFT + tuple((x << 3, y << 3) for x, y in LEFT) +HUBS = (1 << 2) | (1 << 5) + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def dot(x, y): + return (x & y).bit_count() & 1 + + +def off(x, y, width): + result = 0 + for i in range(width): + if x & (1 << i): + result |= (y & ~(1 << i)) << (width*i) + return result + + +def basis(vectors): + rows = {} + for value in vectors: + while value: + pivot = value.bit_length()-1 + if pivot not in rows: + rows[pivot] = value + break + value ^= rows[pivot] + return tuple(rows[k] for k in sorted(rows, reverse=True)) + + +def remainder(value, rows): + for row in rows: + if value & (1 << (row.bit_length()-1)): + value ^= row + return value + + +def span(vectors): + values = {0} + for vector in vectors: + values |= {value ^ vector for value in values} + return values + + +def orbit(vector, pool): + rows = basis([vector]) + while True: + more = [x for x, y in pool if any(dot(v, y) for v in rows)] + new = basis([*rows, *more]) + if len(new) == len(rows): + return rows + rows = new + + +def invariant_certificate(vectors, pool): + rows = basis(vectors) + joint = basis(x for x, _ in pool) + require(0 < len(rows) < len(joint), 'subspace must be nonzero and proper') + require(all(not remainder(v, joint) for v in rows), 'subspace outside joint image') + require(all(not dot(v, y) or not remainder(x, rows) + for v in rows for x, y in pool), 'subspace is not invariant') + + +def classify(x, y, pool): + core_x, core_y = x & 63, y & 63 + if not core_y: + invariant_certificate([u for u, _ in BLOCKS], pool) + return False, 'zero core covector' + if not core_x: + invariant_certificate([x], pool) + return False, 'zero core image' + require(set(pool) == set(BLOCKS) | {(x, y)}, 'nondegenerate coset must have one lift') + alpha = [dot(x, v) for _, v in BLOCKS] + beta = [dot(u, y) for u, _ in BLOCKS] + if 0 in beta: + invariant_certificate([BLOCKS[beta.index(0)][0]], pool) + return False, 'missing outgoing incidence' + if 0 in alpha: + omitted = alpha.index(0) + invariant_certificate([x]+[u for i, (u, _) in enumerate(BLOCKS) if i != omitted], pool) + return False, 'missing incoming incidence' + joint = span(x for x, _ in pool) + require(len(joint) == 128, 'positive image dimension') + for value in joint-{0}: + require(len(orbit(value, pool)) == 7, 'positive orbit does not span') + return True, 'irreducible' + + +def census(width): + hrows = basis(off(x, y, width) for x, y in BLOCKS) + hspace = span(hrows) + require(len(hrows) == 4 and all(p.bit_count() >= 3 for p in hspace-{0}), 'base pattern space') + by_pattern, by_quotient = defaultdict(list), defaultdict(list) + idempotents = 0 + for x in range(1, 1 << width): + for y in range(1, 1 << width): + if not dot(x, y): + continue + idempotents += 1 + p = off(x, y, width) + direct = sum(1 << (width*i+j) for i in range(width) for j in range(width) + if i != j and (x >> i) & (y >> j) & 1) + require(p == direct, 'direct matrix pattern') + if p: + by_pattern[p].append((x, y)) + by_quotient[remainder(p, hrows)].append((x, y)) + require(set(by_quotient[0]) == set(BLOCKS), 'complete base pool') + counts, pool_sizes = Counter(), Counter() + positives = [] + extra_pool = None + for key, members in by_quotient.items(): + if key == 0: + continue + pool = tuple(sorted(set(BLOCKS) | set(members))) + for x, y in members: + if not (x >> 6 and y >> 6): + continue + p = off(x, y, width) + independent_pool = set(BLOCKS) + for h in hspace: + independent_pool.update(by_pattern.get(p ^ h, ())) + require(independent_pool == set(pool), 'quotient and literal coset pools differ') + if width == 7 and (x, y) == (64, 69): + require(len(pool) == 8 and (70, 5) in pool, 'degenerate extra projector') + require(all(v.bit_count() > 1 for v in (hspace | {p ^ h for h in hspace})-{0}), + 'extra-projector fixture must be unit-free') + extra_pool = [list(pair) for pair in pool] + answer, kind = classify(x, y, pool) + predicted = (x & 63) == (y & 63) == HUBS and dot(x >> 6, y >> 6) == 1 + require(answer == predicted, 'classification differs from exact certificate') + counts[kind] += 1 + pool_sizes[len(pool)] += 1 + if answer: + patterns = hspace | {p ^ h for h in hspace} + require(len(patterns) == 32 and all(v.bit_count() > 1 for v in patterns-{0}), + 'positive no-edge pattern space') + positives.append((x, y)) + fresh = width-6 + require(len(positives) == ((1 << fresh)-1)*(1 << (fresh-1)), 'all-size positive count') + symmetric = sum(x == y for x, y in positives) + require(symmetric == 1 << (fresh-1), 'symmetric count') + return {'width': width, 'all_rank_one_idempotents': idempotents, + 'candidate_links': sum(counts.values()), 'outcomes': dict(sorted(counts.items())), + 'complete_pool_sizes': {str(k): v for k, v in sorted(pool_sizes.items())}, + 'irreducible_links': [list(pair) for pair in sorted(positives)], + 'symmetric': symmetric, 'nonsymmetric': len(positives)-symmetric, + 'degenerate_extra_pool': extra_pool} + + +def verify(): + require(all(dot(x, v) == int(i == j) + for i, (x, _) in enumerate(BLOCKS) for j, (_, v) in enumerate(BLOCKS)), + 'six image/covector pairs are dual') + require(len(basis(x for x, _ in BLOCKS)) == 6, 'core image basis') + checks = [census(7), census(8)] + positive = (HUBS | 64, HUBS | 192) + pool = BLOCKS + (positive,) + require(classify(*positive, pool)[0], 'source positive witness') + disjoint = (6 | 64, 5 | 128) + require(dot(*disjoint) == 1 and not ((disjoint[0] >> 6) & (disjoint[1] >> 6)), + 'valid disjoint-fresh witness') + require(not classify(*disjoint, BLOCKS+(disjoint,))[0], 'disjoint-fresh must be reducible') + bad_spaces = [[BLOCKS[0][0]], [x for x, _ in pool], [1 << 8], []] + for bad in bad_spaces: + try: + invariant_certificate(bad, pool) + except ValueError: + pass + else: + raise ValueError('invalid invariant certificate accepted') + require(not dot(positive[0], positive[1] ^ 64), 'idempotence control') + result = {'status': 'PASS_TWO_BLOCK_FRESH_LINK_CLASSIFICATION', + 'censuses': checks, 'source_nonsymmetric_witness': list(positive), + 'valid_disjoint_fresh_reducible_witness': list(disjoint), + 'census_positive_orbits_checked': 127*sum(len(c['irreducible_links']) for c in checks), + 'rejection_controls': 5} + require(json.loads((ROOT/'RESULT.json').read_text()) == result, 'retained receipt') + return result + + +if __name__ == '__main__': + print(json.dumps(verify(), sort_keys=True, indent=2))