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
79 changes: 79 additions & 0 deletions research/noncommutative-two-row-tariff/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Exact two-row dirty-fanout tariffs over finite noncommutative rings

DONE — the exact two-row dirty-fanout price over every finite associative ring. Scoped all-positive-price theorem with an unrestricted finite shortest-word check; no new kappa. No claim remains active.

This extends lee-phys's finite-commutative five-term formula in [PR #5139](https://github.com/CrocSwap/integer-mult-bounds/pull/5139) to noncommutative finite rings. The functional form of the predecessor formula is retained and credited. The changed condition is principality of the **left** demand ideal, with ordered noncommutative construction coefficients.

**Contract.** Let R be a finite associative ring with 1!=0. Two independent dirty rows a_0,a_1 and a disjoint preserved source p lie in R^w, w>=1. Require A_i=a_i+lambda_i p for all inputs. Use only

```text
P_i(beta): A_i <- A_i + beta p, cost mu_i>0,
E_i(alpha): A_i <- A_i + alpha A_(1-i), cost c_i>0.
```

Coefficients multiply on the left. Prices are stationary, complete and independent of coefficients. Words are finite and input-independent, all dirt returns, and no extra rows, free basis changes, clearing or observers are allowed. Every required inverse is paid separately.

For L=R lambda_0+R lambda_1, define

```text
D = [lambda_0!=0] mu_0 + [lambda_1!=0] mu_1,
T_i = 2 mu_i + 2 c_j, where j=1-i.

If L is not principal, S_i=infinity.
Otherwise, for nonzero total demand:
S_i = mu_i if lambda_j=0,
mu_i+2 c_j if lambda_j!=0 and lambda_j in R lambda_i,
mu_i+2 c_j+2 c_i otherwise.
```

At zero total demand OPT=0. At every other demand, over all permitted interleavings and repeated source insertions,

```text
OPT = min(D,T_0,T_1,S_0,S_1).
```

**Lower bound.** A row cannot have exactly one nonzero incoming row addition in a word that restores all original dirt. Before that unique addition, its dirt row is still its original basis row. The other current dirt row belongs to an invertible two-row basis. A nonzero coefficient times that other row cannot vanish: multiplying by the corresponding inverse-basis column recovers the coefficient. After the addition no later incoming gate can undo the change. Source insertions do not alter dirt. Thus each used incoming direction occurs at least twice. This argument works over noncommutative rings and zero divisors.

If both rows receive source insertions, their source cost alone is at least D. If only row i receives source insertions and it receives at least two, then either lambda_j!=0 and at least two incoming additions to j are required, giving T_i, or lambda_j=0 and direct insertion at the only demanded row already costs no more.

