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
32 changes: 32 additions & 0 deletions research/scalar-trace-compression/CHECKPOINT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Native scalar trace compression checkpoint

Scientific base: b58ad9ef4d4e861b0eaa5dba41742bdc072dca51, selected
conditional kappa 0.00302015. Prepared for Cinna Davis with substantial
OpenAI Codex assistance; Apache-2.0.

Question: can a changed scalar graph reduce the complete native paid
moment, rather than repacking the frozen path invoice?

The initial logical ADD-combination experiment starts with PR4470's exact
`research/joint-helper-lattice/native_joint.py` construction. Both orientations
have 70 combinations, including 28 zero sums. Rebuilding monotone transports
leaves the complete paid profile unchanged:
`{1:2237,2:388,3:494,4:147,5:36,8:8}`. This experiment therefore gives no K gain.
The endpoint and scalar-prefix replay were pending at that initial checkpoint.

Next: test three-gate scalar identities that change the contact graph, bind
any candidate to all 632 arbitrary-input endpoints in both orientations, then
recompute its actual paid moment. Discard candidates failing the physical
common-frame condition or complete paid improvement. A smaller scalar word
alone does not justify a higher-K claim.

Credit Cinna Davis's PR4441/4447/4470 lineage, zxv, Jacob Alan Sussman, the
retained native/Clifford/geometry authors and their unchanged source notices.

Final checkpoint: the registered candidate also applies 18 noncommuting triangle
identities per orientation. Two complete native interpreters pass all 632
columns and physical frames. It removes 116 scalar macros and 914 primitive
allowance units, with the Gaussian profile exactly unchanged. A separate
exploratory rewrite of 526 signed swaps into deferred routes also left the
profile unchanged; that new primitive is not part of the certified program.
RESULT.json and PROOF.md are the final evidence. No higher K was found.
78 changes: 78 additions & 0 deletions research/scalar-trace-compression/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Exact logical rewrites and their physical execution

Prepared for Cinna Davis with substantial OpenAI Codex assistance; Apache-2.0.

## Equal elementary matrices

An ADD a += alpha*b has matrix I+alpha E_ab. Two ADDs commute if the first
destination is not the second source and the first source is not the second
destination. Repeated ordered pairs combine by adding their coefficients;
a zero sum deletes both instructions.

The scan records writes to each source, reads of each target and other touching
events. It combines gates only across instructions commuting with the repeated
ADD. Phases and touching warps, scales and non-ADDs are barriers. Transports
preserve logical values and are rebuilt afterwards. Stale history after a
deletion may reject legal combinations but cannot admit an illegal one.
There are 70 combinations, including 28 cancellations: 42+2*28=98 removed
ADDs in each orientation.

## Noncommuting triangles

For three distinct roles, execute each line left to right:

```
a += alpha*b; b += beta*c; a -= alpha*b
= b += beta*c; a -= alpha*beta*c.

a += alpha*b; c += beta*a; a -= alpha*b
= c += beta*a; c += alpha*beta*b.
```

In the first identity the net changes are -alpha*beta*c on a and beta*c on b.
The second restores a and adds beta*a+alpha*beta*b to c, using original input
values. Both hold for arbitrary rational coefficients and independent inputs.
No zero helper, Gaussian commutation or order-two complex phase is assumed.

Intervening instructions must touch none of the three roles. Their order is
preserved; modified regions cannot be reused. Lookahead is bounded at 180
instructions, with no optimality claim. There are 18 accepted triangles per
orientation: four of the first kind and fourteen of the second forward, with
counts reversed backward. Each removes one ADD, giving 116 removed macros.

## Physical execution and complete accounting

A field at frame f stores C_f times its logical value. A transport changes
this reference while preserving that value; an ADD requires exactly common
physical operand frames, under the retained native contract.

A triangle's first contact space must lie in the middle space, which must lie
in the last. Both replacement ADDs use the middle frame. Every transport is
rebuilt from its actual preceding reference; a non-nested or empty paid edge
is rejected. All warps, center episodes, residual adapters and terminal frames
are retained. Logical equality alone is not the physical certificate.

Both retained native interpreters execute the actual candidate on all 632
arbitrary persistent columns. Owned C0 is arbitrary before its permitted clear
and clears at return. Exact rational rows retain free noncommuting warp words
and the correct dual signs. The interpreters agree on every endpoint, physical
frame, paid rank and scalar invoice. A wrong paid rank is rejected. Separate
dense rational multiplication checks the triangle and rejects a wrong sign;
source-byte changes fail authentication before imports.

The candidate Gaussian edge set is contained in the source edge set. Their
operators, absolute phases and all-width interpretation reuse existing source
recipes; no new lowering is claimed. Helper boundaries are unchanged. Formal
prefix maxima remain 457 forward and 169 backward, below the retained envelope.
The source primitive lowerer, including coefficient preparation, gives exactly
914 fewer real allowance units in each orientation.

## Why K is unchanged

