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
1 change: 1 addition & 0 deletions research/swap-contact-fusion-gate/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inputs/* -text
145 changes: 145 additions & 0 deletions research/swap-contact-fusion-gate/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# A two-region retiming gate after carried-frame field swaps

This is a source-scoped abstract transport result, not a physical supplier
or a universal frame-optimization theorem. It uses the unchanged source at
PR4971 `0130b196145a43a7d305de41f49e56e8e8556378`, including the actual
forward and backward scalar words. Substantial OpenAI Codex assistance;
Apache-2.0. The original swap construction and endpoint proof are Dugongue's.

## The declared replacement class

Keep the scalar contact order, weighted field exchanges, signed native address
operators, source/target owners, start/end charts and all eight center queries.
Keep each center's copy/query/clear interface at its original charts. A field
exchange carries its chart. Between consecutive scalar contacts on each field
strand, fold all intervening signed native address maps into their actual
invertible binary map M. The strand contributes the containment constraint

M F_u ⊆ F_v

and one price `(dim F_v - dim F_u)^t`, where `0<t<1`, whenever that
difference is positive. Zero differences cost zero. Here t=1-C in the
recursive moment. Grant every containing binary subspace, without imposing
additional native phase restrictions; this enlarges the candidate class.
Fixed scalar/tape/owner work is unchanged and has no negative refund.

The source graph's nodes are scalar ADD contacts and fixed start, final and
owned-center boundaries. A contact has one chart shared by both participating
fields. A SCALE is chart-independent, so it needs no new node. Each current
strand records its most recent contact and intervening binary map. An ADD
consumes two strands and creates two outgoing strands at one node. A center
copy creates a fixed node for its source and owned cell, retaining the source
strand; center queries and clear operations fix the owned-cell chart.

All physical warp events are first checked against their literal signed
G-columns. Arbitrarily changing an event's frame labels is not an allowed
operation. The zero-to-full mutation from the #4571/#4979 lineage is rejected.
This binary consistency check does not re-prove absolute Clifford phases.

A **region** is a connected component of graph edges that have identity
binary map and zero rank in the SOURCE schedule. Every node in one such
region has the same source chart. Its internal identity edges must remain
zero in the replacement class: one common chart is assigned to all nodes
of the region. A region containing any fixed boundary is fixed. At most two
other regions may change chart. All remaining region charts stay at their
source values. Thus splitting a region, opening one of its zero edges or
changing three regions is outside this theorem.

## Exhausting the chart choices

For one changed region, with the outside charts fixed, let

L = sum of M F_u over incoming boundary edges,
U = intersection of M^-1 F_v over outgoing boundary edges.

Every allowed common chart F satisfies L⊆F⊆U. Internal nonidentity edges
also require M F=F; these are checked separately. Each source orientation
has 768 free regions: 642 have dim U-dim L=0 and 126 have difference one.
There are therefore only one or two subspaces to consider per region.
The checker enumerates both and checks the complete affected-edge histogram.

For two adjacent free regions, remove BOTH from the outside chart constraints.
Construct separate outer intervals [L_a,U_a], [L_b,U_b]. Enumerate all subspaces
in each interval and check every internal and connecting edge literally.
To enumerate an interval, start with L and repeatedly adjoin every vector of
U outside the current span, retaining each resulting subspace once. Every
intermediate subspace of U/L has a basis, so this process reaches every one;
using only a chosen coordinate basis of U would be insufficient. The replay
checks a two-dimensional quotient fixture containing its noncoordinate line.
The source intervals all fit the enforced four-dimensional quotient bound.

For each of 1,474 adjacent free-region pairs per orientation, this gives
59,231 candidate assignments in total and 2,090 feasible assignments. Count
each affected strand edge once, including edges between the two regions.
The inequality certificates below settle every feasible assignment. The
specific forced-common-chart fusion is impossible for all 1,438 pairs: the
joint L is not contained in the joint U. Each saved witness supplies an
explicit vector in L outside U.

If two free regions are not adjacent, their affected-edge sets are disjoint,
and their feasibility constraints and price differences separate. The
one-region result therefore settles those pairs without enumerating them.

## Exact prices for every 0<t<1

For each feasible assignment, form sorted old and new lists of affected
nonnegative integer edge ranks, retaining zeros. First test that the old list
majorizes the new list, with equal total rank. Concavity of x^t on [0,∞)
then gives

sum old_rank^t ≤ sum new_rank^t.

The remaining differences, NEW minus OLD price, have exactly three forms:

A(t) = -1 + 3*2^t - 3*3^t + 4^t,
B(t) = 12 - 8*2^t - 4*3^t + 4*4^t,
D(t) = 12 - 9*2^t + 3^t - 3*4^t + 3*5^t.

They occur respectively 24, 6, 1 times in the one-region enumeration and
136, 58, 10 times in the adjacent-pair enumeration, in each orientation.
Every other feasible assignment has a majorization certificate. No floating
moment evaluation or sampled exponent grid is used in the certificate.

A is the third forward difference of x^t at x=1. Its integral representation
is the integral of `t(t-1)(t-2)*x^(t-3)` over a unit three-cube, so A>0
for 0<t<1.

Put `b(t)=B(t)/4=3-2*2^t-3^t+4^t`, l=log 2, and p=log_2 3.
Since `3^5<2^8`, p<8/5. For 0≤t≤1,

b'''(t)/l^3 = 8*4^t-p^3*3^t-2*2^t
≥ (8-p^3-2)*4^t > 0.

Thus b' is convex and lies below the chord joining its endpoint values.
Both are negative: b'(0)=-log 3 and b'(1)=log(16/27). Therefore b decreases
to b(1)=0, and B(t)≥0 on [0,1], strictly positive for t<1.

For D, put q=log_2 5. The integer inequality `2^23<5^10` gives q>23/10.
Ignoring a positive term and enlarging the negative terms gives

D'''(t)/l^3 = 3*q^3*5^t + p^3*3^t - 24*4^t - 9*2^t
≥ (3*q^3-33)*5^t > 0.

The last sign follows from 23^3>11*10^3. Again D' is convex. Its endpoint
values are negative because

D'(0) = log(375/32768) < 0,
D'(1) = log(5^15*27/2^42) < 0.

Consequently D decreases to D(1)=0 and is nonnegative on [0,1]. All numerical
premises here are exact integer inequalities checked by the replay.

This proves that every declared one- or two-region replacement has local
recursive cost at least the source cost for every 0<t<1. Keeping all other
supplier terms fixed cannot turn it into a higher-saving invoice. No new
productive target, supplier admission, selected frontier or κ follows.

## What would change the question

The result permits different charts but keeps each source region intact and
changes at most two of them. It leaves larger simultaneous changes, splitting
a region with new paid transitions, frame descents, changed scalar dependencies,
earlier output access, changed center contracts, new native operators and new
owner resources open. Even a positive abstract graph improvement in a larger
class would still need exact phase-aware physical lowering, actual all-input
return, the full finite/tape bill, completion/compiler, BIT and outer transfer.
114 changes: 114 additions & 0 deletions research/swap-contact-fusion-gate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# No one- or two-region moment gain after PR4971's carried-frame swaps

**Exact scoped obstruction with executable witnesses; no new κ.** On the
changed scalar representation of [PR4971](https://github.com/CrocSwap/integer-mult-bounds/pull/4971)
at `0130b196145a43a7d305de41f49e56e8e8556378`, recharting at most two
source-defined constant-frame regions cannot lower the recursive moment for
any `0<t<1`, where t=1-C. This is stronger than a failed floating search and
narrower than a global optimum. The selected conditional κ stays 0.00302015.

The source replaces 534 three-ADD swaps per orientation with weighted field
exchanges carrying their charts, including 43 swaps with unequal incoming
charts. That opens a changed representation for rank-shape optimization. We
keep this source scalar order, signed address maps, center queries and boundary
contracts, then test the complete local cost of changing chart regions.

| Exact check | Forward | Backward |
|---|---:|---:|
| Contact graph nodes / strand edges | 15,959 / 29,966 | 15,959 / 29,974 |
| Source constant-frame regions | 1,045 | 1,037 |
| Movable regions | 768 | 768 |
| Adjacent movable-region pairs | 1,474 | 1,474 |
| Candidate two-region assignments | 59,231 | 59,231 |
| Feasible assignments, all non-improving | 2,090 | 2,090 |
| Adjacent identity-edge pairs admitting constant-chart fusion | 0 / 1,438 | 0 / 1,438 |

All 768 one-region intervals have quotient dimension at most one: 642 are
rigid and 126 have two chart choices. The two-region enumerator includes
every subspace in each actual outer interval, including noncoordinate lines,
then enforces every connecting and internal operator constraint. Nonadjacent
two-region changes separate into the already checked single-region problems.
Sorted integer rank majorization and three explicitly proved power inequalities
certify every feasible price comparison at every exponent in the stated range.
[PROOF.md](PROOF.md) defines the replacement class and proves the implications.

Both orientations keep the complete recursive profile
`{1:2201,2:412,3:510,4:127,5:40,8:8}`, rank mass 5,327. The unchanged
predecessor replay checks all 632 arbitrary input rows and all 408 helpers;
the new graph code recounts exactly that paid profile and checks signed
operator-to-chart consistency before pricing it. This is not a new physical
Clifford or all-column audit.

## Reproduce

Python 3.12, standard library, from the repository root:

```sh
python3.12 -B scripts/research_package.py --package research/swap-contact-fusion-gate
python3.12 -I -O -B research/swap-contact-fusion-gate/verify.py
```

The registered hook runs both normal and optimized variants. Default verification
is read-only and compares the complete fresh result and every witness against
`RESULT.json` and `WITNESSES.json.gz`. Compressed-container bytes are not a
mathematical equality test: the canonical decompressed witness bytes are compared.
`--write` explicitly regenerates only these two new artifacts. The original
retained verifier never receives the new command's arguments and cannot enter
its own authoring mode.

Checks reject a false zero-to-full native warp, missing unequal-chart carry,
broken graph containment, an omitted paid rank and a profitable fusion being
misclassified as a negative result. A complete quotient fixture includes the
noncoordinate line. The original swap sign/frame mutations also replay.
All checks use explicit exceptions and run under `-O`.

## Sources, scope and limits

Scientific base is canonical main `b91956876e5b4122fd89179f1b57557ff8378f15`,
priority revision 7. The rank-shape card was proposed with seed
`b139e45c9b653201499030c31dc4fe8f`. This changes its historical decoder premise
to the concrete carried-swap representation, with that change recorded in
[TASK.json](TASK.json). [SOURCES.json](SOURCES.json) pins the selected context,
card and exact retained inputs. `inputs/ORIGINS.json` maps every unchanged
predecessor file to the public PR4971 head and SHA-256; these bytes are committed
locally before the new analysis so replay needs no side-branch Git history or
network. The main-tree #4948 source word is the same compressed payload, retained
as provenance. This checkout is shallow; full-history ancestry audit is not claimed.

A region is an identity-map zero-edge component in the SOURCE graph, and its
internal identity edges must remain zero. The theorem changes charts on at most
two intact free regions. It keeps the owned-center copy/query/clear boundaries,
scalar dependencies, field exchanges and start/end charts fixed. It does not
exclude a larger simultaneous change, splitting regions by new paid transitions,
nonmonotone transports, changed centers, changed native operators or a new
scalar word. No target credit, complete supplier, fixed-tape implementation,
completion/compiler extension, BIT/outer transfer, Lean proof, human review or
higher κ is supplied. The inherited physical phase premises remain explicit.

Initial exploratory scripts also found the smallest-frame chronology fragments
the paid calls and loses moment. Those temporary scripts and floating comparisons
are not certificate dependencies or claims of optimality. The committed result
uses exact enumeration and written all-exponent inequalities only.

## Open next questions

Try one fully specified interaction among at least three intact free regions,
or change the scalar dependency graph or split a region with a charged new
transition. First check exact containment and the full affected-edge histogram;
then lower a positive candidate physically with absolute phases, arbitrary-input
returns and every scalar/movement/precision cost. A new graph optimum would
still need complete supplier and outer accounting. Structured first steps and
blockers are in TASK.json. The present result gives no reason to rerun broader
one/two-region searches on the same source.

## Credit

Prepared by Cinna Davis / 1337isnot1337 with substantial OpenAI Codex assistance;
solo, no subagents, no independent human review. Apache-2.0. Credit Dugongue for
PR4971's changed word, construction and replay, and PR4935/4948 source binding;
Cao Yifan / intqwq for the round-three source beyond PR4610; the Cinna Davis
scalar/helper and PR4440/4470 lineage; zxv, Jacob Alan Sussman and all authors in
the unchanged retained NOTICE. Credit James Reed / jwr404 for #4571's
operator/frame gap, #4979 for its exact event guard, and James Reed's independent
PR4971 review. Existing fixed-eight-array and monotone-frame obstructions are
distinct precedents, not global barriers applied to this changed graph.
88 changes: 88 additions & 0 deletions research/swap-contact-fusion-gate/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"scope": "Exact at-most-two-region moment and adjacent identity-edge fusion gate; inherited physical maps, no new kappa.",
"source_payload_sha256": "cfcd36b40326d7a5815e1db5313444379b3fb756b27d5201c561574c085cc0dd",
"orientations": {
"forward": {
"nodes": 15959,
"edges": 29966,
"regions": 1045,
"free_regions": 768,
"paid": {
"1": 2201,
"2": 412,
"3": 510,
"4": 127,
"5": 40,
"8": 8
},
"single_region_counts": {
"five_four_three_two": 1,
"four_three_two": 6,
"gap_0": 642,
"gap_1": 126,
"majorization": 863,
"third_difference": 24
},
"adjacent_region_pairs": 1474,
"two_region_counts": {
"candidate_assignments": 59231,
"feasible_assignments": 2090,
"five_four_three_two": 10,
"four_three_two": 58,
"majorization": 1886,
"third_difference": 136
},
"swaps": 534,
"unequal_swaps": 43,
"mutation_controls": [
"zero_to_full_operator_mismatch",
"dropped_unequal_frame_carry",
"broken_edge_containment"
]
},
"backward": {
"nodes": 15959,
"edges": 29974,
"regions": 1037,
"free_regions": 768,
"paid": {
"1": 2201,
"2": 412,
"3": 510,
"4": 127,
"5": 40,
"8": 8
},
"single_region_counts": {
"five_four_three_two": 1,
"four_three_two": 6,
"gap_0": 642,
"gap_1": 126,
"majorization": 863,
"third_difference": 24
},
"adjacent_region_pairs": 1474,
"two_region_counts": {
"candidate_assignments": 59231,
"feasible_assignments": 2090,
"five_four_three_two": 10,
"four_three_two": 58,
"majorization": 1886,
"third_difference": 136
},
"swaps": 534,
"unequal_swaps": 43,
"mutation_controls": [
"zero_to_full_operator_mismatch",
"dropped_unequal_frame_carry",
"broken_edge_containment"
]
}
},
"additional_controls": [
"noncoordinate_quotient_line",
"profitable_fusion_rejected",
"omitted_paid_rank_rejected"
],
"witness_payload_sha256": "cc8ea97062750b2485bbf741493eb5de45a672ff6190a0899985c72db0e354ed"
}
Loading