research/lab/py/digit-uniform-bound
0 directories and 2 files in research/lab/py/digit-uniform-bound.
Digit Uniform Bound
- One bound on the digit transform of every one-missing-digit set in a base at once: it names the base and forgets the digit, so what it proves is a statement about
baseand not a list of bases. - The target is the
l^1exponentalpha_1of a one-missing-digit set against the threshold1/4, where the pair route turns a Mobius asymptotic on.
THE DOMINATION
- The set is
F = {0..base-1}, the digits of the code, less{a0},fill = base - 1, and its normalised transform ishat F(t) = (1/(base-1)) Sum_(a != a0) e(a t). - The full residue sum is the Dirichlet kernel up to a phase:
Sum_(a<base) e(a t) = e(((base-1)/2) t) D_base(t)withD_base(t) = sin(base pi t)/sin(pi t). - Subtracting the excluded term and taking absolute values,
|hat F(t)| = |e(((base-1)/2) t) D_base(t) - e(a0 t)|/(base-1) <= (|D_base(t)| + 1)/(base - 1) =: u_base(t), for everytand everya0. - The right side names no digit, so
G(w) = sup_(cell w) |hat F| <= sup_(cell w) u_basedominates allbaseexcluded digits at once, and|hat F| <= 1gives the free sharpeningu_base -> min(1, u_base). - The cost is exact: the triangle inequality throws away the phase
e((a0 - (base-1)/2) t), sou_baseis attained only where that phase is antipodal to the kernel and the bound is strict everywhere else. The uniform bound is weaker than the per-digit one at every base, by construction.
THE RUN DECOMPOSITION
- The shift sandwich reads
alpha_1 <= (1/N) log_base max_x Sigma_N(x)withSigma_N(x) = Sum_(i < base^N) Prod_(j<N) |hat F(base^j (x + i/base^N))|, andSigma_N <= Sigma_N^u, the same sum withu_basein place of|hat F|. - Expanding
Prod_j (|D_base(base^j t)| + 1)over subsetsEof{0..N-1}and telescoping each maximal run,D_base(t) D_base(base t) ... D_base(base^(l-1) t) = D_(base^l)(t), gives the exact identity(base-1)^N Sigma_N^u(x) = Sum_E Sum_(i<base^N) Prod_(runs (s,l) of E) |D_(base^l)(base^s (x + i/base^N))|. - Every term is a Lebesgue sum of a Dirichlet kernel over an arithmetic progression of points. Peeling the run of largest
sfirst, whose factor depends on the fewest low digits ofi, bounds each term bybase^N Prod_r lambda_(l_r)withlambda_l = L_(base^l)/base^landL_M = max_x Sum_(j<M) |D_M(x + j/M)|. - The peel is checked term by term: every one of the
2^N - 1run terms sits underbase^N Prod_r lambda_(l_r)andmax_x Sigma_N^usits undera_N (base/(base-1))^N, atbase 3, 4toN = 4andbase 5, 7, 10toN = 3, slack about12%. - Summing over
Eby first letter givesa_N = a_(N-1) + Sum_(l<N) lambda_l a_(N-1-l) + lambda_N, whose growth root solvesz = 1 + Sum_(l>=1) lambda_l z^(-l), andalpha_1 <= log_base(z base/(base-1)).
THE LEBESGUE CONSTANT
- Writing the
Mpoints as distancesd_jto the nearest integer and|sin(M pi x)| = |sin(M pi d_j)|, the sum iss(theta) Sum_j 1/sin(pi d_j)at offsetthetain[0, 1/2], with pairs at(m + theta)/Mand(m + 1 - theta)/M. - With
mu = pi(m + 1/2)/Manddelta = pi(1/2 - theta)/M, the pair identitys = cos(M delta)andcsc(mu - delta) + csc(mu + delta) = 2 sin mu cos delta/(sin^2 mu - sin^2 delta)turn the pair into2 csc mutimesX = cos(M delta) cos delta sin^2 mu/(sin^2 mu - sin^2 delta). - For
m >= 1,sin delta/sin mu <= delta/mu = r/(2m+1) <= r/3withr = 2 M delta/piin[0,1], andcos(pi r/2) <= 1 - r^2because2 sin^2(pi r/4) >= r^2, soX <= (1 - r^2)/(1 - r^2/9) <= 1and the pair is largest attheta = 1/2. - For
m = 0the pair is at most(M/pi)(1 + pi^2/(24 M^2)) max_theta sin(pi theta)(1/theta + 1/(1 - theta)) = (4M/pi)(1 + o(1)), which is thetheta = 1/2value again. - At
theta = 1/2the sum is2 Sum_(j < M/2) csc(x_j),x_j = (2j+1) pi/(2M); splittingcsc = 1/x + gwithgconvex increasing, the midpoint rule givesSum g(x_j) <= (M/pi) Int_0^(pi/2) g = (M/pi) log(4/pi), andH_(2n) - H_n/2bounds the reciprocal-odd sum. - Hence
L_M <= M((2/pi) log M + gamma' ) + 2/piwithgamma' = (2/pi)(gamma + log(8/pi)) = 0.96252282676, printed and used rounded up at0.9625229, solambda_l <= (2/pi) l log base + gamma' + (2/pi) base^(-l)at everyl, and the coarserlambda_l <= (2/pi) l log base + c_0withc_0 = 0.97needsbase^l >= 86, since0.97 - gamma' = 0.0074771has to cover(2/pi)/base^l. The scan confirms the shape:L_M/M - (2/pi) log Mfalls from0.965217atM = 4to0.962523, and the maximising offset is1/2at everyMtested.
THE THRESHOLD
- With the exact hypothesis
lambda_l <= c_1 l log base + gamma' + c_1 base^(-l),c_1 = 2/pi, the root equation is(z-1)^3 = c_1 (log base) z + gamma'(z - 1) + c_1 (z-1)^2/(base z - 1), andalpha_1 < 1/4follows fromz < base^(1/4)(1 - 1/base). The coarserc_0 = 0.97form drops the last term and is the same statement whereverbase^l >= 86. - Certified at 120 bits at
w = base^(1/4)(1 - 1/base)for everybasein[125, 3000), and the chain fails atbase 124; the certificate first checks that the constant it uses sits above the truegamma', which the earlier printed0.9625153did not. - Above
base 211the closed-form capz <= 1 + sqrt(2 c_1 log base + c_0), which follows fromz >= 2andz <= 2(z-1), is belowbase^(1/4)(1 - 1/base)and both sides are monotone, so the tail needs no evaluation at all. - The threshold is
base_u = 125:alpha_1 < 0.249980atbase 125, and it falls from there at every excluded digit, with no per-base spectral computation anywhere in the chain. Thec_0 = 0.97form of the same chain gives126, one base worse, so the sharper constant strengthens that statement and does not contradict it.
ANY NUMBER OF EXCLUDED DIGITS
- Nothing in the chain used
m = 1. WithEany set ofmexcluded digits,|Sum_(e in E) e(e t)| <= mgives|hat F(t)| <= min(1, (|D_base(t)| + m)/(base - m)) =: u_(base,m)(t), again naming no digit, and the free cap|hat F| <= 1still applies. - The run decomposition gains one weight. Expanding
Prod_j (|D_base(base^j t)| + m)over subsetsEof{0..N-1}carriesm^(N - |E|)on the positions outsideE, and each maximal run ofEtelescopes to the same Dirichlet kernel, so(base-m)^N Sigma_N^u(x) = Sum_E m^(N - |E|) Sum_(i<base^N) Prod_(runs (s,l) of E) |D_(base^l)(base^s(x + i/base^N))|, the identity checked term for term against the direct product. - The peel is unchanged, since it bounds one run term at a time; summing over
Eby first letter givesa_N = m a_(N-1) + m Sum_(l<N) lambda_l a_(N-1-l) + lambda_Nandmax_x Sigma_N^u <= a_N (base/(base-m))^N. - The growth root solves
z = m + m Sum_(l>=1) lambda_l z^(-l), so withlambda_l <= c_1 l log base + gamma' + c_1 base^(-l)the certificate is(z - m)(z - 1)^2 <= m(c_1 (log base) z + gamma'(z - 1) + c_1 (z-1)^2/(base z - 1))andalpha_1 < efollows fromz < base^e (1 - m/base). Atm = 1this is the cubic of the section above, so the general form is a check on the special one and not a rewrite of it. - The thresholds, certified at 120 bits on
[base_u, 3000)with the chain failing atbase_u - 1: against1/4it givesbase_u(1) = 125,base_u(2) = 649,base_u(3) = 1873; against the weaker bar1/3it gives32,105,230. So everybase >= 649clearsalpha_1 < 1/4at every excluded pair, with no per-pair spectral computation anywhere. The1/3rung atm = 1lands atbase 32, wherebase^l = 32is below86, so it is exactly the rung the coarserc_0form may not be used on. - The cost of uniformity grows with
mbecause the phase thrown away ismcharacters rather than one: the majorant losesm/(base-m)where the truth loses the interference between them, and the two-digit numeric floor is far below650(lab/py/digit-transform-norms, verbpairfail).
THE WINDOW CEILING
- The same majorant run through the window machine measures how far the uniform idea can reach at all:
U(w) = min(1, (min(base, S_1(w) S_2(w)) + 1)/(base-1))on the cell[w/base^n, (w+1)/base^n), the transfer matrix(M y)(v) = Sum_(c<base) U(v base + c) y((v base + c) mod base^(n-1)), andalpha_1 <= log_base rho. - The supremum is enclosed in closed form, never sampled.
|sin(pi t)|is concave on[0,1], sosup_cell 1/|sin(pi t)| = 1/sin(pi delta(w))exactly withdelta(w) = min(w, base^n - 1 - w)/base^n; andsup_cell |sin(base pi t)|is1when the image interval[w, w+1]/base^(n-1)contains a half-integer andmaxof the two endpoint values otherwise. Both are monotone closed forms, so there is no sub-scan and no Lipschitz slack. - The ceiling: the uniform window bound clears
1/4first atbase 75and at every base above it, and the bound moves by less than0.001from three window digits to four (0.340029 -> 0.339085atbase 21,0.297650 -> 0.297296atbase 34), so no refinement of the window rescues a base near74. - So
base 75is the floor of the digit-uniform route as a numeric fact,base_u = 126is the floor of what the route proves uniformly inbase, and the difference is slack in the run decomposition, not in the majorant.
THE CONSISTENCY CHECK
- Where both apply the uniform bound must be weaker than the per-digit ladder, and it is at every base tested, never stronger:
0.461532against0.323432at base 9 missing0,0.440960against0.350684at base 10 missing5,0.344129against0.283414at base 20 missing6,0.339085against0.250088at base 21 missing0,0.299529against0.253000at base 33 missing15,0.297296against0.249371at base 34 missing16. - The gap closes as the base grows,
0.1381atbase 9down to0.0479atbase 34, which is the discarded phase costing1/(base-1).
THE CERTIFICATE
- The threshold inequality is
mpmath.ivat 120 bits:base^(1/4),log baseand every product and difference are intervals, and a row passes only when the lower endpoint of the margin is positive. - The window rows are floats with every operation pushed outward by
nextafterand every sine inflated by2^-45in the unsafe direction, the Perron root bounded above by Collatz-Wielandt,M y <= mu ycomponentwise givingrho <= mu, with the float Perron vector as the test vector and a positive floor on it. - The power iteration accepts a root only after fifty consecutive relative moves under
1e-13and at least three hundred steps; a shorter test admits the transient cluster of near-zero cells, whose row sums arebase, and returns a root too large by a factor of sixteen. - Every printed exponent is
log_base murounded up and asserted againstmu < base^ebefore it prints, and the certifiedL_Mrows are the exact maximum over the offset, not a fit.
RUN
uv run python research/lab/py/digit-uniform-bound/ubound.py checkin 5 seconds: the domination on nine bases and every distinct digit, the run identity against the direct product at five base-level pairs, the Lebesgue scan, the threshold and its certificate, and the consistency rows.domination,identity,peel,lebesgue,threshold,window,least,comparerun the pieces;leastis 6 seconds andwindowis 5.- Prints only, writes nothing; every row that has a target asserts it, and the run ends by raising if any row is off.
WITNESSES
- The domination
|hat F| <= (|D_base| + 1)/(base-1)for every excluded digit, with the digit-slack column1.000000atbase 3falling to0.010045atbase 200. - The exact run decomposition of
Sigma_N^uinto2^NLebesgue sums of Dirichlet kernels at modulibase^l, and the peel bounding each of them. L_M <= M((2/pi) log M + 0.9625153) + 2/pi, with the maximum at the half-offset and the scanned constant falling from0.965217to0.962523.- The threshold
base_u = 125, certified at 120 bits on[125, 3000), the chain failing at124; thec_0 = 0.97form of the same chain gives126. - The window ceiling
base 75at three digits, and the consistency rows against the per-digit ladder.