If there is exactly one insertion at i, the left-ideal invariant from [Discussion #5300](https://github.com/CrocSwap/integer-mult-bounds/discussions/5300) forces L to be principal. A nonzero demand at j requires at least two incoming additions to j. If row i receives no incoming addition, its final demand is the inserted beta=lambda_i and every contribution to row j is a left multiple of beta. Consequently lambda_j not in R lambda_i forces at least two incoming additions to i as well. These alternatives give exactly S_i as a lower bound. Together they cover every word.

**Attainment.** D is direct insertion at every demanded row. T_i is the restoring echo

```text
E_j(-lambda_j), P_i(1), E_j(lambda_j), P_i(lambda_i-1).
```

Zero calls may be deleted. If lambda_j=0, S_i is direct insertion. If lambda_j=r lambda_i, use E_j(-r), P_i(lambda_i), E_j(r).

In the remaining principal case, finite-ring shortening gives a,beta,r with

```text
beta=lambda_i-a lambda_j,
lambda_j=r beta,
lambda_i=(1+a r) beta.
```

The five-gate word E_i(-a), E_j(-r), P_i(beta), E_j(r), E_i(a) restores both dirt rows and has the required source column. It costs S_i. The product order a r is retained. Discussion5300 supplies the finite-module proof of shortening through the semisimple quotient and nilpotent radical; it does not divide by a nonunit or form a quotient by a one-sided annihilator. This completes the upper bound and the theorem.

**Noncommutative discriminator.** In UT2(F2), take (lambda_0,lambda_1)=(E_11,E_12), with one-based matrix indices. The left ideal is nonprincipal, although E_11 R is the generated right ideal. At prices (mu_0,mu_1,c_0,c_1)=(100,1000,1,1), the exact optimum is 202. An incorrectly admitted one-insertion term would underprice it. This is a real noncommutative instance, not a relabelled commutative ring.

**Independent finite evidence.** A Dijkstra search uses the full two-by-three original-dirt/source coefficient matrix as its state. It admits every nonzero coefficient in all four gate types, arbitrary order, and arbitrary repetition; it does not assume the displayed word forms or use the formula as a cutoff. Across five positive-price contexts over UT2(F2), it settles 46,604 states, discovers 99,577 states, and finds all 64 demand endpoints in every context. All 320 exact minima equal the formula. The normal and optimized warning-strict CPython 3.12.14 runs agree. These finite price contexts corroborate the proof; they are not an exhaustive enumeration of real price vectors.

Base: canonical main ff3cc58e370d0f678e529246f8c73e8094e18fcf, priority revision 7. Fresh main and current Discussion/PR overlap were checked. This is a declared noncommutative two-row tariff question under the changed connector-interface scope. The prior general-row source-count result and full-matrix-ring feasibility result are inputs, not repeated contributions. Infinite-ring and arbitrary-many-row total-price formulas remain outside this statement.

Credit lee-phys's [pinned finite-commutative formula](https://github.com/CrocSwap/integer-mult-bounds/blob/ff3cc58e370d0f678e529246f8c73e8094e18fcf/research/finite-commutative-fanout/README.md), Krzysztof Wojt's [PR #5045](https://github.com/CrocSwap/integer-mult-bounds/pull/5045) for the source-count and return classification, Nick Petalas's [PR #4916](https://github.com/CrocSwap/integer-mult-bounds/pull/4916) for the noncommutative dirty-row contract, and Ross Richardson's [PR #3121](https://github.com/CrocSwap/integer-mult-bounds/pull/3121) for the dirty-cut lineage. Ali Romman's [PR #5310](https://github.com/CrocSwap/integer-mult-bounds/pull/5310) and [pinned finite-module proof](https://github.com/aliromman/integer-mult-bounds/blob/77fef394048539d269a45433f30a064d34af96a9/research/finite-ring-source-insertions/README.md) supply the finite left-module shortening extension, first recorded in Discussion5300. This proof dependency is fixed at 77fef394048539d269a45433f30a064d34af96a9; no executable is imported. Classical stable-range and module theory retain their credit.

**Remaining work.** A physical caller must supply complete coefficient-independent prices before this abstract optimum can be used. Source access, native frames, exact arithmetic, precision, movement and head return are not free. A useful next task is to price one triangular-ring realization of the displayed demand; no new multiplier or supplier is supplied. No predecessor scientific replay, selected cold replay, native replay, Lean or Docker build was run. Prepared by Ali Romman with substantial OpenAI Codex assistance; Apache-2.0. No independent human or proof-kernel acceptance is claimed.

## Reproduce

```sh
python3 -B scripts/research_package.py --package research/noncommutative-two-row-tariff
```

Use Python 3.12 with the standard library. The normal and optimized commands must print `PASS_NONCOMMUTATIVE_TWO_ROW_TARIFF`. The launcher must print `PASS_REGISTERED_RESEARCH_PACKAGE`. The checker has no external runtime inputs.

## Open next questions

Price one triangular-ring realization under a complete physical cost model. The source binding and physical cost model are not supplied by this package. See `TASK.json` for the structured scope.
18 changes: 18 additions & 0 deletions research/noncommutative-two-row-tariff/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schema_version": 1,
"base_commit": "ff3cc58e370d0f678e529246f8c73e8094e18fcf",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "c35482cd9035843b15a634cc8276a7e1e40e8395",
"sha256": "6fe0a099b89aa2aed796a13c3a21dafc63f3388ebf397464e44e0451893b9375"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602",
"sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72"
}
]
}
67 changes: 67 additions & 0 deletions research/noncommutative-two-row-tariff/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"schema_version": 1,
"task_id": "connector-alphabet-change",
"priority_revision": 7,
"base_commit": "ff3cc58e370d0f678e529246f8c73e8094e18fcf",
"original_card": {
"id": "connector-alphabet-change",
"question": "Does one explicit extension of the connector alphabet offer a favorable completed budget?",
"starting_points": [
"docs/research/research-family-status.md",
"research/universal-connector-boundary/README.md",
"certificates/selected-result.json"
],
"methods": [
"Construct and charge a legal extra operation on a minimal instance.",
"Prove a target-specific bound after adding one specified operation family."
],
"acceptance_gate": "State which fixed-alphabet premise changes and charge its implementation; do not declare it free. 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",
"research/universal-connector-boundary/verify.py"
],
"expected": "PASS_UNIVERSAL_CONNECTOR_BOUNDARY",
"inspect": "Reproduce the 945-pairing control, then read Exact interface to list the allowed calls.",
"scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay."
},
"first_experiment": "Add exactly one legally priced operation and test a tiny dirty-input instance before enumerating larger cases.",
"bottleneck_link": "A new legal connector operation could change recursive interface cost; a larger census in the same alphabet is a separate side result.",
"allowed_variations": [
"Choose one additional operation and a small source count for its first counterexample."
],
"scope_change_triggers": [
"Keeping the alphabet and only increasing the source count; record this as a changed assignment.",
"Extending a source-count census without naming a supplier/interface decision it could change; audit #2973 pruning concerns before relying on the affected predecessor exclusions."
],
"overlap_terms": [
"universal connector",
"source-toggle",
"connector alphabet"
]
},
"scope_status": "changed",
"actual_scope": "This scoped optimum extends the five-term finite-commutative tariff to every finite associative unital ring. It covers all positive, stationary, coefficient-independent directional prices and arbitrary finite gate words. Left-ideal principality and ordered coefficients determine the one-insertion terms.",
"scope_change_reason": "This is a scoped interface theorem. It does not complete the original supplier or uniform-transfer task.",
"bottleneck_link": "Price one triangular-ring realization under a complete physical cost model.",
"budget_minutes": 60,
"stop_rule": "Stop after the scoped proof, exact controls and bounded registered replay; do not expand to physical lowering.",
"outcome": "completed",
"evidence": "320 exact minima over UT2(F2), with 46,604 settled states and 99,577 discovered states in five unrestricted shortest-word searches",
"author": "Ali Romman",
"ai_assistance": "Substantial OpenAI Codex assistance; no independent human or proof-kernel acceptance is claimed.",
"open_questions": [
{
"question": "Price one triangular-ring realization under a complete physical cost model.",
"why_it_matters": "The abstract result needs an actual caller and a complete cost model.",
"first_step": "Price one triangular-ring realization under a complete physical cost model.",
"blocked_by": "No production caller or physical cost model is supplied."
}
],
"upstream_checkpoint": {
"commit": "ff3cc58e370d0f678e529246f8c73e8094e18fcf",
"priority_revision": 7,
"checked_at": "2026-10-23T16:55:39.262302+00:00"
}
}
34 changes: 34 additions & 0 deletions research/noncommutative-two-row-tariff/VERIFY.json
Original file line number Diff line number Diff line change
@@ -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": 120,
"checks": "320 exact minima over UT2(F2), with 46,604 settled states and 99,577 discovered states in five unrestricted shortest-word searches"
},
{
"argv": [
"{python}",
"-I",
"-W",
"error",
"-O",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 120,
"checks": "320 exact minima over UT2(F2), with 46,604 settled states and 99,577 discovered states in five unrestricted shortest-word searches"
}
]
}
81 changes: 81 additions & 0 deletions research/noncommutative-two-row-tariff/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
"""Compare the noncommutative two-row tariff with unrestricted shortest words."""
from itertools import product
import heapq
import json


