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
14 changes: 14 additions & 0 deletions research/integer-address-signed-swap/PREDECESSORS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"schema_version": 1,
"files": [
{
"path": "research/integer-address-signed-swap/predecessor-2544.md",
"usage": "input",
"git_blob": "e4647abcd7056dd205252f8d1e4d20368df66c9d",
"sha256": "bd9e1a3346adbb8b99a30eaa2819006760adff5258f629b2ffc628cc397e93c4",
"source_commit": "9fb1552f12ca4777ca660461a8b602e709285f99",
"source_path": "research/gl2-swap-weighted-tariff/README.md",
"source_url": "https://github.com/CrocSwap/integer-mult-bounds/pull/2544"
}
]
}
166 changes: 166 additions & 0 deletions research/integer-address-signed-swap/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Integer address SWAPs need a separately charged sign

## Exact model

Work in `M_R(F2[GL2(Z)])`. Each of the R scalar roles is an arbitrary dirty
binary stream. Address matrices act on its two integer coordinates; a NEG
below negates one **address coordinate**, not a binary payload value.
The paid labels are

```
a+ = [1 1;0 1], a- = [1 -1;0 1],
b+ = [1 0;1 1], b- = [1 0;-1 1],
nx = [-1 0;0 1], ny = [1 0;0 -1].
```

For any binary rank-one idempotent `N=uv^T`, with `v^T u=1`, a call is
`D_N(g)=I_R+([g]+1)N`. The prices of a+/a- are A, those of b+/b- are B,
and those of nx/ny are C. A,B,C are fixed nonnegative real numbers,
independent of role count, projector, state and word position. Arbitrary
scalar GL_R(F2) operations may be interleaved for free. No other address
map, clean input, reset, erasure, higher-rank paid unit or free restoration
is provided. Every actual inverse call is charged.

Let r roles have any mixture of the four signed anti-diagonal targets

```
S=[0 1;1 0], -S=[0 -1;-1 0],
J=[0 1;-1 0], -J=[0 -1;1 0].
```

Let t of them be S or -S (determinant -1). The other r-t targets are J or
-J (determinant +1). The complete endpoint is their diagonal direct sum,
with identity on all R-r spectators and every off-diagonal coupling zero.
Assume finite R>=r>=0. Equality is coefficientwise in the full formal group
algebra, not equality only after applying a nonfaithful representation.

**Theorem.** The exact minimum price is

```
r*(2*min(A,B)+max(A,B)) + t*C.
```

At unit prices, this is 4t+3(r-t). The zero-target case is the empty word.
This is a sharp tariff in this specified relaxation, not a physical tape
invoice, primitive elapsed time, recursive supplier or new exponent.

## The credited ADD bounds survive the integer extension

Reduction modulo2 is a group homomorphism `GL2(Z) -> GL2(F2)`. Both signs of
a shear have the same image; nx and ny have identity image. All four targets
map to coordinate SWAP. The induced group-algebra map preserves a formal
identity and the scalar projectors, while deleting every address NEG call.

Thus PR2544's credited individual crossing bounds and PR2415/PR1989's total
bound apply to the remaining word, with the same arbitrary scalar mixing
and restored dirty spectators:

```
n_a >= r, n_b >= r, n_a+n_b >= 3r. (1)
```

For clarity, each individual bound uses the upper/lower crossing block of
the natural two-dimensional representation. In address-major order, a paid
a has image `[I N;0 I]`, a paid b has `[I 0;N I]`, scalar mixing is block
diagonal, and each target has both crossing ranks one per target role.

The total bound acts on the three nonzero binary vectors, ordered
`(1,0),(1,1),(0,1)`. a and b are the two adjacent transpositions. Their
action on ordered distinct pairs splits increasing and decreasing pairs:
each paid shear has crossing rank one; SWAP has crossing rank three.
This is the predecessor's ordered-pair argument, not a new proof principle.

All these crossing ranks are subadditive because for a fixed decomposition
`(UV)_12=U_11 V_12+U_12 V_22`, hence `rank((UV)_12)` is at most the sum of
the two crossing ranks. No intermediate triangularity or commuting
projectors are assumed.

## A disjoint determinant-character charge

Take the homomorphism `det:GL2(Z)->{+1,-1}`, then its two-point permutation
representation over F2. The +1 element acts as I2, while -1 swaps the two
sheets. Extend it linearly to the full group algebra and tensor with roles.

Every ADD has identity image, hence crossing rank zero. Every paid address
NEG has image `[I+N N;N I+N]`, whose crossing block N has rank one. Free
scalar mixing is `[Q 0;0 Q]` and crosses zero. At the endpoint, exactly the
t negative-determinant targets exchange sheets, with crossing rank t.
The same subadditivity therefore proves

```
n_NEG >= t. (2)
```

This is a separate necessary inequality. The ADD cuts charge no NEGs, and
the determinant cut charges no ADDs. Summing their weighted consequences
does not charge one instruction twice. In particular, even when an even
number of target swaps has overall determinant +1, its block crossing rank
is t rather than merely the parity of t. Scalar role mixing cannot hide it.

