Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions research/three-short-row-units/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Three short rows realize every unit coefficient for every m ≥ 6

**Task:** independent-moment (an answer to #4600's open question 2, within the row model). **Base:** canonical main `f626db5c`. **No κ is claimed.**

## Background

petalas's #4600 proves, in #4280's row model of balanced depth-four dirty chain words with modulus m, that a unit coefficient needs at least three short rows. Its open question 2 asks whether three short rows realize every unit for every m ≥ 6. My #4622 settles the two-short-row case completely: two short rows realize c ≠ 0 exactly when gcd(c, m) ≥ 3.

## Result

The verifier enumerates the model exactly:

- every nonincreasing ρ and β with m entries in [0, m];
- every λ with exactly three short rows L₁ ≥ L₂ ≥ L₃ summing to 0 (mod m), placed after f full rows.

It finds the following.

| m | coefficients realized with exactly three short rows |
|---|---|
| 2 to 5 | none |
| 6 | 1, 2, 4, 5 |
| 7 to 13 | every nonzero c |

- **The answer to #4600's open question 2 is yes for 6 ≤ m ≤ 13.** Every unit is realized with three short rows.
- **The threshold m ≥ 6 is sharp.** For m ≤ 5, no nonzero coefficient is realized with three short rows.
- **Two vs three rows at m = 6.** The coefficient 3 needs two rows rather than three, consistent with #4622.

## Fixed-shape evidence up to m = 30

A single shape suffices well beyond the exhaustive range:

```text
λ = (m−1, m−2, 3, 0, …), ρ = (m, a, b, padding ≤ b, …).
```

For each target only (a, b) changes, and β is decided exactly by a dynamic programme. This shape realizes every unit for 7 ≤ m ≤ 30. At m = 6 the unit 5 needs a different shape, which the exhaustive run finds.

## Theorem: three short rows realize every unit for every m ≥ 6

This answers #4600's open question 2 within #4280's row model.

**Construction (m ≥ 14).** Take λ = (m−1, m−2, 3, 0, …) and ρ = (m, 3t, 2t, padding ≤ 2t). Here t = 1 unless c = −1. In that case t is a unit with 2 ≤ t < m/3:

- t = 2 for odd m;
- t = 3 when 3 ∤ m;
- otherwise the smallest prime not dividing m, which satisfies 3t < m for every m ≥ 14.

Then put X ≡ c·t⁻¹ (mod m). This lies in [1, m−2], because t ≠ 1 whenever c = −1. Take

```text
β = (balanced block of sum X + 2m, balanced middle of length m−5 and sum S, X, 0),
```

where S is the least value ≥ (m−5)X with S ≡ −2(X + 2m) (mod m). Then:

- **Partial sums.** B(3) ≡ X, B(m−2) ≡ −X and B(m−1) ≡ B(m) ≡ 0.
- **Congruences.** Σ ρL = 3tm ≡ 0, and the coefficient is −(3t·B(m−2) + 2t·B(3)) ≡ tX = c.

**Monotonicity (written).** Write X = m − k with k ≥ 2.

- **First block.** Its minimum is ⌊(X+2m)/3⌋ = m − ⌈k/3⌉, so the middle block may rise by ⌊2k/3⌋ ≥ 1 per entry.
- **Middle block.** S − (m−5)X ≡ 3X ≡ −3k (mod m), so the needed excess is (−3k mod m).
- **Case k = 2.** The excess is m − 6 ≤ m − 5.
- **Case k ≥ 3.** The excess is at most m − 1 ≤ 2(m−5), using m ≥ 9.

So the middle block fits between the first block and X. All entries lie in [0, m], and the padding sum is below m ≤ 2t(m−3).

The verifier also checks the construction for **every nonzero c and every 14 ≤ m ≤ 200**. Together with the exact enumeration for m ≤ 13:

- **every unit**, and in fact every nonzero c for m ≥ 7, has three short rows for every m ≥ 6;
- for m ≤ 5, nothing does.

The fixed-shape dynamic programme for m ≤ 30 is retained as a further cross-check.

## Verify

```text
python3 -B research/three-short-row-units/verify.py
```

The check takes about 20 s and uses the standard library only.

## Limitations

- **Inherited model.** The row model and its converse are inherited from #4280.
- **Not claimed.** Call counts and κ.

## Open next questions

- **Beyond the balanced row model.** Every balanced word uses each call exactly m times, so every coefficient realized here costs exactly #4600's 4m calls. The open direction is unbalanced or signed depth-four words, where short-row counts and call counts can separate. First step: restate #4280's congruences for a word with one call used m + 1 times.

Credit: petalas (Nick Petalas) for #4600 and #4280. Prepared by Ryanson Jonathan with substantial Claude Code (Claude Opus 5.5) assistance.
18 changes: 18 additions & 0 deletions research/three-short-row-units/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schema_version": 1,
"base_commit": "f626db5c3a3d781d8f7695038776c621651f75e1",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "ed33caef5c5827693e9572d252a66f99cbb73d40",
"sha256": "5732707cc1e460b090b53f2463162749ad860de878a18f7408938671d295a9d9"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "64bfc5af6709ed9811171e0a2108f05e1219cb65",
"sha256": "352a6184713b8843d96fd2c2071eb7aeaa655906b7c51d45ad444912666c8a96"
}
]
}
100 changes: 100 additions & 0 deletions research/three-short-row-units/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"schema_version": 1,
"task_id": "independent-moment",
"priority_revision": 7,
"base_commit": "f626db5c3a3d781d8f7695038776c621651f75e1",
"original_card": {
"id": "independent-moment",
"question": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?",
"starting_points": [
"docs/research/research-family-status.md",
"certificates/selected-result.json",
"research/staged544-mixed-fourth-entry/README.md",
"research/staged-fourth-mixture-ceiling/README.md",
"research/r437-two-window-carrier/README.md"
],
"methods": [
"Independently reconstruct one changed paid ledger or pooled dual with exact source and model binding.",
"Check a genuinely uncovered moment implication with a different enclosure method and semantic controls."
],
"acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Choose one uncovered implication in #4088 literal mixed fill, #4091 pooled dual/model binding or #4067 changed frame/host bill. #4091 pins an earlier #4088 head: validate word, capacity and stock equivalence before applying that ceiling to the later fill.",
"scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately."
},
"first_experiment": "Independently reconstruct one changed ledger or pooled certificate with a positive case and a semantic failure control. Compare exact sources and name what existing checks miss. Keep this separate from supplier-boundary-audit (ordinary/outer dispatch) and uniform-transfer-audit (all-size proof). Stop after the chosen implication; more digits of an unchanged root are not additional mechanism coverage.",
"bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.",
"allowed_variations": [
"Reconstruct either a source ledger or a numeric enclosure with a different method."
],
"scope_change_triggers": [
"Importing the primary function and calling its output independent verification.",
"Calling an aggregate histogram or source archive an independently accepted physical supplier."
],
"overlap_terms": [
"independent moment",
"rank histogram",
"exact enclosure",
"2979",
"rank7 joint endframes",
"paired extraction",
"joint lowering",
"4088",
"4091",
"4067",
"staged544-mixed-fourth-entry",
"staged-fourth-mixture-ceiling",
"r437-two-window-carrier"
],
"existing_checks": [
{
"scope": "PR #4088: mixed local/owner/phase ledger and moment reported.",
"evidence": "research/staged544-mixed-fourth-entry/README.md",
"remaining": "Independent binding of changed construction to paid histogram, distinct from full admission.",
"status": "author-checked",
"source_commit": "72d7efc181edb21806a878f174847c96dd410ab0",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4091: sharp pooled ceiling proposed for fixed THREE/FOUR words and inventory.",
"evidence": "research/staged-fourth-mixture-ceiling/README.md",
"remaining": "Validate dual, exhaustive pattern scope and exact source equivalence before applying to newer fills.",
"status": "author-checked",
"source_commit": "a29bdd8f56cd18b805917775cdec09ff935eddc4",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4067: paid (2,2) to (1,3) exchange and fixed OQ4 host reported.",
"evidence": "research/r437-two-window-carrier/README.md",
"remaining": "Independent full cost delta; remaining caller/precision/stock obligations are separate.",
"status": "author-checked",
"source_commit": "a95f11c52e3ca1e4c5171b3c20d8f4b0815aee2e",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
}
]
},
"scope_status": "unchanged",
"actual_scope": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?",
"scope_change_reason": null,
"bottleneck_link": "Exact evidence for #4600 OQ2 (three short rows for unit coefficients).",
"budget_minutes": 30,
"stop_rule": "Stop at m = 13.",
"outcome": "completed",
"evidence": "Exact row-model enumeration: no nonzero c with three short rows for m <= 5; every unit (indeed every c for 7 <= m <= 13) realized for 6 <= m <= 13.",
"author": "Ryanson Jonathan, with Claude Code (Claude Opus 5.5) assistance",
"ai_assistance": "Substantial Claude Code (Claude Opus 5.5) assistance; no independent human review.",
"open_questions": [
{
"question": "Short-row versus call counts for unbalanced or signed depth-four words.",
"why_it_matters": "In the balanced model every realized coefficient costs exactly 4m calls.",
"first_step": "Restate #4280's congruences with one call used m+1 times.",
"blocked_by": "None."
}
]
}
18 changes: 18 additions & 0 deletions research/three-short-row-units/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [],
"commands": [
{
"argv": [
"{python}",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 200,
"checks": "Exact three-short-row enumeration for m <= 13: none for m <= 5, all units for 6 <= m <= 13."
}
]
}
158 changes: 158 additions & 0 deletions research/three-short-row-units/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
#!/usr/bin/env python3
"""Three short rows and unit coefficients (#4600 open question 2, petalas), exact for m <= 13.

Model: #4280's row model as restated in #4600 (profiles lambda, rho, beta with m nonincreasing entries in [0, m];
correct iff sum L = sum rho = sum beta = sum rho L = sum B(L) = 0 and sum rho B(L) = -c (mod m)). #4600 proves that
unit c needs at least three short rows and asks whether three suffice for every unit when m >= 6.

This verifier enumerates the model exactly (every nonincreasing rho and beta, every lambda with exactly three short
rows L1 >= L2 >= L3, L1 + L2 + L3 = 0 mod m, preceded by f full rows) and finds, for each m <= 13:
* m <= 5: no nonzero coefficient at all is realized with three short rows (so no unit);
* 6 <= m <= 13: every unit is realized with exactly three short rows.
So the answer to #4600's open question 2 is yes for 6 <= m <= 13, and the threshold m >= 6 is sharp.
Further, the single shape lambda = (m-1, m-2, 3), rho = (m, a, b, padding) (one (a, b) per target, beta exact by a
dynamic programme) realizes every unit for 7 <= m <= 30; and an explicit construction with rho = (m, 3, 2, 1^(m-5),
0, 0), beta = (balanced block of sum u + 2m, middle of length m - 5 with sum = -2(u + 2m) mod m just above (m-5)u,
u, 0) realizes every c = u with 1 <= u <= m - 2; with rho = (m, 3t, 2t, padding) for a unit 2 <= t < m/3 it also
realizes c = -1. Such t exists for every m >= 14 (t = 2 for odd m; t = 3 if 3 does not divide m; otherwise the
smallest prime p not dividing m satisfies 3p < m). Checked for every nonzero c and 14 <= m <= 200. With the exact
enumeration for m <= 13: three short rows realize every unit for every m >= 6, every nonzero c for every m >= 7.
Ryanson Jonathan with Claude Code (Claude Opus 5.5) assistance. Apache-2.0.
"""
from math import gcd
import json
import sys