def need(ok,message):
if not ok:raise ValueError(message)


VALUES=list(product(range(2),repeat=3));INDEX={x:i for i,x in enumerate(VALUES)}
ONE=INDEX[(1,0,1)]
ADD=[[INDEX[tuple(a^b for a,b in zip(x,y))] for y in VALUES] for x in VALUES]
MUL=[[INDEX[(a*d,(a*e)^(b*f),c*f)] for d,e,f in VALUES] for a,b,c in VALUES]
PRINCIPAL=[frozenset(MUL[a][g] for a in range(8)) for g in range(8)]


def tariff(lam,prices):
mu=prices[:2];c=prices[2:]
ideal=frozenset(ADD[a][b] for a in PRINCIPAL[lam[0]] for b in PRINCIPAL[lam[1]])
terms=[sum(mu[i] for i in range(2) if lam[i])]
for i in range(2):
j=1-i;terms.append(2*mu[i]+2*c[j])
if ideal in PRINCIPAL:
terms.append(mu[i] if not lam[j] else mu[i]+2*c[j] if lam[j] in PRINCIPAL[lam[i]] else mu[i]+2*c[j]+2*c[i])
return min(terms)


def step(state,kind,i,coefficient):
s=list(state)
if kind=='P':
s[3*i+2]=ADD[s[3*i+2]][coefficient]
else:
j=1-i
for k in range(3):s[3*i+k]=ADD[s[3*i+k]][MUL[coefficient][s[3*j+k]]]
return tuple(s)