For A<=B, (1) gives
`A*n_a+B*n_b=A*(n_a+n_b)+(B-A)*n_b >= r*(2A+B)`.
The other ordering is symmetric. Adding C times (2) proves the lower bound,
including zero prices. Negative prices are excluded substantively: for R>=1,
a paid label followed by its charged inverse is a formal identity loop;
if its price is negative, arbitrary repetitions make the cost unbounded below.

## Literal integer attaining words

Use left-to-right matrix multiplication in the displayed words. Direct
integer multiplication gives

```
J = a+ b- a+ = b- a+ b-,
-J = a- b+ a- = b+ a- b+,
S = J nx, -S = J ny.
```

Choose the cheaper three-shear orientation for each target and append the
one indicated NEG exactly for negative-determinant targets. On role j use
N=E_jj. Each factor changes only that role, so the full formal product has
exactly the prescribed monomial there and identity elsewhere. Concatenating
over r roles attains (1) and (2) jointly. It needs no extra role, scalar
preparation, inter-role copying or uncharged restoration. This verifies the
entire dirty endpoint, not only a natural-representation image.

## Uniform address realization and its boundary

Each attaining integer matrix word reduces to the same signed permutation
on `(Z/MZ)^2` for every M>=2. Every label is a unit coordinate ADD or address
NEG; neither whole-SWAP nor free coordinate relabeling is an extra paid label.
This supplies literal uniform upper identities, not their physical compiler,
prefix/suffix layout, word representation or recursively weighted cost.

The lower bound is for formal GL2(Z) identities, equivalently for a fixed
finite word that realizes the complete stream endpoint on integer addresses.
To see faithfulness of the latter implication, for any finite set of distinct
integer matrices choose v=(1,z) outside the finitely many collision values
of z. Each nonzero matrix difference kills at most one such v. The distinct
images then separate all coefficients of every finite group-algebra entry.
The same separation survives reduction modulo any sufficiently large M,
since a fixed finite list of nonzero integer differences cannot all vanish
modulo arbitrarily large M. Thus a fixed finite word valid at every modulus
in an unbounded family also satisfies the formal identity.

This is **not** a lower bound for every separately optimized word at one
finite modulus. At M=2, both address NEG labels become identity and J=S,
so three shears already swap coordinates. Nor does the theorem establish
admission for width-dependent alphabets, varying coefficient labels, changing
role counts, restricted input subspaces or incomplete spectator restoration.

The quotient images are lower-bound witnesses only. For example a+ squared
is a nonidentity integer matrix with identity image in both the mod2 and
determinant quotients. Adding `[I]+[(a+)^2]` to an endpoint entry is therefore
invisible to all four cuts but changes the full formal map. The verifier
uses exact formal coefficients for endpoints and checks this control.

## Credit

PR2544 at `9fb1552f12ca4777ca660461a8b602e709285f99` supplies the asymmetric
GL2(F2) tariff and its individual label counts, crediting Aaron Wang's
PR2444 handoff and Ross Richardson's PR1989/PR2415 total crossing bound.
Those bounds and standard rank subadditivity are reused, not claimed new.
The contribution is their source-bound integer-address extension with a
separately paid determinant-sign requirement, mixed signed endpoints and
the explicit finite-modulus boundary. Prepared for ywz65 with substantial
OpenAI Codex assistance, Apache-2.0. No human or formal-kernel review claimed.
87 changes: 87 additions & 0 deletions research/integer-address-signed-swap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Price address signs in uniform integer SWAP words

For any mixture of `r` signed anti-diagonal targets in formal
`F2[GL2(Z)]`, with `t` of determinant -1, the exact minimum price is

```
r*(2*min(A,B)+max(A,B)) + t*C.
```

Here the two unit shear orientations, with either sign, cost A and B;
negating either **address coordinate** costs C. Prices are nonnegative.
All R>=r roles begin arbitrarily, scalar `GL_R(F2)` mixing is free, and all
spectators and off-diagonal couplings must be restored. A paid unit acts on
one binary rank-one scalar idempotent, not an arbitrary-rank block.
At unit prices, SWAP and minus-SWAP cost four each; the two determinant-positive
quarter turns cost three each. A binary payload sign is not an address NEG.

[PROOF.md](PROOF.md) gives the all-R, all-target, all-nonnegative-price theorem.
The inherited mod2 ADD cuts give `n_a>=r`, `n_b>=r`, `n_a+n_b>=3r`.
A separate two-sheet determinant representation gives `n_NEG>=t`: even when
t is even, the crossing rank sees t, not just its parity. The charges are
disjoint. Literal signed three-shear words, with one NEG where needed, attain
all inequalities together on complete formal endpoints.