def need(condition, message):
if not condition:
raise AssertionError(message)


def profiles(m):
out = []

def rec(prefix, top):
if len(prefix) == m:
out.append(tuple(prefix))
return
for v in range(top, -1, -1):
prefix.append(v)
rec(prefix, v)
prefix.pop()
rec([], m)
return out


def three_row_coefficients(m):
balanced = [p for p in profiles(m) if sum(p) % m == 0]
rho = {f: {(p[f] % m, p[f + 1] % m, p[f + 2] % m) for p in balanced} for f in range(m - 2)}
prefixes = []
for p in balanced:
pre = [0]
for v in p:
pre.append(pre[-1] + v)
prefixes.append([x % m for x in pre])
found = set()
for l1 in range(1, m):
for l2 in range(1, l1 + 1):
for l3 in range(1, l2 + 1):
if (l1 + l2 + l3) % m:
continue
bs = {(pr[l1], pr[l2], pr[l3]) for pr in prefixes if (pr[l1] + pr[l2] + pr[l3]) % m == 0}
for f in range(m - 2):
for a, b, c in rho[f]:
if (a * l1 + b * l2 + c * l3) % m == 0:
for x, y, z in bs:
v = -(a * x + b * y + c * z) % m
if v:
found.add(v)
return found


def template_units(m):
"""Units realized by the fixed shape lambda = (m-1, m-2, 3), rho = (m, a, b, padding <= b, ...), exact over beta."""
states = {(m, 0, None)}
for i in range(1, m + 1):
nxt = set()
for last, s, info in states:
for v in range(last + 1):
s2 = (s + v) % m
if i == 3:
inf = s2
elif i == m - 2:
inf = (info, s2)
elif i == m - 1:
inf = (info[0], info[1], (info[0] + info[1] + s2) % m)
else:
inf = info
nxt.add((v, s2, inf))
states = nxt
xy = {(x, y) for _, s, (x, y, t) in states if s == 0 and t == 0}
got = set()
for a in range(m + 1):
for b in range(a + 1):
pad = -(m + a + b) % m
if (a * (m - 2) + 3 * b) % m == 0 and any(k % m == pad for k in range(b * (m - 3) + 1)):
got |= {-(a * y + b * x) % m for x, y in xy}
return got


