#!/usr/bin/env python3 """ test_327 -- THE ROUND SPHERE, EXACTLY, WITH THE FULL NONLINEAR OPERATOR: THE KERNEL, THE STRAIGHT CONFORMAL PATH AGAINST THE RADIAL LIFT, THE SCALAR-CURVATURE DETECTOR, AND THE COUNT OF TEN For MA section 6 (the paper this script is deposited with). Independent of tests 79-105 and 315 and of the audit's scripts: F(g) = Cod_g(K~(g)), K~ = sqrt(det M) M^{-1}, M = -G, is computed here in full, as exact rational jets at one point of the unit S^3, in hyperspherical coordinates (r, theta, phi), gamma = dr^2 + sin^2 r dOmega^2, at the point cos r = 3/5, cos theta = 5/13 (so every Taylor coefficient is rational). Jets are truncated at spatial degree 3 (F needs three derivatives of g) and at order 2 in the path parameter t. PRE-REGISTERED: P1 The implementation is right where the answer is known. For radial graphs g[u] = (1+u)^2 gamma + du (x) du, realizable for every u, F(g[u]) = 0 exactly through order t^2, for u = t p with p a random cubic jet. And F(gamma) = 0. P2 The kernel at gamma: the t-linear part of F(gamma + t h) vanishes for h = 2 u gamma (u a random cubic jet) and for h = L_X gamma (X a random cubic vector jet). P3 The straight conformal path leaves at second order. For f = x_0 x_1 = cos r sin r cos theta, F(e^{2tf} gamma) = 0 + 0 t - t^2 DF_gamma(df (x) df) + O(t^3) exactly, where DF_gamma(df (x) df) is computed separately as the t-linear part of F(gamma + t df (x) df); and DF_gamma(df (x) df) != 0 at the point. (The radial lift e^{2tf}(gamma + t^2 df (x) df) is the metric of x_t(p) = e^{t f(p)} p, realizable for every t; the two paths differ by -t^2 e^{2tf} df (x) df. The formula is the audit's XP02; the nonvanishing is checked here.) P4 The detector. On conformal directions, the t-linear part of R(gamma + 2 t u gamma) is -4(Delta + 3)u, which vanishes on a first harmonic (u = x_1 = sin r cos theta) and on the shell dipole u = lambda cos theta equals 4 lambda (2 cot^2 r - 1) cos theta, which is 5 lambda/26 at the point. P5 The count of ten. sum_{n>=3} 2(n^2 - 4) lambda_n^{-s}, for lambda_n = n(n^2 - 1) or n^2(n^2 - 1)^2/2 or any lambda_n = n^p(1 + O(n^-2)), continues to s = 0 with value 2[zeta_H(-2,3) - 4 zeta_H(0,3)] = 10 exactly: the binomial terms of the continuation would need a pole at 2k - 2 = 1 or 2k = 1, which never occurs. Over all n >= 1 the same multiplicity counts 4 (2[zeta(-2) - 4 zeta(0)]), and the n = 1 term is 2(1 - 4) = -6, so 10 = 4 + 6. The scalar levels n >= 3, multiplicity n^2, count zeta(-2) - 1 - 4 = -5. NOTE (29 Oct 2026, after the referee read): "any lambda_n = n^p(1 + O(n^-2))" is too broad as written. It needs an expansion in EVEN powers of 1/n; odd powers change the count (test_333). The integer loop below restates the pole condition rather than testing it; the two lambda named here are of the even form, and their value 10 is checked by test_315 P4 against direct sums. The printed label of the P5 check was changed to match; the computation is unchanged. FIRST RUN, AND THE CHANGE (claims unchanged): P2 failed on the Lie direction for an implementation reason. L_X gamma was built from gamma's jet truncated at spatial degree 3, so d gamma was accurate only to degree 2, while F needs h to degree 3. P3 passed, but it had checked the identity for f's cubic Taylor polynomial (a legitimate function), while DF_gamma(df (x) df) at the point needs f to fourth order. Re-run with gamma taken to degree 5 wherever it is differentiated outside F, and f to degree 4. P1, P4 and P5 were unaffected (exact polynomial inputs, or R needing only two derivatives). BUNDLE EDIT (29 October, before the bundle's final run; claims unchanged): sympy's nsimplify removed from P5. On a number with no free symbols nsimplify evaluates numerically and can return a different algebraic number agreeing to about 15 digits; sympy evaluates these Hurwitz zeta values as exact rationals, so it was a no-op. The check now compares exact expressions directly. The opening line's reference to a working document was replaced by the section of the paper. The archive's [M] labels were removed from the claims. """ import sys import itertools import sympy as sp FAILURES = [] def check(name, ok, detail=""): print(f" [{'PASS' if ok else 'FAIL'}] {name}" + (f" -- {detail}" if detail else "")) if not ok: FAILURES.append(name) x, y, z, t = sp.symbols("x y z t") # offsets in r, theta, phi; path parameter V = (x, y, z) DS, DT = 3, 2 # spatial and t truncation def trunc(e): p = sp.Poly(sp.expand(e), x, y, z, t) return sum((c * x**m[0] * y**m[1] * z**m[2] * t**m[3] for m, c in p.terms() if m[0] + m[1] + m[2] <= DS and m[3] <= DT), sp.Integer(0)) def mul(a, b): return trunc(a * b) def msum(*args): return trunc(sum(args)) # trig jets at the point def cs_series(n): c = sum(((-1) ** k * x**(2 * k) / sp.factorial(2 * k) for k in range(n)), sp.Integer(0)) s = sum(((-1) ** k * x**(2 * k + 1) / sp.factorial(2 * k + 1) for k in range(n)), sp.Integer(0)) return c, s c0r, s0r = sp.Rational(3, 5), sp.Rational(4, 5) c0t, s0t = sp.Rational(5, 13), sp.Rational(12, 13) cx, sx = cs_series(3) cos_r = trunc(c0r * cx - s0r * sx) sin_r = trunc(s0r * cx + c0r * sx) cos_t = trunc((c0t * cx - s0t * sx).subs(x, y)) sin_t = trunc((s0t * cx + c0t * sx).subs(x, y)) gamma = sp.diag(1, mul(sin_r, sin_r), mul(mul(sin_r, sin_r), mul(sin_t, sin_t))) # higher-accuracy jets (exact to spatial degree 5) for fields differentiated outside F sin_r5 = sp.expand(s0r * cx + c0r * sx); cos_r5 = sp.expand(c0r * cx - s0r * sx) sin_t5 = sp.expand((s0t * cx + c0t * sx).subs(x, y)); cos_t5 = sp.expand((c0t * cx - s0t * sx).subs(x, y)) def trunc_s(e, deg): p = sp.Poly(sp.expand(e), x, y, z, t) return sum((c * x**m[0] * y**m[1] * z**m[2] * t**m[3] for m, c in p.terms() if m[0] + m[1] + m[2] <= deg), sp.Integer(0)) gamma5 = sp.diag(1, trunc_s(sin_r5**2, 5), trunc_s(sin_r5**2 * sin_t5**2, 5)) def matmul(A, B): return sp.Matrix(3, 3, lambda i, j: msum(*[mul(A[i, k], B[k, j]) for k in range(3)])) def at0(e): return e.subs({x: 0, y: 0, z: 0}) def inv_series(A): """inverse of a jet matrix whose value at (0, t = 0) is invertible: A^-1 = sum_k (-A0^-1 E)^k A0^-1.""" A0 = A.subs({x: 0, y: 0, z: 0, t: 0}) A0i = A0.inv() E = sp.Matrix(3, 3, lambda i, j: trunc(A[i, j] - A0[i, j])) out = A0i P = A0i for _ in range(DS + DT + 1): P = matmul(-matmul(A0i, E), P) out = out + P return sp.Matrix(3, 3, lambda i, j: trunc(out[i, j])) def det3(A): return msum(mul(A[0, 0], msum(mul(A[1, 1], A[2, 2]), -mul(A[1, 2], A[2, 1]))), -mul(A[0, 1], msum(mul(A[1, 0], A[2, 2]), -mul(A[1, 2], A[2, 0]))), mul(A[0, 2], msum(mul(A[1, 0], A[2, 1]), -mul(A[1, 1], A[2, 0])))) def d(e, i): return sp.diff(e, V[i]) def F_jet(g): """F(g) = Cod_g(K~) at the point, as polynomials in t, with all intermediate fields as jets.""" gi = inv_series(g) Gam = [[[trunc(sum(gi[a, e] * (d(g[e, b], c) + d(g[e, c], b) - d(g[b, c], e)) for e in range(3)) / 2) for c in range(3)] for b in range(3)] for a in range(3)] # Riemann R^a_{bcd} = d_c Gam^a_{db} - d_d Gam^a_{cb} + Gam^a_{ce} Gam^e_{db} - Gam^a_{de} Gam^e_{cb} def Riem(a, b, c, dd): return msum(d(Gam[a][dd][b], c), -d(Gam[a][c][b], dd), *[mul(Gam[a][c][e], Gam[e][dd][b]) - mul(Gam[a][dd][e], Gam[e][c][b]) for e in range(3)]) Ric = sp.Matrix(3, 3, lambda b, dd: msum(*[Riem(a, b, a, dd) for a in range(3)])) R = msum(*[mul(gi[b, dd], Ric[b, dd]) for b in range(3) for dd in range(3)]) G = sp.Matrix(3, 3, lambda a, b: trunc(Ric[a, b] - mul(R, g[a, b]) / 2)) Mend = sp.Matrix(3, 3, lambda a, b: trunc(-sum(mul(gi[a, c], G[c, b]) for c in range(3)))) Nn = Mend - sp.eye(3) Nn = sp.Matrix(3, 3, lambda i, j: trunc(Nn[i, j])) # det M = det(I + N); sqrt; inverse detM = det3(Mend) xdet = trunc(detM - 1) sq = sp.Integer(1) pw = sp.Integer(1) for k in range(1, DS + DT + 2): pw = mul(pw, xdet) sq = sq + sp.binomial(sp.Rational(1, 2), k) * pw sq = trunc(sq) Minv = sp.eye(3) P = sp.eye(3) for _ in range(DS + DT + 2): P = matmul(-Nn, P) Minv = Minv + P Kend = sp.Matrix(3, 3, lambda i, j: mul(sq, Minv[i, j])) K = matmul(g, Kend) # lower: K_ab = g_ac K^c_b nab = lambda a, b, c: msum(d(K[b, c], a), *[-mul(Gam[e][a][b], K[e, c]) - mul(Gam[e][a][c], K[b, e]) for e in range(3)]) Cod = [sp.expand(at0(nab(a, b, c) - nab(b, a, c))) for (a, b) in ((0, 1), (0, 2), (1, 2)) for c in range(3)] return Cod, at0(R) def tcoef(vals, k): return [sp.expand(v).coeff(t, k) for v in vals] def rand_cubic(seed): import random rnd = random.Random(seed) mons = [m for m in itertools.product(range(4), repeat=3) if sum(m) <= 3] return sum(sp.Rational(rnd.randint(-5, 5), rnd.randint(1, 4)) * x**m[0] * y**m[1] * z**m[2] for m in mons) def dd_tensor(fj): return sp.Matrix(3, 3, lambda i, j: trunc(d(fj, i) * d(fj, j))) # ---------------------------------------------------------------- P1 print("P1 the implementation: F(gamma) = 0 and F(radial graph) = 0 through t^2") F0, R0 = F_jet(gamma) okR = R0 == 6 p = rand_cubic(1) u = trunc(t * p) gr = sp.Matrix(3, 3, lambda i, j: trunc(mul(mul(1 + u, 1 + u), gamma[i, j]) + mul(d(u, i), d(u, j)))) Fr, _ = F_jet(gr) ok1 = all(sp.simplify(v) == 0 for v in F0) and all(sp.expand(v) == 0 for v in Fr) and okR check("F(gamma) = 0, R = 6; F((1+u)^2 gamma + du du) = 0 exactly through t^2 for a random cubic u", ok1, f"radial-graph residual coefficients: {set(sp.expand(v) for v in Fr)}") # ---------------------------------------------------------------- P2 print("P2 the kernel at gamma: conformal and Lie directions") uc = rand_cubic(2) hc = sp.Matrix(3, 3, lambda i, j: trunc(2 * uc * gamma[i, j])) Fc, _ = F_jet(sp.Matrix(3, 3, lambda i, j: trunc(gamma[i, j] + t * hc[i, j]))) Xv = [rand_cubic(3), rand_cubic(4), rand_cubic(5)] LX = sp.Matrix(3, 3, lambda a, b: trunc(sum(Xv[c] * d(gamma5[a, b], c) + gamma5[c, b] * d(Xv[c], a) + gamma5[a, c] * d(Xv[c], b) for c in range(3)))) Fl, _ = F_jet(sp.Matrix(3, 3, lambda i, j: trunc(gamma[i, j] + t * LX[i, j]))) ok2 = all(v == 0 for v in tcoef(Fc, 1)) and all(v == 0 for v in tcoef(Fl, 1)) nontriv = any(v != 0 for v in tcoef(Fc, 2)) check("t-linear part of F(gamma + t h) is 0 for h = 2u gamma and h = L_X gamma (random cubic u, X)", ok2 and nontriv, "second-order part nonzero for the conformal one: " + str(nontriv)) # ---------------------------------------------------------------- P3 print("P3 the straight conformal path leaves at second order; the radial lift does not") f = trunc_s(cos_r5 * sin_r5 * cos_t5, 4) # f to fourth order e2tf = trunc(1 + 2 * t * f + 2 * t**2 * f * f) gconf = sp.Matrix(3, 3, lambda i, j: mul(e2tf, gamma[i, j])) Fconf, _ = F_jet(gconf) dfdf = dd_tensor(f) Fd, _ = F_jet(sp.Matrix(3, 3, lambda i, j: trunc(gamma[i, j] + t * dfdf[i, j]))) DFdfdf = tcoef(Fd, 1) grad = sp.Matrix(3, 3, lambda i, j: trunc(mul(e2tf, gamma[i, j] + t**2 * dfdf[i, j]))) Frad, _ = F_jet(grad) ok3 = (all(v == 0 for v in tcoef(Fconf, 0)) and all(v == 0 for v in tcoef(Fconf, 1)) and all(sp.expand(a + b) == 0 for a, b in zip(tcoef(Fconf, 2), DFdfdf)) and any(v != 0 for v in DFdfdf) and all(sp.expand(v) == 0 for v in Frad)) check("F(e^{2tf} gamma) = -t^2 DF_gamma(df df) + O(t^3) with DF_gamma(df df) != 0; F(radial lift) = 0 through t^2", ok3, f"DF_gamma(df df) components at the point: {[v for v in DFdfdf if v != 0][:4]}") # ---------------------------------------------------------------- P4 print("P4 the scalar-curvature detector on conformal directions") lam = sp.Rational(1) def deltaR(uj): _, Rj = F_jet(sp.Matrix(3, 3, lambda i, j: trunc(gamma[i, j] * (1 + 2 * t * uj)))) return sp.expand(Rj).coeff(t, 1) def lap(uj): gi = inv_series(gamma) Gam = [[[trunc(sum(gi[a, e] * (d(gamma[e, b], c) + d(gamma[e, c], b) - d(gamma[b, c], e)) for e in range(3)) / 2) for c in range(3)] for b in range(3)] for a in range(3)] return at0(sum(gi[a, b] * (d(d(uj, a), b) - sum(Gam[c][a][b] * d(uj, c) for c in range(3))) for a in range(3) for b in range(3))) ug = rand_cubic(6) x1 = trunc(mul(sin_r, cos_t)) dip = trunc(lam * cos_t) cot2 = (c0r / s0r) ** 2 want_dip = 4 * lam * (2 * cot2 - 1) * c0t ok4 = (sp.expand(deltaR(ug) + 4 * (lap(ug) + 3 * at0(ug))) == 0 and deltaR(x1) == 0 and sp.expand(deltaR(dip) - want_dip) == 0 and want_dip != 0) check("delta R(2u gamma) = -4(Delta + 3)u; 0 on a first harmonic; 4 lambda (2 cot^2 r - 1) cos theta on the shell dipole", ok4, f"dipole value at the point: {deltaR(dip)} = {want_dip}") # ---------------------------------------------------------------- P5 print("P5 the count of ten") zH = lambda s, a: sp.zeta(s, a) ten = 2 * (zH(-2, 3) - 4 * zH(0, 3)) four = 2 * (sp.zeta(-2) - 4 * sp.zeta(0)) minus5 = sp.zeta(-2) - 1 - 4 ok5 = (sp.simplify(ten - 10) == 0 and sp.simplify(four - 4) == 0 and 2 * (1 - 4) == -6 and minus5 == -5 and all((2 * k - 2) != 1 and (2 * k) != 1 for k in range(0, 50))) # numerical continuation for lambda_n = n(n^2 - 1), as a cross-check (binomial expansion in n^-2) import mpmath as mp mp.mp.dps = 30 def Z(s, K=60): return sum(mp.rf(s, k) / mp.factorial(k) * 2 * (mp.zeta(3 * s + 2 * k - 2, 3) - 4 * mp.zeta(3 * s + 2 * k, 3)) for k in range(K)) zval = Z(mp.mpf("1e-25")) ok5 &= abs(zval - 10) < 1e-20 check("zeta(0) = 2[zeta_H(-2,3) - 4 zeta_H(0,3)] = 10 for lambda_n with an even-power expansion (test_333); 4 over n >= 1; scalars n >= 3: -5", ok5, f"exact {ten}, continuation {mp.nstr(zval, 20)}") print() print(f"test_327: {'ALL PASS' if not FAILURES else 'FAILURES: ' + ', '.join(FAILURES)}") sys.exit(1 if FAILURES else 0)