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
104 changes: 104 additions & 0 deletions research/streaming-gaussian-phase-tariff/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Exact phase-scan reduction

This construction changes the payload execution of the retained PR2250
Gaussian phase pass. The phase polynomial, tensor convention, address order,
affine word and compact operations stay the same. The source proof remains
the authority for those contracts; this proof covers the new scan and bill.

## Domain

A complete declared address rectangle has M records, each with an integral
number of Gaussian coefficients. A coefficient is two b-bit two's-complement
words, real first, in least-significant-bit order, with b>=2. Put V equal to
the complete payload bit count. The source head initially has offset h from
its origin. Phase controls depend only on the current address, with the
retained tensor exponent f*p0+sum_j q(x_j) modulo four. For an inverse pass,
negate this exponent on the recovered input address. Let V_odd be the total
payload volume of records whose phase is odd.

The result is exact modulo 2^b in each component. It is also exact on signed
Gaussian integers when the usual symmetric headroom prevents overflow.
The most negative two's-complement word is included in the modular theorem;
it is not evidence that signed negation cannot overflow.

## Scan and correctness

For phase 0, copy both halves directly to the output. For phase 2, stream
the negation of each half directly. Reset the one-bit carry before each
half. The recurrence starts with carry=1 and emits the low bit of
1-input_bit+carry, then retains its high bit. Induction on the consumed
prefix proves two's-complement negation modulo 2^b.

For an odd phase, copy the real half into one scratch tape. Stream the
imaginary half directly to output, negating it for phase 1. Rewind scratch
and append the real half, negating it for phase 3. Erase scratch before the
next coefficient. The resulting pairs are (-imag,real) and (imag,-real).
Together with the even cases, these are exactly multiplication by i^phase.

Every branch consumes exactly one coefficient and appends exactly one
coefficient. It cannot mix record boundaries. Induction over coefficients
and records proves the complete endpoint. Finish and erase the consumed
input, rewind output and return with empty scratch at its origin. No
payload is addressed by an output index. Bulk copy abbreviates consecutive
bit reads and writes; the charge includes every bit.

The scan uses three payload roles in total: input, output and one real-half
scratch tape. Scratch has peak extent b, independent of the number of
records. The phase counter/arithmetic interface is inherited and separately
charged. The complete monomial wrapper uses the unchanged affine word,
compact operations and inverse chronology, so replacing only this phase
pass preserves its endpoint and ordinary-call inventory.

## Exact invoice

The following counts include input erasure, scratch clearing and output
rewind. They apply per R=2b coefficient when h=0.

| Phase parity | Reads | Writes | Erasures | Moves | Total |
|---|---:|---:|---:|---:|---:|
| even | R | R | R | 6R | 9R |
| odd | 3R/2 | 3R/2 | 3R/2 | 9R | 27R/2 |

In the odd branch, the extra half is copied to scratch, rewound, read,
rewound again and erased. These actions account for the complete extra
9R/2. The final source erase contributes its head return as well as its
forward erase and return. An initial rewind contributes h once.
Therefore the total is

```text
new = 9V + (9/2)V_odd + h
old = 18V + h
saving = 9V - (9/2)V_odd.
```

The old formula follows by counting both half-scratch paths in the unchanged
source. At h=0, the new payload bill saves at least one quarter and at most
one half. A nonzero initial head adds the same h to both bills; do not apply
the percentage to that extra charge. The number of control evaluations is
still M. No lower bound over all phase implementations is claimed.

For each actual event8814 right/left fixture, V=32768 and V_odd=16384.
The phase bill decreases from 589824 to 368640, exactly 37.5 percent.
This percentage is for the phase component, not a complete monomial,
recursive caller, runtime benchmark or multiplication exponent. The unchanged
affine/ordinary calls can dominate the full monomial cost.

## Evidence and remaining costs

