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
135 changes: 135 additions & 0 deletions research/carried-warp-frame-intervals/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Sharp marginal frame intervals and the extremal price test

This is a written proof about the binary frame contract defined below. The
finite exact replays supplement it. No formal proof kernel, physical phase
admission or multiplication theorem is claimed. Prepared by 1337isnot1337 with
substantial OpenAI Codex assistance; Apache-2.0.

## The graph and the quantified statement

Let V be F₂^h for any finite positive h. Let D be a finite directed acyclic
multigraph whose vertices are topologically numbered. Each edge e:a→b carries
an invertible linear map G_e:V→V. A specified subset of vertices has prescribed
subspaces F_v. A feasible assignment consists of subspaces U_v≤V such that

U_v = F_v at each prescribed vertex;
G_e(U_a) ≤ U_b for every edge e:a→b.

Assume at least one feasible assignment exists. Define L in topological order:

L_v = F_v at prescribed vertices;
L_v = sum_{e:a→v} G_e(L_a) otherwise.

The empty sum is the zero subspace. Define H in reverse topological order:

H_v = F_v at prescribed vertices;
H_v = intersection_{e:v→b} G_e^(-1)(H_b) otherwise.

The empty intersection is V. Then:

1. L and H are feasible, and every feasible U satisfies L_v≤U_v≤H_v.
2. For each single vertex v and each subspace S with L_v≤S≤H_v, there
exists a feasible assignment U with U_v=S. It is constructed by adding
the prescription U_v=S and recomputing the lower propagation.

This is a standard order propagation argument applied to this caller. Choices
at different vertices remain coupled by the edges. The statement concerns
one prescribed marginal at a time, over all subspaces, not a registry search.

## Proof of the bounds

Compare against any feasible U. Forward induction gives L_v≤U_v: this is
immediate at prescribed vertices, and a sum of images of contained subspaces
is contained in U_v at an unprescribed vertex. Backward induction gives U_v≤H_v,
using inverse images and intersections. Thus L_v≤H_v.

For an edge a→b, if b is unprescribed its recurrence contains G_e(L_a).
If b is prescribed, the existence of a feasible U gives
G_e(L_a)≤G_e(U_a)≤F_b=L_b. Hence L is feasible. For H, an unprescribed a
satisfies G_e(H_a)≤H_b by definition. At a prescribed a, use feasibility and
the already established backward bound to get G_e(F_a)≤H_b. Thus H is feasible.
The implementation checks these prescribed-vertex compatibility conditions
explicitly and rejects empty intervals.

## Proof of complete marginal attainability

Fix v and S between L_v and H_v. Keep L unchanged before v, prescribe S at v,
and propagate sums of images forward. Incoming edges at v remain valid because
their images are contained in L_v≤S.

At each later vertex w, the extra contribution from S is the sum of G_path(S)
over paths from v to w whose internal vertices are unprescribed. This follows
inductively because linear isomorphisms preserve sums of subspaces. At the first
prescribed endpoint w on any such path, the reverse recurrence gives
H_v≤G_path^(-1)(F_w). Consequently G_path(S)≤F_w. The original lower contribution
was also contained in F_w, so prescribing F_w causes no conflict. That vertex
resets the downstream contribution to its fixed F_w. This proves compatibility
at every prescribed vertex and constructs the required feasible assignment.

## Binding the graph to the native word

The input is the exact frame-carrying program constructed by Dugongue's PR4971
at head 0130b196145a43a7d305de41f49e56e8e8556378. It retains Cao Yifan's native
round-three source and the credited native/helper lineage.

Each live field holds a pointer (v,A), meaning that its current frame, before
any next paid climb, is A(U_v). Initially v is its prescribed entrance and A=I.
A weighted whole-field swap exchanges the pointers. A native warp of signed
operator k changes A to G_k A, using the inverse map for negative k.

A scalar contact between live fields creates one vertex u and an edge
(v,u,A) for each operand. Both pointers then become (u,I). A scalar SCALE
commutes with the frame and creates no constraint. A scalar contact with the
owned cell retains its supplied frame as a prescribed vertex. Every live
terminal frame is prescribed. Owned-center events and all scalar coefficients
are retained. The graph is acyclic because every new contact is later in the
word than the pointers feeding it.

Every feasible graph assignment has a sufficient chronological realization:
before a contact u, climb each operand from A(U_v) to U_u. The edge constraint
makes this an ascending nested climb. At a warp carry the actual frame by G_k;
at a weighted swap carry it with the exchanged field. Restore each prescribed
terminal frame by its final edge. This realizes exactly the binary contract.

