README.md
6.8 kB · markdown
Weighted Designs
- One exact generator for a weighted design, the refinement equation
phi(x) = sum_f c_f phi(base x - f)on thebasegrid withc_f = base^dim w_f, taken as the measuremu = sum_f w_f mu . S_f^(-1),S_f(x) = (x + f)/base. Input is(base, dim, F, w)withFthe filled digits andwa probability vector of exact rationals; output is safe-rounded floats. - The object it runs by default is base 3,
dim 2, cells(0,0) (2,0) (0,2), weights3/8, 3/8, 1/4, level 10. Every mass atlevelis an integer over8^level. - THE ARITHMETIC CLASS is decided exactly, never fitted: each
w_fbecomes its vector of prime exponents, and the group generated by thelog w_fis cyclic exactly when that integer matrix has rank 1. Rank 1 prints the span, rank 2 or more prints nonlattice. This is the input to the renewal dichotomy and is computed before any sweep runs. - The rank test holds for positive rational weights and for nothing else: only there does a weight carry a prime-exponent vector, and the criterion rests on the
Q-linear independence of the logs of the primes, so the exponent lattice and the group generated by thelog w_fhave the same rank. An irrational weight has no such vector and the test does not run on it; the printed header carries the hypothesis and the run asserts every weight is a rational. - THE MASS SIDE is the renewal variable
-log w.deltais the root ofsum_f w_f^s = 1by bisection, andN(a)counts words of mass at leaste^(-a)by exact multinomial enumeration over the distinct weight values with their multiplicities. The study prints the oscillation ofln N(a) - delta aover a window ofln baseata = 20, 40, 60, 80, 100, and asserts flat against a lattice class and decaying against a nonlattice one, the class having been fixed by the exponent-matrix rank. - THE LENGTH SIDE is the mass-weighted spin ripple:
M(r)is the mass of cells within radiusrof the corner fixed point, read as an exact integer shell histogram, detrended byalpha = -log_base w_0and folded into 24 bins oflog_base rover whole periods ofRinbase^4..base^8. The drift bar is that fold on the first half of the window against the second, over the bins both halves populate, and a second bar is taken on a whole-period split. Thelog baseperiodicity residual is printed by decade, and the cross-level identityM_level(r) = n_0 M_(level-1)(r)forr < 2 base^(level-1)is asserted as exact integer equality. - THE LOCAL DIMENSIONS are
alpha_min = -log_base max_f w_f,alpha_max = -log_base min_f w_fand the information exponentalpha(1) = -sum_f w_f log_base w_f. - THE JSR LADDER runs one solver on two rungs. Rung 0 is the designs:
Finside{0,...,base-1}^dimputssupp phiin the unit cell, exactly one integer translate meets it, the Daubechies-Lagarias matrices are1 x 1withT_f = [base^dim w_f], andJSR = base^dim max_f w_fin closed form withalpha_Holder(phi) = -dim - log_base(max_f w_f). Rung 1 is the first overlap atbase 2,T_0 = (c_(2i-j-1)),T_1 = (c_(2i-j)), restricted tosum_i v_i = 0by an exact change of basis whose defining identityB C = T Bis asserted entry by entry. - The bracket is a certificate, not a float. All matrix arithmetic runs in
Q(sqrt m)over exact rationals; spectral radii and spectral norms of the1 x 1and2 x 2blocks are enclosed by rational bounds through their trace and determinant, the Gripenberg lower end scans words to length 8 and truncates its root down, and the norm upper end scans to length 14 and rounds its root up. The same solver is run on rung 0 and asserted to collapse onto the closed form. - THE CONTROLS are pre-registered and printed with their verdicts: equal weights must reproduce the 0/1 design exactly, log-commensurable weights must keep every ripple, and only an irrational log ratio may move a mass observable. The study asserts that the length ripple survives all three and that exactly one of the three moves the mass side. A mass observable moving under all three would fail here.
- THE MULTIFRACTAL SPECTRUM closes the mass side. For equal contraction
1/baseunder the open set condition the pressure equationsum_f w_f^s (1/base)^tau(s) = 1givestau(s) = log_base sum_f w_f^sin closed form, andf(alpha) = inf_s (alpha s + tau(s)). Three things are checked:tau(0) = log_base |F|andtau(1) = 0; the box partition atlevelcarries the moments exactly,sum_i mu_i^s = (sum_f w_f^s)^levelin exact rational arithmetic ats = -2..3and levels 6, 8, 10; and the coarse-grained bandf_level(alpha) = log_base N(alpha)/levelsits under the transform at every level and every achievablealpha, which follows in one line fromN_i mu_i^s <= base^(level tau(s)). - The gap between the band and the transform is the Stirling volume term of the multinomial count. The expectation is Stirling's series, derived independently of the sweep, and the study asserts the band matches it to better than
1e-3at all three levels while the deficit itself falls with the level. Both endpoints of the band are exact at every level, deficit0.000000000. - The whole band at level 10 is printed row by row by the generator, never assembled by hand.
- Every printed number is asserted before it prints, and the study exits nonzero on any failure.
RUN
uv run python research/lab/py/weighted-designs/weighted.py- About four seconds; prints only, writes nothing, and holds one level-10 cell list at a time.
WITNESSES
- weights.md What weights move, the class table: the seven rank rows,
1/2,1/2,1/2,1/2,1/2,1/4,1/3,1/3,1/3and1/2,1/4,1/4at rank 1 with spansln 2,ln 2,ln 3,ln 2, and1/2,1/2,1/3,2/5,2/5,1/5,3/8,3/8,1/4at rank 2. - weights.md What weights move, the class table's last column: every
deltaand every five-point oscillation ofln N(a) - delta a, the four flat and the three decaying. - weights.md What weights move, the Dirichlet root:
1.0000000000at all four probability vectors. - weights.md What weights move, the controls: the three verdicts, length kept under all three and mass moved under exactly one.
- weights.md What weights never move, the ripple table: the four swings, drift bars, whole-period bars and fold gaps, the periodicity residual by decade, and the cross-level identity exact on all four.
- weights.md The ladder, rung 0:
T_f,JSR, the solver bracket,alpha_min,alpha_maxandalpha_Holder(phi)on all four sets. - weights.md The ladder, rung 1: the hat mask at
[0.5000000, 0.5000000]and D4 at[0.6830127, 0.7105812], hencealphain[0.4929285, 0.5500157]. - weights.md The pressure: the
tau(s)table ats = -2..3, the exact moments at levels 6, 8, 10, the deficits0.176458, 0.147536, 0.127619atalpha = 1.077324384, the Stirling match and the exact endpoints. - The whole coarse-grained band at level 10 is printed row by row by the run and is not carried on the page.