The verifier checks all coefficient pairs of widths 2 through 6 in all four
phases, 768 tensor/polynomial/inverse patterns with nonzero initial heads,
the actual right/left recipes and both complete monomial directions. It also
checks a two-column compact fixture in both directions with arbitrary dirty
compact fields and identical ordinary-call inventories. An independent
integer oracle checks phase values. All measured bills must match exactly.

Three arithmetic discriminators distinguish inverse phase, missing carry and
missing odd-phase sign. Three malformed extents are executed and rejected.
Finite checks corroborate the scan proof; they are not its all-width basis.

Descriptor production, encoded phase arithmetic, the complete physical
caller, recursive child, precision and final supplier admission remain open.
This local constant reduction does not change the complete kappa calculation.
It does not replace the separate Word RAM cost model or Gaussian normalization
kernel. New work: Ali Romman with substantial OpenAI Codex assistance,
Apache-2.0. Jose Manuel and the retained source authors keep their credit.
63 changes: 63 additions & 0 deletions research/streaming-gaussian-phase-tariff/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Streaming Gaussian phase tariff

**Local algorithmic improvement; no new kappa.** Use direct streaming for
even Gaussian phases and one real-half scratch tape for odd phases. The
complete payload bill is `9V+(9/2)V_odd+h`, instead of the retained source's
`18V+h`. Here h is the initial head offset and V_odd is the volume with an
odd phase. From origin, this saves 25 to 50 percent of phase payload work.

The [proof](PROOF.md) covers all valid complete record layouts and coefficient
widths. The unchanged phase polynomial, affine word and compact interpreter
are composed in [phase.py](phase.py). No frozen source file is changed.
The actual event8814 right and left phase passes each save 37.5 percent:
589824 to 368640 transitions. [RESULT.json](RESULT.json) records these values.
This is a component tape invoice, not an end-to-end runtime or kappa gain.

## Replay

Use CPython 3.12, standard library only, from the repository root:

```sh
python3.12 -B scripts/research_package.py --package research/streaming-gaussian-phase-tariff
```

Expected status: `PASS_STREAMING_GAUSSIAN_PHASE_TARIFF_NO_NEW_KAPPA`.
The registered hook runs normal and optimized modes and checks source hashes
and a typed exact receipt. Evidence includes 21824 coefficient/phase cases,
768 tensor phase patterns, four actual complete monomial cases, two compact
tensor round trips, three arithmetic discriminators and three input rejections.
Every new result agrees with the unchanged predecessor and an independent
integer phase oracle. All source ordinary calls and control evaluations are
retained. The official export permits a Git-free replay.

No full supplier, native catalogue replay, encoded-control lowering, Lean,
Docker or selected cold replay was run. Human and formal-kernel review are
unclaimed. The written scan proof supplies the uniform result. The complete
caller, recursive child, precision and supplier budget remain separate.

## Attribution and scope