For every real C the recursive moment depends on the target profile T and
paid profile P through sums of r^(1-C). Both profiles are exactly unchanged.
Substituting into an unchanged complete controller therefore gives the old
moment function at every C, not just at sampled exponents. Fixed scalar work
can affect constants; it does not establish a new exponent saving here.
This is a constructive local simplification, not a global lower bound on
changed scalar circuits, native words or integer multiplication.
62 changes: 62 additions & 0 deletions research/scalar-trace-compression/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# A changed native scalar graph, with an unchanged recursive moment

**Constructive scalar saving; no higher K.** Exact commuting ADD combinations
and three-gate triangle identities remove **116 scalar macros and 914 real
primitive allowance units per native invocation**, in each orientation of the
selected PR4470 word. All 632 persistent inputs remain arbitrary.

| Orientation | Real primitive allowance before | After | Saving |
| --- | ---: | ---: | ---: |
| Forward | 158120 | 157206 | 914 |
| Inverse transpose | 158168 | 157254 | 914 |

The complete Gaussian paid profile remains
`{1:2237,2:388,3:494,4:147,5:36,8:8}`. All 408 helper boundaries and every
main boundary remain those of PR4470. The recursive moment and selected
conditional K=0.00302015 therefore do not improve. These are fixed scalar
circuit savings, not measured runtime gains or a new bottleneck breakthrough.

This addresses PR4470's changed-scalar-order next question: a real dependency
rewrite is possible, but these rewrites do not remove a binding Gaussian
contact. Other scalar circuits are not excluded. The deferred signed-route
experiment also preserved the paid profile; CHECKPOINT.md labels its limits.

## Reproduce

```sh
python3.12 -B scripts/research_package.py --package research/scalar-trace-compression
```

The registered standard-library replay authenticates 53 live input files,
reconstructs both words, and uses two retained exact interpreters on all 632
arbitrary-input columns in both orientations. It checks every common frame,
paid rank, free warp word and owned center return. Every surviving Gaussian
edge has an existing source phase recipe; no new edge needs lowering. The
formal prefix bounds remain 457 forward and 169 backward.

RESULT.json binds the algorithmically generated program's deterministic hash.
Normal replay compares that receipt without writing; `verify.py --write` is
an authoring command. PROOF.md gives the identities and execution conditions.

## Scope and credit

This author-checked local result does not install the changed circuit into
the selected supplier or rerun the selected cold replay, compiler or outer
transfer. Its unchanged paid moment provides no higher K. Retained native,
all-column, ownership, phase, precision, tape, analytic and recovery hypotheses
remain source assumptions. No independent human or formal-kernel review is
claimed.

Credit Cinna Davis's PR4441/4447/4470 native and controller lineage, zxv,
Jacob Alan Sussman and the retained scalar, Clifford, geometry, precision and
outer contributors. The construction and two interpreters are reused with
credit, not newly independently implemented here. Prepared for Cinna Davis
with substantial OpenAI Codex assistance; Apache-2.0.

## Open next questions

Find a changed scalar circuit avoiding a genuinely binding Gaussian contact.
Start with a role whose next larger frame is forced by one ADD, replace that
dependency by an exact costed circuit, then replay every endpoint and reprice
both orientations. The current rewrite supplies no such paid-profile change.
New center recipes and changed warp words remain separate routes.
57 changes: 57 additions & 0 deletions research/scalar-trace-compression/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"directions": {
"backward": {
"all_632_columns_two_interpreters": true,
"cancelled_pairs": 28,
"combined_pairs": 70,
"new_physical_transport_edges": 0,
"owned_center_cleared": true,
"paid": {
"1": 2237,
"2": 388,
"3": 494,
"4": 147,
"5": 36,
"8": 8
},
"prefix_l1": "169",
"primitive_allowance_after": 157254,
"primitive_allowance_before": 158168,
"program_sha256": "ee2de4b1130594985b1a46772f83ccc6244d92aed829082a182f3a2918490935",
"removed_scalar_macros": 116,
"second_scalar_allowance": 157254,
"triangles": {
"source_update": 14,
"target_update": 4
}
},
"forward": {
"all_632_columns_two_interpreters": true,
"cancelled_pairs": 28,
"combined_pairs": 70,
"new_physical_transport_edges": 0,
"owned_center_cleared": true,
"paid": {
"1": 2237,
"2": 388,
"3": 494,
"4": 147,
"5": 36,
"8": 8
},
"prefix_l1": "457",
"primitive_allowance_after": 157206,
"primitive_allowance_before": 158120,
"program_sha256": "dbc4309e24089fb38e1844bfac5f25f320aadf0588831107ee3d43e76b4bafa2",
"removed_scalar_macros": 116,
"second_scalar_allowance": 157206,
"triangles": {
"source_update": 4,
"target_update": 14
}
}
},
"new_kappa": null,
"paid_moment_changed": false,
"status": "PASS_CHANGED_NATIVE_SCALAR_GRAPH"
}
Loading