Conversely, any schedule in this contract with the same scalar contacts, swaps,
warp maps and fixed boundaries defines such a graph assignment. Between two
contacts, invertible maps preserve containment, so any ascending climbs can be
deferred through the intervening warps to the next contact. The composed map
on that edge therefore sends the earlier contact frame into the later one.
This is the precise schedule class to which the sharp bounds apply.

These statements concern subspaces and normalized linear actions. They do not
prove that every new canonical frame transition has the required physical
absolute phase or uniform implementation. The separate replay checks all
632 independent-input normalized rows, actual G-image warp conditions, frame
chronology, paid ranks and owned-cell clearing for each emitted candidate.

## Paid rank and the two extremal profiles

The sum of the dimensions of the 632 live frames changes only at paid climbs.
Swaps permute its terms and the invertible warp maps preserve each dimension.
Consequently every ascending realization with these fixed entrances and exits
has the same total live paid rank. The eight retained rank-eight owned-center
jobs add a fixed 64. The complete source and each realized schedule have total
paid rank 5,327.

For a paid profile n_r, define C_k(n)=sum_r n_r min(r,k). For any concave rank
price f on {0,...,9} with f(0)=0, put d_j=f(j)-f(j-1). Direct summation gives

f(r) = r d_9 + sum_{k=1}^8 min(r,k) (d_k-d_(k+1)).

Every curvature coefficient d_k-d_(k+1) is nonnegative. Equal total rank cancels
the linear term when comparing profiles. Therefore C_k(source)≤C_k(candidate)
for every k implies that the source price is no greater for every such f.
A positive cut difference yields strict inequality for every strictly concave f,
including f(r)=r^t for 0<t<1.

The exact differences candidate minus source, for k=1,...,9, are

least: [347, 375, 60, 30, 0, 0, 0, 0, 0];
greatest: [500, 427,115, 12, 0, 0, 0, 0, 0].

Both extremal schedules are thus strictly more expensive than the source for
every power price in the relevant range. This rejects these schedules as a
paid-profile improvement with the other invoice terms held fixed. It does not
optimize the intermediate assignments or include a new physical/compiler bill.
126 changes: 126 additions & 0 deletions research/carried-warp-frame-intervals/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Carried frame intervals for the PR4971 native word

