Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions research/recursive-dot-carry/CALLER-REVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Review of the #7834 and #7830 caller controls

## The first payload twist in #7834

Let $T$ be the target volume, $r$ the fastest radix, $f$ the internal precision and $S=2^f$. At fastest coordinate $r/4$ or $3r/4$, the twist angle is $\pi/4$ or $3\pi/4$. The actual root generator uses the same square-root interval for both magnitudes and changes the cosine sign in the second case. Its output is $(u,v)$ with $|u|=|v|=\lfloor S/\sqrt2\rfloor$ and both operands have width $f$. This applies for admitted dyadic $r\ge4$. [Root enclosures and projection](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/fine_ring.py#L139-L188) · [Twist construction](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/fine_ring.py#L393-L430)

The admitted payload lies inside the radius-$S/2$ disk after lifting to the internal grid. The preceding conjugate phase pass preserves this bound. Each phase root is projected inward componentwise, and each cached phase product drops each component toward zero, so a stored phase has norm at most $S$. Multiplication followed by the same truncation therefore preserves the payload bound. Conjugation for the opposite entry only changes signs.

Write $v=\sigma u$, where $\sigma\in\{-1,1\}$. For a payload record $(x,y)$ the exact numerators are $u(x-\sigma y)$ and $u(y+\sigma x)$. Both mixtures have magnitude at most $\sqrt2\sqrt{x^2+y^2}\le S/\sqrt2$. Each of the original four calls and the replacement two calls therefore uses width $f$. The same signed normalizer sees the same two exact integers. There are two such records per fastest-axis row, so changing only this pass saves exactly $4T/r$ word-product dispatches per middle invocation. The dispatch threshold is 8,192 bits. At larger $f$, the affected calls select the source's wide child interface. This leaves the other transforms, routing, and cleanup charges in place. [Middle sequence](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/fine_ring.py#L435-L489) · [Word dispatcher](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/word_multiply.py#L55-L62)

The independent checker pins and runs the source root, diagonal, and middle implementations. It tests 50 source projections, including internal precisions at and above the wide cutoff, and substitutes only at the two guaranteed positions in the first payload twist. Six complete middle runs over radices 4, 8 and 16 preserve their outputs and release the numeric tapes. In both directions, the pinned 128-bit grid at target shape $(8,8)$ uses 1,728 original dispatches and 1,696 after this substitution. I separately reproduced the joint-fusion worker's receipt byte for byte. Its broader guarded substitution reaches 1,664 on that geometry by accepting 32 records across the middle. These finite middle replays use short word dispatches. [Broader guarded replay](JOINT-REPLAY.json)

An actual source-generated kernel record at coordinate $(2,1)$ in the same shape on the $f=16$ grid gives $(x,y)=(-25079,60547)$ against the twist $(46340,46340)$. All four original dispatches use 16-bit magnitudes. The mixture $x-y=-85626$ needs 17 bits. The payload half-disk guarantee therefore cannot be transferred to the kernel twist or to arbitrary diagonal passes. The wider test at $f=8200$ in the joint-fusion control checks the actual selector with an exact integer substitute for the wide child. It establishes preservation of the selector width and exact normalized integer at the named test record. [Independent checker](diagonal/independent_twist.py) · [Replay](diagonal/independent-twist.json)

## Sign-adaptive three-product joins in #7834

The classical three-product identity also works for the source's full signed Kronecker words. Choose signs $s,t\in\{-1,1\}$ so that $a+sb$ and $c+td$ are differences of magnitudes on their respective sides. Both mixed operands fit the larger original width per side. For $P=(a+sb)(c+td)$, if $s=t$ then the imaginary cross term is $s(P-ac-bd)$. If $s=-t$ then the real cross term is $P-tad-sbc$. This preserves the full integer numerators through centered limb extraction, negacyclic folding and the signed drop. If the mixed product crosses the wide-child threshold, at least one product omitted by the selected matching crosses it too. The threshold control with four equal positive operands of magnitude $2^{8191}+1$ makes an unguarded additive mix cross that threshold and keeps the sign-adaptive mix below it.

I replayed all four complete Gaussian product fixtures under optimized Python. Each uses 74,655 original and 62,284 substituted short-word dispatches, with 12,347 scalar joins and 24 ring joins changed. The pre-carry coefficients match a direct convolution oracle, the final binary outputs match ordinary multiplication, and numeric tapes are empty at return. All four exercise the same small Gaussian geometry. The high-width selector exercise covers 625 signed cases and substitutes an exact integer oracle for the wide child body. The replay demonstrates counts of calls, with separate sign, mixture, reconstruction, and tape work in any full cost comparison.

Both substitutions earn zero P104 tariff credit. They affect the additive scalar and packed-ring rows in #7834. Its grouped butterfly and CRT recurrence retains its charged jobs. The proof and replay distinguish the sparse border, where separately dropped summands must remain separate. At divisor 4, pairs $(3,1)$ and $(4,0)$ share raw sum 4 and have sums of signed drops 0 and 1. The worker replay also observes a concrete source row where postponement changes the drop. Its two-root transpose control checks the documented address endpoint in a model. With $D=e_0$ and $H$ equal to $0$ or $e_0$, the first return's aligned sum is $C_nD$ in both cases, while its retained first lane $C_n(D-H)$ differs and is read by the second root. [#7834 fixed-tape invoice](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/PROOF.md#L63-L81) · [Complete regression replay](GAUSSIAN-REPLAY.json)

## The pinned #7830 caller

I replayed the signed-parent probe byte-for-byte and independently checked the equal-rank occurrence labels against the pinned BIT certificate. The two sampled rational and binary native pairs have separate protected readers. The alternate pulses share their aligned sum or XOR, so a decoder seeing only the sum and the same incoming carry cannot produce the distinct required outputs. Removing a paid entry and its matching productive target at the same grade contributes zero to their signed difference.

The same-owner slab merge has a different interface and a positive split credit. Let $J=10^{480}$ and $R=4^{182}14^{134}21^{164}$. The source's low-first order really gives ranks $J$ and $R-J$, with $J<R<\min(2J,11^{480})$. Swapping on the first slab and then the second equals swapping on their union because the coordinate projectors are disjoint. This preserves both child-coordinate sets and all spectators under the stated whole-owner wrapper. A single rank-$R$ call fits the existing global ceiling. For $t=1-0.003884928046155$, the paid saving divided by $J^t$ agrees with $0.0000037048630317894778619$ at 85-digit precision. This is one fewer activation and zero dropped productive targets within the tested source contract.

The independent arithmetic also reproduces the optimistic unsplit BIT ratio $(P_t/T_t)^{480}=1.0031997182114837193\ldots$ for the pinned roster at the target. For $0<t<1$, subdivision can only add to the unsplit bill, and specializing targets can only remove productive credit. Thus even ideal removal of all subdivision surcharge fails this target with the same raw roster and full-field ABI. The local coalescence evidence has no fresh matcher or qualified outer application. [#7830 chronological application and cutoff](https://github.com/CrocSwap/integer-mult-bounds/blob/87fbf4f7b35b0f18ab12b5767775a9a424cf0b15/research/p104-mixed-rank-supplier/PROOF.md#L5-L39) · [Equal-rank certificate](https://github.com/CrocSwap/integer-mult-bounds/blob/87fbf4f7b35b0f18ab12b5767775a9a424cf0b15/research/p104-mixed-rank-supplier/BIT.json)
35 changes: 35 additions & 0 deletions research/recursive-dot-carry/CALLERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Where the two products are consumed

## Gaussian integer multiplication

In aliromman's #7834, the pointwise multiplication forms $ac-bd$ and $ad+bc$ before truncating each component. The synthetic ring join similarly forms both signed sums before it decodes the packed limbs, folds the negacyclic output, and drops to the fixed grid. These are genuine sites to change the scalar products while preserving the observations. Moving an individual rounding operation can change the result. For example, at divisor four, the pairs $(3,1)$ and $(4,0)$ have the same sum and different sums of individual truncations. The original implementation also checks the recovered complex residual and the final carry. [Pinned pointwise source](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/fine_ring.py#L118-L130) · [Packed ring join](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/fine_ring.py#L332-L390) · [Recovery to the final integer](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/product.py#L121-L170)

Two optional source replays exercise the pinned implementation. Their savings overlap at some sites. Each count compares its own variant with the original code.

* **Direct complex products.** A signed version of the classical three-product identity chooses a sum or difference separately on each input, keeping the largest product operand at or below its original side maximum. For example, on four components equal to $2^{8191}+1$, the conventional sum in $(a+b)(c+d)$ crosses the implementation's 8,192-bit cutoff. The sign choice avoids that extra wide dispatch. In four complete finite multiplications on the emitted $5\times7$ grid, ordinary word-product dispatches fell from **74,655 to 62,284** each. The input widths include a 20-by-19-bit example and a 144-by-144-bit example. Full product, coefficient vector, recorded error, tape movement and cleanup agreed. Both versions made zero wide-worker calls on those four runs. A complete 145-bit run reached its CPU limit before returning. The measured quantity is a count of multiplication dispatches, with extra combinations and branch work in the variant. [Sign choices, added work and scope](gaussian/PROOF.md) · [20-bit receipt](gaussian/REGRESSION.json)
* **Chirp twist.** Equal or nearly equal coefficient components give an ordinary product and a signed correction in each returned component. Exact equal-magnitude coefficients occur at the two diagonal angles of the first payload twist when its power-of-two radix is at least eight. This saves four scalar dispatches per outer tuple at these two positions. On a complete $8\times8$ middle call with the emitted 128-bit precision, applying the guarded edit across the diagonal passes gave **1,728 to 1,664** calls in each transform direction with identical output words. The emitted $32\times32$, 96-bit geometry gave **26,880 to 26,624**. The optional 8,200-bit precision control has a nonzero correction that affects the answer. It is a direct subroutine fixture external to the top-level geometry selector, and substitutes an exact integer oracle at the wide-worker return. [Offset proof and guard costs](diagonal/PROOF.md) · [Phase receipts](diagonal/RESULT.json)

Both kinds of scalar multiplication enter the ordinary word-arithmetic rows of #7834's invoice. Its certified common exponent for the grouped butterflies and CRT calls is $1-.997\cdot.001737=.998268211$. Removing every multiplication in the examined ordinary rows would still leave those existing terms. The simple modulus-$2^m$ result also omits the wider signed value that the packed ring's centered extraction consumes. [Middle-product cost](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/MIDDLE.md) · [Complete multiplier invoice](https://github.com/CrocSwap/integer-mult-bounds/blob/4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02/research/fine-prime-gaussian-product/PROOF.md#L63-L83)

### Replaying the Gaussian cases

The default package verifier runs without a second checkout. For the two public caller controls, use the exact source commit below. The scripts authenticate their source files, use the Python standard library, and write results to standard output. The short direct-product control runs the original and edited complete integer multiplier. Its full mode adds independently checked signed convolutions, cutoff controls and a charged-wrapper address witness. The phase control replays both transform directions.

~~~sh
git clone --filter=blob:none --no-checkout https://github.com/CrocSwap/integer-mult-bounds.git gaussian-source
git -C gaussian-source fetch origin pull/7834/head
git -C gaussian-source checkout --detach 4f0c67d5bb41d4af5501dcd40b3b388b35e0ff02
src=gaussian-source/research/fine-prime-gaussian-product
python3 -I -B research/recursive-dot-carry/gaussian/check.py --source "$src" --regression-only
python3 -I -B research/recursive-dot-carry/diagonal/verify.py --source-dir "$src"
~~~

## Charged P104 and BIT returns

At #7830 head `87fbf4f7b35b0f18ab12b5767775a9a424cf0b15`, rational slots 0 and 3 transform independent owners 1260 and 281 at grades 3 and 5. The first and only consumers of those child returns are distinct productive terminals 156028 and 155049. The impulses $(1,0)$ and $(0,1)$ thus have equal sum and different protected outputs. Even if surrendering both terminals retired both paid calls, the paid and productive grade deltas would each be $\{3:-48,5:-48\}$, for zero net signed credit. On BIT, native clocks 2 and 5 pulse distinct banks 680 and 681. Clocks 11 and 15 consume them into 683 and 684. Their coordinatewise XOR also loses the identity of the pulsed bank. A common incoming carry cannot recover it. [Rational word](https://github.com/CrocSwap/integer-mult-bounds/blob/87fbf4f7b35b0f18ab12b5767775a9a424cf0b15/research/p104-chart306-chain/DOUBLE-CANDIDATE.json.gz) · [Inherited BIT word](https://github.com/CrocSwap/integer-mult-bounds/blob/89a67c404226d51028e135de2b9169e9020d57af/research/p104-iterated-returns/binary/WORD.json.gz) · [Caller review](https://github.com/CrocSwap/integer-mult-bounds/blob/87fbf4f7b35b0f18ab12b5767775a9a424cf0b15/research/p104-mixed-rank-supplier/review/REVIEW.md)

One same-owner control preserves both blocks by coalescing their coordinates, a different operation from projecting them to a sum. Its grade $R=4^{182}14^{134}21^{164}$ lies between $J=10^{480}$ and $11^{480}$. Putting both slabs through the original complete grade-$R$ job saves $J^{1-\kappa}+(R-J)^{1-\kappa}-R^{1-\kappa}>0$ in the paid moment relative to that split. Even the unsplit raw BIT paid-to-productive moment at the target exceeds 1 at tensor power 480. Coarsening this fixed roster alone cannot clear the target. A new physical schedule would separately need its stock, matching and ordinary checks. [Mixed-rank construction](https://github.com/CrocSwap/integer-mult-bounds/blob/87fbf4f7b35b0f18ab12b5767775a9a424cf0b15/research/p104-mixed-rank-supplier/PROOF.md) · [Native price data](reference-price.json)

The [independent caller review](CALLER-REVIEW.md) derives the twist count, tests its width guard and replays the charged controls. The [caller receipt](caller-evidence.json) records the source-bound coordinate and price checks. The separate [twist verifier](diagonal/independent_twist.py) restricts the guard to the first payload twist; its [frozen output](diagonal/independent-twist.json) reports that narrower result.

The research starting point is canonical main `e54523517d0f03e58352e647c403a5af3e525a57`. The four-sibling promises, channel widths and gate savings have the scopes above. Earlier work on rectangular carry-state ranges, individual product bits, fixed-point Gaussian rounding and the mixed supplier supplies the comparison and the protected observations. [Rectangular convolution, #6252](https://github.com/CrocSwap/integer-mult-bounds/pull/6252) · [Single-product channels, #7838](https://github.com/CrocSwap/integer-mult-bounds/pull/7838) · [Selected result record](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/certificates/selected-result.json)
Loading
Loading