diff 56bc728..f6bf760 exact_dft_power_saving_v2.txt
diff --git a/exact_dft_power_saving_v2.txt b/exact_dft_power_saving_v2.txt
index 23d0cad..f16b5ec 100644
--- a/exact_dft_power_saving_v2.txt
+++ b/exact_dft_power_saving_v2.txt
@@ -46,23 +46,23 @@ The forward invocation performs the following eight rows in order: yβ y-JA; y
Lemma. For arbitrary initial auxiliary values the forward invocation sends (x,y,A,c) to (x,y+x,A,c); three such invocations, two forwards and the second reversed, send (X_d,Y_d) to (-Y_d,X_d) for every din T^3 and restore every auxiliary value.
-Proof. The first two rows subtract JA+Rc from y, the middle rows add R(c+Gx)+J(A+Vx), and the last two restore c and A; the net addition to y is (RG+JV)x. The coefficient of x_T in (RG)_S is (|Scap T|-1)/2, which is 1 when S=T, 0 when |Scap T|=1, and is cancelled by JV when |Scap T|=0 or 2. Hence RG+JV is the identity, and the auxiliary values cancel in each invocation on its own coordinates. The stage sequence (x,y)mapsto(x,y+x)mapsto(-y,y+x)mapsto(-y,x) gives the stated bank exchange.
+Proof. The first two rows subtract JA+Rc from y, the middle rows add R(c+Gx)+J(A+Vx), and the last two restore c and A; the net addition to y is (RG+JV)x. The coefficient of x_T in (RG)_S is (|Scap T|-1)/2, which is 1 when S=T, 0 when |Scap T|=1, and is cancelled by JV when |Scap T|=0 or 2. Hence RG+JV is the identity, and the auxiliary values cancel in each invocation on its own coordinates. The stage sequence (x,y)|->(x,y+x)|->(-y,y+x)|->(-y,x) gives the stated bank exchange.
-A triple has d_{nbr}=binom{97}{3}+3cdot97=147731 neighbours, the two terms counting intersections of size 0 and 2, and the number of physical wires is W=2N_0+I_0(vd_{nbr}+101)=1873807244643542670000, the term vd_{nbr} counting ordered pairs.
+A triple has d_{nbr}=binom{97}{3}+3Β·97=147731 neighbours, the two terms counting intersections of size 0 and 2, and the number of physical wires is W=2N_0+I_0(vd_{nbr}+101)=1873807244643542670000, the term vd_{nbr} counting ordered pairs.
-The network alone would still cost Wm pointwise operations to turn into tensor powers. The saving comes from changing frame along its wires. Work in the binary space D=π½_2^m with its dot product; call a subspace nondegenerate when its bilinear form has zero radical. For zin D write R_z for translation of addresses, (R_z f)(x)=f(x+z), and let J_m=2^{-m/2},((-1)^{xcdot y})_{x,y} be the normalized Walsh matrix, with J_m^2 the identity. Conjugating the diagonal character (-1)^{zcdot x} by J_m returns R_z. For a nondegenerate label U let P_U be projection onto U along U^perp and set
+The network alone would still cost Wm pointwise operations to turn into tensor powers. The saving comes from changing frame along its wires. Work in the binary space D=π½_2^m with its dot product; call a subspace nondegenerate when its bilinear form has zero radical. For zin D write R_z for translation of addresses, (R_z f)(x)=f(x+z), and let J_m=2^{-m/2},((-1)^{xΒ· y})_{x,y} be the normalized Walsh matrix, with J_m^2 the identity. Conjugating the diagonal character (-1)^{zΒ· x} by J_m returns R_z. For a nondegenerate label U let P_U be projection onto U along U^perp and set
q_U(x)=wt(P_U x)bmod 4, Phi_U=J_m,diag_x(i^{q_U(x)}),J_m,
where wt is integer Hamming weight. These matrices are used only to prove identities; the algorithm never executes a Walsh transform. Plainly Phi_0 is the identity, and Phi_D=C^{ β m}, because q_D(x)=wt(x) splits over the m bits and each bit factor is the 2times 2 kernel C.
Lemma. Let Uβ V be nested nondegenerate labels and let the residual E=Vcap U^perp carry an orthonormal binary basis of size rho. Then Phi_VPhi_U^{-1} is a product of exactly rho directional kernels C_z=a,Id+b,R_z or the inverse C_z^{-1}, with zne0.
-Proof. For binary x,y one has wt(x+y)=wt(x)+wt(y)-2|supp(x)capsupp(y)|, so weight is additive modulo four on orthogonal vectors. Decomposing V=Uperp E over the orthonormal basis z_1,...,z_rho gives q_V(x)-q_U(x)=sum_j wt(z_j)[z_jcdot x]pmod 4, with brackets the integer representative 0 or 1. Every wt(z_j) is odd, so its residue is pm1; on a decreasing edge the whole expression is negated. The identity i^{[zcdot x]}=a+b(-1)^{zcdot x} followed by Walsh conjugation produces C_z, and R_z^2=Id with C_z^2=R_z gives C_z^{-1}=R_zC_z.
+Proof. For binary x,y one has wt(x+y)=wt(x)+wt(y)-2|supp(x)capsupp(y)|, so weight is additive modulo four on orthogonal vectors. Decomposing V=Uperp E over the orthonormal basis z_1,...,z_rho gives q_V(x)-q_U(x)=sum_j wt(z_j)[z_jΒ· x]pmod 4, with brackets the integer representative 0 or 1. Every wt(z_j) is odd, so its residue is pm1; on a decreasing edge the whole expression is negated. The identity i^{[zΒ· x]}=a+b(-1)^{zΒ· x} followed by Walsh conjugation produces C_z, and R_z^2=Id with C_z^2=R_z gives C_z^{-1}=R_zC_z.
To apply the lemma, replace each scalar wire by an array indexed by D, give every gate a nondegenerate label shared by all wires it touches, give each source and sink its own label, and insert Phi_VPhi_U^{-1} along every edge from label U to label V. Scalar gates mix the touched arrays with scalar coefficients, while the common frame acts only on the address coordinate, so the two commute; the intermediate frames cancel and the intermediate auxiliary roles are restored by the scalar lemma. Indexing every array instead by f columns of m bits and using Phi_U^{ β f}, the same cancellation gives the full identity
diag_{sinks}(Phi_U^{ β f}),S,diag_{sources}((Phi_U^{-1})^{ β f}),
where S is the pointwise signed bank exchange and the identity on auxiliaries. This holds on arbitrary values in every physical role.
-The remaining choice is the labels. Identify D with D^{ β 3} for D=π½_2^h, and for Tin{1,...,h} of size three let t_T be its indicator, so t_Tcdot t_T=1 and neighbour indicators are orthogonal. Put u_d=t_{d_1} β t_{d_2} β t_{d_3} and U_d=< u_d>, a nondegenerate line. Sources carry label 0 except that X_d carries U_d; sinks carry label D except that Y_d carries U_d^perp. A route from 0 to D then has frame ratio C^{ β m}, and the route X_dto Y_d has the same ratio up to a translation, as the terminal computation confirms. The total increase of terminal dimensions is Wm-2N_0, leaving a margin of 2N_0 below Wm before any internal decrease is charged.
+The remaining choice is the labels. Identify D with D^{ β 3} for D=π½_2^h, and for Tin{1,...,h} of size three let t_T be its indicator, so t_TΒ· t_T=1 and neighbour indicators are orthogonal. Put u_d=t_{d_1} β t_{d_2} β t_{d_3} and U_d=< u_d>, a nondegenerate line. Sources carry label 0 except that X_d carries U_d; sinks carry label D except that Y_d carries U_d^perp. A route from 0 to D then has frame ratio C^{ β m}, and the route X_dto Y_d has the same ratio up to a translation, as the terminal computation confirms. The total increase of terminal dimensions is Wm-2N_0, leaving a margin of 2N_0 below Wm before any internal decrease is charged.
At an invocation in stage j write E=D^{ β (j-1)}, P=<β_{l<j}t_{d_l}>, B=P^perpsubset E, and Q=<β_{l>j}t_{d_l}>, with an empty tensor product the whole one-dimensional space. Thus E=Bperp P, B=0 in stage 1, and Q is everything in stage 3. Writing t=t_{d_j} at the physical bank entry of a gate, the eight scalar rows carry the following labels, each further tensored with Q: row 0 on Y and its side wires, B β < t>; rows 1 and 4 on Y and the centre, B β D; row 2 on X and the side, (B β D)perp(P β < t>); rows 3 and 6 on X and the centre, E β D; row 5 on Y and the side, (B β D)perp(P β t^perp); row 7 on X and the side, E β D. The X labels rise to E β D while the Y labels rise through B β D; the only decrease is the centre wire's return from E β D in row 3 to B β D in row 4, of dimension h. At stage 2 the eight updates run reversed with logical source Y and target X; the physical touch order is Y-side, Y-centre, X-side, X-centre, Y-centre, Y-side, X-centre, X-side, the ordered neighbouring side pairs stay neighbouring, and every displayed label stays nondegenerate.
@@ -71,13 +71,13 @@ Lemma. Every edge has nested nondegenerate endpoint labels, every nonzero orthog
Proof of the residual lemma. The full list of nonzero segments is as follows, all but the last tensored with Q; the omitted edges have zero residual. On X: entering to row 2 has B β t_X^perp, and row 2 to 3 has P β t_X^perp. On Y: row 0 to 1 has B β t_Y^perp, and row 4 to 5 has P β t_Y^perp. On the centre: source to row 1 has B β D, while each of 1to3, 3to4, 4to6 has P β D. On the side: source to row 0 has B β < t_Y>; row 0 to 2 has (B β t_Y^perp)perp(P β < t_X>); row 2 to 5 has P β < t_X,t_Y>^perp; row 5 to 7 has P β < t_Y>. Finally the auxiliary edge from its last use to the sink has E β D β Q^perp, with Q^perp taken in the full future space.
-The point of neighbouring triples is the side edge 2to5. Since t_Xcdot t_Y=0 and both have norm one, t_Y^perp=< t_X>perp< t_X,t_Y>^perp, so the row-2 label (B β D)perp(P β < t_X>) sits inside the row-5 label (B β D)perp(P β t_Y^perp) with exactly the displayed residual. All other rows follow from E=Bperp P and D=< t>perp t^perp. These decompositions confirm every inclusion and show that the only decreases are the central edges 3to4, each of dimension h. The signed changes telescope along physical wires: sources sum to N_0 and sinks to Wm-N_0, a total of Wm-2N_0, and each of the I_0(h+1) central wires loses h once; replacing signed by absolute changes adds twice these losses, giving s. Since v>3h(h+1), Delta=2N_0-2I_0(h+1)h=2v^2(v-3h(h+1))>0, and substitution yields the printed integers.
+The point of neighbouring triples is the side edge 2to5. Since t_XΒ· t_Y=0 and both have norm one, t_Y^perp=< t_X>perp< t_X,t_Y>^perp, so the row-2 label (B β D)perp(P β < t_X>) sits inside the row-5 label (B β D)perp(P β t_Y^perp) with exactly the displayed residual. All other rows follow from E=Bperp P and D=< t>perp t^perp. These decompositions confirm every inclusion and show that the only decreases are the central edges 3to4, each of dimension h. The signed changes telescope along physical wires: sources sum to N_0 and sinks to Wm-N_0, a total of Wm-2N_0, and each of the I_0(h+1) central wires loses h once; replacing signed by absolute changes adds twice these losses, giving s. Since v>3h(h+1), Delta=2N_0-2I_0(h+1)h=2v^2(v-3h(h+1))>0, and substitution yields the printed integers.
Nondegeneracy alone does not force an orthonormal basis over π½_2, because a nondegenerate form can be alternating. Every nonzero residual contains a norm-one vector: t^perp and < t_X,t_Y>^perp contain coordinate units outside supports of size at most three and six, a nonzero B contains a coordinate unit outside a support of size 3^{j-1}<h^{j-1}, a nonzero Q^perp is handled the same way, and the full spaces and lines P,Q,< t> plainly contain norm-one vectors; tensor products and a nonzero summand in an orthogonal sum preserve this. A nondegenerate binary symmetric space with a norm-one vector has an orthonormal basis: split off unit lines until the remainder is alternating, split a nonzero nondegenerate alternating space into orthogonal hyperbolic planes, and absorb each plane perpendicular to an already removed unit w by replacing (w,p,q) with w+p, w+q, w+p+q, which stay pairwise orthogonal unit vectors spanning the same three dimensions. All choices are finite binary linear algebra with a fixed pivot order.
Proposition (finite network interface). For every integer fge1 the explicit network applies C^{ β mf} to each of the W arrays indexed by π½_2^{mf}, using s directional steps, each on one array and conjugate by address permutations to copies of C^{ β f} on fibres, together with a fixed number of pointwise linear maps and address permutations; the assertion survives any extra spectator address bits.
-Proof. Use the network labels with each address split into f columns of m bits. Except on the route X_dto Y_d a source and its routed sink carry labels 0 and D, so the frame ratio is C^{ β mf}. On the exceptional route put u=u_d; since ucdot u=1, P_{U_d}x=u[ucdot x], and orthogonal weight additivity gives q_{U_d^perp}(x)-q_{U_d}(x)=wt(x)-2,wt(u)[ucdot x]=wt(x)+2[ucdot x]pmod4, because wt(u_d)=27 is odd. The exceptional frame ratio is therefore R_uC^{ β m} in each column. Correct these translations at the sinks and undo the signed bank exchange; the result is C^{ β mf} on every physical role, including each auxiliary array.
+Proof. Use the network labels with each address split into f columns of m bits. Except on the route X_dto Y_d a source and its routed sink carry labels 0 and D, so the frame ratio is C^{ β mf}. On the exceptional route put u=u_d; since uΒ· u=1, P_{U_d}x=u[uΒ· x], and orthogonal weight additivity gives q_{U_d^perp}(x)-q_{U_d}(x)=wt(x)-2,wt(u)[uΒ· x]=wt(x)+2[uΒ· x]pmod4, because wt(u_d)=27 is odd. The exceptional frame ratio is therefore R_uC^{ β m} in each column. Correct these translations at the sinks and undo the signed bank exchange; the result is C^{ β mf} on every physical role, including each auxiliary array.
By the edge lemma an edge of residual dimension rho costs rho products C_z^{ β f} or (C_z^{-1})^{ β f}. Extend z to a binary basis and apply the corresponding invertible address change in each column; translation by z becomes a flip of one selected bit, so the forward product is C^{ β f} on those f bits for each setting of all other bits, and an inverse product adds only a translation. Summing the residual dimensions gives exactly s directional steps, and the network, its bases, and the count of remaining pointwise operations are fixed independently of f.
@@ -89,11 +89,11 @@ Theorem (tensor-power bound). There is a deterministic exact algorithm applying
Proof. Take the least power of two at least W, namely W_*=2^{71}, and set
S=s+(W_*-W)m=W_*m-Delta, lambda=(S)/(W_*)=m-frac{Delta}{2^{71}}, theta=log_mlambda,
-so that 1<lambda<m and 0<theta<1; the W_*-W extra roles each use the m ordinary coordinate directions, preserving the absolute saving Delta. Transform W_* arbitrary arrays at once. With K=m(71+1) fixed, for k<K apply the k factors of C along the fibres one at a time; since K is fixed the cost divided by W_*2^k stays bounded, including k=0. For kge K write k=mf+r with f=lfloor k/mrfloor and 0le r<m, apply the r leftover bit factors directly, use the finite interface with f columns and r spectator bits on W arrays, and on each of the other W_*-W arrays use one directional step for each of the m coordinate directions; there are S directional steps in all. Every step needs 2^{k-f} independent transforms C^{ β f}; since fge72 and k-fge(m-1)fge71, the number 2^{k-f} is divisible by W_*=2^{71}, so after the address permutation its fibres split into exactly 2^{k-f}/W_* batches, each handled by recursion, with no partial batch.
+so that 1<lambda<m and 0<theta<1; the W_*-W extra roles each use the m ordinary coordinate directions, preserving the absolute saving Delta. Transform W_* arbitrary arrays at once. With K=m(71+1) fixed, for k<K apply the k factors of C along the fibres one at a time; since K is fixed the cost divided by W_*2^k stays bounded, including k=0. For kge K write k=mf+r with f=floor( k/m) and 0le r<m, apply the r leftover bit factors directly, use the finite interface with f columns and r spectator bits on W arrays, and on each of the other W_*-W arrays use one directional step for each of the m coordinate directions; there are S directional steps in all. Every step needs 2^{k-f} independent transforms C^{ β f}; since fge72 and k-fge(m-1)fge71, the number 2^{k-f} is divisible by W_*=2^{71}, so after the address permutation its fibres split into exactly 2^{k-f}/W_* batches, each handled by recursion, with no partial batch.
Let T(k) be the cost for W_* arrays and t(k)=T(k)/(W_*2^k). The fixed pointwise gates, permutations, terminal corrections, and at most m-1 leftover bit layers cost at most A W_*2^k outside recursive calls, so
- T(k)le A W_*2^k+S,frac{2^{k-f}}{W_*},T(lfloor k/mrfloor), t(k)le A+lambda,t(lfloor k/mrfloor)(kge K).
-Unrolling dlelceillog_m(k+1)rceil steps, with successive arguments lfloor k/m^jrfloor and base costs at most B, gives
+ T(k)le A W_*2^k+S,frac{2^{k-f}}{W_*},T(floor( k/m)), t(k)le A+lambda,t(floor( k/m))(kge K).
+Unrolling dlelceillog_m(k+1)rceil steps, with successive arguments floor( k/m^j) and base costs at most B, gives
t(k)le Asum_{j=0}^{d-1}lambda^j+Blambda^dle((A)/(lambda-1)+B)lambda^d=O((k+1)^theta),
using lambda^dlelambda(k+1)^theta. Fixed tables are generated once at absolute cost. The recursion can reuse working arrays: its stack has O(log(k+2)) levels, consecutive active lengths drop by at least a factor two, and all counters and strides fit O(k+1) bits. Initializing W_*-1 unused arrays, running the simultaneous procedure on the requested array in the last role, and keeping that role's output costs O(W_*2^k)=O(2^k), and W_* is an absolute constant. This proves the stated single-array bound.
@@ -101,44 +101,44 @@ Restoring arbitrary auxiliary values in the scalar lemma is exactly what makes t
Second, compiling a Fourier matrix on exactly its own coordinates. Padding a coordinate set is forbidden, because the sets later become tensor factors and separate padding would multiply the total dimension. The Fourier matrix is first factored into diagonal and triangular Toeplitz factors, the Toeplitz factors are realized as words on the original coordinates, with recorded workspace, and every two-coordinate shear is then compiled to the single kernel C. Call an update that adds a scalar multiple of one coordinate to a distinct coordinate a shear; a shear layer is a set of shears on disjoint pairs; a monomial layer is an invertible monomial matrix; a mixed round performs monomial layers or shear layers on disjoint coordinate regions, and splits into a monomial layer followed by a shear layer.
-Lemma (Newton reduction). For every primitive r-th root u and rge1 there is an invertible lower triangular N with F_r(u)=N D_N^{-1} N^{mathsf T}sfT, where D_N=diag(N_{00},...,N_{r-1,r-1}); N is a product of two invertible diagonal matrices and one invertible lower triangular Toeplitz matrix of width r, prepared as rational expressions in u with every denominator nonzero.
+Lemma (Newton reduction). For every primitive r-th root u and rge1 there is an invertible lower triangular N with F_r(u)=N D_N^{-1} N^{T}, where D_N=diag(N_{00},...,N_{r-1,r-1}); N is a product of two invertible diagonal matrices and one invertible lower triangular Toeplitz matrix of width r, prepared as rational expressions in u with every denominator nonzero.
Proof. For r=1 take N=D_N=T=(1). Otherwise let the k-th column of P be the coefficient vector of the monic Newton polynomial prod_{j<k}(Z-u^j), so P is unit upper triangular and N=F_r(u)P is lower triangular. For ige k,
N_{ik}=prod_{j=0}^{k-1}(u^i-u^j)=(-1)^k u^{k(k-1)/2}frac{H_i}{H_{i-k}}, H_j=prod_{s=1}^{j}(1-u^s), H_0=1,
-each H_j, 0le j<r, nonzero because u is primitive. Hence N=diag(H_i),T,diag((-1)^k u^{k(k-1)/2}) with T_{ik}=H_{i-k}^{-1} for ige k and 0 else, an invertible lower triangular Toeplitz matrix of diagonal one. Writing L=ND_N^{-1} gives the unit-lower/diagonal/unit-upper factorization F_r(u)=LD_NP^{-1}; such a factorization is unique, since comparing two forces a unit lower triangular matrix to equal an upper one, hence the identity, and then fixes the diagonal. Since F_r(u)=F_r(u)^{mathsf T}sfT, transposition gives another such factorization, so P^{-1}=L^{mathsf T}sfT and F_r(u)=ND_N^{-1}N^{mathsf T}sfT. Every division is by a product of nonzero H_j and powers of u, and the argument covers composite r and every primitive root.
+each H_j, 0le j<r, nonzero because u is primitive. Hence N=diag(H_i),T,diag((-1)^k u^{k(k-1)/2}) with T_{ik}=H_{i-k}^{-1} for ige k and 0 else, an invertible lower triangular Toeplitz matrix of diagonal one. Writing L=ND_N^{-1} gives the unit-lower/diagonal/unit-upper factorization F_r(u)=LD_NP^{-1}; such a factorization is unique, since comparing two forces a unit lower triangular matrix to equal an upper one, hence the identity, and then fixes the diagonal. Since F_r(u)=F_r(u)^{T}, transposition gives another such factorization, so P^{-1}=L^{T} and F_r(u)=ND_N^{-1}N^{T} Every division is by a product of nonzero H_j and powers of u, and the argument covers composite r and every primitive root.
-Thus it suffices to compile an invertible triangular Toeplitz matrix on its own coordinates; its transpose needs the same number of layers, since transposition reverses factor order and preserves monomial and shear layers. The local convolutions are written as linear arithmetic directed acyclic graphs in which each gate forms a linear combination of at most two earlier values or sources, fan-out counting designated output uses. A convolution of variable data with a fixed vector, of total operand length v, has such a DAG with O(vlog(2+v)) gates and O(log(2+v)) depth and absolute bounded fan-out: pad to the least power of two at least the full length, use pointwise multiplication at roots of unity with the fixed vector's transform supplying scalars, and combine transformed entries by the binary recursion a,bmapsto a+omega b,,a-omega b. Reversals and truncations preserve the bounds. Topology is printed before any coefficient is evaluated, keeping even gates whose scalar happens to vanish.
+Thus it suffices to compile an invertible triangular Toeplitz matrix on its own coordinates; its transpose needs the same number of layers, since transposition reverses factor order and preserves monomial and shear layers. The local convolutions are written as linear arithmetic directed acyclic graphs in which each gate forms a linear combination of at most two earlier values or sources, fan-out counting designated output uses. A convolution of variable data with a fixed vector, of total operand length v, has such a DAG with O(vlog(2+v)) gates and O(log(2+v)) depth and absolute bounded fan-out: pad to the least power of two at least the full length, use pointwise multiplication at roots of unity with the fixed vector's transform supplying scalars, and combine transformed entries by the binary recursion a,b|-> a+omega b,,a-omega b. Reversals and truncations preserve the bounds. Topology is printed before any coefficient is evaluated, keeping even gates whose scalar happens to vanish.
The DAG may need more registers than the coordinates hold. A replay identity runs it inside coordinates that already carry other data, using the compute-copy-reverse pattern of Bennett's reversible simulation and the principle of restoring storage whose contents are arbitrary, as in clean transparent computation in catalytic space:
./pdf/buhrman-et-al-2014-catalytic-space.pdf
-Lemma (replay with arbitrary borrowed coordinates). Suppose M:β^etoβ^a has a linear DAG with g gates, depth H, fan-in at most two, and fan-out at most delta counting output uses, and each output is a source or gate read or zero. On disjoint coordinate sets x,y,z of sizes e,a,g, a word of O((delta+1)(H+1)) shear layers and at most 8g+2a shears implements (x,y,z)mapsto(x,y+Mx,z); the initial contents of z are arbitrary, even correlated with x and y.
+Lemma (replay with arbitrary borrowed coordinates). Suppose M:β^etoβ^a has a linear DAG with g gates, depth H, fan-in at most two, and fan-out at most delta counting output uses, and each output is a source or gate read or zero. On disjoint coordinate sets x,y,z of sizes e,a,g, a word of O((delta+1)(H+1)) shear layers and at most 8g+2a shears implements (x,y,z)|->(x,y+Mx,z); the initial contents of z are arbitrary, even correlated with x and y.
-Proof. Give each gate one coordinate z_v in topological order and add its prescribed linear combination of predecessors into z_v, at most two shears per gate; the forward sweep is zmapsto Uz+Tx with U unit lower triangular, and the output reads are Fz+Dx with FT+D=M because a zero-gate-coordinate start reproduces the DAG. Run the sweep, add the output reads to y, and undo, restoring z and adding Mx+FUz to y. Run the same sweep with direct-source edges suppressed, omit Dx at the readout, subtract the resulting FUz, and undo again; the net effect is the stated map, and it is an identity in independent x,y,z, hence valid for correlated initial z. To layer the sweeps, give each gate a longest-path depth level; within a level the undirected multigraph of shear edges has maximum degree at most max{2,delta}, so greedy edge colouring uses at most 2max{2,delta}-1 colours and each colour has disjoint pairs, reordering being legal because no destination precedes a predecessor at the same level. Reverse sweeps reverse the layers and negate coefficients; four sweeps and two output rounds give the depth and the count 8g+2a.
+Proof. Give each gate one coordinate z_v in topological order and add its prescribed linear combination of predecessors into z_v, at most two shears per gate; the forward sweep is z|-> Uz+Tx with U unit lower triangular, and the output reads are Fz+Dx with FT+D=M because a zero-gate-coordinate start reproduces the DAG. Run the sweep, add the output reads to y, and undo, restoring z and adding Mx+FUz to y. Run the same sweep with direct-source edges suppressed, omit Dx at the readout, subtract the resulting FUz, and undo again; the net effect is the stated map, and it is an identity in independent x,y,z, hence valid for correlated initial z. To layer the sweeps, give each gate a longest-path depth level; within a level the undirected multigraph of shear edges has maximum degree at most max{2,delta}, so greedy edge colouring uses at most 2max{2,delta}-1 colours and each colour has disjoint pairs, reordering being legal because no destination precedes a predecessor at the same level. Reverse sweeps reverse the layers and negate coefficients; four sweeps and two output rounds give the depth and the count 8g+2a.
Lemma (exact-width Toeplitz layers). An invertible lower triangular Toeplitz matrix of width r has a word on exactly r coordinates in O(1+log^4 r) mixed rounds, prepared together with its coefficients in r^{O(1)} time from the Toeplitz entries and power-of-two roots of order at most 8r; the topology depends only on r, and every division is justified by the nonzero diagonal entry.
-Proof. The construction is the displacement-rank factorization of Kailath, Kung, and Morf, with an effective choice of chunk size that is measured on the printed graphs. Write T_v=(h_{i-j})_{0le jle i<v}, zero above the diagonal, h_0ne0. Compute reciprocal series g_0=h_0^{-1} and g_k=-h_0^{-1}sum_{j=1}^{k}h_jg_{k-j} for 1le k<r; these invert every lower triangular Toeplitz block. For v>1 put p=lfloor v/2rfloor and split
+Proof. The construction is the displacement-rank factorization of Kailath, Kung, and Morf, with an effective choice of chunk size that is measured on the printed graphs. Write T_v=(h_{i-j})_{0le jle i<v}, zero above the diagonal, h_0ne0. Compute reciprocal series g_0=h_0^{-1} and g_k=-h_0^{-1}sum_{j=1}^{k}h_jg_{k-j} for 1le k<r; these invert every lower triangular Toeplitz block. For v>1 put p=floor( v/2) and split
T_v=T_p&0B&T_{v-p}=Id&0E&Iddiag(T_p,T_{v-p}), E=BT_p^{-1},
so two diagonal transforms run in parallel and then add into the second block from the transformed first. In original indices E_{ij}=sum_{nu=j}^{p-1}h_{i-nu}g_{nu-j} for ple i<v, 0le j<p.
-Cut both intervals into consecutive chunks. For a target chunk of size a and source chunk of size e let M be the corresponding atimes e submatrix of E and let J_a,J_e be the lower shifts. Away from the first local row and column the entries telescope to E_{ij}-E_{i-1,j-1}=-h_{i-p}g_{p-j}, so, with D=M-J_aMJ_e^{mathsf T}sfT, one has without any rank test
- D=sum_{nu=1}^{3}v^{(nu)}(w^{(nu)})^{mathsf T}sfT,
-formed by extending that outer product to the whole chunk, subtracting it from D to get R, and adding the two corrective products e_0R_{0,*} and (R_{*,0}-R_{00}e_0)e_0^{mathsf T}sfT; all three terms are kept even when coefficients vanish. Iterating M=D+J_aMJ_e^{mathsf T}sfT gives, by nilpotence, M=sum_{lge0}J_a^lD(J_e^{mathsf T}sfT)^l. For one product vw^{mathsf T}sfT its action on x is two convolutions, b_l=sum_{j=l}^{e-1}w_{j-l}x_j then c_i=sum_{l=0}^{e-1}v_{i-l}b_l; reversing x, the first is an ordinary convolution, the second a truncated one, and three such branches summed give a specific DAG with absolute constants K_0,K_1,delta_0 and
+Cut both intervals into consecutive chunks. For a target chunk of size a and source chunk of size e let M be the corresponding atimes e submatrix of E and let J_a,J_e be the lower shifts. Away from the first local row and column the entries telescope to E_{ij}-E_{i-1,j-1}=-h_{i-p}g_{p-j}, so, with D=M-J_aMJ_e^{T}, one has without any rank test
+ D=sum_{nu=1}^{3}v^{(nu)}(w^{(nu)})^{T},
+formed by extending that outer product to the whole chunk, subtracting it from D to get R, and adding the two corrective products e_0R_{0,*} and (R_{*,0}-R_{00}e_0)e_0^{T}; all three terms are kept even when coefficients vanish. Iterating M=D+J_aMJ_e^{T} gives, by nilpotence, M=sum_{lge0}J_a^lD(J_e^{T} For one product vw^{T} its action on x is two convolutions, b_l=sum_{j=l}^{e-1}w_{j-l}x_j then c_i=sum_{l=0}^{e-1}v_{i-l}b_l; reversing x, the first is an ordinary convolution, the second a truncated one, and three such branches summed give a specific DAG with absolute constants K_0,K_1,delta_0 and
gle K_0(a+e)log_2(2+a+e), Hle K_1log_2(2+a+e), deltaledelta_0,
counting output uses.
To fit this DAG in the parent block, reserve the a+e source and target coordinates and one borrowed coordinate for each of the g gates, each such coordinate staying assigned to its gate throughout the replay. Choose the chunk size by measurement, without knowing K_0: for each integer bin{1,...,v} partition both intervals into chunks of size b except the last, print the DAG skeleton of every resulting pair, count its gates, and call b admissible when g+a+ele v for every pair. Take the largest admissible b; this is an integer test on printed graphs, made before any data moves. If no b is admissible, replace the entire recursive decomposition of T_v by a direct word: process rows in decreasing order, multiply the running coordinate by h_0, and add h_{i-j} times each lower coordinate j<i, whose original values are still in place.
-The depth bound is now immediate to verify. Take an absolute Dge16K_0+16; for large v the size b_0=lfloor v/(Dlog_2 v)rfloorge v/(2Dlog_2 v) is admissible, because a+ele 2v/(Dlog_2 v)le v/8 and the gate bound gives gle 4K_0v/Dle v/4. So the fallback occurs only for bounded v, and the chosen bge b_0 leaves O(log v) chunks per interval. For a chosen pair, borrow its g coordinates outside its source and target chunks but inside the same v coordinates; g+a+ele v guarantees such coordinates exist. The replay runs in O(1+log v) shear layers, the O(log^2 v) pairs are processed serially, every borrowed coordinate is restored before the next pair, and the cross update takes O(1+log^3 v) layers. From disjoint child blocks,
- d(v)lemax{d(lfloor v/2rfloor),d(lceil v/2rceil)}+O(1+log^3 v),
+The depth bound is now immediate to verify. Take an absolute Dge16K_0+16; for large v the size b_0=floor( v/(Dlog_2 v))ge v/(2Dlog_2 v) is admissible, because a+ele 2v/(Dlog_2 v)le v/8 and the gate bound gives gle 4K_0v/Dle v/4. So the fallback occurs only for bounded v, and the chosen bge b_0 leaves O(log v) chunks per interval. For a chosen pair, borrow its g coordinates outside its source and target chunks but inside the same v coordinates; g+a+ele v guarantees such coordinates exist. The replay runs in O(1+log v) shear layers, the O(log^2 v) pairs are processed serially, every borrowed coordinate is restored before the next pair, and the cross update takes O(1+log^3 v) layers. From disjoint child blocks,
+ d(v)lemax{d(floor( v/2)),d(lceil v/2rceil)}+O(1+log^3 v),
and summing along a balanced path gives d(r)=O(1+log^4 r).
Preparation uses polynomially many scalar operations for the reciprocals, the entries E_{ij}, and the three outer products. Each recursion node tests at most v sizes and at most v^2 chunk pairs per size, every printed graph has O(vlog(2+v)) gates, and there are fewer than 2r nodes, so even this deliberately redundant search is polynomial in integer cost; only the chosen graphs have coefficients evaluated, and computed scalars are stored as a shared arithmetic DAG. The first convolution has operand lengths e,e and the second a,e, both padded to power-of-two lengths below 4r, so one primitive root of order L_r=2^{lceillog_2(4r)rceil}<8r supplies every needed root and its inverse by taking powers. All integer indices have O(log(2+r)) bits. This is the claimed preparation bound, and the finite threshold in the depth argument never has to be computed.
Lemma (Fourier layers at every primitive root). For every primitive r-th root u the matrix F_r(u) has a polynomially preparable exact-width word in O(1+log^4 r) monomial and shear layers, whose coefficients are rational expressions in u and the power-of-two roots just used, with all denominators nonzero.
-Proof. Apply the Toeplitz lemma to the Toeplitz factor T inside N from the Newton reduction; the two diagonal factors of N are monomial layers. Composing the words for N^{mathsf T}sfT, D_N^{-1}, and N, and noting that transposition preserves layer types while reversing factor order, gives the Fourier word. Splitting mixed rounds into monomial and shear layers gives O(1+log^4 r) layers, and preparation and nonzero-denominator guarantees follow from the two lemmas.
+Proof. Apply the Toeplitz lemma to the Toeplitz factor T inside N from the Newton reduction; the two diagonal factors of N are monomial layers. Composing the words for N^{T}, D_N^{-1}, and N, and noting that transposition preserves layer types while reversing factor order, gives the Fourier word. Splitting mixed rounds into monomial and shear layers gives O(1+log^4 r) layers, and preparation and nonzero-denominator guarantees follow from the two lemmas.
It remains to compile a single shear into the kernel C. Put H' the 2times2 matrix with first row 1,1 and second row 1,-1, and S=diag(1,i). Direct multiplication gives H'=a^{-1}SCS. Then
K=H',diag(2,1),H',diag(-3,1),H'=-8&-100&-6,
@@ -178,9 +178,9 @@ and these primes and this ell are found in polynomial work in log(n+2) on O(log(
Proof. With pi(t) the count of primes at most t, for integer uge1,
(4^u)/(2u+1)lebinom{2u}{u}le(2u)^{pi(2u)}.
-The first bound holds because the central binomial coefficient is the largest; in the factorial formula the exponent of a prime p in binom{2u}{u} is sum_{age1}(lfloor 2u/p^arfloor-2lfloor u/p^arfloor)lelfloorlog_p(2u)rfloor, whose prime-power contribution is at most 2u, giving the second. Taking u=(j+1)^2 gives pi(2u)>j+1 for all large j, so the j-th odd prime is O((j+1)^2), and the upper bound on log R_ell follows by summation. For the lower bound r_jge j+2, so R_ellge(ell+2)!/2 contributes a constant times elllogell to the logarithm. Maximality gives R_ellle2n<R_ell r_{ell+1}, and the extra factor r_{ell+1} contributes O(log(ell+2)), so log n=Ξ(elllogell) and the displayed ell follows. Primes up to the first unused one are bounded by a fixed polynomial in ell+1=O(log(n+2)), testing divisors is polynomial work in log(n+2), and maintaining the product up to the first value exceeding 2n keeps everything at O(log(n+2)) bits.
+The first bound holds because the central binomial coefficient is the largest; in the factorial formula the exponent of a prime p in binom{2u}{u} is sum_{age1}(floor( 2u/p^a)-2floor( u/p^a))lefloor(log_p(2u)), whose prime-power contribution is at most 2u, giving the second. Taking u=(j+1)^2 gives pi(2u)>j+1 for all large j, so the j-th odd prime is O((j+1)^2), and the upper bound on log R_ell follows by summation. For the lower bound r_jge j+2, so R_ellge(ell+2)!/2 contributes a constant times elllogell to the logarithm. Maximality gives R_ellle2n<R_ell r_{ell+1}, and the extra factor r_{ell+1} contributes O(log(ell+2)), so log n=Ξ(elllogell) and the displayed ell follows. Primes up to the first unused one are bounded by a fixed polynomial in ell+1=O(log(n+2)), testing divisors is polynomial work in log(n+2), and maintaining the product up to the first value exceeding 2n keeps everything at O(log(n+2)) bits.
-Choose this ell and let ege0 be least with L=R_ell 2^ege2n, so 2nle L<4n, 2^e<2r_{ell+1}, and e=O(log(ell+2)); a bounded range is handled directly, so asymptotics may assume ellge1. For pairwise coprime factors q of L, namely the odd primes and the factor 2^e when nontrivial, choose d_q with (L/q)d_qequiv1pmod q and E_q=(L/q)d_q. The E_q are orthogonal idempotents modulo L, and the Chinese remainder indexing (j_q)_qmapstosum_q E_qj_qpmod L is a bijection with
+Choose this ell and let ege0 be least with L=R_ell 2^ege2n, so 2nle L<4n, 2^e<2r_{ell+1}, and e=O(log(ell+2)); a bounded range is handled directly, so asymptotics may assume ellge1. For pairwise coprime factors q of L, namely the odd primes and the factor 2^e when nontrivial, choose d_q with (L/q)d_qequiv1pmod q and E_q=(L/q)d_q. The E_q are orthogonal idempotents modulo L, and the Chinese remainder indexing (j_q)_q|->sum_q E_qj_qpmod L is a bijection with
w_L^{jk}=prod_q w_q^{d_q j_q k_q},
so, after input and output permutations, F_L is the tensor product of the F_q, the local output permutation multiplying a digit by the unit d_q modulo q. Good's coprime factorization is the source of this reduction, and Cooley, Lewis, and Welch make explicit that no twiddle factor enters:
./pdf/cooley-lewis-welch-1967-historical-notes.pdf
@@ -204,8 +204,8 @@ The main estimate follows. All maps are exact and deterministic, the local compi
and every fixed power of log(n+2) is eventually negligible against nell^theta, so substituting ell=Ξ(log n/loglog n) gives O(n(log n)^theta(loglog n)^{4-theta}). For a numerical exponent, direct integer arithmetic gives
Ξ΅=(Delta)/(mW_*)=(1717850673)/(590295810358705651712)>frac{28}{10^{13}},
and since log m<14 the choice eta_0=2/10^{13} makes eta_0log m<Ξ΅; from exp(-t)ge1-t,
- lambda=m(1-Ξ΅)<mexp(-eta_0log m)=m^{1-2cdot10^{-13}},
-so theta<1-2cdot10^{-13} and the fixed power of loglog n is below (log n)^{10^{-13}} for all large n, giving O(n(log n)^{1-10^{-13}})=o(nlog n). Every length, root order, product of indices, and address is polynomially bounded in n with absolute constants, the largest root order being controlled by the bound on D_*, so a fixed number of O(log(n+2))-bit words per integer suffices throughout.
+ lambda=m(1-Ξ΅)<mexp(-eta_0log m)=m^{1-2Β·10^{-13}},
+so theta<1-2Β·10^{-13} and the fixed power of loglog n is below (log n)^{10^{-13}} for all large n, giving O(n(log n)^{1-10^{-13}})=o(nlog n). Every length, root order, product of indices, and address is polynomially bounded in n with absolute constants, the largest root order being controlled by the bound on D_*, so a fixed number of O(log(n+2))-bit words per integer suffices throughout.
For exact convolution and polynomial multiplication, set M=2n-1 and zero-pad a,b to length M. Every index sum lies in 0,...,2n-2=M-1, so the length-M cyclic convolution has no wraparound and equals (c_0,...,c_{M-1}), and with the positive-exponent convention
(F_Mc)_j=sum_{r,s=0}^{n-1}a_rb_sw_M^{j(r+s)}=(F_Mwidetilde a)_j(F_Mwidetilde b)_jquad(0le j<M).
@@ -225,19 +225,19 @@ Lemma (effective extraction). Given finitely many polynomials in a variables ove
Proof. The triangular substitution below is the standard proof of Noether normalization, and the obstruction argument is the determinant form of Nakayama's lemma (Stacks Project tags 051M, 051N, 00OX, and 00DV). Keep a finite generating list of the ideal I=(f_i) and an integer m initially equal to a, with witnesses for derived members. After invertible polynomial changes, maintain for each j>m a member of I monic in x_j over the earlier variables, so S=β[x_1,...,x_a]/I is finite over R=β[x_1,...,x_m]. The fiber S/(x_1,...,x_m)S is computed by setting the first m variables to zero and reducing monically in a rational basis; if it is nonzero that is the answer, and if m=0 and it is zero then S=0. If the fiber vanishes and m>0, localizing at the maximal ideal and applying the determinant form of Nakayama shows S_{mathfrak m}frakm=mS_{mathfrak m}frakm forces det(Id-M) a unit and nonzero, a contradiction unless Icap Rne0; a nonzero member hin Icap R is found by searching increasing degree cutoffs with rational linear algebra. The triangular monic substitution x_i=y_i+y_m^{(d+1)^i}, x_m=y_m (the earlier variables, with d=deg h) weights monomials so that the leading power of y_m in the transformed h has a unique monomial source and a nonzero rational coefficient, giving a monic relation in y_m after dividing; the earlier relations stay monic, so m decreases and the process terminates in at most a steps of finite rational arithmetic. An inverse-witness equation uv=1 forces u a unit in every output algebra.
-Remark (faithful simulation). If d=dim_{β}E, the algebra E β _{β}β is the space β^d with the computed multiplication table, and zmapsto z1_E is injective. Addition is coordinatewise and multiplication by a prepared algebra element is a dtimes d complex matrix, so each linear operation costs O(d^2) ordinary scalar operations. When a circuit acts as F_r times the algebra identity, embedding inputs as multiples of 1_E and reading the first coordinate of each output is a faithful constant-factor simulation, needing neither a complex embedding nor extraction of algebraic roots; the integer d is fixed before the input length is known.
+Remark (faithful simulation). If d=dim_{β}E, the algebra E β _{β}β is the space β^d with the computed multiplication table, and z|-> z1_E is injective. Addition is coordinatewise and multiplication by a prepared algebra element is a dtimes d complex matrix, so each linear operation costs O(d^2) ordinary scalar operations. When a circuit acts as F_r times the algebra identity, embedding inputs as multiples of 1_E and reading the first coordinate of each output is a faithful constant-factor simulation, needing neither a complex embedding nor extraction of algebraic roots; the integer d is fixed before the input length is known.
-The fixed identities suffice for an effective circuit printer. Put Q=q^b, j=lfloor k/brfloor, and tensor the first certificate word across j groups; every call slot decomposes, after reindexing, as
- (A β I_{Q-q})^{ β j}congβ_{r=0}^{j}(A^{ β r})^{ β binom{j}{r}(Q-q)^{j-r}},
-and recursion on these smaller tensor orders plus direct calls on the fewer than b remaining axes gives, writing f(k) for the construction size divided by q^k, a normalized cost f(k)le C_0+g,πΌ,f(K) with K binomial on lfloor k/brfloor trials and success probability q/Q (the sector widths weight the recurrence by dimension). Since gq/(bQ)<1, choosing 0<alpha<1 with g(q/(bQ))^alpha<1 and using concavity and πΌ(K+1)^alphale(1+kq/(bQ))^alpha gives f(k)=O((k+1)^alpha).
+The fixed identities suffice for an effective circuit printer. Put Q=q^b, j=floor( k/b), and tensor the first certificate word across j groups; every call slot decomposes, after reindexing, as
+ (A β I_{Q-q})^{ β j}~=β_{r=0}^{j}(A^{ β r})^{ β binom{j}{r}(Q-q)^{j-r}},
+and recursion on these smaller tensor orders plus direct calls on the fewer than b remaining axes gives, writing f(k) for the construction size divided by q^k, a normalized cost f(k)le C_0+g,πΌ,f(K) with K binomial on floor( k/b) trials and success probability q/Q (the sector widths weight the recurrence by dimension). Since gq/(bQ)<1, choosing 0<alpha<1 with g(q/(bQ))^alpha<1 and using concavity and πΌ(K+1)^alphale(1+kq/(bQ))^alpha gives f(k)=O((k+1)^alpha).
-For successive tge1 let r_1<...<r_t be the first t primes above 2q and set m_t=prod_{i=1}^{t}r_i, ell_t=m_t2^{lceillog_2(16r_t)rceil}, R_t=β[z]/(Phi_{ell_t}(z)). Cyclotomic polynomials are computed from z^s-1=prod_{dmid s}Phi_d(z), arithmetic is polynomial division and the Euclidean algorithm, a polynomial is a unit modulo Phi_s exactly when its gcd with Phi_s is one, and identities in R_t are checked at the primitive roots; roots of orders dividing ell_t are compatible powers of z. Carry the constructions over E β _{β}R_t with Fourier coefficients in the central factor, use the Fourier layer construction on each width r_i (its rational formulas hold in R_t, all denominators nonzero at every primitive specialization and every convolution root order dividing the power of two), and realize a shear of unit coefficient v as the conjugate of U by diag(v,1,...,1), splitting a general coefficient c as d+(c-d) with a positive integer d chosen until c-d is a unit. Partition the disjoint pairs of an axis into at most q batches of at most lfloor r_i/qrfloor pairs, possible because r_i>2q, with spectators restored before the next batch. Synchronizing these fixed patterns across axes with identities in idle positions, each monomial slot having linear size and every other slot a direct sum of A^{ β k} with kle t and total width m_t, the amplification bound gives a circuit over E β _{β}β of size
+For successive tge1 let r_1<...<r_t be the first t primes above 2q and set m_t=prod_{i=1}^{t}r_i, ell_t=m_t2^{lceillog_2(16r_t)rceil}, R_t=β[z]/(Phi_{ell_t}(z)). Cyclotomic polynomials are computed from z^s-1=prod_{dmid s}Phi_d(z), arithmetic is polynomial division and the Euclidean algorithm, a polynomial is a unit modulo Phi_s exactly when its gcd with Phi_s is one, and identities in R_t are checked at the primitive roots; roots of orders dividing ell_t are compatible powers of z. Carry the constructions over E β _{β}R_t with Fourier coefficients in the central factor, use the Fourier layer construction on each width r_i (its rational formulas hold in R_t, all denominators nonzero at every primitive specialization and every convolution root order dividing the power of two), and realize a shear of unit coefficient v as the conjugate of U by diag(v,1,...,1), splitting a general coefficient c as d+(c-d) with a positive integer d chosen until c-d is a unit. Partition the disjoint pairs of an axis into at most q batches of at most floor( r_i/q) pairs, possible because r_i>2q, with spectators restored before the next batch. Synchronizing these fixed patterns across axes with identities in idle positions, each monomial slot having linear size and every other slot a direct sum of A^{ β k} with kle t and total width m_t, the amplification bound gives a circuit over E β _{β}β of size
s_t=O!(m_t(t+1)^alpha(1+log^4(t+2)))=o(m_tlog m_t),
-because r_t=O((t+1)^2) and log m_tge tlog2. Specializing zmapsto w_{ell_t} and expanding only the fixed algebra E yields a fully explicit complex circuit together with a fully expanded scalar preparation program, with every coefficient a rational polynomial evaluated at w_{ell_t} and written as a finite Horner list.
+because r_t=O((t+1)^2) and log m_tge tlog2. Specializing z|-> w_{ell_t} and expanding only the fixed algebra E yields a fully explicit complex circuit together with a fully expanded scalar preparation program, with every coefficient a rational polynomial evaluated at w_{ell_t} and written as a finite Horner list.
Theorem (bounded-printer uniformization). Suppose a fixed bit machine prints complete records (m_t,C_t) with strictly increasing m_ttoβ, where C_t computes F_{m_t} by s_t=o(m_tlog m_t) scalar linear gates, and each record explicitly lists its gates, output indices, and a scalar preparation program whose instructions use rationals, valid nonzero divisors, and canonical roots w_a of positive integer orders written in binary. Then one deterministic algorithm computes every F_n in o(nlog n) time, including preparation and indexing, and a single specified root of order below 8n^3 suffices.
-Proof. Run the normalized printer from the start for B=lfloorlog_2 nrfloor bit steps and take the last completed record with 2le m_tlesqrt B, or the ordinary radix-two circuit if there is none; every fixed record eventually finishes with a width inside the bound, so the selected width tends to infinity and s/(mlog m)to0. The visible description has at most B bits; decode the explicit lists, evaluate the preparation program once (cost B^{O(1)}), and then run its m+s gates on each new input in O(m+s) time without re-expansion. Put X=2n-1, let m^H be the largest power of m not exceeding X, and set p=lceil X/m^Hrceil, P=m^Hp, so 1le ple m and Xle P<2X<4n. The mixed-radix recursion uses Hlelog(2n)/log m copies of radix m and one radix p, the latter computed directly; at a split ab using input index bj_a+j_b and output index k_a+ak_b the identity (bj_a+j_b)(k_a+ak_b)equiv bj_ak_a+aj_bk_b+j_bk_apmod{ab} gives the two smaller transforms and the intervening twiddle, and copying, tabulating, and enumerating cost linear work per level, so one transform costs
+Proof. Run the normalized printer from the start for B=floor(log_2 n) bit steps and take the last completed record with 2le m_tlesqrt B, or the ordinary radix-two circuit if there is none; every fixed record eventually finishes with a width inside the bound, so the selected width tends to infinity and s/(mlog m)to0. The visible description has at most B bits; decode the explicit lists, evaluate the preparation program once (cost B^{O(1)}), and then run its m+s gates on each new input in O(m+s) time without re-expansion. Put X=2n-1, let m^H be the largest power of m not exceeding X, and set p=lceil X/m^Hrceil, P=m^Hp, so 1le ple m and Xle P<2X<4n. The mixed-radix recursion uses Hlelog(2n)/log m copies of radix m and one radix p, the latter computed directly; at a split ab using input index bj_a+j_b and output index k_a+ak_b the identity (bj_a+j_b)(k_a+ak_b)equiv bj_ak_a+aj_bk_b+j_bk_apmod{ab} gives the two smaller transforms and the intervening twiddle, and copying, tabulating, and enumerating cost linear work per level, so one transform costs
O!(P[1+p+H(1+s/m)])+B^{O(1)}.
Finally reduce F_n to a convolution of length P: store eta^{j^2}x_j with eta=w_{2n} for 0le j<n, use the fixed kernel eta^{-h^2} at the residues of -(n-1)le hle n-1 (distinct since Pge2n-1), and multiply output k by eta^{k^2}, which reproduces F_nx through k^2+j^2-(k-j)^2=2kj; a constant number of transforms plus linear work suffices. For the root, let R be the product of the listed root orders, with total binary length at most B, so Rle2^Ble n, and the single w_D with D=2nPR<8n^3 supplies every listed root and the two outer roots by integer powering. Since p=O(1+β(log n)), dividing the arithmetic term by nlog n gives
O!((1+p)/(log n)+(1)/(log m)+(s)/(mlog m))=o(1),