import numberdb.sage as numberdb
import sage.rings.real_mpfr
from sage.rings.rational_field import QQ
def primary_weight(N, k, a):
assert N >= 2 and k >= 1
assert len(a) == N-1 and all(x >= 0 and int(x) == x for x in a)
assert sum(a) <= k
pairing = sum((QQ(a[i-1]) * (QQ(min(i,j))-QQ(i*j)/QQ(N))
* QQ(a[j-1]+2)
for i in range(1,N) for j in range(1,N)), QQ(0))
return pairing / QQ(2*(N+k))
primary_weight(3, 2, (1, 0)) # 4/15
The generator evaluates the inverse-Cartan quadratic pairing with exact Sage rational arithmetic and writes reduced fractions, including exact zero. No numerical rounding or approximate input is used. Exact arithmetic concerns the represented values, not the correctness of the formula or its implementation.
The attached checks.py independently enumerates the sectors and evaluates the Young-row formula with Python Fraction, without importing the generator. All 297 generated values pass this comparison, together with the vacuum, conjugation, rank-one, level-one, fundamental, adjoint and simplex-vertex controls. The checker rejects a factor-of-two error, the central-charge shift, reduction modulo one, a missing sector, an incorrect tuple and a floating-point representation. Stored-value checks, generator reproducibility, dependency versions and measured sizes are recorded in numerical-evidence.json; these are finite checks, not a proof of universal identities.