"""test_640 -- MA open problem 7: Rivertz's six equalities span the six components of W. MA §8.1: W^{cd} = (1/2) eps^{cab} R_ab^d, with R_ab^d = (1/2)(d_a det M delta_b^d - d_b det M delta_a^d) - ((nabla_a M) P)^d_b + ((nabla_b M) P)^d_a, M = -G, P = adj M; W is symmetric of bidegree (2, 1) in the curvature and its derivative (test_626). Rivertz's equalities r_1, ..., r_6 (Rivertz 1999; Agaoka and Hashinaga 2022, arXiv:2206.03634) are polynomials of the same bidegree in R_ijkl and S_ijklm = (nabla_m R)_ijkl, with R_ijkl = alpha_ik alpha_jl - alpha_il alpha_jk for a hypersurface. Agaoka and Hashinaga, Remark 4.13(2): r_1 generates a 6-dimensional GL(3)-irreducible space of polynomials, of which r_1, ..., r_6 are a basis. r_1 and r_2 are transcribed from their introduction; r_3 to r_6 are not used (the copy available here is garbled). Everything is at a point, in an orthonormal frame (g = delta): R from its six components R_1212, R_1213, R_1223, R_1313, R_1323, R_2323; S from 18 components cut to 15 by the second Bianchi identity. Claims registered before the run: P1 [exact] Controls: on the jet of a hypersurface (alpha symmetric, beta = nabla alpha totally symmetric; R and S by the Gauss equation and its derivative) W = 0, r_1 = 0 and r_2 = 0; with beta not symmetric, W != 0 and r_1 != 0. P2 [symbolic] r_1 and r_2 each lie in the rational span of the six W^{cd}, as polynomials on the generic 3-jet. P3 [symbolic] The images of r_1 and r_2 under the six relabellings of the frame (permutation matrices, in GL(3), so inside the span of r_1, ..., r_6) span a 6-dimensional space. With P2: span(W) = span(r_1, ..., r_6). P4 [symbolic] Schur's lemma alone does not decide this: (tr M)^2 Y, with Y the Cotton-York tensor, is another symmetric tensor of the same bidegree, natural under O(3), and it is not in span(W). So the answer to MA open problem 7 is yes. The reason is Agaoka and Hashinaga's Propositions 4.9 and 4.11, not representation theory alone: r is |A_0| times their tensor h^0, the Codazzi defect of the Gauss solution is -(alpha^0 h^0)/|A_0|, and with |A_0| = det K~ = sqrt(det M) this makes W a constant multiple of r. History: Gemini (17 November 2026, its independent-route draft, §2.4) proposed the result by Schur's lemma on (det T*) (x) Sym^2 T. P4 shows that step needs a multiplicity-one input it does not supply; the finite check here settles the statement. """ import sys import itertools import random from fractions import Fraction as Fr import sympy as sp FAIL = [] def check(name, ok, detail=""): ok = bool(ok) if not ok: FAIL.append(name) print(f"[{'PASS' if ok else 'FAIL'}] {name}" + (f" ({detail})" if detail else ""), flush=True) PAIRS = [(0, 1), (0, 2), (1, 2)] def pair_index(i, j): """index of the pair and the sign of (i, j) relative to it; None if i == j.""" if i == j: return None, 0 a, b = (i, j) if i < j else (j, i) return PAIRS.index((a, b)), (1 if i < j else -1) def make_R(comp): """comp[(p, q)] for p <= q pair indices -> full R(i, j, k, l).""" def R(i, j, k, l): p, s1 = pair_index(i, j) q, s2 = pair_index(k, l) if p is None or q is None: return 0 return s1*s2*comp[(min(p, q), max(p, q))] return R def make_S(comp): def S(i, j, k, l, m): p, s1 = pair_index(i, j) q, s2 = pair_index(k, l) if p is None or q is None: return 0 return s1*s2*comp[(min(p, q), max(p, q), m)] return S def W_of(R, S): Ric = sp.Matrix(3, 3, lambda j, l: sum(R(i, j, i, l) for i in range(3))) dRic = [sp.Matrix(3, 3, lambda j, l: sum(S(i, j, i, l, m) for i in range(3))) for m in range(3)] Rs = Ric.trace() M = -(Ric - Rs/2*sp.eye(3)) dM = [-(dRic[m] - dRic[m].trace()/2*sp.eye(3)) for m in range(3)] P = M.adjugate() ddet = [(P*dM[a]).trace() for a in range(3)] def Rab(a, b, d): return (sp.Rational(1, 2)*(ddet[a]*(1 if b == d else 0) - ddet[b]*(1 if a == d else 0)) - (dM[a]*P)[d, b] + (dM[b]*P)[d, a]) W = sp.Matrix(3, 3, lambda c, d: sp.Rational(1, 2)*sum(sp.LeviCivita(c, a, b)*Rab(a, b, d) for a in range(3) for b in range(3))) return W, M, dM def r1(R, S): # Agaoka-Hashinaga's indices 1, 2, 3 are 0, 1, 2 here R1212, R1213, R1223 = R(0, 1, 0, 1), R(0, 1, 0, 2), R(0, 1, 1, 2) R1313, R1323, R2323 = R(0, 2, 0, 2), R(0, 2, 1, 2), R(1, 2, 1, 2) s = lambda *ix: S(*[i - 1 for i in ix]) return ((R1213*R2323 - R1223*R1323)*s(1, 2, 1, 2, 1) - (R1213*R1323 - R1223*R1313)*s(1, 2, 1, 2, 2) - (R1212*R2323 - R1223**2)*s(1, 2, 1, 3, 1) + (R1212*R1323 - R1213*R1223)*s(1, 2, 1, 3, 2) + (R1212*R1323 - R1213*R1223)*s(1, 2, 2, 3, 1) - (R1212*R1313 - R1213**2)*s(1, 2, 2, 3, 2)) def r2(R, S): R1212, R1213, R1223 = R(0, 1, 0, 1), R(0, 1, 0, 2), R(0, 1, 1, 2) R1313, R1323, R2323 = R(0, 2, 0, 2), R(0, 2, 1, 2), R(1, 2, 1, 2) s = lambda *ix: S(*[i - 1 for i in ix]) return ((R1313*R2323 - R1323**2)*s(1, 2, 1, 2, 1) - 2*(R1213*R1323 - R1223*R1313)*s(1, 2, 1, 2, 3) - (R1212*R1313 - R1213**2)*s(1, 2, 2, 3, 3) - (R1212*R2323 - R1223**2)*s(1, 3, 1, 3, 1) + 2*(R1212*R1323 - R1213*R1223)*s(1, 3, 1, 3, 2) - (R1212*R1313 - R1213**2)*s(1, 3, 2, 3, 2)) # ------------------------------------------------------------------ P1: controls on hypersurface jets def hypersurface_jet(alpha, beta): R = lambda i, j, k, l: alpha[i][k]*alpha[j][l] - alpha[i][l]*alpha[j][k] S = lambda i, j, k, l, m: (beta[i][k][m]*alpha[j][l] + alpha[i][k]*beta[j][l][m] - beta[i][l][m]*alpha[j][k] - alpha[i][l]*beta[j][k][m]) return R, S random.seed(640) ok1 = True for trial in range(3): A = [[None]*3 for _ in range(3)] for i in range(3): for j in range(i, 3): A[i][j] = A[j][i] = sp.Rational(random.randint(-9, 9), random.randint(1, 5)) vals = {} for c in itertools.combinations_with_replacement(range(3), 3): vals[c] = sp.Rational(random.randint(-9, 9), random.randint(1, 5)) Bsym = [[[vals[tuple(sorted((i, j, k)))] for k in range(3)] for j in range(3)] for i in range(3)] R, S = hypersurface_jet(A, Bsym) Wv, _, _ = W_of(R, S) ok1 &= all(sp.simplify(e) == 0 for e in Wv) and sp.simplify(r1(R, S)) == 0 and sp.simplify(r2(R, S)) == 0 # beta symmetric in its first two slots (a derivative of a symmetric tensor) but not in the last Bbad = [[[Bsym[i][j][k] + (sp.Rational(random.randint(1, 5)) if (i, j, k) in ((0, 0, 1), (1, 1, 2)) else 0) for k in range(3)] for j in range(3)] for i in range(3)] Rb, Sb = hypersurface_jet(A, Bbad) Wb, _, _ = W_of(Rb, Sb) ok1 &= any(sp.simplify(e) != 0 for e in Wb) and sp.simplify(r1(Rb, Sb)) != 0 check("P1 controls: W = r_1 = r_2 = 0 on hypersurface jets; W, r_1 != 0 when beta is not totally symmetric", ok1) # ------------------------------------------------------------------ the generic 3-jet Rsym = {(p, q): sp.Symbol(f"R{p}{q}") for p in range(3) for q in range(p, 3)} Ssym = {(p, q, m): sp.Symbol(f"S{p}{q}{m}") for p in range(3) for q in range(p, 3) for m in range(3)} Rg = make_R(Rsym) Sg0 = make_S(Ssym) bianchi = [] for i, j in PAIRS: e = Sg0(i, j, 0, 1, 2) + Sg0(i, j, 1, 2, 0) + Sg0(i, j, 2, 0, 1) bianchi.append(sp.expand(e)) sol = sp.solve(bianchi, [Ssym[(0, 1, 1)], Ssym[(1, 1, 1)], Ssym[(1, 2, 1)]], dict=True) assert len(sol) == 1 Sred = {k: v.subs(sol[0]) for k, v in Ssym.items()} Sg = make_S(Sred) free = sorted(set().union(*[sp.sympify(v).free_symbols for v in Sred.values()]), key=str) assert len(free) == 15, len(free) assert all(sp.expand(Sg(i, j, 0, 1, 2) + Sg(i, j, 1, 2, 0) + Sg(i, j, 2, 0, 1)) == 0 for i in range(3) for j in range(3)) VARS = list(Rsym.values()) + free W, M, dM = W_of(Rg, Sg) Wc = [sp.expand(W[c, d]) for c in range(3) for d in range(c, 3)] assert all(sp.expand(W[c, d] - W[d, c]) == 0 for c in range(3) for d in range(3)) def coeff_vector(polys): ps = [sp.Poly(p, *VARS) for p in polys] mons = sorted(set().union(*[set(p.as_dict().keys()) for p in ps])) return sp.Matrix([[p.as_dict().get(m, 0) for m in mons] for p in ps]), mons def rank_of(polys): Mx, _ = coeff_vector(polys) return Mx.rank() rW = rank_of(Wc) in_span = [] for rr in (r1, r2): rp = sp.expand(rr(Rg, Sg)) in_span.append(rank_of(Wc + [rp]) == rW and rp != 0) check("P2 r_1 and r_2 lie in the span of the six W^cd (rank 6)", rW == 6 and all(in_span), f"rank W = {rW}; r_1 in span: {in_span[0]}, r_2 in span: {in_span[1]}") images = [] for perm in itertools.permutations(range(3)): Rp = lambda i, j, k, l, perm=perm: Rg(perm[i], perm[j], perm[k], perm[l]) Sp = lambda i, j, k, l, m, perm=perm: Sg(perm[i], perm[j], perm[k], perm[l], perm[m]) for rr in (r1, r2): images.append(sp.expand(rr(Rp, Sp))) rI = rank_of(images) rIW = rank_of(images + Wc) check("P3 the frame relabellings of r_1, r_2 span 6 dimensions, inside span(W): span(W) = span(r_1..r_6)", rI == 6 and rIW == 6, f"rank of images {rI}, with W {rIW}") Ric = sp.Matrix(3, 3, lambda j, l: sum(Rg(i, j, i, l) for i in range(3))) dRic = [sp.Matrix(3, 3, lambda j, l: sum(Sg(i, j, i, l, m) for i in range(3))) for m in range(3)] dSch = [dRic[m] - dRic[m].trace()/4*sp.eye(3) for m in range(3)] Y = sp.Matrix(3, 3, lambda c, d: sum(sp.LeviCivita(c, a, b)*dSch[a][b, d] for a in range(3) for b in range(3))) symY = all(sp.expand(Y[c, d] - Y[d, c]) == 0 for c in range(3) for d in range(3)) X = [sp.expand(M.trace()**2*Y[c, d]) for c in range(3) for d in range(c, 3)] check("P4 (tr M)^2 x Cotton-York: symmetric, same bidegree, not in span(W)", symY and rank_of(Wc + X) > 6, f"rank of W with it: {rank_of(Wc + X)}") print("\nALL PASS" if not FAIL else f"\nFAILURES: {FAIL}") sys.exit(1 if FAIL else 0)