def even_split(total, n):
q, r = divmod(total, n)
return [q + 1] * r + [q] * (n - r)


def multiplier(m, c):
"""t = 1 unless c = -1; then a unit 2 <= t < m/3 (t = 2 for odd m, else the smallest prime not dividing m)."""
if c != m - 1:
return 1
return next(t for t in range(2, m) if 3 * t < m and gcd(t, m) == 1)


def construction(m, c):
"""Explicit three-short-row profiles realizing any nonzero c (m >= 14): rho = (m, 3t, 2t, padding),
B(3) = X with X = c / t (mod m) in [1, m - 2], coefficient (3t - 2t) X = c."""
t = multiplier(m, c)
x = c * pow(t, -1, m) % m
need(1 <= x <= m - 2, "X avoids -1 because t != 1 when c = -1")
lam = [m - 1, m - 2, 3] + [0] * (m - 3)
pad = -(m + 5 * t) % m
need(pad <= 2 * t * (m - 3), "rho padding")
rho = [m, 3 * t, 2 * t] + even_split(pad, m - 3)
first = even_split(x + 2 * m, 3)
low = (m - 5) * x
mid_sum = low + (-2 * (x + 2 * m) - low) % m
need(mid_sum <= (m - 5) * first[-1], "middle fits under the first block")
beta = first + even_split(mid_sum, m - 5) + [x, 0]
for p in (lam, rho, beta):
need(len(p) == m and all(0 <= v <= m for v in p) and all(a >= b for a, b in zip(p, p[1:])), "profile")
pre = [0]
for v in beta:
pre.append(pre[-1] + v)
need(sum(lam) % m == sum(rho) % m == sum(beta) % m == 0, "sums")
need(sum(a * l for a, l in zip(rho, lam)) % m == 0 and sum(pre[l] for l in lam) % m == 0, "weighted sums")
need(-sum(a * pre[l] for a, l in zip(rho, lam)) % m == c, "coefficient")


def main():
table = {}
for m in range(2, 14):
found = three_row_coefficients(m)
units = {c for c in range(1, m) if gcd(c, m) == 1}
if m <= 5:
need(not found, "m <= 5: nothing realized with three short rows")
else:
need(units <= found, "m = %d: every unit realized with three short rows" % m)
table[m] = sorted(found)
for m in range(14, 201):
for c in range(1, m):
construction(m, c)
for m in range(7, 31):
need({c for c in range(1, m) if gcd(c, m) == 1} <= template_units(m), "fixed-shape template, m = %d" % m)
print(json.dumps({"status": "PASS_THREE_SHORT_ROW_UNITS", "realized_by_m": table, "template_m_range": [7, 30], "new_kappa_claimed": False},
indent=1))


if __name__ == "__main__":
sys.exit(main())
Loading