Exact verification of the skeleton risk
This page records how the results in Theory of the skeleton risk are checked and supplies the reference polynomials used for its computer-assisted risk comparison. Finite checks validate implementations and printed values; the all-degree claims rely on the proofs in the theory chapter.
The exact helpers in tests/sampling.py use fractions.Fraction.
They do not add a computer-algebra dependency to the normal test suite.
tests/fitting.py separately checks the statistical risks by simulation.
Independent checks
Result |
Independent reference and checked range |
|---|---|
General scalar sum |
Full Gram recursion at \(M=2,3,4\), \(D=1,\ldots,5\). |
\(a_{D-3}\) quartic |
Every polynomial coefficient at \(D=3,\ldots,8\); independent Gram/orbit generation at \(D=9\); top-face boundaries through \(D=30\). |
Codimension-one sum |
General scalar sum at face sizes \(1,\ldots,4\) and four degrees per size. |
Triangle edge coefficient |
Every Jacobi mode, its propagation controls and the Gram trace at \(D=2,\ldots,10\); harmonic simplification also checked through \(D=100\). |
Triangle vertex coefficient |
Full Gram recursion at \(D=1,\ldots,10\), kernel sum at \(D=1,\ldots,12\), and the single sum at \(D=81,100\); the telescoping certificate includes both endpoints. |
Dimension polynomials and limits |
Every polynomial through \(D=8\) is regenerated by Gram/orbit counting; every leading coefficient is checked against the general limit. |
Winning vertex counts |
Exact polynomial evaluation with a floating-point rounding bound on square roots, together with a proven tail bound, at \(D\leq8\). |
The high-degree triangle checks are outside the exploratory range \(D\leq80\) used before the vertex proof was obtained. Degree 1000 was also checked during development. These observations are not used as a proof of an all-degree formula.
On the development machine, the independent \(D=9\) quartic check took about 0.23 seconds. Complete triangular edge mode/risk checks took about 0.14, 0.27 and 0.52 seconds at \(D=8,9,10\). Regenerating all reference polynomials took about 0.09, 0.75 and 6.6 seconds at \(D=6,7,8\). These checks remain in normal CI; timings are observations, not performance guarantees. The unreduced \(D=6,m=0\) computation took 31.6 seconds, versus 0.04 seconds with propagation reduction.
Reproducing the vertex certificate
The certificate can also be regenerated with the existing SymPy dependency. This optional search is outside the test suite; the proof of Theorem 15 only needs the rational identity and its boundary values:
from sympy import binomial, cancel, symbols
from sympy.concrete.gosper import gosper_sum
d, h = symbols("d h", integer=True, nonnegative=True)
denominator = d * (d + 1) * (d + 2) * (d + 3)
w = binomial(d + 1, h + 2) * binomial(d + 1, h)
c = (2 * d + 3) * (d**2 + 2 * d - 1) / denominator
r = (h + 2) * ((d**2 + 2 * d - 1) * h - 1) / (denominator * (h + 1))
assert cancel(gosper_sum(w * (1 / (h + 2) - c), h) / w - r) == 0
ratio = (d - 1 - h) * (d + 1 - h) / ((h + 1) * (h + 3))
assert cancel(ratio * r.subs(h, h + 1) - r - 1 / (h + 2) + c) == 0
Reference dimension polynomials
The table is regenerated independently of the scalar sum by exact Gram solves and orbit counting. For a face of size \(m+1\), use a simplex with \(V=2D-m-1\) vertices, which contains every control-pair support. Theorem 9 reduces the propagation solve to \(m+2\) vertices. For a union with \(j\) outside vertices, its multiplicity on \(M\) vertices is its multiplicity on \(V\) vertices times \((M-m-1)_{\underline j}/(V-m-1)_{\underline j}\), where the underline denotes a falling factorial.
The pair sum keeps one first control per permutation orbit outside the fixed face, then one second control per orbit of its stabilizer. If the outside exponents have multiplicities \(n_k\), including zeros, the first orbit has size \((2D-2m-2)!/\prod_kn_k!\); the second multiplicity is the product of the same expression within the equal-exponent groups. This gives every polynomial coefficient over the rationals, without interpolation in the dimension or reliance on the closed forms. The \(m=D-1,D-2,D-3\) rows agree with the corresponding general formulas.
\(D\) |
\(m\) |
\(P_{D,m}(M)\) |
|---|---|---|
1 |
0 |
\(2\) |
2 |
0 |
\(\frac32 (3M^2 - 15M + 28)\) |
2 |
1 |
\(120\) |
3 |
0 |
\(\frac12 (9M^4 - 114M^3 + 835M^2 - 2610M + 3320)\) |
3 |
1 |
\(360 (3M^2 - 21M + 58)\) |
3 |
2 |
\(20160\) |
4 |
0 |
\(\frac58 (5M^6 - 115M^5 + 1825M^4 - 14765M^3 + 71250M^2 - 174840M + 181152)\) |
4 |
1 |
\(\frac{105}{2} (63M^4 - 1050M^3 + 9481M^2 - 38654M + 67512)\) |
4 |
2 |
\(136080 (3M^2 - 27M + 94)\) |
4 |
3 |
\(6652800\) |
5 |
0 |
\(\frac{1}{128} (225M^8 - 8100M^7 + 223650M^6 - 3352440M^5 + 33885265M^4 - 210684820M^3 + 810530924M^2 - 1692775952M + 1526667648)\) |
5 |
1 |
\(840 (7M^6 - 203M^5 + 3573M^4 - 34441M^3 + 201644M^2 - 629700M + 867312)\) |
5 |
2 |
\(56700 (45M^4 - 930M^3 + 9971M^2 - 49694M + 106152)\) |
5 |
3 |
\(79833600 (3M^2 - 33M + 136)\) |
5 |
4 |
\(3632428800\) |
6 |
0 |
\(\frac{7}{1536} (189M^{10} - 9765M^{9} + 416010M^{8} - 9917418M^{7} + 170241981M^{6} - 1939736421M^{5} + 15319824604M^{4} - 79461497164M^{3} + 261855225632M^{2} - 485208011456M + 394380100608)\) |
6 |
1 |
\(\frac{63}{40} (4725M^{8} - 207900M^{7} + 5933250M^{6} - 99912240M^{5} + 1132957965M^{4} - 8261943780M^{3} + 38361752764M^{2} - 100723167440M + 118578731904)\) |
6 |
2 |
\(155925 (55M^{6} - 1925M^{5} + 38401M^{4} - 431519M^{3} + 2952160M^{2} - 11026484M + 18273744)\) |
6 |
3 |
\(21621600 (117M^{4} - 2886M^{3} + 35695M^{2} - 208734M + 519368)\) |
6 |
4 |
\(68108040000 (3M^{2} - 39M + 184)\) |
6 |
5 |
\(2964061900800\) |
7 |
0 |
\(\frac{1}{10368} (3969M^{12} - 277830M^{11} + 16911909M^{10} - 585892314M^{9} + 15245701191M^{8} - 274563067842M^{7} + 3631411308511M^{6} - 34078439471286M^{5} + 227106974533684M^{4} - 1028193132036840M^{3} + 3014866953859072M^{2} - 5083595030097792M + 3804385671687168)\) |
7 |
1 |
\(\frac{315}{8} (189M^{10} - 11655M^{9} + 488100M^{8} - 12550518M^{7} + 229047537M^{6} - 2894482743M^{5} + 25831659094M^{4} - 156730040300M^{3} + 621915070424M^{2} - 1437930406240M + 1507450665216)\) |
7 |
2 |
\(\frac{31185}{4} (2475M^{8} - 128700M^{7} + 4016430M^{6} - 76100640M^{5} + 969732275M^{4} - 8107098420M^{3} + 43614175604M^{2} - 135327928048M + 189756997248)\) |
7 |
3 |
\(151351200 (91M^{6} - 3731M^{5} + 83699M^{4} - 1072645M^{3} + 8358906M^{2} - 36008544M + 68795424)\) |
7 |
4 |
\(363242880000 (9M^{4} - 258M^{3} + 3607M^{2} - 24086M + 67896)\) |
7 |
5 |
\(80029671321600 (3M^{2} - 45M + 238)\) |
7 |
6 |
\(3379030566912000\) |
8 |
0 |
\(\frac{1}{1536} (243M^{14} - 22113M^{13} + 1822905M^{12} - 86413257M^{11} + 3170012139M^{10} - 82654759071M^{9} + 1640539616043M^{8} - 24125599635171M^{7} + 266382561743494M^{6} - 2157428183555988M^{5} + 12638903353801912M^{4} - 51381774261439680M^{3} + 137262734136374272M^{2} - 214224590422872576M + 149755742713294848)\) |
8 |
1 |
\(\frac{55}{384} (43659M^{12} - 3580038M^{11} + 206363619M^{10} - 7485895494M^{9} + 199202107797M^{8} - 3823026542874M^{7} + 54535243641473M^{6} - 568795558812642M^{5} + 4306623724542524M^{4} - 22811488486847928M^{3} + 80426058871064384M^{2} - 168310145729971584M + 161038581507542016)\) |
8 |
2 |
\(\frac{27027}{16} (19305M^{10} - 1383525M^{9} + 61604400M^{8} - 1734571410M^{7} + 34500231285M^{6} - 483666978405M^{5} + 4831926907690M^{4} - 33375332254980M^{3} + 152661774969416M^{2} - 413966621739552M + 513284796940032)\) |
8 |
3 |
\(\frac{4729725}{2} (20475M^{8} - 1228500M^{7} + 42200550M^{6} - 891274440M^{5} + 12638555275M^{4} - 118800088180M^{3} + 722231576084M^{2} - 2559256843376M + 4107713331840)\) |
8 |
4 |
\(1543782240000 (17M^{6} - 799M^{5} + 19941M^{4} - 286433M^{3} + 2496802M^{2} - 12115512M + 26028000)\) |
8 |
5 |
\(31678411564800 (171M^{4} - 5586M^{3} + 86965M^{2} - 650590M + 2040000)\) |
8 |
6 |
\(124179373334016000 (3M^{2} - 51M + 298)\) |
8 |
7 |
\(5129368400572416000\) |