Base `7c472563474e60185e6ca101a17622133d047e56`, priority revision 7.
[SOURCES.json](SOURCES.json) pins consumed files; selected-result and catalogue
files are historical provenance. Jose Manuel/jmbarrancoml supplied the source
scan, affine/compact routines and proof in
[PR #2250](https://github.com/CrocSwap/integer-mult-bounds/pull/2250).
Douglas Colkitt's compact construction remains credited there. JoyboyBrian's
[PR #5327](https://github.com/CrocSwap/integer-mult-bounds/pull/5327)
binds the actual event8814 fixture to Cinna Davis's mixed caller and retained
native/Clifford lineage. The Word RAM phase work in
[PR #4538](https://github.com/CrocSwap/integer-mult-bounds/pull/4538)
and Gaussian normalization in
[PR #3127](https://github.com/CrocSwap/integer-mult-bounds/pull/3127)
are related work with different operations and cost models, not consumed
implementations or new results claimed here.

Prepared by Ali Romman with substantial OpenAI Codex assistance. New code and
proof: Apache-2.0. Existing source notices remain unchanged.

## Open next questions

Lower this scan onto the encoded physical coefficient/Count interface and
charge the phase controls there. Use the exact component bill and preserved
ordinary-call inventory as comparison points. The full caller and recursive
child are required before any complete supplier gain can be claimed.
27 changes: 27 additions & 0 deletions research/streaming-gaussian-phase-tariff/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"status": "PASS_STREAMING_GAUSSIAN_PHASE_TARIFF_NO_NEW_KAPPA",
"coefficient_cases": 20,
"coefficient_pairs": 21824,
"pattern_cases": 768,
"actual_recipe_phase_receipts": {
"right": {
"volume": 32768,
"odd_volume": 16384,
"new_transitions": 368640,
"old_transitions": 589824,
"output_sha256": "9ef1f647a6725b96633d79231f30f617ff2719b1534628615474cec42b0d8a3e"
},
"left": {
"volume": 32768,
"odd_volume": 16384,
"new_transitions": 368640,
"old_transitions": 589824,
"output_sha256": "3b5c2bdc4689619fe654625df3a73264f30be479b531d5f8b0f85cc6b23183e5"
}
},
"actual_monomial_cases": 4,
"compact_tensor_cases": 2,
"controls": 6,
"worst_case_payload_saving": "1/4",
"even_phase_payload_saving": "1/2"
}
54 changes: 54 additions & 0 deletions research/streaming-gaussian-phase-tariff/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"schema_version": 1,
"base_commit": "7c472563474e60185e6ca101a17622133d047e56",
"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"
},
{
"path": "research/complex-four-base-packet/FIXTURE.json",
"usage": "input",
"git_blob": "4788ef4a4c74847432ad1bb928d736f71245db9d",
"sha256": "25b296e61180c5d2683fef88edb4244faaeb35898ff76c7a8368ca7063a1ca86"
},
{
"path": "research/complex-four-base-packet/README.md",
"usage": "input",
"git_blob": "2b6caf55cb15a9bdff4ecb2c576de628c93a71cd",
"sha256": "f5653a054a3caa44343aec4f20b180c6c745af7bf1ad7404d77626e7d28fce0e"
},
{
"path": "research/selected-complex-compact-adapters/PROOF.md",
"usage": "input",
"git_blob": "685efc529493e4b841c1ce8799d28968b4991d7e",
"sha256": "804446e22304540eb02a5f4da3f71464a217be830a33b11420ea31eea878782c"
},
{
"path": "research/selected-complex-compact-adapters/compact.py",
"usage": "input",
"git_blob": "60bc206c78150f23563a4775800b0dd32025843d",
"sha256": "0e1027a60f38c21cfd808c8ce44dcc2423810efdab0e15f02b07f261ad48fc3c"
},
{
"path": "research/selected-complex-compact-adapters/monomial.py",
"usage": "input",
"git_blob": "5fa4494167c4ba668993a2b1c902969518728a4c",
"sha256": "394f9a465ac9148af0c20844d375e4befbef17d92b2fcc840d83419480dd4740"
},
{
"path": "research/selected-complex-compact-adapters/streams.py",
"usage": "input",
"git_blob": "61542ce4c9eb51bfc113475b4f98649cb90a853e",
"sha256": "718a582a50aee8f1f04945ed942be1d4162962fe47dbf05c6ff37b7fb8c61257"
}
]
}
78 changes: 78 additions & 0 deletions research/streaming-gaussian-phase-tariff/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"schema_version": 1,
"task_id": "uniform-transfer-audit",
"priority_revision": 7,
"base_commit": "7c472563474e60185e6ca101a17622133d047e56",
"original_card": {
"id": "uniform-transfer-audit",
"question": "Does one quantified step of the proposed #4100 all-size construction hold at its actual caller?",
"starting_points": [
"docs/research/research-family-status.md",
"certificates/selected-result.json",
"research/unconditional-batched-crt/README.md"
],
"methods": [
"Prove one missing implication with explicit quantified hypotheses.",
"Find an exact counterexample at the claimed interface boundary."
],
"acceptance_gate": "Identify the proposition and what would change downstream; do not equate a finite replay with a universal proof.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read PROOF.md and AUDIT.md in #4100. Select one distinct obligation: CRT total repair, native/free-algebra lifting, precision/conditioning, or complete fixed-tape cost. This is an author-submitted proof, not an accepted unconditional theorem.",
"scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately."
},
"first_experiment": "Check live handoffs; name one proposition, its caller, quantified domain and dependency closure. Independently prove the implication or exhibit a precise gap/counterexample. Prioritize CRT.md total repair or COMPLEX.md free-algebra lift only if unclaimed. Stop at the chosen obligation; do not substitute finite samples or root arithmetic for an all-size proof, or launch the complete package by default.",
"bottleneck_link": "Finite supplier improvements are useful only under the retained transfer obligations.",
"allowed_variations": [
"One CRT repair, native lift, precision/conditioning or tape-cost proposition, with its exact caller."
],
"scope_change_triggers": [
"Replacing a quantified obligation with another finite smoke test.",
"Treating archive intake, an author PASS receipt or a finite composed fixture as discharge of the universal hypotheses."
],
"overlap_terms": [
"uniform transfer",
"all-size",
"precision",
"4100",
"unconditional-batched-crt"
],
"existing_checks": [
{
"scope": "PR #4100: proposed unconditional construction and finite checks, without independent acceptance.",
"evidence": "research/unconditional-batched-crt/README.md",
"remaining": "Independent proof audit of one caller-bound all-size implication; all other premises remain explicit.",
"status": "author-checked",
"source_commit": "337d04939571a637aeab54a0f58f54fde811663a",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
}
]
},
"scope_status": "changed",
"actual_scope": "An exact lower-cost sequential Gaussian phase scan and source monomial composition.",
"scope_change_reason": "Replace two unconditional half-scratch paths with direct even phases and one odd-phase scratch path; a scoped local implementation improvement.",
"bottleneck_link": "Reduces paid payload work in the actual monomial adapter, without claiming a complete supplier or asymptotic gain.",
"budget_minutes": 60,
"stop_rule": "Finish exact scan correctness and tariff; do not expand into encoded control or full supplier work.",
"outcome": "completed",
"evidence": "PROOF.md, RESULT.json, exhaustive small coefficients, mixed tensor patterns, actual complete monomials and compact composition.",
"author": "Ali Romman",
"ai_assistance": "Substantial OpenAI Codex assistance; independent human and proof-kernel review unclaimed.",
"open_questions": [
{
"question": "Can this scan be lowered to encoded physical controls with the same bill?",
"why_it_matters": "The current address/control interface is inherited and separately charged.",
"first_step": "Bind one actual coefficient/Count traversal and charge its phase controls.",
"blocked_by": "Full caller, recursive child and complete supplier pricing."
}
],
"coordination": {
"claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2238#discussioncomment-19153519",
"overlap": "318 open PRs, 4648 Discussion records, all 7267 main notes and targeted all-state searches; arbitrary diffs and unpublished work not covered."
}
}
41 changes: 41 additions & 0 deletions research/streaming-gaussian-phase-tariff/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"research/complex-four-base-packet/FIXTURE.json",
"research/complex-four-base-packet/README.md",
"research/selected-complex-compact-adapters/PROOF.md",
"research/selected-complex-compact-adapters/compact.py",
"research/selected-complex-compact-adapters/monomial.py",
"research/selected-complex-compact-adapters/streams.py"
],
"commands": [
{
"argv": [
"{python}",
"-I",
"-W",
"error",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 120,
"checks": "Exact phase values and invoices, source monomial endpoints, compact composition, source hashes and typed receipt."
},
{
"argv": [
"{python}",
"-I",
"-W",
"error",
"-O",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 120,
"checks": "Exact phase values and invoices, source monomial endpoints, compact composition, source hashes and typed receipt."
}
]
}
Loading