This package computes sharp per-contact binary frame bounds for the weighted
field swaps of [PR4971](https://github.com/CrocSwap/integer-mult-bounds/pull/4971)
while also carrying frames through the actual invertible native warp maps.
It preserves the source's scalar word, helper boundaries and owned-cell contacts.
No new κ, physical phase admission or selected-frontier change is claimed.

The source is PR4971 head `0130b196145a43a7d305de41f49e56e8e8556378`, which
retains Cao Yifan's round-three word beyond PR4610. It is a different native word from the selected PR4470 supplier. PR4971 was
merged while this investigation was running; its retained source remains in
this branch’s ancestry. No separate pending-PR fetch is needed for a cold replay.

## What is established

[PROOF.md](PROOF.md) defines the exact binary schedule class and proves sharp
marginal bounds for every finite acyclic graph with invertible linear maps on
its edges. The graph propagates subspace sums forward and inverse-image
intersections backward. Every feasible contact frame lies between those bounds.
For each single contact, every intermediate subspace extends to a feasible
binary schedule by adding that prescription and propagating again. Different
contacts' choices remain coupled by the graph edges.

On the actual source, each orientation has:

- 15,935 graph vertices and 29,790 mapped edges;
- 14,671 scalar-contact vertices, of which 14,487 are variable;
- 13,148 rigid variable contacts and 1,339 flexible contacts;
- a maximum interval dimension difference of five.

The checker independently executes the source, the reconstruction from its
original contact labels, both extremal schedules and one strict intermediate
pinned frame. Every execution checks the 632 independent-input normalized
endpoints, all 408 arbitrary helper inputs, actual signed G-image warp frames,
scalar contacts, paid ranks and owned C0 clearing. The emitted schedules retain
534 weighted field swaps and 240 warp events per orientation.

The least and greatest schedules give no paid improvement. Their profiles are:

| Schedule | Rank 1 | Rank 2 | Rank 3 | Rank 4 | Rank 5 | Rank 8 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| Source / original contacts | 2201 | 412 | 510 | 127 | 40 | 8 |
| Least frames | 2520 | 755 | 225 | 127 | 10 | 8 |
| Greatest frames | 2774 | 651 | 301 | 36 | 28 | 8 |

All have total paid rank 5,327. Exact min-rank cut differences show that the
source costs no more for every concave price f with f(0)=0, and costs strictly
less for every power price r^t with 0<t<1. This is an all-price comparison of
these profiles, not a numerical power sample. The proof uses the standard
discrete curvature decomposition of a concave sequence.

`RESULT.json` contains the complete interval dimension census, profiles,
integer cut differences and controls. It also records an exhaustive two-variable
three-bit example: all 256 subspace pairs are checked, six are feasible, and
all seven feasible marginal pins are extended constructively. Five toy controls
and four actual-word controls per orientation reject wrong map direction,
independently chosen incompatible marginals, an impossible pin, a changed fixed
node, a singular map, a false paid rank, false warp frames and lost swap frame
carry and an incorrect swap sign. The separate exact row replay imports no retained row primitives.

## Reproduce

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

```sh
python3 -B scripts/research_package.py --package research/carried-warp-frame-intervals --check-only
python3 -B scripts/research_package.py --package research/carried-warp-frame-intervals
python3 -I -OO -B research/carried-warp-frame-intervals/verify.py
```

The registered replay authenticates the seven live source files. Its retained
constructor runs in an isolated subprocess with an empty private bytecode-cache
namespace. `verify.py --write` regenerates the deterministic receipt.

`frame_dag.py` exposes `FrameDAG.bounds()` and `FrameDAG.extend(node, subspace)`.
`NativeSchedule(canonical, program)` builds the actual mapped graph, and
`realize(values)` emits the corresponding sufficient binary schedule with
strictly nested paid climbs. The implementation accepts ambient dimensions one through nine; this caller
uses nine. Frames are exact subspaces encoded as point bitsets.
No subspace is selected using floating-point optimization.

## Scope and provenance

Only ascending live-field climbs, fixed scalar/weighted-swap order, fixed warp
maps, fixed helper/main entrances and exits, and fixed owned-cell contacts are
covered by the sharp bounds. The theorem includes every binary subspace in
that contract. It establishes no global price optimum over their coupled
assignments. The finite replays are normalized exact linear checks; physical
Clifford absolute phases, new whole-job lowering, all-column implementation,
movement, precision, the complete controller invoice and multiplication remain
separate obligations. The two losing extrema do not justify those larger runs.

Sources, Git blobs and SHA256 pins are in `SOURCES.json`. The catalogue and
selected record are historical provenance. The task card is explicitly changed
from historical four-provider admission to this carried-frame interface.
Canonical main was refreshed at `bee95ce88f9f19802f0613f92838895cd0e14a1f`, priority
revision 7. All seven scientific source files match that refreshed main byte
for byte. The scientific source pin remains the original PR4971 head. Overlap checks found PR4971 as the direct predecessor and PR340 as
older fixed-word free-form frame retiming. Earlier packages also enumerate local
frame intervals. This package applies the standard graph recurrence to the new
carried-swap/native-map contract; it claims no invention of lattice propagation
or concave-price comparison. Remote coverage and sparse local limits are recorded
in TASK.json, and no exhaustive novelty claim is made.

## Open next questions

Can a coupled intermediate assignment beat the source's complete paid profile?
Start with the 1,339 flexible contacts and retain every mapped-edge constraint;
the extrema and independent marginal choices are insufficient. A favorable
profile is required before expanding into physical phase and controller/compiler
validation. No improving assignment has been established. The concrete question,
relevance, first step and blocker are also recorded in TASK.json.

## Credit

Dugongue's PR4971 supplies the weighted frame-carrying swap construction and its
retained source. Cao Yifan supplies the round-three native word beyond PR4610.
Cinna Davis supplies the scalar/helper and selected-result lineage, including
PR4440/4470. Dugongue's PR4935/4948, zxv, Jacob Alan Sussman and the remaining
native/compiler authors retain their original credit in the source NOTICE.
The retained LICENSE and NOTICE are declared export inputs. James Reed's issue4571
motivates checking actual G-image warp events in the separate replay.

Prepared by 1337isnot1337 with substantial OpenAI Codex assistance, without
subagents. New material is Apache-2.0. This is written mathematics and exact
finite evidence, without formal-kernel or independent human acceptance.
Loading