research/lab/py/staircase-constants
0 directories and 2 files in research/lab/py/staircase-constants.
staircase-constants
- Computes the fill ratio of every base-2 design along the
rowword of odd sides3, 5, ..., 2L+1, against the closed formR_L = (w/2^dim)^L prod_i Gamma(L+2-r_i)/Gamma(2-r_i) / (Gamma(L+3/2)/Gamma(3/2))^dimover the rootsr_iof the fill polynomialP_F(n) = sum_j a_j n^(dim-j) (n-1)^j,a_jthe corners withjodd coordinates. - Corner
iis the binary digits ofi, most significant first, asmrlyrs::math::bang::factory::code_to_cornersreads a code; the fill depends on the profilea_jalone, so 77 profiles cover all 273 nonempty codes atdim 1, 2, 3,3 + 15 + 255. section_rendercounts filled cells of every code atdim 1..3on odd sides3..9and even sides2..8, and the row word bynp.kronatL = 2..5,2..3,2indim 1, 2, 3, againstP_Fandw/2^dim.section_exactchecks the Gamma identity against the exact integer product atL = 1, 2, 3, 10, 100, 1000at 50 digits.section_asymptoticsumslog1pof the exact per-letter excess in float toL = 10^6and compares withdrift log L + log C + c1/L,drift = dim/2 - mean,c1 = dim/8 + drift - var/2, mean and variance of the odd count over the corners.constantassertsCreal and positive before taking its real part.section_namedcomparesCwith its closed form on named codes;section_paritycompares the Gamma form at roots of unity for the two parity designs atdim 2..6with the independent zeta log seriesexp(-+ sum_m (+-1)^m (lambda(dim m) - 1)/m)at 50 digits, with the closed form where one is printed, and with the direct product;section_familytakes the roots of the at-most-one-odd design from its fill polynomial atdim 1..8, so the 50-digit match tests only the Gamma recurrence and the direct sum at ten digits is the independent check.- Values print at 12 significant digits and rounded to nine decimals, the form the notes copy.
section_pairingchecksP(1-n) = (-1)^dim P(n)iff the profile is a palindrome on 776 profiles atdim 1..4, the mirror identityC_F C_F' = prod sin(pi r)/(4 r (1-r))on all 77, and counts the profiles whose roots outside0, 1/2, 1pair underr -> 1-r.section_fencemultiplies the renormalised factors along sides3^kand along the odd primes;section_staircaseevaluates the stacked-prefix staircase dimension by Barnes G at the roots, against the direct fill sum, and the gap todimagainstlog(2^dim/w)/(log 2n - 3/2)ton = 2 x 10^5.
RUN
uv run python research/lab/py/staircase-constants/staircase.py
- From the repo root; one core, about 7 seconds: render 0.1s, roots 0.1s, exact 0.3s, asymptotic 1.0s, pairing 0.3s, staircase 2.8s, the rest under 0.2s each.
WITNESSES
magic.mdThe staircase: the Gamma identity on 77 profiles, worst log gap4.4e-47; the direct sum toL = 10^6againstdrift log L + log C + c1/L, worst residual1.13e-12, residual timesL^2flat at1.12fromL = 10^4.magic.mdThe staircase: renormalised limits along3^k,1.56493401857,1.31484053105,1.87429848245atdim 1 code 1,dim 2 code 7,dim 3 code 23; the five staircase dimensions1.892789261, 1.892315261, 1.893034267, 1.894190425, 1.895495742from Barnes G; Barnes G against the direct sum on 77 profiles, gap2.1e-50;ntimes the rate error-0.75, -0.71, -0.70, -0.69, -0.69atn = 10^2 .. 2 x 10^5,dim 2 code 7, and-0.41 .. -0.36on the row word.pi.mdPi on the staircase: the parity constants0.785398163,1.254589239,0.948815486,1.052420668,0.985352084,1.014708181,0.995477949,1.004525474,0.998553027,1.001447181atdim 2..6, each against the zeta log series at 50 digits, gap below1e-50, and its closed form where one is printed, gap below1e-50.pi.mdPi on the staircase: the named constants and the mirror products9 sqrt3 pi/64,sqrt2 pi^2/24,pi/4; 18 flip-closed codes against 46 palindromic codes atdim 2, 3; 37 of 77 profiles reduce by reflection, 13 of them palindromic.
- README.md3.9 kB
- staircase.py18.3 kB