README.md
3.7 kB · markdown
stack-levels
- The correlation law of two stacked layers when the layers are different designs, or the same design at different levels, computed exactly.
- The general law it runs on: for 1-periodic
f, gwith Fourier coefficientshat f(k), hat g(k), the mean off(mx) g(nx)over the unit interval issum_j hat f(j n') hat g(-j m')withg = gcd(m,n),m' = m/g,n' = n/g, and the covariance is the same sum overj != 0. check_parityrecovers the landed parity law from that sum by exact rational integration on the lcm grid: the master integralgcd(m,n)^2/(mn)at all 820 pairs to 40, reading1/15, 1/3, 1/3at(3,5), (3,9), (5,15), and the layer covariance(g^2-1)/(4mn), zero at all 159 coprime odd pairs.- The same block prints the price of the tree's half-period convention: the 1-periodic odd strip
p(x) = 1ifffloor(2x)is odd carriesg^2/(4mn), nonzero at 159 of the 490 coprime pairs to 40, so coprime independence belongs to the odd sub-stack and not to the design. check_carpetcomputes the covariance off_level(mx)andf_level(nx)for the base-3 Sierpinski shadowf_level(x) = 1iff none of the firstlevelbase-3 digits is 1, exactly, at level 1, 2, 3 and all 820 pairs to 40, by cell counting on thelcm(m,n) 3^levelgrid.- It checks three laws there: the covariance depends only on
m/g, n/g; the productCov * m' n'depends only on(m' mod 3^level, n' mod 3^level); and the covariance is zero exactly when3^leveldividesm'orn'. - At level 1 it checks the closed form
Cov = (2/9) chi(m') chi(n')/(m'n')withchithe nontrivial character mod 3, reading-1/9at(1,2),1/45at(2,5)and0at(1,3), on all 1600 ordered pairs. - It prints the kernels
G_2on the units mod 9 and the rowG_3(1,b)on the units mod 27, and the non-separability witnessG(1,1)G(4,4) - G(1,4)^2 = 76/729. carpet_2dcell-counts the 2D fieldf_level(mu) f_level(mv)againstf_level(nu) f_level(nv)on the squared grid and confirmsCov_2D = Cov_1D (M + (2/3)^(2 level)), so the two zero sets coincide.check_levelsverifies the level splitf_level(x) = prod_(i < level) f_1(3^i x)as masks at level 1..4, the nestingf_level(nx) <= f_(level-1)(3nx), and the cross-level zero lawCov(f_level(mx), f_level'(nx)) = 0exactly when3^level | n'or3^level' | m', on all 14400 ordered triples withlevel, level' <= 3andm, n <= 40.check_designsverifies two closed forms at level 1: between two base-3 one-digit-removed shadows,Cov = c/(27 m'n')withcin-6, -3, 3, 6and zero exactly when 3 dividesm'n'; between the base-2 strip and a base-3 shadow,Cov = c/(18 m'n')withcin-3, 0, 3. The strip against the Sierpinski shadow is exactly zero at all 1600 pairs.check_gramcomputesdet[gcd(m,n)^2/(mn)]over oddm, n <= 2K+1by exact elimination and matchesprod J_2(k)/k^2over the same odds atK = 1..12,J_2the Jordan totient; the value atK = 12is11399736556781568/21994507608198125.
RUN
uv run python research/lab/py/stack-levels/stack_levels.py
Two seconds, prints only, writes nothing.
WITNESSES
- The general law and its parity specialisation, against the landed
gcd(m,n)^2/(mn):check_parity. - The gcd law does not survive to base 3: the carpet covariance is a character-twisted gcd law at level 1 and a mod-
3^levelkernel above it, and coprime layers are correlated:check_carpet,carpet_law_level1,carpet_kernel. - Levels are not new layers:
check_levels,level_product_mask. - Which design pairs are coprime-independent:
check_designs,design_law_33,design_law_23. - The layers of the parity stack are linearly independent:
check_gram,jordan2,exact_det.