def search(prices):
start=(ONE,0,0,0,ONE,0)
goals={(ONE,0,a,0,ONE,b):(a,b) for a,b in product(range(8),repeat=2)}
dist={start:0};heap=[(0,start)];answers={};settled=0
gates=[(kind,i,c,prices[i if kind=='P' else i+2])
for kind in ('P','E') for i in range(2) for c in range(1,8)]
while heap and len(answers)<64:
cost,x=heapq.heappop(heap)
if dist[x]!=cost:continue
settled+=1
if x in goals:answers[goals[x]]=cost
for kind,i,c,price in gates:
y=step(x,kind,i,c);new=cost+price
old=dist.get(y)
if old is None or new<old:
dist[y]=new;heapq.heappush(heap,(new,y))
need(len(dist)<=8**6,'finite formal-state capacity')
need(len(answers)==64,'every demand reached')
return answers,settled,len(dist)


def run():
contexts=[(1,1,1,1),(1,9,1,1),(9,1,1,1),(4,5,2,3),(100,1000,1,1)]
totals=states=comparisons=0
for prices in contexts:
actual,settled,seen=search(prices)
for lam,value in actual.items():
need(value==tariff(lam,prices),'unrestricted shortest word versus formula')
comparisons+=1
totals+=settled;states+=seen
e11=INDEX[(1,0,0)];e12=INDEX[(0,1,0)]
need(tariff((e11,e12),(100,1000,1,1))==202,'nonprincipal left-ideal tariff')
need(e12 in {MUL[e11][a] for a in range(8)} and e12 not in PRINCIPAL[e11],'coefficient side matters')
need(MUL[e11][e12]!=MUL[e12][e11],'noncommutative carrier')
return dict(status='PASS_NONCOMMUTATIVE_TWO_ROW_TARIFF',price_contexts=len(contexts),
demand_comparisons=comparisons,settled_states=totals,discovered_states=states,
wrong_side_price_foil=202,no_new_kappa=True)


if __name__=='__main__':
print(json.dumps(run(),sort_keys=True))