from fractions import Fraction as F from math import prod # Algebraic identities only; no claims about algebraic cycles follow from these computations alone. for d in [F(-2),F(-3,2),F(-7)]: for rank in [1,3,5]: assert (-d)**rank*d==-(d**((rank+1)//2))**2 print('PASS: odd-rank determinant adjustment at three rational determinants and ranks 1,3,5.') for d in [F(2),F(3),F(5)]: for norm_b in [F(-3),F(-2,5)]: D=(4*d)**3*norm_b norm_a=-d*norm_b assert D*norm_a**3==-(8*d**3*norm_b**2)**2 print('PASS: real-quadratic trace determinant adjustment at six exact rational specializations.') roots=list(range(1,7)) for m in range(6): total=sum(F(x**m,prod(x-y for y in roots if y!=x)) for x in roots) assert total==(0 if m<5 else 1) print('PASS: degree-six interpolation trace identity at six distinct rational roots, m=0,...,5.') assert 4+1-2==3 print('PASS: eightfold Weil contraction codimension 4+1-2=3.') print('Scope: no external Hodge/KS/Aux assertion, spin descent, or general cycle-algebraicity theorem is certified.')