This extends [PR2544](https://github.com/CrocSwap/integer-mult-bounds/pull/2544)
at `9fb1552f12ca4777ca660461a8b602e709285f99`; its asymmetric mod2 tariff is
credited, not rediscovered. That predecessor credits Aaron Wang's PR2444
handoff and Ross Richardson's PR1989 general ordered-pair cut and PR2415
coordinate-SWAP bridge. Its unchanged README is retained as
[predecessor-2544.md](predecessor-2544.md) for source-bound review; no source
implementation is imported. [PREDECESSORS.json](PREDECESSORS.json) pins it;
[SOURCES.json](SOURCES.json) pins the unchanged main ordered-pair proof,
with SHA-256 and Git blob IDs.

## Domain boundary

Formal equality is also forced by a **fixed finite word** valid on full integer
streams, or at every modulus in an unbounded family; the proof supplies the
finite-support separation argument. The attaining identities work modulo
every M>=2. The lower bound does **not** apply to every word optimized
separately at a fixed finite M. At M=2 address NEG is identity and three shears
already implement SWAP. Restricted clean inputs, width-dependent alphabets,
higher-rank units, free address maps and incomplete restoration are outside
the model. No physical tape compiler, completed recursive supplier, selected
frontier change or integer-multiplication theorem follows.

## Reproduce and evidence

Python 3.12+, standard library, from the repository root:

```sh
python3 -I -O -B research/integer-address-signed-swap/verify.py
python3 -I -O -B research/integer-address-signed-swap/test_boundary.py
python3 scripts/research_package.py --package research/integer-address-signed-swap
```

The fixed [RESULT.json](RESULT.json) records 930 rank-one paid-factor cut checks
(all binary projectors for R=1..4), 20 free scalar factors, 1,364 complete formal
endpoints (every mixture of up to four targets, two orientations and zero/one
spectator), 42,625 exact rational price checks and 720 deterministic mixed
paid/free prefixes. These bounded checks support the written proof; they are
not an exhaustive word search or a proof assistant formalization.

Controls detect an omitted NEG invisible to mod2 cuts, a nonzero formal
perturbation invisible to **all** quotient representations, fourteen deleted
attaining calls and a nonidempotent projector. Separate controls exhibit the
M=2 exception, negative-price identity loops and the changed higher-rank-unit
premise. Six subprocess tests check unchanged Git-free exports, source drift,
missing sources/receipt, typed receipt drift and exclusive regeneration.

Verification is read-only. `--write-result NEW_PATH` regenerates a complete
receipt and refuses an existing path. Explicit failures remain active under
`-O`. Runtime provenance and independent AI review are recorded with delivery;
hosted CI and independent human review are not asserted.

## Open next questions

1. Establish a lower bound for one named physical finite-modulus family at its
actual widths. Start by pinning the native alphabet and proving its action
faithful on the allowed word supports; M=2 blocks an unconditional transfer.
2. Price the literal signed words in a legal tape representation. Start with
all ADD/NEG calls, temporary roles and restoration; native compilation,
all-size layout and recursive eligibility remain blockers.

The structured obligations and original picker scope change are in
[TASK.json](TASK.json). Contributor: ywz65 with substantial OpenAI Codex
assistance. Apache-2.0; predecessor attribution is retained.
22 changes: 22 additions & 0 deletions research/integer-address-signed-swap/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"all_register_proof": "PROOF.md",
"claim_kind": "finite_checks_for_scoped_proof",
"controls": {
"all_quotients_miss_nonzero_formal_perturbation": true,
"finite_modulus_two_breaks_formal_lower_bound": true,
"fourteen_deleted_attainer_calls_rejected": true,
"higher_rank_unit_would_change_model": true,
"nonidempotent_projector_rejected": true,
"omitted_neg_detected_only_by_sign_cut": true,
"six_negative_price_identity_loops": true
},
"exact_rational_price_cases": 42625,
"formula": "r*(2*min(A,B)+max(A,B))+t*C",
"free_scalar_factor_cases": 20,
"full_formal_endpoint_cases": 1364,
"mixed_word_prefix_cases": 720,
"new_selected_exponent": false,
"rank_one_paid_factor_cases": 930,
"schema_version": 1,
"source_files": 3
}
31 changes: 31 additions & 0 deletions research/integer-address-signed-swap/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"schema_version": 1,
"base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11",
"sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "e8870e5917057d59b730eb14721a778639eca050",
"sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7"
},
{
"path": "research/symmetric-adjacent-cut-bound/README.md",
"usage": "input",
"git_blob": "cdb3f431acc07b4a75abdd3998093fd68d9a498f",
"sha256": "4fb453c83d7cd15a93fc7c65b82f2f67cb609a31285ac9ebd1f44b675777d154"
},
{
"path": "research/symmetric-adjacent-cut-bound/PROOF.md",
"usage": "input",
"git_blob": "30dad3856246c9cef3b8014ee967dd545f3a092d",
"sha256": "008be68867a8e85f4e18455d206e03f20aebfc28e9f08efba576180e7e1edc50"
}
],
"retained_source_note": "Only the cited predecessor README is retained for Git-free review, unchanged with its credit and Apache-2.0 notice; no predecessor implementation is imported."
}
Loading