diff --git a/research/cached-chirp-cyclic-join/CHECKPOINT.md b/research/cached-chirp-cyclic-join/CHECKPOINT.md new file mode 100644 index 0000000000..004c058259 --- /dev/null +++ b/research/cached-chirp-cyclic-join/CHECKPOINT.md @@ -0,0 +1,39 @@ +# Wave 8 recoverable checkpoint + +Worker: analytic_join. Track 50/75. Local branch: +research/cached-chirp-cyclic-join-20261109. Canonical parent: +7c49fe32c55de02c2c873655c804b16e4c3fef0a. + +Root owns publication; this worker has neither pushed nor submitted a PR. +The package is independent of all earlier frozen worktrees. The one approved +pivot moved from already-covered generic expansion error to #6906's exact +open convolution/grid interface; broad Core is excluded. + +The first genuine T8 physical attempt completed inside its 120-second bound +and emitted PASS_CACHED_CHIRP_CYCLIC_JOIN. Exact output hash: +2e1c1b26ba13815c4baa8dcf46169b27152fe2f035475a4ee99c1bf96a32a548. +The actual over-radius failure occurs before any new cached call; cleanup +and borrowed-source origins are checked. The dense comparison is only the +specified q2 finite-provider witness, not production GL64/O73 admission. + +An earlier source-opening probe failed the existing cold-module guard: +our initially chosen local helper name source.py collided with a native +module named source. No guard was disabled and no failed probe is reported +as a completed physical replay. Renaming our helper to join_sources.py +resolved the collision; all inherited sources and checks stayed unchanged. + +Public caller dependency was updated from its identical local tested tree +to root-verified commit 96211247643059ae48af4c7d9dc960034798935d. +The source-specific universal proof, original-period conventions, grid +allocation and complete cost invoice are in PROOF.md. Direct normal and optimized replays passed in 62.094 and 63.201 seconds. +The first registered pair also passed. Final registered replay additionally +strengthens the omitted-grid control by retaining the actual unprojected +f-grid oracle words: those values differ and overflow the q carrier. This +check does not substitute a production provider. Final review and commit +gates are recorded below after freezing. +No full transform, removed foundational assumption or new kappa is claimed. + +Final registered normal/optimized replay passed (133.551 seconds combined, +120-second per-command caps), with identical receipts. Metadata/pins passed. +The full registered output is retained in evidence/registered.json; the +compact parsed receipt and original direct runs are in evidence/REPLAY.json. diff --git a/research/cached-chirp-cyclic-join/DEPENDENCIES.json b/research/cached-chirp-cyclic-join/DEPENDENCIES.json new file mode 100644 index 0000000000..d004f5a7fb --- /dev/null +++ b/research/cached-chirp-cyclic-join/DEPENDENCIES.json @@ -0,0 +1,93 @@ +{ + "schema_version": 1, + "files": [ + { + "path": "research/cached-chirp-cyclic-join/retained/cached/NOTICE.md", + "git_blob": "eccfcc03eef8c3cd27432a738765a5190a312361", + "sha256": "301387392afeda16cab345e76f0b60fde519b3cd9d0e8e3658d56a1fbaa98a7f", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "3c0443b2aa721ce692199ff31abc18e8d917596a", + "source_path": "research/physical-cached-chirp-payload/NOTICE.md" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/cached/PROOF.md", + "git_blob": "a75f9a771c679dc53bb8150724bf95cf46719418", + "sha256": "25ce9ec09f39fc80c21fddbc60093a60319719fbdd2f1bb35cdda52b2fd65e36", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "3c0443b2aa721ce692199ff31abc18e8d917596a", + "source_path": "research/physical-cached-chirp-payload/PROOF.md" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/cached/README.md", + "git_blob": "1e95863471783f5c87745c0eed63d755e0dfab4d", + "sha256": "e70ef27111d73e2b84209087b566626d07f7f6d09c4f146fb53de30bb41b5624", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "3c0443b2aa721ce692199ff31abc18e8d917596a", + "source_path": "research/physical-cached-chirp-payload/README.md" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/cached/SOURCE.md", + "git_blob": "8433a71fdee13f8437a2cb4a04bbd53422a8789b", + "sha256": "c79144c0fb335903db21d26016455908d5b5662584f77e5312f7b24a7ff711c7", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "3c0443b2aa721ce692199ff31abc18e8d917596a", + "source_path": "research/physical-cached-chirp-payload/SOURCE.md" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/cached/chirp_consumer.py", + "git_blob": "19c77f56be7347406cc8ee689c999b7afd74dbed", + "sha256": "47b91b4b9773453b24064604d174dc1fb5304b76d1477c39f414f4517ecb51a1", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "3c0443b2aa721ce692199ff31abc18e8d917596a", + "source_path": "research/physical-cached-chirp-payload/chirp_consumer.py" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/cached/chirp_tables.py", + "git_blob": "9302c067210f5e1e7d2a0280c40186590bdbaadc", + "sha256": "221077b7660dc991d997d62065aec336d49b108d0307c1140b3e95ab4b9b8925", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "3c0443b2aa721ce692199ff31abc18e8d917596a", + "source_path": "research/physical-cached-chirp-payload/chirp_tables.py" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/cached/chirp_tapes.py", + "git_blob": "03916e432685d65f34c48fe6b125b64ca3c65db3", + "sha256": "cc257f302317fcfe332725a070fd9f90f20aa6b53bf0a70a9a3e0de20baa792b", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "3c0443b2aa721ce692199ff31abc18e8d917596a", + "source_path": "research/physical-cached-chirp-payload/chirp_tapes.py" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/boundary_codec.py", + "git_blob": "5fdbd993cc4d9087e509fec2d9fb6e34912fa232", + "sha256": "e28149c32d9a53fbbe9b93c67bc0b85f1587747f74fa0452b6ff26618972eace", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "73d5adaba2b7dc662e86eb901e81369a3f73be9f", + "source_path": "research/core-halo-source-bridge/boundary_codec.py" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/halo_tapes.py", + "git_blob": "b3dfa43ba0d08c6393731ac3cd2857a92e4c8aa2", + "sha256": "80b246fafae0adf53af7561e1be59f4374e6294d66bb7a12ef9524b9ef4f2a78", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "73d5adaba2b7dc662e86eb901e81369a3f73be9f", + "source_path": "research/core-halo-source-bridge/retained/halo/sparse-halo-tape-transaction/tapes.py" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/reference-PROOF.md", + "git_blob": "cabc570bb170b8cf17a34ca457b7ffa6adb17c07", + "sha256": "24ce857bfef43e8e104110bde5c3a702a13f6b0f021f3b2bf3e85d6c026e89b3", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "4509310a9a58d4c41c74029f899cbf36be1af9a1", + "source_path": "research/reference-ideal-compression-join/PROOF.md" + }, + { + "path": "research/cached-chirp-cyclic-join/retained/caller-PROOF.md", + "git_blob": "08a808b09c4a888d27f468f236ba6ca1d7881ac4", + "sha256": "0dde51f56eee2c711afa3b5c1e4f783ad0b057b7c206aa931b260c407236dfdd", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "96211247643059ae48af4c7d9dc960034798935d", + "source_path": "research/fine-recovery-catalogue-obstruction/PROOF.md" + } + ] +} diff --git a/research/cached-chirp-cyclic-join/NOTICE.md b/research/cached-chirp-cyclic-join/NOTICE.md new file mode 100644 index 0000000000..9000588ddf --- /dev/null +++ b/research/cached-chirp-cyclic-join/NOTICE.md @@ -0,0 +1,39 @@ +# Attribution and source integrity + +Prepared for **@CubeJerry** with substantial OpenAI assistance in source +audit, mathematical proof, implementation, bounded independent oracles and +packaging. Lead source/proof review is recorded separately. This is not +independent human acceptance or formal proof-kernel verification. + +The repository Apache-2.0 license applies. Original notices in retained +files remain unchanged. `DEPENDENCIES.json` records exact public commits, +paths, Git blobs and SHA256 hashes; `SOURCES.json` records the canonical base. + +- CrocSwap/integer-mult-bounds#6906 supplies the unchanged certified cached + phase source, physical payload consumer, source preparation and their + proofs. Its public head is 3c0443b2aa721ce692199ff31abc18e8d917596a. + This package closes that report's stated convolution/grid interface. +- CrocSwap/integer-mult-bounds#4325 and #5987 supply the cached suffix error + and table-travel results. Those lemmas are inherited, not reclaimed. +- CrocSwap/integer-mult-bounds#3763 supplies the unchanged complete Cyclic + program, chirp identity, numerical contracts and full Fourier invoice. + Its original source credits Chafik Boukhalfa (#479) and Ross Richardson + (#948); those notices and the nested arithmetic authorship remain intact. +- CrocSwap/integer-mult-bounds#3787, #3851 and the authenticated nested ring + and Fourier packages supply the actual arithmetic cohort and binder. + No new scalar multiplier or native Fourier theorem is claimed. +- The public Core/halo source bridge at + 73d5adaba2b7dc662e86eb901e81369a3f73be9f supplies the retained common-grid + codec and external tape model. +- The public Reference/ideal compression join at + 4509310a9a58d4c41c74029f899cbf36be1af9a1 and recovery-catalogue audit at + 96211247643059ae48af4c7d9dc960034798935d supply the exact successor boundary. +- CrocSwap/integer-mult-bounds#5295/#5325 and #4100 already establish other + expansion/analytic error components; no complete theorem from them is + silently admitted. Mason Hale's unchanged interval implementation is + used in source preparation and retains its original authorship. + +The independently written fixture oracle uses exact integers, isqrt and +Fractions. It imports no predecessor numerical checker. Its finite q2 +physical provider and exact metadata specialization remain explicit. +The selected kappa and five inherited assumptions are unchanged. diff --git a/research/cached-chirp-cyclic-join/OVERLAP.md b/research/cached-chirp-cyclic-join/OVERLAP.md new file mode 100644 index 0000000000..5fc351bc17 --- /dev/null +++ b/research/cached-chirp-cyclic-join/OVERLAP.md @@ -0,0 +1,23 @@ +# Bounded overlap audit and precise novelty + +Canonical main: 7c49fe32c55de02c2c873655c804b16e4c3fef0a. This is a bounded +source audit, not a claim of exhaustive archive coverage. + +| Predecessor | Already established | Distinct work here | +| --- | --- | --- | +| #6906, head 3c0443b2aa721ce692199ff31abc18e8d917596a | Certified inward cached phases, real scalar payload passes, travel/error/source bill | Actual same-bank kernel and two endpoints around canonical Cyclic, carrier/common-grid conversion and joined radius/error | +| #3763, canonical physical-chirp-middle | Actual cyclic program, old independently generated chirps, normalization and complete 3 T_F bill | Bind #6906's fresh rounded suffix kernel A at all three occurrences and fund f versus external q | +| #4325/#5987 | Cached suffix mechanism and improved table travel | Reused without claiming new suffix/travel theorem | +| #5295/#5325 | Old expansion and restored-error telescopes | Reused only as context; no generic expansion theorem is reclaimed | +| #3851/#3935 | Different original Gaussian/source08 production plan and chirp path | Current exact cached tables and common-grid compression entrance; old catalogue admission is not waived | +| Public caller audit 96211247643059ae48af4c7d9dc960034798935d | Unchanged old Tensor recovery port is incompatible with the fine-family guards | Explicit one middle term in its missing prefix equation; no full caller replacement | +| Concurrent broad Core work | Another active session's source/implementation responsibility | Excluded; no modification, duplicate publication or claim of their execution | + +The initial expansion-prefix scope would repeat established generic bounds. +The one approved pivot was therefore the exact open question stated in +#6906 README: complete chirp convolution and payload-grid conversion. The +actual canonical `tensor_sources.bind_chirp` already supplies the correct +cohort join; it is reused unchanged, with no new binder claim. The new +runtime glues existing children while the proof binds their actual rounded +kernel, radius and grid semantics. No Fourier identity, cached stability or +complete multiplication exponent is claimed as new. diff --git a/research/cached-chirp-cyclic-join/PR-BODY.md b/research/cached-chirp-cyclic-join/PR-BODY.md new file mode 100644 index 0000000000..5669eb02f5 --- /dev/null +++ b/research/cached-chirp-cyclic-join/PR-BODY.md @@ -0,0 +1,81 @@ +## Problem and exact result + +The public cached phase payload package (#6906) explicitly leaves complete +chirp convolution and payload-grid conversion open. A compression-only +precision ledger does not fund those operations or their actual intermediate +radius. This package connects that exact public consumer to canonical +`Cyclic.run` (#3763), retaining every original padded coordinate and the +same immutable rounded phase bank at all three chirp occurrences. + +For D>=2, t_0=r>=4, t_i in {r/2,r}, odd original slopes, T=product t_i, +M=T/r=2^A and an actual q-grid input of maximum modulus at most one half, +the joined output satisfies + +`||yhat-Q_freq F_t x||_* < (8M+9D+18)2^-f + 2^(1-q)`. + +Here the norm is maximum component-l1 and F_t is normalized. Choosing +`q>=chi+2` and +`f=max(q,16,A+13,chi+1+ceil(log2(8M+9D+18)),ceil(log2(6D)))` +gives strict error below `2^-chi`; `f=O(p0)` for the stated fine family. +The reached output modulus is below .501. The exact q-to-f lift and final +f-to-q projection introduce no normalizer or new Gaussian Gamma. + +## What changes and why it is useful + +- Execute kernel-on-ones, both conjugate payload passes and the actual + complete Cyclic child, consuming each protected return. +- Check input radius with actual exact scalar products; join the different + native signed carrier widths and the public common-grid codec. +- Reuse the unchanged canonical cohort binder, which authenticates and + compares every corrected ring export byte before enabling the APIs. +- Prove the actual-input defect from the shared rounded kernel A, and state + the precise broad-expansion term remaining at the public compression + caller. Keep all three full Fourier calls, complete padded-field scans, + source setup, copying, cleanup and retained backing in the invoice. + +Cached phase stability/travel (#4325/#5987/#6906), the cyclic algorithm and +Fourier identity (#3763), old expansion bounds (#5295/#5325), and the exact +binder are predecessor results. The distinct contribution is this executable +source/grid/convolution interface and its explicit joined precision/radius +budget. `OVERLAP.md` records the bounded audit. + +## Pins and reproduction + +Canonical base: `7c49fe32c55de02c2c873655c804b16e4c3fef0a`. +Cached public source: `3c0443b2aa721ce692199ff31abc18e8d917596a` (#6906). +Public codec: `73d5adaba2b7dc662e86eb901e81369a3f73be9f`. +Public Reference/ideal join: `4509310a9a58d4c41c74029f899cbf36be1af9a1`. +Public caller audit: `96211247643059ae48af4c7d9dc960034798935d`. +Exact file hashes are in SOURCES.json and DEPENDENCIES.json; public unmerged +heads are explicitly retained dependencies. + +```sh +python3 -B scripts/research_package.py --package research/cached-chirp-cyclic-join +python3 -B scripts/check_research_commit.py --package research/cached-chirp-cyclic-join --check-modes +``` + +The registered normal and optimized runs emit +`PASS_CACHED_CHIRP_CYCLIC_JOIN`. The genuine T8 fixture has q10/f16/W19, +radices (4,2), slopes (3,1), 192 cached scalar products and 16 input-radius +squares, in addition to the actual Cyclic arithmetic. A separately written +integer oracle matches all output words; an exact dense Gaussian-rational +sum gives maximum component-l1 error 11/8192 below the 45/16384 bound. +Actual radius and pending-return failures plus conjugation, missing M and +grid controls detect the critical seams. All 75 finite allocation cases +pass; the proof, rather than that finite list, supplies the universal claim. + +## Limits, status and credit + +**No new kappa.** The complete multiplication bound and selected certificate +are unchanged. The finite q2 native provider is not production GL64/O73. +The proof retains the source, scalar and Fourier contracts; it does not +establish their all-size acceptance by replay. Broad Gaussian expansion, +its reached radius/error, fine-family backend admission, opposite transform +and complete CRT/integer recovery remain separate obligations. The old +Tensor catalogue is neither invoked nor waived. Another session's broad +Core work is outside scope. + +Prepared for @CubeJerry with substantial OpenAI assistance in research, +implementation, proof, independent exact oracles and packaging. Predecessor +credit is in NOTICE.md, and retained notices remain intact. Separate +model-assisted lead review is not human or proof-kernel acceptance. diff --git a/research/cached-chirp-cyclic-join/PR-TITLE.txt b/research/cached-chirp-cyclic-join/PR-TITLE.txt new file mode 100644 index 0000000000..78d6ab1b85 --- /dev/null +++ b/research/cached-chirp-cyclic-join/PR-TITLE.txt @@ -0,0 +1 @@ +Join cached chirp payloads to actual cyclic convolution and common grid diff --git a/research/cached-chirp-cyclic-join/PROOF.md b/research/cached-chirp-cyclic-join/PROOF.md new file mode 100644 index 0000000000..2f434e4b55 --- /dev/null +++ b/research/cached-chirp-cyclic-join/PROOF.md @@ -0,0 +1,285 @@ +# Cached source chirps through actual cyclic convolution and grid conversion + +Prepared for @CubeJerry with substantial OpenAI assistance. Apache-2.0. +This closes one concrete prefix interface, not the complete Gaussian prefix +or a multiplication theorem. No new kappa or selected-result change. + +## 1. Exact source boundary and overlap + +Canonical source pin: `7c49fe32c55de02c2c873655c804b16e4c3fef0a`. +The unchanged cached consumer, producer and serializer are from +CrocSwap/integer-mult-bounds#6906, public head +`3c0443b2aa721ce692199ff31abc18e8d917596a`. That package implements certified +chirp/conjugate payload passes and explicitly leaves full chirp convolution +and payload-grid conversion open. We supply those connections here. + +The actual `Cyclic` child is canonical +`research/physical-chirp-middle/cyclic_engine.py` (#3763). Its unchanged +twist/ring/narrow/untwist sequence already implements normalized cyclic +convolution. The original #3763 chirp consumer uses a different numerical +kernel producer; we do not claim its Fourier identity or cyclic algorithm +anew. #4325/#5987 and #6906 already prove cached phase error and movement. +#5295/#5325 already supply the old expansion/error telescopes; they do not +implement this cached convolution/grid seam or replace the old Tensor +catalogue. The broad fine-family Core is outside this package and remains +separate concurrent work. + +The canonical `tensor_sources.bind_chirp` function is used unchanged to bind +the two runtime families. The Gaussian/FFT-word loader and the chirp loader +authenticate the same corrected ring export (SHA256 +`c03d4b056ccd3db860c93579f6525e0bb1baea31cff879eb07135c99432ef159`). +The binder compares every ring-package byte before supplying the existing +state token. No numerical routine, scalar owner or validation is replaced. +Actual `Tape` and `Count` identities are checked before importing the join. +The old Tensor catalogue and its inadmissible fine-theta production guards +are not invoked or waived. + +## 2. Field, source and grid contracts + +Let D>=2, r=2^ell>=4, t_0=r and t_i in {r/2,r}; put +T=product t_i, M=T/r=2^A. Each original slope s_i is odd with 0q and zero when f=q. +All conversions scan the complete T-record field and are paid below. + +## 3. The same rounded kernel at all three occurrences + +Let A(x) be the *fresh rounded suffix expression* defined by #6906's actual +cache at x. It is not the exact irrational a(x). The predecessor proves + + |A(x)|<=1, + |A(x)-a(x)| <= (3D-1)sqrt(2)h =: e_a. (1) + +The same unchanged source bank and f/W fields are used for three cached +calls. First run the forward cached pass on a literally produced all-ones +field. Multiplication of the dyadic A(x) by exact one, followed by f-grid +truncation, is exact, so its returned kernel is A(x), with no fourth error +term. The second call applies the conjugate pass to the exactly lifted x. +The third applies it to the actual Cyclic return. The cache recurrence +depends only on original coordinates and tables, never on payload values; +fresh initialization and completed cleanup therefore give the identical +A(x) at every occurrence. In particular conjugating before the first +endpoint, using A as convolution kernel, and conjugating the last endpoint +are all necessary sign conventions. + +The actual computation at the f grid is thus + + x0 = trunc_f(conj(A)*x), + z = actual_Cyclic(A,x0), + yf = trunc_f(conj(A)*z), + yq = component_trunc_q(yf). (2) + +Kernel and endpoint calls execute real CachedChirp owners. The join copies +and consumes every protected child return before reuse. The Cyclic child +executes two twists, its actual ring convolution, exact signed-width +narrowing and one untwist. Its ring consumer already performs its exact +M restoration; the join performs no additional M, r, T or gamma scale. + +## 4. Actual-input defect and radius + +Retain #3763's exact cyclic and primitive/coefficient contracts. For +f>=16 and f-A>=13, on disk inputs whose smaller norm is <=.7, its actual +returned normalized cyclic convolution C obeys + + ||actual_Cyclic(v,w)-C(v,w)||_abs + < (4sqrt(2)M+12)h, + ||actual_Cyclic(v,w)||_abs + <= min(||v||_abs,||w||_abs)+4sqrt(2)Mh. (3) + +The strict numerical radius consequence is sufficient here; (3) is the +retained written theorem, not a new proof of the Fourier backend. By +inwardness, ||x0||_abs<=1/2. With ||A||_abs<=1, (3) is admitted at the actual +computed x0. Since `32*1000^2<2^26`, f-A>=13 gives 4sqrt(2)Mh<.001. +Every returned z and final yf,yq consequently has norm <.501. Cached +endpoint truncation and the final external projection cannot increase +complex modulus. Thus all cache payload calls are within their radius-one +source contract. Both narrower f+2 carriers hold all converted components; +no discarded high bit is justified by approximate cancellation. + +For a fixed supplied dyadic A define the exact map +F_A x=conj(A)*C(A,conj(A)*x). Bilinear contraction of C and |A|<=1 imply +that the two endpoint rounding errors in (2) contribute <2sqrt(2)h in +modulus. Adding (3), + + ||yf-F_A x||_abs < (4sqrt(2)M+12+2sqrt(2))h. (4) + +Now replace the three A occurrences with a by a three-term telescoping +identity at exact operands. Each term is bounded by (1)*||x||_abs, so +`||F_A x-F_a x||_abs<=3e_a/2`. This uses exact bilinear maps only; no +linearity or nonexpansiveness of the rounded program is assumed. +The retained chirp identity gives F_a=Q_freq F_t, the normalized Fourier +map with `(Q_freq v)_x=v_(-s_i x_i mod t_i)`. + +Convert the *one final global* modulus estimate to component-l1 using +||.||_*<=sqrt(2)||.||_abs. There is no sqrt(2)^D factor. Since +12sqrt(2)<17, (1),(4) and the final q projection prove + + ||yq-Q_freq F_t x||_* + < (8M+9D+18)2^-f + 2^(1-q). (5) + +This is a bound at the actual supplied x. Its prior expansion error is +not assumed zero and is handled separately in Section 6. The returned +component-l1 radius is <.501sqrt(2)<1, suitable for a radius-one compression +entrance subject to that compression's separate dense/source admissions. + +## 5. Explicit sufficient precision, with no new normalization + +For an integer target chi>=0, set C=8M+9D+18 and choose + + q>=chi+2, + f=max(q,16,A+13,chi+1+ceil(log2 C),ceil(log2(6D))), + W=f+3. (6) + +The final term permits the unchanged cached preparer's radius-one, +target-zero allocation to keep precisely this f. Then the first term of +(5) is <=2^(-chi-1), and the second is <=2^(-chi-1), with strict total +error <2^-chi from the actual rounding bounds. The W value is exactly the +unchanged producer's chosen width: A>=ell-1 and A>=D-1, so f>=A+13 +also covers its ell+2 and ceil(log2(D+1))+2 metadata-width clauses. All counts and shifts are constructed +before online payload processing and remain encoded thereafter. + +For the fine family, A=O(p0), D=poly(p0), q,chi=O(p0), and ell=o(p0). +Thus f,W=O(p0); indeed f=O(q+A+log(D+1)+1). This explicitly funds the cyclic +M-amplification rather than assuming that a compression-only q rule already +covers it. It is an added sufficient internal grid, not a claim that every +previously prepared phase bank or frozen prefix already used these bits. +Grid lifting preserves represented values. No normalizer is introduced and +the actual existing total Gaussian gamma is unchanged. + +## 6. Precisely reduced prefix obligation + +Let e be the exact normalized broad expansion field and ehat its computed +q-grid field in the same original padded coordinates. Assume the actual +ehat passes the radius guard above, and ||ehat-e||_*<=epsilon_exp. The exact +normalized Fourier map contracts maximum complex modulus, hence + + ||Q_freq F_t(ehat-e)||_* <= sqrt(2) epsilon_exp. + +The new actual middle output yhat therefore satisfies + + ||yhat-Q_freq F_t e||_* + < sqrt(2)epsilon_exp + delta_mid, + delta_mid=(8M+9D+18)2^-f+2^(1-q). (7) + +Use the public Reference/ideal join's exact normalized compression C_N, +its actual existing total restoration exponent Gamma, and its separately +proved restored compression error <=2^-tau on yhat. Its caller contribution +is now explicitly + + ||completed_output-2^Gamma C_N Q_freq F_t e||_* + < 2^-tau + 2^Gamma ||C_N||_* + (sqrt(2)epsilon_exp+delta_mid) + e_extra. (8) + +For example, if the actual normalized C_N contracts this norm and the +middle's assigned restored allowance is 2^-tau_mid, choosing +chi>=Gamma+tau_mid and (6) funds its term. A separate allowance must fund +the expansion term and every extra interface error e_extra. No rounded-map +contraction or automatic equality of old/new gammas is imported. No +complete RF_s, opposite source transform, CRT or integer recovery is +claimed: (8) leaves precisely the source-bound broad expansion, its reached +radius/error and all remaining backend/production assumptions open. + +## 7. Full source, movement and arithmetic invoice + +All fields have full volume T. In addition to three unchanged cached calls +and one unchanged Cyclic call, the join pays: + +- exact q-to-f entrance and f-to-q return in the public codec; +- 2T exact real products for the physical input-radius checks; +- one T-record all-ones bank, three exact W<->f+2 field conversions; +- owned kernel/endpoint/current fields, the final external output copy, + every child return consumption, all rewinds and cleanup. + +These add O(TW+T M_word(W)) online work, including conversions whose grids +agree but signed carrier widths differ. Use the unchanged complete scalar +invoice M_word(W)=O(W log^2(W+2)) only under its inherited all-size contract. +The cached update count per call is U=sum_k(T/product_{i=2, t_0=r>=4, other t_i in +{r/2,r}, T=product t_i and M=T/r=2^A, the returned common-grid field obeys + + ||yhat - Q_freq F_t x||_* < (8M+9D+18) 2^-f + 2^(1-q), + +where ||.||_* is maximum coordinate component-l1, and F_t is normalized. +For target chi, choose q>=chi+2 and + + f=max(q,16,A+13,chi+1+ceil(log2(8M+9D+18)),ceil(log2(6D))). + +The error is then strictly below 2^-chi. This is f=O(p0) for the stated +fine-family parameters. The actual output modulus is below .501, so its +component-l1 radius is below one. The common codec introduces no normalizer; +the existing total Gaussian Gamma is unchanged. See PROOF (7)-(8) for the +explicit remaining broad-expansion term in the completed caller. + +## What executes + +`joined_middle.py` runs three unchanged CachedChirp owners on one certified +phase bank: kernel-on-ones, conjugate input endpoint and conjugate output +endpoint. Between endpoints it runs the actual complete Cyclic child, +including its three Fourier calls and exact M restoration. Exact signed +carrier conversion joins the two native widths; the public Core/halo codec +lifts q to f and returns once to q. The unchanged canonical cohort binder +compares all corrected ring export bytes before enabling both child APIs. + +The full invoice keeps 3 T_F, every cyclic scalar and source cost, three +cached passes, 2T radius squares, complete T-record conversion/copy/cleanup, +all table preparation and all retained high-water backing. It does not price +convolution as a free primitive or transfer the historical Fourier frontier +to an unadmitted fine-family production call. + +## Reproduce + +From the repository root, using only the standard library: + +```sh +python3 -B scripts/research_package.py --package research/cached-chirp-cyclic-join +``` + +The two registered commands run normally and with assertions disabled, each +with a 120-second limit. Expected marker: `PASS_CACHED_CHIRP_CYCLIC_JOIN`. +For one direct bounded replay: + +```sh +python3 -B research/cached-chirp-cyclic-join/verify.py +``` + +The actual T8 fixture has radices (4,2), slopes (3,1), q10/f16/W19 and chi7. +Its output agrees exactly with a separately written staged integer oracle. +Against the independent exact dense Gaussian-rational Fourier sum, maximum +component-l1 error is 11/8192, below the proved 45/16384 envelope and 2^-7. +It performs 192 cached scalar products and 16 input-radius squares, in +addition to the Cyclic arithmetic. It rejects an actual over-radius input +before any new cached call and protects a pending return. Conjugation, +missing M restoration and dropped-grid controls distinguish the seams. + +The fixture uses the retained q2 finite provider and canonical exact small +metadata specialization. It does **not** execute production GL64/O73, +replace numerical children, or prove backend admission by dense comparison. +The finite receipt and attempt history are in `evidence/REPLAY.json` and +`CHECKPOINT.md`. The universal result is the explicit proof under its named +source, scalar and Fourier contracts; model-assisted review is not human +or proof-kernel acceptance. + +## Dependencies + +Canonical main is pinned at 7c49fe32c55de02c2c873655c804b16e4c3fef0a. +`SOURCES.json` authenticates all 18 live canonical inputs. `DEPENDENCIES.json` +authenticates retained public #6906 files, the public codec, the exact +Reference/ideal join and the caller obstruction. These public but unmerged +contributions are dependencies, not silently assumed canonical acceptance. +No source is downloaded by the checker. + +## Open next questions + +This closes only the cached convolution/grid middle. Actual broad expansion, +its reached radius/error, fine-family Fourier backend admission, the opposite +transform and complete CRT/integer recovery remain open. The old Tensor +catalogue guards are neither invoked nor waived. The selected certificate, +complete multiplication bound and five foundational assumptions are unchanged. + +Prepared for @CubeJerry with substantial OpenAI assistance. Predecessor credit +and exact scope distinctions are in `NOTICE.md` and `OVERLAP.md`; the full +proposed PR description is in `PR-BODY.md`. diff --git a/research/cached-chirp-cyclic-join/SOURCES.json b/research/cached-chirp-cyclic-join/SOURCES.json new file mode 100644 index 0000000000..3a7ea71d69 --- /dev/null +++ b/research/cached-chirp-cyclic-join/SOURCES.json @@ -0,0 +1,114 @@ +{ + "schema_version": 1, + "base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "files": [ + { + "path": "research/physical-chirp-middle/PROOF.md", + "git_blob": "56b12bd4f0727f333b368ac59839fd4e423b9b9a", + "sha256": "92cccf922e0e79fcffc5b6883812c6c5f162565c926f9d807791f6b850ac0951", + "usage": "input" + }, + { + "path": "research/physical-chirp-middle/chirp_plan.py", + "git_blob": "66ac8c226306b01e82a916b471a6808aa9e90a48", + "sha256": "b4452d1232710af8da10b215bf183f9671385462cf0d59a3c65449041d92b1d8", + "usage": "input" + }, + { + "path": "research/physical-chirp-middle/cyclic_engine.py", + "git_blob": "4670745b77c117128821160b41863ad9a160b215", + "sha256": "38c37e1176160607f2e0e6912242e65de2a59afbc1ba909acabf099c59fb34c1", + "usage": "input" + }, + { + "path": "research/physical-chirp-middle/chirp_sources.py", + "git_blob": "8c0c7690c3eeab0e4aca9346f942fefa7db1d5b7", + "sha256": "3d55262795e2a5511521bb3657336bf4498a7c3afe03dcd5ae0f71c465b57abb", + "usage": "input" + }, + { + "path": "research/physical-chirp-middle/chirp_packets.py", + "git_blob": "5af57cd3812cbf718d37b15b252cebea1fe430f9", + "sha256": "ee1d41fac17066c95519fd30e79e3b5dfaf763c7871ff46fd8b2ab45e2c6c245", + "usage": "input" + }, + { + "path": "research/physical-chirp-middle/phase_streams.py", + "git_blob": "ed9b231ca3e4b36fdd1debcc5bf5ef0ff7ab2810", + "sha256": "8b763797abcf356ddef8fa53e43499ad2ae7a9b145740f55de9303dc9a7b2168", + "usage": "input" + }, + { + "path": "research/physical-chirp-middle/chirp_fixture.py", + "git_blob": "b02f20bbf7aa650e39be8a5e28ce904e95170693", + "sha256": "7e62172c47c907b498d4dc968d72ba560884b71a2662e0396b31d405714c50ad", + "usage": "input" + }, + { + "path": "research/physical-gaussian-tensor/tensor_sources.py", + "git_blob": "00edf5a03fad4ed69891dd0ca4a6909bd68ef4cf", + "sha256": "cba69b2bc93b7dabbffdbdf07fb41130fde5d65a8f4d344ade52d3a326e30ac0", + "usage": "input" + }, + { + "path": "research/pr4100-chirp-odometer-tariff/README.md", + "git_blob": "c0f8b2a006965074c38484964d05f0a9cc1f3008", + "sha256": "6ed0793017d3c84003b0c7921c7b9598b868c48f05e46b8c0a88c52cfb843ff5", + "usage": "input" + }, + { + "path": "research/tensor-expansion-accuracy/PROOF.md", + "git_blob": "b439b91269154a8e31c0bc2f6ad410d1d4195d16", + "sha256": "659fe79662c5cfab5fd22cc937e88b849c1491bf4a66e79ee1a7558aeb090e0d", + "usage": "input" + }, + { + "path": "research/physical-gaussian-core/gaussian_sources.py", + "git_blob": "ce521f91997775e189f984ba7dd68a15bf9ecd9b", + "sha256": "c5889a97a11a9c6c6c44deb8a2042498ddc3f55703de15269132b8f198e24b15", + "usage": "input" + }, + { + "path": "research/physical-gaussian-core/inputs/word-export.tar", + "git_blob": "885794cf3328941209034ee2d946ed76dbea8ce3", + "sha256": "d428e8b6aef4d348fa2e922ca64c4cfd634bbb2f0c150033273e65fcf4600b49", + "usage": "input" + }, + { + "path": "research/physical-gaussian-core/inputs/branchfree-source.tar", + "git_blob": "48dc77f5145d649bfed6745e38ab18b11772d597", + "sha256": "e6cdacd59a067189a99bfe03f4448913bb8d518ed4a9b1d981a68c5c666529c7", + "usage": "input" + }, + { + "path": "research/certified-gaussian-recovery/intervals.py", + "git_blob": "91d458865aa026bdf0d59653a4ecbfe3a178ecbc", + "sha256": "159d2a7d32a8cc7c8f56632a8ef127308b984a0a6753c9d6bdccacc6e7d6d4df", + "usage": "input" + }, + { + "path": "research/unconditional-batched-crt/PROOF.md", + "git_blob": "406eb561cc8d6041ea3fba1a849653b654f2198c", + "sha256": "689fc7b01c5f04f77019ff02d1b79cb4f7020bd98e05b1052020bad295dec060", + "usage": "input" + }, + { + "path": "research/unconditional-batched-crt/GAUSSIAN.md", + "git_blob": "adfb28c93e6b06178c901caaac39ede41a9e541b", + "sha256": "2f63c91c58f2d1cf31294812c75970ea390c61866a8da7ed700d4316a033a242", + "usage": "input" + }, + { + "path": "docs/research/agent-task-catalog.json", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81", + "usage": "input" + }, + { + "path": "research/physical-chirp-middle/inputs/ring-export.tar", + "git_blob": "004c660f786cee08b07fd74af80c9c91146b89f4", + "sha256": "c03d4b056ccd3db860c93579f6525e0bb1baea31cff879eb07135c99432ef159", + "usage": "input" + } + ] +} diff --git a/research/cached-chirp-cyclic-join/TASK.json b/research/cached-chirp-cyclic-join/TASK.json new file mode 100644 index 0000000000..adcb68975b --- /dev/null +++ b/research/cached-chirp-cyclic-join/TASK.json @@ -0,0 +1,101 @@ +{ + "actual_scope": "Compose the exact public CachedChirp producer and consumer with canonical odd-slope Cyclic.run, exact carrier conversion and the public common-grid codec; bound the actual supplied input defect and full padded-volume costs.", + "ai_assistance": "Substantial OpenAI assistance in source audit, proof, exact independent rational oracles, code and packaging. Independent lead review, if included, is separately recorded; no human or proof-kernel acceptance.", + "author": "Prepared for @CubeJerry", + "base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "bottleneck_link": "The fine-family compression ledger needs a source-bound prefix. Public cached phases left actual convolution and payload-grid conversion open; this package closes that middle interface while retaining broad expansion and Fourier backend premises.", + "budget_minutes": 70, + "evidence": "Universal actual-input phase/convolution/grid proof; complete source authentication; genuine eight-coordinate native composite against independent staged integer and exact dense Gaussian-rational oracles; actual radius and pending-return failures; phase, scale and grid discriminators.", + "finite_domain": "One genuine T8 fixture, radices (4,2), slopes (3,1), q10/f16/W19, chi7; 75 allocation cases D2..16 and chi in {0,1,7,31,63}. No random search or production GL64/O73 execution.", + "independent_previous_package": false, + "no_new_kappa": true, + "open_questions": [ + { + "question": "Can the actual broad fine-family expansion enter this middle with maximum complex modulus at most one half and a paid component-l1 error bound?", + "blocked_by": "The cached/Cyclic join supplies neither broad expansion nor old-catalogue replacement.", + "first_step": "Pin the actual expansion program and source ABI, fund its reached radius, precision and full padded-volume bill, then use PROOF (7)-(8).", + "why_it_matters": "A compression and middle join alone do not establish a complete transform." + }, + { + "question": "Can the full Fourier backend and opposite transform satisfy all inherited production and recovery contracts for the fine-family source?", + "blocked_by": "The finite q2 native fixture is not production GL64/O73 or whole-family admission.", + "first_step": "Bind exact source maps, the existing total Gamma, every source S factor and the final strict integer recovery tolerance.", + "why_it_matters": "The selected conditional theorem and all-size recovery remain unchanged." + } + ], + "original_card": { + "acceptance_gate": "Identify the proposition and what would change downstream; do not equate a finite replay with a universal proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "existing_checks": [ + { + "evidence": "research/unconditional-batched-crt/README.md", + "remaining": "Independent proof audit of one caller-bound all-size implication; all other premises remain explicit.", + "scope": "PR #4100: proposed unconditional construction and finite checks, without independent acceptance.", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "337d04939571a637aeab54a0f58f54fde811663a", + "status": "author-checked" + }, + { + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "status": "reviewed" + } + ], + "first_experiment": "Choose one assumption ID (native_all_columns, owned_erasure, compiler, precision_tape, analytic_recovery), one quantified implication and exact dependency closure. Check current handoffs, including #5625 row reentry and #5707 root-prefix lowering, without treating their partial scope as the whole theorem. Prove or falsify that implication with a caller-bound argument; stop at the chosen obligation. Finite tests or root digits do not discharge an all-size statement.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "id": "uniform-transfer-audit", + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "overlap_terms": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "question": "Can one of the selected record's five inherited assumptions be proved at its actual caller?", + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ] + }, + "outcome": "completed", + "previous_public_commit": "96211247643059ae48af4c7d9dc960034798935d", + "priority_revision": 8, + "schema_version": 1, + "scope_change_reason": "The first bounded audit found generic old expansion error already covered by #5295/#5325. The single approved pivot targets #6906 explicit remaining convolution/grid interface, reusing canonical #3763 Cyclic and the exact unchanged cohort binder.", + "scope_status": "refined", + "seed": 55, + "source_projection_scope": "No online numerical projection. The genuine bounded fixture uses canonical chirp_fixture.compiled_setup exact metadata constants and the retained q2 finite Fourier provider; physical/numerical consumers remain unchanged.", + "stop_rule": "Freeze the source-specific cached/Cyclic/common-grid seam and complete bill after bounded replay and lead review. Do not implement broad Core, waive old Tensor admission, infer a production replay or claim a full transform.", + "task_id": "uniform-transfer-audit", + "tracks": [ + "50-59 recursive interface", + "75-84 independent verification/formalization" + ], + "wave": 8, + "worker": "analytic_join" +} diff --git a/research/cached-chirp-cyclic-join/VERIFY.json b/research/cached-chirp-cyclic-join/VERIFY.json new file mode 100644 index 0000000000..6776e61b28 --- /dev/null +++ b/research/cached-chirp-cyclic-join/VERIFY.json @@ -0,0 +1,47 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/physical-chirp-middle/PROOF.md", + "research/physical-chirp-middle/chirp_plan.py", + "research/physical-chirp-middle/cyclic_engine.py", + "research/physical-chirp-middle/chirp_sources.py", + "research/physical-chirp-middle/chirp_packets.py", + "research/physical-chirp-middle/phase_streams.py", + "research/physical-chirp-middle/chirp_fixture.py", + "research/physical-gaussian-tensor/tensor_sources.py", + "research/pr4100-chirp-odometer-tariff/README.md", + "research/tensor-expansion-accuracy/PROOF.md", + "research/physical-gaussian-core/gaussian_sources.py", + "research/physical-gaussian-core/inputs/word-export.tar", + "research/physical-gaussian-core/inputs/branchfree-source.tar", + "research/certified-gaussian-recovery/intervals.py", + "research/unconditional-batched-crt/PROOF.md", + "research/unconditional-batched-crt/GAUSSIAN.md", + "docs/research/agent-task-catalog.json", + "research/physical-chirp-middle/inputs/ring-export.tar" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "checks": "Authenticate complete canonical/public sources; genuine T8 cached/Cyclic/grid transaction versus independent integer and dense rational oracles; paid-radius rejection, protected return, borrowed origins, source invariance, conjugation/scale/grid controls and 75 exact allocation cases. Finite q2 native provider only.", + "timeout_seconds": 120 + }, + { + "argv": [ + "{python}", + "-O", + "-B", + "{package}/verify.py" + ], + "checks": "Authenticate complete canonical/public sources; genuine T8 cached/Cyclic/grid transaction versus independent integer and dense rational oracles; paid-radius rejection, protected return, borrowed origins, source invariance, conjugation/scale/grid controls and 75 exact allocation cases. Finite q2 native provider only.", + "timeout_seconds": 120 + } + ] +} diff --git a/research/cached-chirp-cyclic-join/evidence/REPLAY.json b/research/cached-chirp-cyclic-join/evidence/REPLAY.json new file mode 100644 index 0000000000..8c6299ca5b --- /dev/null +++ b/research/cached-chirp-cyclic-join/evidence/REPLAY.json @@ -0,0 +1,309 @@ +{ + "schema_version": 1, + "runs": [ + { + "command": [ + "python", + "-B", + "research/cached-chirp-cyclic-join/verify.py" + ], + "elapsed_seconds": 62.094, + "returncode": 0, + "stderr": "", + "marker": "PASS_CACHED_CHIRP_CYCLIC_JOIN", + "receipt": { + "A": 1, + "D": 2, + "T": 8, + "W": 19, + "allocation_cases": 75, + "cached_calls": 3, + "cached_scalar_products": 192, + "canonical_inputs": 18, + "chi": 7, + "claim": "source-bound cached chirp / cyclic / grid join; no new kappa", + "compiled_metadata_setup": { + "17^(.997)": 3, + "18^(.997)": 3, + "1^(.002)": 6 + }, + "complete_multiplier_claim": false, + "controls": [ + "pending_return", + "actual_radius_before_phase", + "shared_borrowed_origin", + "same_grid_signed_width", + "first_conjugate", + "last_conjugate", + "exact_M_scale", + "final_external_grid_drop" + ], + "convolution_calls": { + "forward": 2, + "opposite": 1, + "product": 1, + "scale": 1 + }, + "cyclic_calls": { + "convolutions": 1, + "narrowings": 1, + "tables": 1, + "twists": 2, + "untwists": 1 + }, + "f": 16, + "fixture_setup": "Canonical compiled_setup proves exact three small floor-power constants; numerical/physical children unchanged.", + "full_fine_family_execution": false, + "input_radius_scalar_products_before_rejection": 16, + "maximum_component_l1_error": "11/8192", + "native_boundary": "Retained exact q2 finite provider; production GL64/O73 not executed.", + "output": [ + [ + 63, + -37 + ], + [ + 58, + -12 + ], + [ + 14, + -31 + ], + [ + 19, + -39 + ], + [ + 32, + 93 + ], + [ + -20, + 124 + ], + [ + 139, + -50 + ], + [ + 92, + -47 + ] + ], + "output_sha256": "2e1c1b26ba13815c4baa8dcf46169b27152fe2f035475a4ee99c1bf96a32a548", + "public_dependencies": 11, + "q": 10, + "universal_bound": "45/16384" + } + }, + { + "command": [ + "python", + "-O", + "-B", + "research/cached-chirp-cyclic-join/verify.py" + ], + "elapsed_seconds": 63.201, + "returncode": 0, + "stderr": "", + "marker": "PASS_CACHED_CHIRP_CYCLIC_JOIN", + "receipt": { + "A": 1, + "D": 2, + "T": 8, + "W": 19, + "allocation_cases": 75, + "cached_calls": 3, + "cached_scalar_products": 192, + "canonical_inputs": 18, + "chi": 7, + "claim": "source-bound cached chirp / cyclic / grid join; no new kappa", + "compiled_metadata_setup": { + "17^(.997)": 3, + "18^(.997)": 3, + "1^(.002)": 6 + }, + "complete_multiplier_claim": false, + "controls": [ + "pending_return", + "actual_radius_before_phase", + "shared_borrowed_origin", + "same_grid_signed_width", + "first_conjugate", + "last_conjugate", + "exact_M_scale", + "final_external_grid_drop" + ], + "convolution_calls": { + "forward": 2, + "opposite": 1, + "product": 1, + "scale": 1 + }, + "cyclic_calls": { + "convolutions": 1, + "narrowings": 1, + "tables": 1, + "twists": 2, + "untwists": 1 + }, + "f": 16, + "fixture_setup": "Canonical compiled_setup proves exact three small floor-power constants; numerical/physical children unchanged.", + "full_fine_family_execution": false, + "input_radius_scalar_products_before_rejection": 16, + "maximum_component_l1_error": "11/8192", + "native_boundary": "Retained exact q2 finite provider; production GL64/O73 not executed.", + "output": [ + [ + 63, + -37 + ], + [ + 58, + -12 + ], + [ + 14, + -31 + ], + [ + 19, + -39 + ], + [ + 32, + 93 + ], + [ + -20, + 124 + ], + [ + 139, + -50 + ], + [ + 92, + -47 + ] + ], + "output_sha256": "2e1c1b26ba13815c4baa8dcf46169b27152fe2f035475a4ee99c1bf96a32a548", + "public_dependencies": 11, + "q": 10, + "universal_bound": "45/16384" + } + } + ], + "scope": "Actual finite q2 provider, no production GL64/O73 or full fine-family execution. All-size source proof is separate.", + "attempt_history": [ + { + "stage": "initial source opening probe", + "outcome": "native cold-module guard rejected local helper name source.py; rename to join_sources.py restored the exact existing guard. No inherited bytes or checks changed." + }, + { + "stage": "first bounded physical attempt", + "outcome": "PASS within120-second bound; same exact output hash; normal/optimized recorded repeats below." + } + ], + "final_registered": { + "command": [ + "python", + "-B", + "scripts/research_package.py", + "--package", + "research/cached-chirp-cyclic-join" + ], + "elapsed_seconds": 133.551, + "returncode": 0, + "marker": "PASS_REGISTERED_RESEARCH_PACKAGE", + "per_command_timeout_seconds": 120, + "normal_and_optimized_receipts_equal": true, + "receipt": { + "A": 1, + "D": 2, + "T": 8, + "W": 19, + "allocation_cases": 75, + "cached_calls": 3, + "cached_scalar_products": 192, + "canonical_inputs": 18, + "chi": 7, + "claim": "source-bound cached chirp / cyclic / grid join; no new kappa", + "compiled_metadata_setup": { + "17^(.997)": 3, + "18^(.997)": 3, + "1^(.002)": 6 + }, + "complete_multiplier_claim": false, + "controls": [ + "pending_return", + "actual_radius_before_phase", + "shared_borrowed_origin", + "same_grid_signed_width", + "first_conjugate", + "last_conjugate", + "exact_M_scale", + "final_external_grid_drop" + ], + "convolution_calls": { + "forward": 2, + "opposite": 1, + "product": 1, + "scale": 1 + }, + "cyclic_calls": { + "convolutions": 1, + "narrowings": 1, + "tables": 1, + "twists": 2, + "untwists": 1 + }, + "f": 16, + "fixture_setup": "Canonical compiled_setup proves exact three small floor-power constants; numerical/physical children unchanged.", + "full_fine_family_execution": false, + "input_radius_scalar_products_before_rejection": 16, + "maximum_component_l1_error": "11/8192", + "native_boundary": "Retained exact q2 finite provider; production GL64/O73 not executed.", + "output": [ + [ + 63, + -37 + ], + [ + 58, + -12 + ], + [ + 14, + -31 + ], + [ + 19, + -39 + ], + [ + 32, + 93 + ], + [ + -20, + 124 + ], + [ + 139, + -50 + ], + [ + 92, + -47 + ] + ], + "output_sha256": "2e1c1b26ba13815c4baa8dcf46169b27152fe2f035475a4ee99c1bf96a32a548", + "public_dependencies": 11, + "q": 10, + "universal_bound": "45/16384" + }, + "final_grid_control": "Uses actual final f-grid oracle words with projection disabled; values differ and overflow the q carrier." + } +} diff --git a/research/cached-chirp-cyclic-join/evidence/normal.json b/research/cached-chirp-cyclic-join/evidence/normal.json new file mode 100644 index 0000000000..d46de8dcf9 --- /dev/null +++ b/research/cached-chirp-cyclic-join/evidence/normal.json @@ -0,0 +1,11 @@ +{ + "command": [ + "python", + "-B", + "research/cached-chirp-cyclic-join/verify.py" + ], + "elapsed_seconds": 62.094, + "returncode": 0, + "stdout": "PASS_CACHED_CHIRP_CYCLIC_JOIN\n{\n \"A\": 1,\n \"D\": 2,\n \"T\": 8,\n \"W\": 19,\n \"allocation_cases\": 75,\n \"cached_calls\": 3,\n \"cached_scalar_products\": 192,\n \"canonical_inputs\": 18,\n \"chi\": 7,\n \"claim\": \"source-bound cached chirp / cyclic / grid join; no new kappa\",\n \"compiled_metadata_setup\": {\n \"17^(.997)\": 3,\n \"18^(.997)\": 3,\n \"1^(.002)\": 6\n },\n \"complete_multiplier_claim\": false,\n \"controls\": [\n \"pending_return\",\n \"actual_radius_before_phase\",\n \"shared_borrowed_origin\",\n \"same_grid_signed_width\",\n \"first_conjugate\",\n \"last_conjugate\",\n \"exact_M_scale\",\n \"final_external_grid_drop\"\n ],\n \"convolution_calls\": {\n \"forward\": 2,\n \"opposite\": 1,\n \"product\": 1,\n \"scale\": 1\n },\n \"cyclic_calls\": {\n \"convolutions\": 1,\n \"narrowings\": 1,\n \"tables\": 1,\n \"twists\": 2,\n \"untwists\": 1\n },\n \"f\": 16,\n \"fixture_setup\": \"Canonical compiled_setup proves exact three small floor-power constants; numerical/physical children unchanged.\",\n \"full_fine_family_execution\": false,\n \"input_radius_scalar_products_before_rejection\": 16,\n \"maximum_component_l1_error\": \"11/8192\",\n \"native_boundary\": \"Retained exact q2 finite provider; production GL64/O73 not executed.\",\n \"output\": [\n [\n 63,\n -37\n ],\n [\n 58,\n -12\n ],\n [\n 14,\n -31\n ],\n [\n 19,\n -39\n ],\n [\n 32,\n 93\n ],\n [\n -20,\n 124\n ],\n [\n 139,\n -50\n ],\n [\n 92,\n -47\n ]\n ],\n \"output_sha256\": \"2e1c1b26ba13815c4baa8dcf46169b27152fe2f035475a4ee99c1bf96a32a548\",\n \"public_dependencies\": 11,\n \"q\": 10,\n \"universal_bound\": \"45/16384\"\n}\n", + "stderr": "" +} diff --git a/research/cached-chirp-cyclic-join/evidence/optimized.json b/research/cached-chirp-cyclic-join/evidence/optimized.json new file mode 100644 index 0000000000..488da7b264 --- /dev/null +++ b/research/cached-chirp-cyclic-join/evidence/optimized.json @@ -0,0 +1,12 @@ +{ + "command": [ + "python", + "-O", + "-B", + "research/cached-chirp-cyclic-join/verify.py" + ], + "elapsed_seconds": 63.201, + "returncode": 0, + "stdout": "PASS_CACHED_CHIRP_CYCLIC_JOIN\n{\n \"A\": 1,\n \"D\": 2,\n \"T\": 8,\n \"W\": 19,\n \"allocation_cases\": 75,\n \"cached_calls\": 3,\n \"cached_scalar_products\": 192,\n \"canonical_inputs\": 18,\n \"chi\": 7,\n \"claim\": \"source-bound cached chirp / cyclic / grid join; no new kappa\",\n \"compiled_metadata_setup\": {\n \"17^(.997)\": 3,\n \"18^(.997)\": 3,\n \"1^(.002)\": 6\n },\n \"complete_multiplier_claim\": false,\n \"controls\": [\n \"pending_return\",\n \"actual_radius_before_phase\",\n \"shared_borrowed_origin\",\n \"same_grid_signed_width\",\n \"first_conjugate\",\n \"last_conjugate\",\n \"exact_M_scale\",\n \"final_external_grid_drop\"\n ],\n \"convolution_calls\": {\n \"forward\": 2,\n \"opposite\": 1,\n \"product\": 1,\n \"scale\": 1\n },\n \"cyclic_calls\": {\n \"convolutions\": 1,\n \"narrowings\": 1,\n \"tables\": 1,\n \"twists\": 2,\n \"untwists\": 1\n },\n \"f\": 16,\n \"fixture_setup\": \"Canonical compiled_setup proves exact three small floor-power constants; numerical/physical children unchanged.\",\n \"full_fine_family_execution\": false,\n \"input_radius_scalar_products_before_rejection\": 16,\n \"maximum_component_l1_error\": \"11/8192\",\n \"native_boundary\": \"Retained exact q2 finite provider; production GL64/O73 not executed.\",\n \"output\": [\n [\n 63,\n -37\n ],\n [\n 58,\n -12\n ],\n [\n 14,\n -31\n ],\n [\n 19,\n -39\n ],\n [\n 32,\n 93\n ],\n [\n -20,\n 124\n ],\n [\n 139,\n -50\n ],\n [\n 92,\n -47\n ]\n ],\n \"output_sha256\": \"2e1c1b26ba13815c4baa8dcf46169b27152fe2f035475a4ee99c1bf96a32a548\",\n \"public_dependencies\": 11,\n \"q\": 10,\n \"universal_bound\": \"45/16384\"\n}\n", + "stderr": "" +} diff --git a/research/cached-chirp-cyclic-join/evidence/registered.json b/research/cached-chirp-cyclic-join/evidence/registered.json new file mode 100644 index 0000000000..8aad10376f --- /dev/null +++ b/research/cached-chirp-cyclic-join/evidence/registered.json @@ -0,0 +1,13 @@ +{ + "command": [ + "python", + "-B", + "scripts/research_package.py", + "--package", + "research/cached-chirp-cyclic-join" + ], + "elapsed_seconds": 133.551, + "returncode": 0, + "stdout": "CHECK Authenticate complete canonical/public sources; genuine T8 cached/Cyclic/grid transaction versus independent integer and dense rational oracles; paid-radius rejection, protected return, borrowed origins, source invariance, conjugation/scale/grid controls and 75 exact allocation cases. Finite q2 native provider only.\nPASS_CACHED_CHIRP_CYCLIC_JOIN\n{\n \"A\": 1,\n \"D\": 2,\n \"T\": 8,\n \"W\": 19,\n \"allocation_cases\": 75,\n \"cached_calls\": 3,\n \"cached_scalar_products\": 192,\n \"canonical_inputs\": 18,\n \"chi\": 7,\n \"claim\": \"source-bound cached chirp / cyclic / grid join; no new kappa\",\n \"compiled_metadata_setup\": {\n \"17^(.997)\": 3,\n \"18^(.997)\": 3,\n \"1^(.002)\": 6\n },\n \"complete_multiplier_claim\": false,\n \"controls\": [\n \"pending_return\",\n \"actual_radius_before_phase\",\n \"shared_borrowed_origin\",\n \"same_grid_signed_width\",\n \"first_conjugate\",\n \"last_conjugate\",\n \"exact_M_scale\",\n \"final_external_grid_drop\"\n ],\n \"convolution_calls\": {\n \"forward\": 2,\n \"opposite\": 1,\n \"product\": 1,\n \"scale\": 1\n },\n \"cyclic_calls\": {\n \"convolutions\": 1,\n \"narrowings\": 1,\n \"tables\": 1,\n \"twists\": 2,\n \"untwists\": 1\n },\n \"f\": 16,\n \"fixture_setup\": \"Canonical compiled_setup proves exact three small floor-power constants; numerical/physical children unchanged.\",\n \"full_fine_family_execution\": false,\n \"input_radius_scalar_products_before_rejection\": 16,\n \"maximum_component_l1_error\": \"11/8192\",\n \"native_boundary\": \"Retained exact q2 finite provider; production GL64/O73 not executed.\",\n \"output\": [\n [\n 63,\n -37\n ],\n [\n 58,\n -12\n ],\n [\n 14,\n -31\n ],\n [\n 19,\n -39\n ],\n [\n 32,\n 93\n ],\n [\n -20,\n 124\n ],\n [\n 139,\n -50\n ],\n [\n 92,\n -47\n ]\n ],\n \"output_sha256\": \"2e1c1b26ba13815c4baa8dcf46169b27152fe2f035475a4ee99c1bf96a32a548\",\n \"public_dependencies\": 11,\n \"q\": 10,\n \"universal_bound\": \"45/16384\"\n}\nCHECK Authenticate complete canonical/public sources; genuine T8 cached/Cyclic/grid transaction versus independent integer and dense rational oracles; paid-radius rejection, protected return, borrowed origins, source invariance, conjugation/scale/grid controls and 75 exact allocation cases. Finite q2 native provider only.\nPASS_CACHED_CHIRP_CYCLIC_JOIN\n{\n \"A\": 1,\n \"D\": 2,\n \"T\": 8,\n \"W\": 19,\n \"allocation_cases\": 75,\n \"cached_calls\": 3,\n \"cached_scalar_products\": 192,\n \"canonical_inputs\": 18,\n \"chi\": 7,\n \"claim\": \"source-bound cached chirp / cyclic / grid join; no new kappa\",\n \"compiled_metadata_setup\": {\n \"17^(.997)\": 3,\n \"18^(.997)\": 3,\n \"1^(.002)\": 6\n },\n \"complete_multiplier_claim\": false,\n \"controls\": [\n \"pending_return\",\n \"actual_radius_before_phase\",\n \"shared_borrowed_origin\",\n \"same_grid_signed_width\",\n \"first_conjugate\",\n \"last_conjugate\",\n \"exact_M_scale\",\n \"final_external_grid_drop\"\n ],\n \"convolution_calls\": {\n \"forward\": 2,\n \"opposite\": 1,\n \"product\": 1,\n \"scale\": 1\n },\n \"cyclic_calls\": {\n \"convolutions\": 1,\n \"narrowings\": 1,\n \"tables\": 1,\n \"twists\": 2,\n \"untwists\": 1\n },\n \"f\": 16,\n \"fixture_setup\": \"Canonical compiled_setup proves exact three small floor-power constants; numerical/physical children unchanged.\",\n \"full_fine_family_execution\": false,\n \"input_radius_scalar_products_before_rejection\": 16,\n \"maximum_component_l1_error\": \"11/8192\",\n \"native_boundary\": \"Retained exact q2 finite provider; production GL64/O73 not executed.\",\n \"output\": [\n [\n 63,\n -37\n ],\n [\n 58,\n -12\n ],\n [\n 14,\n -31\n ],\n [\n 19,\n -39\n ],\n [\n 32,\n 93\n ],\n [\n -20,\n 124\n ],\n [\n 139,\n -50\n ],\n [\n 92,\n -47\n ]\n ],\n \"output_sha256\": \"2e1c1b26ba13815c4baa8dcf46169b27152fe2f035475a4ee99c1bf96a32a548\",\n \"public_dependencies\": 11,\n \"q\": 10,\n \"universal_bound\": \"45/16384\"\n}\nPASS_REGISTERED_RESEARCH_PACKAGE research/cached-chirp-cyclic-join outcome=completed\n", + "stderr": "" +} diff --git a/research/cached-chirp-cyclic-join/join_preparation.py b/research/cached-chirp-cyclic-join/join_preparation.py new file mode 100644 index 0000000000..1ecb6db7c7 --- /dev/null +++ b/research/cached-chirp-cyclic-join/join_preparation.py @@ -0,0 +1,72 @@ +"""Paid, input-independent phase/shape/grid preparation for the exact seam. +Prepared for @CubeJerry with substantial OpenAI assistance. Apache-2.0. +""" +from dataclasses import dataclass +from functools import reduce +from operator import mul +from chirp_tables import prepare +from chirp_tapes import EncodedChirpTables +from cardinal_counts import Count +from records import Tape +from session import erase_marker +from words import need + +def ceil_log2(x):return (x-1).bit_length() + +@dataclass(frozen=True) +class Allocation: + q:int + f:int + W:int + D:int + A:int + M:int + volume:int + chi:int + coefficient:int + +def allocate(radices,slopes,q,chi): + need(type(q) is int and type(chi) is int and chi>=0 and q>=chi+2,'funded external middle grid') + need(len(radices)==len(slopes)>=2,'at least two source axes') + r=radices[0] + need(type(r) is int and r>=4 and not r&(r-1),'largest even dyadic polynomial axis') + need(all(type(t) is int and t in (r//2,r) for t in radices),'canonical two-scale axis family') + need(all(type(s) is int and 0=4 else 1;k=(i+j)%4 + sums[k][0]+=sign*(a*c-b*d);sums[k][1]+=sign*(a*d+b*c) + out.extend((trunc(a,4<= 2 and self.external_grid >= 0, + "positive external magnitude carrier") + require(self.native_grid >= self.external_grid and self.normalizer_bits >= 0, + "exact incoming grid lift and nonnegative dyadic normalizer") + require(self.native_bits >= self.external_bits + self.lift, + "complete native sign and lifted external magnitude") + + @property + def lift(self): + return self.native_grid - self.external_grid + + @property + def drop(self): + return self.native_grid + self.normalizer_bits - self.external_grid + + +class Codec: + """Constant owned roles, shared immutable unary formats, protected output. + + B is exactly the retained first-face transport module. Native tape methods + are those of the retained Core Tape class. Lifecycle marker operations are + the actual native session operations. These are source-model parameters, + never numerical callbacks. The online code has finite-valued local state. + """ + + def __init__(self, B, NativeTape, blank, initialize_marker, erase_marker, fmt): + self.B = B + self.blank = blank + self.initialize_marker = initialize_marker + self.erase_marker = erase_marker + # This input-independent setup is charged; no role is made per record. + self.magnitude_clock = B.Tape("bridge magnitude clock") + self.lift_clock = B.Tape("bridge lift clock") + self.pad_clock = B.Tape("bridge pad clock") + self.native_clock = B.Tape("bridge native clock") + self.drop_clock = B.Tape("bridge drop clock") + self.raw = B.Tape("bridge raw component") + self.absolute = B.Tape("bridge absolute component") + self.magnitude = B.Tape("bridge final magnitude") + self.output = B.Tape("bridge protected normalized field") + self.input = NativeTape() + erase_marker(self.input) + self.pending = False + self.active = False + self.input_armed = False + self.reconfigure(fmt) + + @property + def templates(self): + return (self.magnitude_clock, self.lift_clock, self.pad_clock, + self.native_clock, self.drop_clock) + + @property + def work(self): + return (self.raw, self.absolute, self.magnitude, self.output) + + def reconfigure(self, fmt): + """Rebuild formats in the same roles; old visited blanks stay charged.""" + require(not self.active and not self.pending and not self.input_armed, + "quiescent bridge format change") + lengths = (fmt.external_bits - 1, fmt.lift, + fmt.native_bits - fmt.lift - fmt.external_bits + 1, + fmt.native_bits, fmt.drop) + for tape, length in zip(self.templates, lengths): + self.B.clear(tape) + for _ in range(length): + self.B.append(tape, "1") + self.B.home(tape) + self.fmt = fmt + + def bbit(self, tape): + bit = tape.read() + require(bit in ("0", "1"), "complete binary external component") + tape.move(1) + return bit == "1" + + def cbit(self, tape): + bit = tape.read() + require(bit in (0, 1), "complete binary native component") + tape.step(1) + return bit == 1 + + def lift_component(self, source): + B = self.B + sign = self.bbit(source) + any_one = False + B.clear(self.raw) + B.home(self.magnitude_clock) + while self.magnitude_clock.read() == "1": + bit = self.bbit(source) + any_one = any_one or bit + B.append(self.raw, "1" if bit else "0") + self.magnitude_clock.move(1) + require(not sign or any_one, "canonical external zero sign") + B.home(self.lift_clock) + while self.lift_clock.read() == "1": + self.input.append(0) + self.lift_clock.move(1) + # raw is at its right terminator: read magnitude from least significant. + self.raw.move(-1) + carry = sign + while self.raw.read() != "^": + bit = self.raw.read() == "1" + bit = not bit if sign else bit + self.input.append(int(bit != carry)) + carry = bit and carry + self.raw.move(-1) + B.home(self.pad_clock) + while self.pad_clock.read() == "1": + bit = sign + self.input.append(int(bit != carry)) + carry = bit and carry + self.pad_clock.move(1) + B.clear(self.raw) + + def prepare_input(self, source): + """Lift the complete immutable external stream, exactly and in order.""" + B = self.B + require(not self.active and not self.pending, "idle source bridge") + require(source not in (*self.templates, *self.work), "external source owner") + self.active = True + self.initialize_marker(self.input) + self.input_armed = True + B.home(source) + try: + while source.read() != "!": + self.lift_component(source) + self.lift_component(source) + require(source.read() == "#", "one complete complex source record") + source.move(1) + self.input.rewind() + except BaseException: + self.abort() + raise + finally: + B.home(source) + return self.input + + def return_component(self, returned): + B = self.B + B.clear(self.raw) + B.home(self.native_clock) + sign = False + while self.native_clock.read() == "1": + sign = self.cbit(returned) + B.append(self.raw, "1" if sign else "0") + self.native_clock.move(1) + # Last native bit is the sign. Absolute value is formed without decoding. + B.home(self.raw) + B.clear(self.absolute) + carry = sign + while self.raw.read() != "!": + bit = self.raw.read() == "1" + bit = not bit if sign else bit + B.append(self.absolute, "1" if bit != carry else "0") + carry = bit and carry + self.raw.move(1) + B.home(self.absolute) + B.home(self.drop_clock) + while self.drop_clock.read() == "1" and self.absolute.read() != "!": + self.drop_clock.move(1) + self.absolute.move(1) + B.clear(self.magnitude) + B.home(self.magnitude_clock) + any_one = False + while self.magnitude_clock.read() == "1": + bit = self.absolute.read() == "1" + any_one = any_one or bit + B.append(self.magnitude, "1" if bit else "0") + if self.absolute.read() != "!": + self.absolute.move(1) + self.magnitude_clock.move(1) + while self.absolute.read() != "!": + require(self.absolute.read() == "0", "normalized return fits external magnitude") + self.absolute.move(1) + B.append(self.output, "1" if sign and any_one else "0") + self.magnitude.move(-1) + while self.magnitude.read() != "^": + B.append(self.output, self.magnitude.read()) + self.magnitude.move(-1) + for tape in (self.raw, self.absolute, self.magnitude): + B.clear(tape) + + def prepare_return(self, returned, source): + """Normalize once, round toward zero, preserve input, check full count. + + The unchanged original stream supplies the record clock. This avoids a + host record counter and checks that the native field has the same size. + """ + B = self.B + require(self.active and not self.pending, "one active bridge input") + B.clear(self.output) + B.home(source) + returned.rewind() + try: + while source.read() != "!": + for _ in (0, 1): + self.bbit(source) + B.home(self.magnitude_clock) + while self.magnitude_clock.read() == "1": + self.bbit(source) + self.magnitude_clock.move(1) + self.return_component(returned) + require(source.read() == "#", "unchanged complete input record clock") + source.move(1) + B.append(self.output, "#") + require(returned.read() == self.blank, "no extra native output records") + B.home(self.output) + self.pending = True + except BaseException: + B.clear(self.output) + raise + finally: + B.home(source) + returned.rewind() + return self.output + + def commit(self, transport): + """Commit only a complete normalized return after the saved-copy phase.""" + B = self.B + require(self.active and self.pending and transport.phase == "saved", + "saved originals and complete protected Core return") + require(transport.source not in (*self.templates, *self.work), + "distinct destination source owner") + # No validation remains after this point: a whole sequential clone. + B.clone(self.output, transport.source) + B.home(transport.source) + transport.phase = "core" + self.abort() + + def abort(self): + """Erase owned payloads; retained extent and immutable templates remain.""" + B = self.B + if self.input_armed: + self.input.clear() + self.erase_marker(self.input) + self.input_armed = False + for tape in self.work: + B.clear(tape) + for tape in self.templates: + B.home(tape) + self.active = self.pending = False + + +class BoundCore: + """The concrete Core run/consume protocol, without a payload callback. + + `core` is the pinned OriginalCore (or the independently scoped CompleteCore + packed boundary); its prepared immutable source ports are `arguments`. + The all-size source theorem determines which boundary is being invoked. + """ + + def __init__(self, codec, core, arguments): + self.codec = codec + self.core = core + self.arguments = tuple(arguments) + + def run(self, transport): + require(transport.phase == "saved", "halo copies precede actual Core") + succeeded = False + try: + payload = self.codec.prepare_input(transport.source) + returned = self.core.run(payload, *self.arguments) + self.codec.prepare_return(returned, transport.source) + self.core.consume() + self.codec.commit(transport) + succeeded = True + finally: + if getattr(self.core, "pending", False): + self.core.consume() + if not succeeded: + self.codec.abort() diff --git a/research/cached-chirp-cyclic-join/retained/cached/NOTICE.md b/research/cached-chirp-cyclic-join/retained/cached/NOTICE.md new file mode 100644 index 0000000000..eccfcc03ee --- /dev/null +++ b/research/cached-chirp-cyclic-join/retained/cached/NOTICE.md @@ -0,0 +1,37 @@ +# Attribution and provenance + +Contribution by **@CubeJerry**, prepared with substantial OpenAI Codex +assistance. The physical implementation/proof, the numerical/source producer, +and the separate half-angle/physical review were developed by distinct AI +research workers and integrated after cross-review. This is not a claim of +independent human acceptance or formal proof-kernel verification. + +The repository's Apache-2.0 license applies. Original notices in every reused +source remain unchanged. + +- CrocSwap/integer-mult-bounds#4100 supplies the exact chirp formula and + largest-axis-fastest polynomial coefficient layout. The canonical proof is + authenticated as an input; the complete proposed theorem is not adopted. +- CrocSwap/integer-mult-bounds#4325 supplies the cached suffix invariant, + stability and original table-travel mechanism, and explicitly identifies + physical payload/multiplier interleaving as an open next question. Its merged + head is `404e307ccb29a854e1f0a34289c86c4bf2a7dd7b`. +- CrocSwap/integer-mult-bounds#5987 sharpens the inherited largest-fastest + travel estimate. Its merged head is + `1262dbcf61a069412dbf1e826fc6a860c0c87f45`. This package does not claim a new + seven-`TP` table lemma or that exact constant for its extra validation work. +- CrocSwap/integer-mult-bounds#3787 and #3851 supply the unchanged physical + word/arithmetic cohort loaded through `physical-gaussian-core`'s authenticated + nested archives. No replacement integer multiplier is supplied here. +- Mason Hale's `certified-gaussian-recovery/intervals.py` supplies the unchanged + elementary interval routines. Its original authorship, license and exact + source pin remain intact. Our half-angle/isqrt reviewer uses a different + enclosure mechanism and does not call this routine for expected phases. +- CrocSwap/integer-mult-bounds#3935 implements a different source08 chirp + schedule, while #5375 concerns encoded monomial phases. They were checked + during bounded overlap screening and are not treated as missing results. + +All live inputs are at canonical base +`7c49fe32c55de02c2c873655c804b16e4c3fef0a`; no unmerged executable dependency +is required. `SOURCES.json` separates live inputs from contextual provenance. +The selected κ and five inherited assumptions are unchanged. **No new κ.** diff --git a/research/cached-chirp-cyclic-join/retained/cached/PROOF.md b/research/cached-chirp-cyclic-join/retained/cached/PROOF.md new file mode 100644 index 0000000000..a75f9a771c --- /dev/null +++ b/research/cached-chirp-cyclic-join/retained/cached/PROOF.md @@ -0,0 +1,230 @@ +# Physical cached chirp payload pass + +Prepared for @CubeJerry with substantial OpenAI Codex assistance. Apache-2.0. +The cached suffix identity, rounding argument and table-travel mechanism are +inherited from CrocSwap/integer-mult-bounds#4325 and #5987. The new result is +their encoded physical consumer, actual word products, polynomial payload +binding and complete ownership invoice. **No new κ.** + +## 1. Source and quantified interface + +Fix d>=1, dyadic t_i=2^ell_i>=2, with t0=max_i t_i, and odd slopes s_i. +Put T=product_i t_i and r=t0. The exact source is #4100 PROOF's phase + + a_i(x)=exp(-pi i s_i x^2/t_i), a(x)=product_i a_i(x_i). + +That source already chooses largest axis0 as the innermost coordinate and +packs its r coefficients into a polynomial record. No transpose is supplied. +Distinct-prime production and the outer CRT/Fourier caller are outside scope. + +Let h=2^-f, with f>=0, actual payload modulus<=R, R>=1, and +W>=f+ceil(log2(R+1))+2, W>=max ell_i. Each coefficient is a consecutive pair +of W-bit two's-complement real/imaginary words on the h grid. A polynomial +record is exactly r such pairs; the remaining axes index consecutive records. +The returned layout is identical. An opaque Kronecker product integer is +not this coefficient-field ABI. + +The borrowed tables contain grid pairs A_i(x), where A_i(0)=1, +|A_i(x)|<=1 and |A_i(x)-a_i(x)|<=e_tab. These are **certified prepared-input +premises**, not online authentication of arbitrary coefficient pages. +Table generation, certification and serialization are paid separately. +Certified inward approximations are permitted; exact transcendental grid-cell +separation is unnecessary. The serializer checks integer unit-disk inequalities, +sizes and zero entries. SOURCE.md supplies the actual numerical producer. + +The caller performs one chirp or conjugate-chirp multiplication, preserves +borrowed bodies/origins, erases scratch and protects its return until consume. +It reuses the unchanged authenticated #3787/#3851 scalar-word cohort and its +hypotheses. No convolution, full transform, supplier admission, outer integer +assembly or discharge of all five selected assumptions is claimed. + +## 2. Physical roles and initialization + +`run(payload,shape,tables,width,precision,conjugate=False)` has three borrowed +data tapes, two distinct Count tapes and a finite conjugation boolean. No d, +T, radix or address is decoded into host control. Shape concatenates ell_i +zero bits and AXIS_END per axis. Each table page is PAGE_BEGIN, t_i complex +records, PAGE_END. All tags belong to a fixed finite alphabet. + +Initialization reads each shape field into an encoded Count; checks positive +ell_i<=W and ell_i<=ell0; and scans exactly 2^ell_i complex records. It checks +each zero entry as one, all remaining body cells as binary, and exact catalogue +endpoints. Nonzero phase semantics come from preparation, not this structural +scan. The shape is copied to one counter tape. Another tape stores pi0,...,pi_d +as complex words, initially all one. Two temporary Signed values carry a suffix. +A fixed pool supplies other temporaries; one fixed FftWord supplies products. +There is no per-axis tape or variable host array during execution. + +## 3. Universal stream invariant + +Before processing x, the input head is at its coefficient, the counter holds +x in little-endian fields, and the cache obeys + + pi_d=1, pi_k=trunc_h(A_k(x_k)*pi_(k+1)), k=d-1,...,0. (1) + +The table head is just after the current axis0 entry. Initialization restores +it just after entry0; A_i(0)=1 makes (1) exact at the initial point. + +Increment resets overflowed lower fields. If it stops in axis j, higher axes +are unchanged. Cache/table heads advance one adjacent axis per overflow. For +j=0 the next table entry is already under the head. For j>0, read_field copies +x_j to a Count and a counted scan advances x_j records from page j's start. +The axis number is never decoded. + +Read adjacent pi_(j+1), then recompute pi_j,...,pi0 in descending axis order. +Backward separator scans find the previous table's entry0 and counter field; +each lower changed digit is zero. The new suffix stays in two Signed values. +All changed instances of (1) are restored; higher instances remain valid. +Thus every cache equals a fresh rounded suffix chain at that coordinate, +regardless of how many records preceded it. Full overflow requires complete +catalogue and payload endpoints. Exactly T coefficients are processed, in +axis0-packed polynomial order, without a payload gather or per-record d scan. + +## 4. Actual arithmetic and error + +Arithmetic.complex_product executes four word products ac,bd,ad,bc and forms +(ac-bd,ad+bc) exactly. Only the two completed components are truncated by f; +individual products are not rounded early. Raw signed words have O(W) bits, +including the 2W-bit products and a sum carry, and are kept until rescaling. + +Every suffix remains in the unit disk: exact products multiply moduli and +componentwise truncation toward zero cannot increase modulus. The final +payload result has modulus<=R and fits the stated carrier. Conjugating its +phase negates the imaginary Signed word exactly without changing the schedule. + +Cache replacement first encodes the complete new pair in short scratch, +checking headroom before modifying the cache. It then clears exactly that +slot, copies the checked word and clears scratch. Thus ordinary external-data +validation cannot strand later cache entries behind an interior blank. +Asynchronous interruption halfway through a write is not a recovery contract. + +For suffix error E_k against the exact unit-phase product, +E_k<=E_(k+1)+e_tab+sqrt(2)h. The final-axis multiplication by pi_d=1 is grid +exact. Consequently + + E_0 <= d e_tab+(d-1)sqrt(2)h, + |output-a(x)u| <= R[d e_tab+(d-1)sqrt(2)h]+sqrt(2)h. (2) + +The conjugate case has the same bound. Component-l1 error is at most sqrt(2) +times the displayed error. Inward tables with each component error<=2h give + + component-l1 output error <= 2[R(3d-1)+1]h. (3) + +Exact component truncation permits the sharper inherited e_tab<=sqrt(2)h. +These bounds concern the actual supplied dyadic input. Earlier input error is +its caller's obligation. There is no accumulation in T: invariant (1) always +contains at most d table approximations and d-1 nontrivial grid truncations. + +## 5. Exact product count + +Let L_k=product_(i=2 (and equality for d=1), these +are O(TW). We do not assert the old exact constant seven for this newly +framed, validated implementation. Every forward/backward page traversal and +final borrowed-head restoration is included. + +Here is an explicit bound for the potentially hidden address arithmetic. +When a carry stops at j>=1, x_j ranges from1 to t_j-1, each value occurring +T/L_(j+1) times. With M=t0>=t_j and L_j>=M*2^(j-1), + + sum_over_carries x_j + = (T/2) sum_(j>=1)(t_j-1)/L_j < T. (5) + +Count.product(digit,entry_bits) scans log(W+1) multiplier digits, with +operand/result lengths O(log(x_j+1)+log(W+1)). Its schoolbook cost is +O(log(W+1)[log(x_j+1)+log(W+1)])=O((x_j+1)W). There are fewer than2T visited +fields and (5) bounds the sum of x_j, so all such products cost O(TW). +The initialization's extent products are similarly absorbed by t_i W. + +read_field copies and normalizes at most ell_j<=W bits. It runs once at a +higher-axis carry stop, not once per changed suffix factor. previous_field +crosses at most one adjacent ell_i-bit field per cache update. Counter +increments, their local returns and adjacent cache moves therefore cost +O(W sum_k T/L_k)=O(TW). No full counter rewind occurs per coefficient. +Short cache-word replacement, complete component additions/truncations and +borrowed/owned cleanup are linear in the cells scanned. The inherited encoded +indices/Counter operations use amortized ripple updates; they do not perform +a full-length comparison at every bit. Initial cache filling is O(dW). + +Including final output consumption, a conservative complete envelope is + + O(T M(W)+TW+d^2W+table manufacture/serialization). (6) + +The zero-entry initialization is already O(dW); the displayed d^2W permits +the predecessor's more general cache-initialization bound. Under the frozen +M(W)=O(W log^2(W+2)) invoice, the online part is +O(TW log^2(W+2)+d^2W). Thus this physical pass has the required power-zero, +polylogarithmic cost at #4100's layout without adopting its complete theorem. + +## 7. Ownership, retained space and setup + +The fixed inventory contains the scratch pool, counter, cache, output and all +active/inactive scalar-word descendants. All five external roles are mutually +distinct and outside that inventory. Origins use paid local delimiter checks. +Construction is sealed during invocation; Count/Signed objects refer to fixed +reusable physical pool roles. Host diagnostic counters are observers only: +removing them changes no branch, tape action or returned bit. + +A pending flag protects the output even when its head has moved to the final +blank. consume erases body and marker before reuse. Ordinary validation +failures close all temporaries, clear owned prefixes and restore borrowed +heads. Concurrent mutation of borrowed data or private child tapes is outside +the contract. The physical fixtures check successful and failed cleanup. + +Current storage, including input, prepared tables and protected return, is + + O(TW + W sum_i t_i + dW + scalar-owner backing). (7) + +Counter shape uses sum_i(ell_i+1) cells and the cache d+1 complex words. +The frozen word proof gives O(W) storage at this scalar width, including its +stack and twiddle workspaces. On reuse every role's largest prior allocation +is still retained and charged, including word descendants, the long output, +cache and counter. Blank retained tails do not disappear from the space bill. +The inherited Tape.clear stops at the current first blank; it does not rescan +historical empty tails. A grow/shrink fixture requires equal current action +counts with fresh and previously widened owners, while retaining their +different backing volumes. + +EncodedChirpTables performs input-independent integer validation and physical +serialization. A conservative validation/serialization tariff is +O((sum_i t_i)W^2+sum_i ell_i+d log^2(W+1)); page storage is in (7). +Certified phase manufacture adds SOURCE.md's explicit per-entry work and +retained interval-cache history. Multiple retained preparations sum their +storage. No numerical receipt, free table oracle or silently discarded source +cache substitutes for that bill. + +## 8. Evidence boundary and remaining obligations + +Finite executions check every bit against a separate original-coordinate +rounded chain, including unequal axes, all-binary carries, d=1, conjugation, +zero rounded factors and signed complex payload. Actual scalar calls agree +with (4). Malformed payload/page/shape, external/owned aliases and moved output +controls test the ABI. A wider prior call is followed by a narrow one with +identical live action counts to a fresh narrow owner and larger retained space. + +Source-aware independent review and source-table certificates complement the +trace. Neither is a human acceptance or proof-kernel claim. Finite fixtures +exercise the word engine's base branch; universal arithmetic uses its pinned +all-size contract. Full convolution/FFT assembly, production prime existence, +outer supplier/CRT/recovery integration and a stronger complete multiplication +bound are not established here. + +The conservative d^2W term is absorbed by TW: d^2 <= (9/8)2^d <= (9/8)T +for integer d>=1. The online consequence is O(TW log^2(W+2)). +Reported action deltas cover a checked transaction: run, literal output read, +rejected pending call and consume. They are not bare-run transition counts. +Finite-alphabet actions differ by a fixed encoding factor from binary steps. diff --git a/research/cached-chirp-cyclic-join/retained/cached/README.md b/research/cached-chirp-cyclic-join/retained/cached/README.md new file mode 100644 index 0000000000..1e95863471 --- /dev/null +++ b/research/cached-chirp-cyclic-join/retained/cached/README.md @@ -0,0 +1,151 @@ +# Source-bound physical cached chirp payload pass + +**No new κ.** This package implements one chirp or conjugate-chirp pass on +actual complex coefficient fields in the axis-zero polynomial layout of +CrocSwap/integer-mult-bounds#4100. It closes the physical payload/intermediate +multiplier interleaving obligation left in the first open question of +`research/pr4100-chirp-odometer-tariff/README.md` (#4325), for the precise +prepared-source and inherited arithmetic boundary stated below. + +The cached suffix identity, numerical stability and table-walk lemmas are +inherited. In particular, #5987 already proves the stronger largest-axis-fastest +travel bound. The new work is an executable encoded controller, its certified +source tables, actual scalar-word calls, complete movement/ownership invoice, +and independent checks against the original phase. The distinct source08 +caller in #3935 and encoded monomial phases in #5375 do not implement this +cached-table schedule. The bounded successor search found no completed +consumer of this exact interface; it was not an exhaustive archive claim. + +## Result + +For dyadic radices `t_i>=2`, odd slopes `s_i`, largest radix `t_0` fastest, +and `T=product(t_i)`, the exact diagonal multiplier is + +\[ + a(x)=\prod_i \exp(-\pi\mathrm i s_i x_i^2/t_i). +\] + +A polynomial record contains `t_0` consecutive complex coefficient pairs. +`CachedChirp.run(payload, shape, tables, width, precision, conjugate=False)` +consumes this layout directly and returns the same layout. Each component is +a `W`-bit two's-complement word on a common `2^-f` grid. Shape, carry digits, +counts and addresses remain encoded; neither dimension nor record count is +an unbounded host control variable during execution. + +The controller uses cached suffix products with fewer than `2T` updates, +four inherited exact scalar products per completed complex multiplication, +and one truncation per completed component. All table travel, counter-field +work, offset products, cache replacement, output consumption and restoration +are included. With `M(W)` the pinned word service's complete tariff, its +online cost is + +\[ + O(T M(W)+TW+d^2W)=O(TW\log^2(W+2)). +\] + +Here `d^2<=9T/8`; the final equality uses the inherited all-size word contract. +No hidden `Td` scan or per-record full-table rewind is admitted. Current +storage is `O(TW+W sum_i t_i+dW)` plus the word service's `O(W)` backing; +all earlier per-role high-water extents remain charged after erasure. + +The source producer emits certified inward grid approximations in the unit +disk, with each component at most two ulps from its exact phase. For actual +input modulus at most `R`, the returned component-l1 error is at most + +\[ + 2\{R(3d-1)+1\}\,2^{-f}. +\] + +The producer chooses `f` and `W` to meet the requested absolute error and +retain an already finer input grid. `SOURCE.md` pays its rational arithmetic, +coefficient serialization and retained interval-cache history explicitly. +That Python preparation is justified by a sequential polynomial simulation; +it is not presented as a literally metered fixed-tape elementary generator. + +## Reproduce + +From the repository root, using the standard library only: + +```sh +python3 -B scripts/research_package.py --package research/physical-cached-chirp-payload +``` + +Expected result: all four registered commands pass. The two entry points emit +`PASS_CACHED_CHIRP_PAYLOAD` and `PASS_INDEPENDENT_CACHED_CHIRP` in their JSON +receipts. Each runs normally and with assertions disabled (`-I -O -B`). +The input manifest authenticates all five live source files, including the +unchanged nested arithmetic cohort. No network or Git command is used by the +registered replays; source checkout metadata is unnecessary after export. + +A direct executable replay is: + +```sh +python3 -I -B research/physical-cached-chirp-payload/verify.py +``` + +`RESULT.json` retains the exact finite receipts and negative-control outcomes. +Its counters concern the declared checked transactions; they are not measurements +of the whole Python interpreter or a proof of the asymptotic theorem. + +The source instance `(t_0,t_1)=(8,4)`, `(s_0,s_1)=(7,3)`, `R=1`, target ten +uses `f=14`, `W=17`, and returns all 32 signed complex coefficients in each +mode. There are exactly 264 scalar products per pass. Smaller calibration +families cover variable depth, unequal later axes, complete carry chains, +`d=1`, exact quarter roots, zero rounded factors and width reuse. + +Nine structural/ownership guards reject with the expected reason. Executed +consumer mutations detect a lost higher carry offset and omitted conjugation. +A grow/shrink comparison requires identical current transaction action +counts on fresh and previously widened owners while preserving their +different retained backing volumes. Reported action counts cover **run, +literal output read, rejected pending call and consume**, not bare-run cost. + +## Independent evidence + +The source reviewer uses directed integer-square-root half-angle enclosures, +without the producer's pi/Taylor machinery. It certifies 342 source rows and +342 conjugates in five families and rejects six semantic mutations. The +physical reviewer separately executes both actual-source modes and checks +the returns against one combined original exponent per tensor coordinate, +without the author's cached or rounded-chain expectation. + +Its component-l1 errors are at most approximately `0.00013164` and +`0.00012679`, below the admitted `3/4096`. A disposable physical subclass +which rounds scalar products before their complex sums returns zero where +the correct completed product returns one. Both paths use the real inherited +scalar engine and complete cleanup. Independent object-graph traversal finds +exactly all 1322 declared tape roles, including inactive descendants; all are +erased at canonical origins after consumption. Borrowed bytes and heads are +preserved. These are source-aware AI checks, not human or proof-kernel approval. + +## Scope and remaining obligations + +Canonical base: `7c49fe32c55de02c2c873655c804b16e4c3fef0a`. +`SOURCES.json` records exact Git blobs and SHA256s; `TASK.json` preserves the +selected task card and its narrowed obligation. `PROOF.md` gives the universal +controller/cost argument, `SOURCE.md` the numerical and setup argument, +`ORACLE.md` the independent enclosure proof, and `REVIEW.md` the review scope. + +The unit-disk/phase/radius properties are certified prepared-input premises; +the physical structural scan does not authenticate arbitrary replacement +coefficient pages. Payload-grid conversion, if needed by a larger caller, +must be priced there. Finite physical tests use the word engine's base branch; +its general FFT branch is an inherited pinned theorem and implementation. +The recorded all-size source proof and code review are distinct from finite +replay coverage. + +## Open next questions + +Open next questions are to bind both endpoint passes to a complete chirp +convolution with its actual normalization and intermediate rounding; to lower +the elementary source preparation to a literal encoded generator; and to +account for grid conversion and table lifetimes across an actual outer family. +`TASK.json` records specific first steps and blockers. No full Fourier or +Gaussian caller, CRT supplier, integer recovery, selected-assumption removal +or improvement to the complete multiplication exponent is claimed. + +Contribution by @CubeJerry with substantial OpenAI Codex assistance in +research, implementation, proof and verification. A separate source-aware +AI researcher supplied the certified source preparation, and another supplied +the independent half-angle and physical checks. See `NOTICE.md` for predecessor +credit. Repository Apache-2.0 licensing applies. diff --git a/research/cached-chirp-cyclic-join/retained/cached/SOURCE.md b/research/cached-chirp-cyclic-join/retained/cached/SOURCE.md new file mode 100644 index 0000000000..8433a71fde --- /dev/null +++ b/research/cached-chirp-cyclic-join/retained/cached/SOURCE.md @@ -0,0 +1,290 @@ +# Certified source tables and actual-input precision for one cached chirp pass + +Canonical source: `7c49fe32c55de02c2c873655c804b16e4c3fef0a`. +Contribution by @CubeJerry, with substantial OpenAI assistance. +**No new κ.** This is the numerical/source contract for the accompanying +physical pointwise pass. It does not assemble a Fourier transform, Gaussian +resampling operation, integer multiplication algorithm, or the five global +assumptions. + +## 1. Source, predecessor boundary, and interface + +CrocSwap/integer-mult-bounds#4100, retained as +`research/unconditional-batched-crt/PROOF.md`, specifies + +\[ + a(x)=\prod_{i=0}^{d-1}a_i(x_i),\qquad + a_i(x_i)=\exp(-\pi\mathrm i s_i x_i^2/t_i). +\] + +Every `t_i=2^{ell_i}>=2`, every `s_i` is odd, and axis zero is +fastest and has largest radix. The source uses distinct positive prime slopes; +the producer permits arbitrary odd signed slopes, reduced modulo `2t_i`. +It preserves the association between an axis, its radix and its slope. +Evenness of `t_i` makes the chirp periodic with period `t_i`. The first +`t_0` complex entries already form one source polynomial record: no layout +conversion is hidden in the source contract. + +CrocSwap/integer-mult-bounds#4325 proves the cached-suffix numerical and +odometer lemmas and leaves physical multiplier/payload interleaving open. +CrocSwap/integer-mult-bounds#5987 proves the stronger largest-fastest table +travel bound. Neither theorem is claimed anew. The contribution combines +the physical consumer with a finite, certified producer of its actual phase +banks and an allocation for the supplied data radius. It does not require +deciding exact irrational floors at grid boundaries. + +The unchanged elementary interval source is +`research/certified-gaussian-recovery/intervals.py`, Git blob +`91d458865aa026bdf0d59653a4ecbfe3a178ecbc`, SHA256 +`159d2a7d32a8cc7c8f56632a8ef127308b984a0a6753c9d6bdccacc6e7d6d4df` +at the canonical base. Its Machin identity, Taylor enclosures and inward +quantizer are inherited, not new analytic lemmas. The source retains +Mason Hale's authorship and Apache-2.0 notice. + +`prepare(radices, slopes, R, tau, oracle=I, incoming_precision=f_in)` +returns immutable integer tables and a plan. The integer `R>=1` bounds +the modulus of **each actual input coefficient**; `tau>=0` requests an +absolute component-l1 error at most `2^-tau`; `f_in>=0` is a minimum grid +precision. The radius is a mathematical admission premise, not a property +checked by the physical caller. The producer never reads payload values. +The interval module must be authenticated by the source loader. + +All phases and payload records use the common grid `h=2^-f`. Physical +tables contain an axis page marker, then `t_i` pairs `(Re,Im)` of signed +`W`-bit two's-complement words in increasing `x_i`, then an end marker. +Shape fields contain `ell_i` zero bits and an axis marker. Shape length +is `sum_i(ell_i+1)`; table payload length is `2W sum_i t_i`; framing adds +`2d` symbols. The physical loader pays literal serialization of the returned +integers. A numerical receipt does not replace source authentication. + +## 2. Certified entries without an exact-floor premise + +Set `q=2f+32`, `u=2^-q` and compute exactly + +\[ + j=(-s_i x_i^2)\bmod(2t_i). +\] + +If `4j` is divisible by `2t_i`, emit the exact quarter root `1,i,-1,-i`. +In particular every `a_i(0)` is exactly one. Otherwise call the pinned +`root_of_unity(j,2t_i,q)` and quantize each component toward zero from +its **inner interval endpoint**. For a positive enclosure `[l,v]` use +`h floor(l/h)`; for a negative enclosure use `-h floor(-v/h)`; for a +zero-crossing enclosure use zero. + +Each output component has the true component's sign or is zero, and its +magnitude is at most the true component's magnitude. Thus the stored point +lies in the closed unit disk. An enclosure of width at most `h` gives +component error at most `2h`: one ulp for truncating the inner endpoint +and one for the enclosure width. This is a two-ulp statement; simply +flooring a lower endpoint does not establish a one-ulp error from the +unknown true value. The producer checks exact endpoint distances and the +squared unit-disk inequality using integers. + +Here is a conservative width bound for the **pinned implementation**. +Its Machin enclosure has width at most `3u`: the two alternating +remainders are below `2^-(q+16)` and endpoint rounding adds less than +`2u`. After reduction to the nearest quarter root, the rational multiplier +of pi is in `[-1/4,1/4]`. Its dyadic enclosure has width at most `u`; +the product interval has width at most `8u`. For `q>=36`, its endpoints +have magnitude below `4/5`. Its squared interval consequently has +absolute upper bound at most `2/3` and width at most `16u`. + +If a Taylor-term enclosure has magnitude at most one and width `v`, +one multiply and division by the integer denominator (at least two) +produces width at most `v/3+11u`. Every term therefore has width at +most `17u`; the magnitude bound remains at most one. Sine's initial +width is at most `8u`; cosine's is zero. The stopping test fires by +term `q`, since its factorial remainder is then smaller than `2^-(q+4)`. +Same-grid additions of interval endpoints are exact; the final remainder +widening adds `2u`. Every returned component has width at most + +\[ + (17q+10)2^{-q}\le 2^{-f}\qquad(q=2f+32,\quad f\ge2). +\] + +Quarter rotations preserve width. Reduced arguments remain bounded even +when `ell_i` is much larger than `f`; exact modular reduction and rational +argument acquisition are still paid. The runtime width check rejects an +invalid or accidentally weakened enclosure instead of accepting it under +an unjustified error claim. + +## 3. Cached expressions and the actual data radius + +Let `F_d(x)=1` and, recursively, let +`F_i(x)=fl(tilde a_i(x_i)*F_(i+1)(x))`, where `fl` truncates each +completed component toward zero. The actual cached state at coordinate +`x` equals this **fresh rounded suffix expression**, not only its ideal +analogue. At initialization all phases and caches are exactly one. If an +odometer increment changes axes `0,...,j`, higher coordinates and caches +are unchanged, so cached `F_(j+1)` is already the fresh expression at +the new coordinate. The consumer recomputes axes `j,...,0` in descending +order using that suffix. Induction proves the invariant after each update. +There is no feedback from an overwritten cache into itself and no error +accumulation over earlier tensor records. + +Section2 gives `|tilde a_i-a_i|<=2 sqrt(2)h` and `|tilde a_i|<=1`. +The arithmetic child forms every complex product from four exact integer +products, then truncates **once per completed component**. A truncation +changes a complex number by at most `sqrt(2)h` and cannot increase its +modulus. Every cached suffix is therefore in the unit disk. The last +factor times terminal cache one is grid-exact. The inherited suffix +induction counts d table errors and d-1 nontrivial product errors: + +\[ + |\widetilde a(x)-a(x)|\le(3d-1)\sqrt2\,h. \tag{1} +\] + +For an actual supplied coefficient `z` with `|z|<=R`, the final rounded +product satisfies + +\[ + |\operatorname{fl}(z\widetilde a)-za| + \le[R(3d-1)+1]\sqrt2\,h, +\qquad + \|\operatorname{fl}(z\widetilde a)-za\|_1 + \le2[R(3d-1)+1]h. \tag{2} +\] + +Conjugation preserves both norms and the grid, so the same theorem holds +for the conjugate pass. Completed output has modulus at most `R`. +A component-l1 input promise `<=R` suffices since it implies the modulus +promise; the output is not claimed to preserve that stronger l1 radius. +The number `T=product_i t_i` of distinct pointwise outputs does not enter +the error bound. The physical shape and carrier checks do not verify the +mathematical admission promise `|z|<=R`. + +The producer chooses + +\[ + f=\max\{f_{in},2,\tau+ + \lceil\log_2(2[R(3d-1)+1])\rceil\}, \tag{3} +\] + +which makes (2) at most `2^-tau`, and chooses a scalar carrier + +\[ + W=\max\{f+\lceil\log_2(R+1)\rceil+2, + \max_i\ell_i+2,\lceil\log_2(d+1)\rceil+2\}. \tag{4} +\] + +This covers completed payload/cache records and local encoded fields. +The unchanged arithmetic child still allocates and pays its wider exact +product and sum scratch: a product of two W-bit integers is not claimed +to fit W bits. Input records must already use the chosen common grid. +A caller's data-grid conversion is a separate paid operation; the +input-independent producer does not perform or conceal it. + +## 4. Fully charged source preparation and retained storage + +Let `m=sum_i t_i`. Let `B>=16` dominate `q`, `W`, `max ell_i`, +the binary input lengths of all slopes, `log_2(d+1)`, `log_2(R+1)`, +`tau` and `f_in`. Source preparation starts from these encoded parameters, +not a free phase oracle. Signed slope reduction and each modular square +use schoolbook bounded-integer arithmetic. Each phase calls at most one +of the inherited elementary routines, with at most `O(B)` Taylor terms. + +The Machin rational partial sums have numerator/denominator length at +most `O(B^2)`: they contain `O(B)` denominators, each with `O(B)` +bits, and a common product denominator suffices. The factorial and +rational remainder tests have polynomial bit length, at most `O(B^2)`. +The sine/cosine working intervals stay on one q-bit grid; their term +recurrences use `O(B)`-bit dyadic endpoints and integer denominators. +Elementary addition, multiplication, division and Euclidean gcd on these +encoded integers give a deliberately loose `O(B^12)` bit-work allowance +per phase and `O(B^4)` transient storage. These are sufficient upper +bounds, not benchmark claims or unit-cost rational arithmetic. + +To remove any free indexed-memory interpretation of the Python preparer, +retain an encoded store containing its output, current cache entries, +parameters and temporary integers. With no prior cache history its size +is bounded by `O((m+d)B+B^4)` bits. A root-cache entry includes its +phase/denominator/precision key and its two endpoint intervals; it is not +treated as a costless table lookup. Let `H_prev` count **all** retained +data from previous preparations, including historical `pi_interval` and +`root_of_unity` caches and prior per-role high-water backing. Use + +\[ + D=O(H_{prev}+(m+d)B+B^4). +\] + +Sequentially scanning the encoded store for each source access gives the +explicit conservative fixed-tape simulation bound + +\[ + C_{setup}=O((m+d)B^{12}D+Wm+\sum_i\ell_i+d),\qquad + S_{setup}=O(D). \tag{5} +\] + +The last terms pay table/shape serialization. This is an existence bill +for the finite elementary setup, not a claim that Python dictionaries +are literal tapes or that this setup has the same measured receipt as +the online consumer. A fresh authenticated interval module namespace +sets the historical source-cache term to zero; if an existing namespace +or owner is reused, its retained history remains in (5). Old caches are +not silently discarded. The receipt's own serialization/hash occupies +and scans `O(mB)` additional bits, already covered by the bound. + +For the actual #4100 source regime, `d=poly(p)`, +`ell_i=Theta(p^{1-epsilon})=o(p)`, and positive slopes have +`O(ell_i)` bits. Conditional on the caller's admitted `R<=2^{O(p)}` +and requested `tau,f_in=O(p)`, (3)-(4) give `f,q,W,B=O(p)`. +Fresh setup (5) is then `d*2^{O(ell)} poly(p)=2^{o(p)}`; +the squaring of `m` caused by the deliberately slow sequential simulation +is absorbed into `2^{O(ell)}` and a polynomial in p. The source +proof already budgets setup at this scale. The preparation contains +no factor `T*d` from reading online data. These deductions invoke the +actual p/ell/d/radius bands; they are not asserted for arbitrary huge +radices, slopes, requested precision or unbounded retained histories. + +The accompanying physical proof prices cached products, phase-page travel, +payload multiplication and restoration. Adding (5) gives + +\[ + O(T M(W)+TW+d^2W+C_{setup}), \tag{6} +\] + +where `M(W)` is the full cost of the unchanged real-word arithmetic +service, including its own premises and scratch. This source proof +neither substitutes unit-cost word multiplication nor discharges those +premises. The retained online data/table/cache space and child backing +remain additive to (5). + +## 5. Reviewable evidence and limits + +The source controls include exact quadrant handling, signed slopes, +modulo-equivalent slopes, small grids with larger radix fields, rejection +of non-dyadic/even-slope/misordered parameters, a deliberately wide +enclosure, a false point outside the unit disk, and an interval whose +inner-endpoint floor really needs more than one ulp of error allowance. +They are exact integer/rational checks. They do not prove a universal +analytic theorem by finite replay; that theorem is Sections2-4. + +The independent `dyadic_chirp_oracle.py` uses repeated positive half-angle +square roots with directed integer-isqrt bounds and complex powering, +with no Machin/Taylor reuse. `chirp_source_review.py` passed normally and +with `-I -O` on five families: 342 phase entries and their 342 literal +conjugates, including the actual distinct-prime fixture +`(t_0,t_1)=(8,4)`, `(s_0,s_1)=(7,3)`, radices up to 256 and a signed +100-bit slope. Six decisive mutations reject sign, denominator, odd-slope, +coordinate-square, unit-disk and axis/slope-association errors. The oracle +has SHA256 `e115bc53870a620431a9a2616ca1a3ff4967caf369296cfb575959e34636f4b6`; +its adapter has SHA256 +`a34f4516aed6f6986fa522f6da83592f3c2bfa6584d2ae16e50818869f9ba87f`. +The independent oracle's soundness is analytic, but its finite refinement +limit can return inconclusive; universal termination is not claimed. +For radius one and target exponent ten, the actual-source fixture has +`f=14`, `W=17`, six exact-quarter entries and six interval entries; +the allocated component-l1 payload error is `3/4096<2^-10`. +The physical verifier separately checks actual payloads, conjugation, +cache carries, preservation, cleanup and exact rounded-stage behavior. +The actual-source 32-record fixture completed both forward and conjugate +passes with 264 exact scalar products each. Its direct full-angle payload +check does not read produced tables or cache states; that additional +check does share the pinned elementary interval library. The half-angle +source check above supplies the distinct elementary numerical mechanism. +All source checks use the frozen authenticated file hashes. + +This is one integrated source-bound diagonal pass. It does not supply +the remaining transform stages, an outer precision induction, a new +integer-multiplication exponent, or a new κ. diff --git a/research/cached-chirp-cyclic-join/retained/cached/chirp_consumer.py b/research/cached-chirp-cyclic-join/retained/cached/chirp_consumer.py new file mode 100644 index 0000000000..19c77f56be --- /dev/null +++ b/research/cached-chirp-cyclic-join/retained/cached/chirp_consumer.py @@ -0,0 +1,255 @@ +"""Literal cached tensor-chirp pass on axis0-packed polynomial coefficients. +Prepared for @CubeJerry with substantial OpenAI Codex assistance. Apache-2.0. +All variable coordinates/counts and numerical values stay on physical tapes. +The cached suffix schedule/travel proof is inherited from #4325/#5987. +""" +from gaussian_sources import active +active() +from cardinal_counts import Count, positive +from compact_counts import copy_bits +from encoded import compare, subtract +from fft_arithmetic import Arithmetic +from fft_word_engine import FftWord +from records import Tape +from ring_words import Signed, power_two, read_signed, truncate, write_signed +from router_metadata import indices, owned +from scratch_pool import ScratchPool +from session import (OuterScope, borrowed_count, borrowed_tape, erase_marker, + initialize_marker, sealed_constructors) +from words import BLANK, LEFT, RIGHT, need +AXIS_END, PAGE_BEGIN, PAGE_END = 5, 6, 7 + +def origin(tape): + need(tape.read()!=LEFT,'canonical cached-chirp borrowed origin') + tape.step(-1);correct=tape.read()==LEFT;tape.step(1) + need(correct,'canonical cached-chirp borrowed origin') + +def walk(tape,count,direction,binary=False): + for _ in indices(count): + if binary:need(tape.read() in (0,1),'complete chirp binary region') + tape.step(direction) + +def read_pair(tape,width): + real=read_signed(tape,width) + try:return real,read_signed(tape,width) + except BaseException:real.close();raise + +def write_pair(pair,tape,width): + for value in pair:write_signed(value,tape,width) + +def increment_field(counter): + while counter.read()==1: + counter.write(0);counter.step(1) + if counter.read()==AXIS_END: + counter.step(1);return True + need(counter.read()==0,'complete cached-chirp counter field') + counter.write(1);counter.step(-1) + while counter.read() not in (LEFT,AXIS_END): + need(counter.read() in (0,1),'binary local counter rewind');counter.step(-1) + counter.step(1);return False + +def read_field(counter): + result=Count.literal(0);borrowed_tape(result.tape).clear() + try: + while counter.read()!=AXIS_END: + need(counter.read() in (0,1),'complete cached-chirp digit') + result.tape.append(counter.read());counter.step(1) + result.tape.append(RIGHT);result.normalize();counter.step(-1) + while counter.read() not in (LEFT,AXIS_END):counter.step(-1) + counter.step(1);return result + except BaseException:result.close();raise + +def previous_field(counter): + counter.step(-1) + if counter.read()==LEFT:counter.step(1);return False + need(counter.read()==AXIS_END,'previous cached-chirp field separator');counter.step(-1) + while counter.read() not in (LEFT,AXIS_END): + need(counter.read() in (0,1),'previous cached-chirp field bits');counter.step(-1) + counter.step(1);return True + +def next_page(tables): + while tables.read()!=PAGE_END: + need(tables.read() in (0,1),'complete forward chirp page');tables.step(1) + tables.step(1) + if tables.read()==BLANK:return False + need(tables.read()==PAGE_BEGIN,'next chirp page separator');tables.step(1);return True + +def previous_page(tables): + tables.step(-1) + while tables.read()!=PAGE_BEGIN: + need(tables.read() in (0,1),'current backward chirp page');tables.step(-1) + tables.step(-1);need(tables.read()==PAGE_END,'preceding chirp page end');tables.step(-1) + while tables.read()!=PAGE_BEGIN: + need(tables.read() in (0,1),'preceding backward chirp page');tables.step(-1) + tables.step(1) + +class CachedChirp: + def __init__(self): + self.word=FftWord(base_bits=4096) + self.pool=ScratchPool(256);self.scope=OuterScope(self.pool) + self.arithmetic=Arithmetic(self.word,self.scope) + self.counter,self.cache,self.output=Tape(),Tape(),Tape() + self.closed,self.pending=True,False + self.calls=self.records=self.cache_updates=self.axes=0 + for tape in (*self.pool.tapes,self.counter,self.cache,self.output):erase_marker(tape) + + def forbidden(self): + word=self.word + return (*self.pool.tapes,self.counter,self.cache,self.output, + *word.pool.tapes,word.output,*word.canonical,*word.base.pool.tapes, + *word.product.pool.tapes,*word.product.word.pool.tapes, + *word.product.twiddles.pool.tapes) + + def idle(self): + self.word.idle() + need(self.word.closed and not self.word.pool.live and self.word.output.read()==BLANK, + 'consumed cached-chirp scalar owner') + + def consume(self): + need(self.closed and self.pending,'one pending cached-chirp return') + self.output.clear();erase_marker(self.output);self.pending=False + + def rounded_product(self,left,right,width,precision): + with owned(*self.arithmetic.complex_product(*left,*right,width)) as exact: + real=truncate(exact[0],precision) + try:return real,truncate(exact[1],precision) + except BaseException:real.close();raise + + def initialize(self,shape,tables,width,precision,entry_bits): + """One shape/table pass; every chirp zero entry is exactly one.""" + first_width=None + try: + with owned(power_two(precision),Count.literal(0)) as (unit,zero): + one=Signed(Count(unit));imaginary=Signed(Count(zero)) + try: + need(shape.read()==0,'nonempty positive-axis chirp shape') + while shape.read()!=BLANK: + with owned(Count.literal(0)) as (length,): + while shape.read()==0: + self.counter.append(0);shape.step(1);length.increment() + positive(length) + need(shape.read()==AXIS_END,'chirp shape axis separator') + self.counter.append(AXIS_END);shape.step(1) + need(compare(length,width)<=0,'chirp coordinate fits scalar carrier') + if first_width is None:first_width=Count(length) + else:need(compare(length,first_width)<=0,'axis0 is a largest radix') + need(tables.read()==PAGE_BEGIN,'chirp table begins at each axis') + tables.step(1) + with owned(*read_pair(tables,width)) as value: + need(not value[0].negative and compare(value[0].magnitude,unit)==0 + and value[1].magnitude.zero(),'exact unit chirp zero entry') + with owned(power_two(length),Count.literal(1)) as (radix,one_count): + with owned(subtract(radix,one_count)) as (rest,): + with owned(Count.product(rest,entry_bits)) as (bits,): + walk(tables,bits,1,True) + need(tables.read()==PAGE_END,'exact radix-sized chirp page') + tables.step(1) + write_pair((one,imaginary),self.cache,width) + self.axes+=1 + need(tables.read()==BLANK,'complete chirp table catalogue') + write_pair((one,imaginary),self.cache,width) + finally:one.close();imaginary.close() + self.counter.rewind();self.cache.rewind();tables.rewind();shape.rewind() + need(tables.read()==PAGE_BEGIN,'first chirp page');tables.step(1) + walk(tables,entry_bits,1,True) + finally: + if first_width is not None:first_width.close() + + def replace_cache(self,value,word_scratch,width,entry_bits): + """Validate/encode before making an interior hole in the cache body.""" + write_pair(value,word_scratch,width);word_scratch.rewind() + for _ in indices(entry_bits): + need(self.cache.read() in (0,1),'complete overwritten cache slot') + self.cache.write(BLANK);self.cache.step(1) + walk(self.cache,entry_bits,-1) + copy_bits(word_scratch,self.cache,entry_bits) + need(word_scratch.read()==BLANK,'complete replacement cache word') + borrowed_tape(word_scratch).clear() + + def advance(self,tables,width,precision,entry_bits,word_scratch): + higher=False + while increment_field(self.counter): + walk(self.cache,entry_bits,1,True) + has_page=next_page(tables) + if self.counter.read()==BLANK: + need(not has_page,'counter and page catalogue end together');return None + need(has_page and self.counter.read() in (0,1),'carry has a following axis') + higher=True + if higher: + with owned(read_field(self.counter)) as (digit,): + with owned(Count.product(digit,entry_bits)) as (offset,): + walk(tables,offset,1,True) + walk(self.cache,entry_bits,1,True) + suffix=read_pair(self.cache,width) + walk(self.cache,entry_bits,-1);walk(self.cache,entry_bits,-1) + try: + while True: + with owned(*read_pair(tables,width)) as factor: + following=self.rounded_product(factor,suffix,width,precision) + for value in suffix:value.close() + suffix=following + self.replace_cache(suffix,word_scratch,width,entry_bits) + self.cache_updates+=1 + if not previous_field(self.counter):break + walk(self.cache,entry_bits,-1);walk(self.cache,entry_bits,-1) + previous_page(tables) + walk(self.cache,entry_bits,-1) + result,suffix=suffix,None;return result + finally: + if suffix is not None: + for value in suffix:value.close() + + def emit(self,payload,phase,width,precision,conjugate): + with owned(*read_pair(payload,width)) as value: + with owned(phase[1].negated() if conjugate else phase[1].copy()) as (imaginary,): + with owned(*self.rounded_product(value,(phase[0],imaginary),width,precision)) as result: + write_pair(result,self.output,width) + self.records+=1 + + def run(self,payload,shape,tables,width,precision,conjugate=False): + payload,shape,tables=(borrowed_tape(v) for v in (payload,shape,tables)) + width,precision=borrowed_count(width),borrowed_count(precision) + ports=(payload,shape,tables,width.tape,precision.tape) + need(type(conjugate) is bool,'one finite conjugation mode') + need(len({id(v) for v in ports})==5 and all(v not in self.forbidden() for v in ports), + 'distinct external cached-chirp ports') + for tape in ports:origin(tape) + positive(width) + need(compare(precision,width)<0,'chirp fractional field fits width') + need(self.closed and not self.pending and not self.pool.live and self.output.read()==BLANK, + 'consume prior cached-chirp output') + self.idle() + for tape in (*self.pool.tapes,self.counter,self.cache,self.output):initialize_marker(tape) + self.closed=False;succeeded=False;word_scratch=None;phase=None + try: + with sealed_constructors(),self.scope.installed(): + try: + word_scratch=self.pool.acquire() + with owned(Count(precision)) as (guard,): + guard.increment();guard.increment() + need(compare(guard,width)<=0,'positive unit phase fits signed carrier') + with owned(Count(width)) as (entry_bits,): + entry_bits.multiply_small(2) + self.initialize(shape,tables,width,precision,entry_bits) + phase=(Signed(power_two(precision)),Signed(Count.literal(0))) + while True: + self.emit(payload,phase,width,precision,conjugate) + for value in phase:value.close() + phase=None + phase=self.advance(tables,width,precision,entry_bits,word_scratch) + if phase is None:break + need(payload.read()==BLANK,'complete axis0-packed polynomial payload') + self.idle();self.calls+=1;succeeded=self.pending=True + finally: + if phase is not None: + for value in phase:value.close() + if word_scratch is not None:word_scratch.clear() + self.counter.clear();self.cache.clear();self.pool.empty() + for tape in ports:tape.rewind() + finally: + for tape in (*self.pool.tapes,self.counter,self.cache):erase_marker(tape) + self.output.rewind() + if not succeeded: + self.output.clear();erase_marker(self.output);self.pending=False + self.closed=True + return self.output diff --git a/research/cached-chirp-cyclic-join/retained/cached/chirp_tables.py b/research/cached-chirp-cyclic-join/retained/cached/chirp_tables.py new file mode 100644 index 0000000000..9302c06721 --- /dev/null +++ b/research/cached-chirp-cyclic-join/retained/cached/chirp_tables.py @@ -0,0 +1,172 @@ +"""Certified input-independent source tables for the #4100 cached chirp. + +The caller supplies the pinned certified-gaussian-recovery intervals module; +this file uses no floating-point trigonometry and inspects no payload. +@CubeJerry, with substantial OpenAI assistance. Apache-2.0. +""" + +from dataclasses import dataclass +from fractions import Fraction +from hashlib import sha256 +import json + +CANONICAL_BASE = "7c49fe32c55de02c2c873655c804b16e4c3fef0a" +INTERVAL_SOURCE = "research/certified-gaussian-recovery/intervals.py" +INTERVAL_SHA256 = "159d2a7d32a8cc7c8f56632a8ef127308b984a0a6753c9d6bdccacc6e7d6d4df" + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def integer(value, name, lower=None): + need(type(value) is int, name + " must be an integer") + if lower is not None: + need(value >= lower, name + " is below its permitted range") + return value + + +def ceil_log2(value): + integer(value, "logarithm argument", 1) + return (value - 1).bit_length() + + +@dataclass(frozen=True) +class Plan: + radices: tuple + slopes: tuple + normalized_slopes: tuple + radius: int + target: int + incoming_precision: int + f: int + W: int + work_bits: int + table_component_error: Fraction + cache_l1_error: Fraction + payload_l1_error: Fraction + + @property + def d(self): + return len(self.radices) + + @property + def phase_records(self): + return sum(self.radices) + + @property + def table_payload_bits(self): + return 2 * self.W * self.phase_records + + @property + def shape_symbols(self): + return sum(t.bit_length() for t in self.radices) + + +@dataclass(frozen=True) +class Bundle: + plan: Plan + tables: tuple + exact_quarter_entries: int + interval_entries: int + maximum_component_enclosure_units: int + + def receipt(self): + p = self.plan + numerical = {"radices": p.radices, "slopes": p.slopes, + "normalized_slopes": p.normalized_slopes, + "radius": p.radius, "target": p.target, + "incoming_precision": p.incoming_precision, + "f": p.f, "W": p.W, "work_bits": p.work_bits, + "tables": self.tables} + encoded = json.dumps(numerical, separators=(",", ":"), sort_keys=True) + return {"source_sha": CANONICAL_BASE, + "interval_path": INTERVAL_SOURCE, + "interval_sha256": INTERVAL_SHA256, + "data_sha256": sha256(encoded.encode("ascii")).hexdigest(), + "radices": list(p.radices), "slopes": list(p.slopes), + "f": p.f, "W": p.W, "work_bits": p.work_bits, + "table_component_error": str(p.table_component_error), + "cache_l1_error": str(p.cache_l1_error), + "payload_l1_error": str(p.payload_l1_error), + "exact_quarter_entries": self.exact_quarter_entries, + "interval_entries": self.interval_entries, + "maximum_component_enclosure_units": self.maximum_component_enclosure_units, + "table_payload_bits": p.table_payload_bits, + "shape_symbols": p.shape_symbols} + + +def allocation(radices, slopes, radius, target, incoming_precision=0): + radices, slopes = tuple(radices), tuple(slopes) + need(radices and len(radices) == len(slopes), "one nonempty slope per axis") + for t in radices: + integer(t, "radix", 2) + need(t & (t - 1) == 0, "dyadic radix") + for s in slopes: + integer(s, "slope") + need(s % 2 == 1, "odd slope") + need(radices[0] == max(radices), "axis zero must have largest radix") + integer(radius, "radius", 1) + integer(target, "target", 0) + integer(incoming_precision, "incoming precision", 0) + d = len(radices) + constant = 2 * (radius * (3*d - 1) + 1) + f = max(incoming_precision, target + ceil_log2(constant), 2) + W = max(f + ceil_log2(radius + 1) + 2, + max(t.bit_length() - 1 for t in radices) + 2, + ceil_log2(d + 1) + 2) + h = Fraction(1, 1 << f) + return Plan(radices, slopes, tuple(s % (2*t) for s, t in zip(slopes, radices)), + radius, target, incoming_precision, f, W, 2*f + 32, + 2*h, 2*(3*d - 1)*h, constant*h) + + +def certified_inner_point(box, precision, oracle): + """Check a conservative two-ulp component certificate for inward output.""" + need(len(box) == 2, "complex enclosure") + bits = box[0].bits + need(bits >= precision and box[1].bits == bits, "one sufficiently fine grid") + step = 1 << (bits - precision) + need(all(z.hi - z.lo <= step for z in box), "source enclosure too wide") + point, reported_l1 = oracle.inward_quantize(box, precision) + errors = tuple(max(abs(c*step - z.lo), abs(c*step - z.hi)) + for c, z in zip(point, box)) + need(all(e <= 2*step for e in errors), "component certificate exceeds two ulps") + need(reported_l1 == Fraction(sum(errors), 1 << bits), "inconsistent interval receipt") + need(oracle.in_disk(point, precision), "source point outside unit disk") + return point, max(z.hi - z.lo for z in box) + + +def prepare(radices, slopes, radius, target, *, oracle, incoming_precision=0): + """Return input-independent, axis-ordered integer phase tables. + + ``oracle`` must be an authenticated instance of the pinned source. + Use a fresh module namespace, or charge retained prior cache storage. + Source loading/authentication is offline, never a payload operation. + """ + p = allocation(radices, slopes, radius, target, incoming_precision) + scale = 1 << p.f + quarters = ((scale, 0), (0, scale), (-scale, 0), (0, -scale)) + tables = [] + exact_count = interval_count = max_width = 0 + for t, s in zip(p.radices, p.normalized_slopes): + modulus = 2*t + table = [] + for x in range(t): + phase = (-s*x*x) % modulus + if (4*phase) % modulus == 0: + value = quarters[(4*phase) // modulus] + exact_count += 1 + else: + box = oracle.root_of_unity(phase, modulus, p.work_bits) + value, width = certified_inner_point(box, p.f, oracle) + max_width = max(max_width, width) + interval_count += 1 + need(all(-(1 << (p.W-1)) <= c < (1 << (p.W-1)) for c in value), + "phase carrier overflow") + table.append(value) + need(table[0] == (scale, 0), "exact initial chirp phase") + tables.append(tuple(table)) + need(p.payload_l1_error <= Fraction(1, 1 << p.target), "precision allocation") + return Bundle(p, tuple(tables), exact_count, interval_count, max_width) diff --git a/research/cached-chirp-cyclic-join/retained/cached/chirp_tapes.py b/research/cached-chirp-cyclic-join/retained/cached/chirp_tapes.py new file mode 100644 index 0000000000..03916e4326 --- /dev/null +++ b/research/cached-chirp-cyclic-join/retained/cached/chirp_tapes.py @@ -0,0 +1,60 @@ +"""Separately paid serialization for cached chirp source tables and shape. +Prepared for @CubeJerry with substantial OpenAI Codex assistance. Apache-2.0. +Host integer loops occur only in input-independent preparation/fixture loading. +""" +from gaussian_sources import active +active() +from cardinal_counts import Count +from chirp_consumer import AXIS_END,PAGE_BEGIN,PAGE_END +from records import Tape +from ring_words import Signed,write_signed +from router_metadata import owned +from session import erase_marker +from words import need + + +def emit_pairs(values,tape,width): + for pair in values: + need(len(pair)==2,'two prepared complex components') + for value in pair: + need(type(value) is int,'prepared integer component') + with owned(Signed(Count.literal(abs(value)),value<0)) as (word,): + write_signed(word,tape,width) + + +class EncodedChirpTables: + def __init__(self,radices,values,width,precision): + self.width=self.precision=self.shape=self.tables=None + try: + need(type(width) is int and type(precision) is int and 0<=precision<=width-2, + 'prepared chirp signed grid') + need(len(radices)==len(values)>0,'one table per prepared axis') + need(all(type(t) is int and t>=2 and not t&(t-1) for t in radices), + 'prepared even dyadic radices') + need(radices[0]==max(radices),'prepared axis0 largest') + self.width=Count.literal(width);self.precision=Count.literal(precision) + self.shape,self.tables=Tape(),Tape() + unit=1< s_i, (2) + u >= ceil(log2(8q)), (3) + u d_sep <= q. (4) + +Equation (2) is `production_axis`'s strict lower ratio. Equations (3),(4) +are `production_common`'s logarithmic concentration and similarity guards. +The additional upper ratio `(2d_sep-1)(t_i-s_i)=1, the last expression is at most +`4(C_D+1)/p0`. It is <=1/2 once `p0>=8(C_D+1)` and the bound on D is in +force. Thus every fine axis fails (2) eventually, irrespective of q or +alpha. The literal caller has no production recovery admission on that +eventual family. + +This qualitative old-band/fine-band incompatibility is prior knowledge: +`pr1786-fine-prime-transfer-audit` already includes an old theta~1/d +guard as a failing control, and #4029/#4142 already read d=D+1. Our new +claim is the complete encoded recovery binding and the stronger nested +consequences below, not discovery of that generic band mismatch. + +## 4. Even independent spacing cannot keep the fine alpha + +Now allow d_sep to be arbitrary, which strictly relaxes the literal source. +For any fine axis (2) and theta_i<=p0^-2 imply + + d_sep > p0^2/4, + q >= u d_sep > u p0^2/4 >= p0^2/4. (6) + +Here u is a positive integer, as in the source. On the other hand (3) gives + + 8q <= 2^u. (7) + +For the actual fine alpha, the public gap proof gives +`pi*u<=5ln(16p0)` for p0>=2^200. For completeness this loose explicit onset +needs only elementary inequalities. Put L=ln(16p0). Since ln2>1/2, +L>100. The ceiling definition and 3=100 by putting x=sqrt(L)>=10 in +`x^2-8x-4>=16`. Also ln2<3/4, since the positive exponential series gives +`exp(3/4)>1+3/4+9/32+27/384>2`. Hence + + 2^u <= exp((5/3)ln2*ln(16p0)) + < (16p0)^(5/4)=32 p0^(5/4), + q < 4 p0^(5/4). (8) + +For p0>=64, `p0^2/4>4p0^(5/4)` (equivalently p0^3>2^16). +Equations (6) and (8) contradict one another. Therefore: + +**For p0>=2^200, no external precision q and no independently chosen +positive spacing d_sep can satisfy (2)--(4) with the actual fine alpha.** + +This is an all-q exclusion, not merely a failure at q=p0 or a finite search. +Increasing the private working precision P does not change (2)--(4). +The onset is for this alpha estimate and refusal only; it is not an onset +for legal global periods, primes, Core geometry or the complete multiplier. + +## 5. Retuning alpha still forces an external precision lower bound + +Relax alpha as well, keeping u positive and (2)--(4). Equations (3),(6) +give + + q > (p0^2/4) log2(8q). + +Because q>p0^2/4, `log2(8q)>1+2log2(p0)`. Consequently every element of +this enlarged necessary-condition domain obeys the strict bound + + q > (p0^2/4)(1+2log2(p0)) + = Omega(p0^2 log p0). (9) + +This does not assert that any point satisfying (9) meets the other old +guards, the original dimension binding, or any source accuracy premise. +It states what every successful relaxation retaining these three guards +would have to pay. In particular no q=O(p0) schedule suffices there. +The private coefficient/setup precision O(p0^2 log p0) of the *new* fine +Reference is a different quantity; no setup bit is being mislabeled as a +runtime record bit in (9). + +## 6. The external width has an actual full-volume scan bill + +`TensorPlan` sets `component_bits=q+2` and `record_bits=2(q+2)`. +`Sandwich.ingress` iterates over every original coordinate in `source_product=S`. +At each it writes a real signed component and an imaginary zero, including +the S-Q padded zero records. `ring_words.write_signed` calls `write_fixed` +in both sign branches; `compact_counts.write_fixed` appends exactly its +declared width, including leading zeroes. Thus one ingress writes exactly + + 2S(q+2) payload cells, and the two ingresses write 4S(q+2). (10) + +The full retained parent bank occupies Omega(Sq) cells. Reads, rewinds, +return copies, erasure, metadata, source tables, CRT, scalar products and +the three complete Tensor calls add work; none can cancel these appends. +This lower bound does not require or discount any supplier cost. + +Using the fine-family volume S=Theta(n/p0) from (1), (9)--(10) imply + + Omega(Sq)=Omega(n p0 log p0) + =Omega(n log n log log n). (11) + +For any fixed kappa>=0 this exceeds the intended +`O(n (log n)^(1-kappa))` budget. Again (11) is the consequence for a +hypothetical successful port preserving the named necessary guards and +literal ingress representation after relaxing d_sep and alpha. The +unchanged literal caller already rejects; we do not charge nonexistent +post-rejection execution. Packing, a new admission policy or a different +caller can evade this scoped obstruction and must be analyzed separately. + +## 7. Numerical recovery is a separate gate, with two source S factors + +This section restates the retained caller's conditional recovery interface; +it is not a new convolution theorem. Let A be its actual `outer_bits`, +M=2^A, and let its own source gamma and E be + + gamma=D(2u+ceil(log2(32q))+1), + E=Dq^2+6M+22+2D, epsilon=E*2^(gamma-q). + +`Sandwich.admit` evaluates exactly + + 2^(2b+5) S^2 (3E 2^gamma+2) < 2^q. (12) + +It also requires production mode, so a passing (12) cannot waive +(2)--(4). #5325 improves a conditional restored Tensor error estimate; +its proof explicitly retains all production requirements and cannot waive +these guards either. A small exact descriptor control in our checker passes +(12) while failing (2); it is not an admitted production invocation. + +For the ideal source maps `R F_s` and `R F_s^+`, with the source's +multiplicative-index permutation R, the opposite sandwich is +`(u_input *cyclic v_input)/S^2`. Ingress scaled each digit by 2^-(b+2). +The literal recovery routine therefore performs two exact multiplications +by S and one exact shift by 2b+4, then nearest integer. Its temporary width +is `(q+2)+4b+4`, as in #5095; S<2^b and q>=b+2 keep it O(q). + +More generally, a replacement complete transform service on every reached +half-disk input with coefficient error