Script: H12_Analytic_Resolvent_Verifier.py

Hilbert 12: analytic Fourier branch

H12_Analytic_Resolvent_Verifier.py

Download original file

This is the original source text. Reading it does not run or verify the program.

Skip source text

1 #!/usr/bin/env python3
2 """Komorebi Hilbert 12, cubic gamma analytical resolvent / ambient C3 pencil.
3 
4 Pure cubic case beta^3=7. Exact symbolic identities and numerical diagnostics.
5 IMPORTANT: This is NOT a proof that the elliptic-gamma special value is algebraic.
6 All work offline. Author: Komorebi P.
7 """
8 import argparse
9 import time
10 import sympy as sp
11 import mpmath as mp
12 
13 b, x, y, w, d, z = sp.symbols('b x y w d z')
14 fb = b**3-7
15 fw = w**2+w+1
16 f = x**3-b*x**2+1
17 J = 2+3*w
18 Jbar = -1-3*w
19 S1_poly = b**2*x**2-3*x-b
20 S2_poly = -b**2*x**2+2*x+2*b
21 D1=b**2*x-4
22 D2=b**2*x-5
23 p1=5*x-3*b
24 p2=4*x-3*b
25 Phi=p1/D1
26 Phi2=p2/D2
27 Den_orbit=D1*D2
28 Delta=f/Den_orbit
29 Qdelta=1-13*Delta+49*Delta**2
30 L=x+w*Phi+(-1-w)*Phi2
31 Lp=x+(-1-w)*Phi+w*Phi2
32 
33 A=4*b*b+b-14
34 B=11*b-23
35 C=-b*b+3*b-3
36 NY=(y-C)*(B+b*A)-A*A
37 DY=A*(y-C)+B*B+b*A*B
38 c=3*(652*b*b-1230*b-33)
39 R=y**3+(6*b*b-14*b+2)*y*y+(4*b*b-6*b-1)*y+94*b*b-124*b-107
40 
41 
42 def rem_b(poly):
43     return sp.rem(sp.expand(poly),fb,b)
44 
45 
46 def assert_num_zero(expr, label):
47     num,_=sp.fraction(sp.together(expr))
48     num=sp.rem(sp.expand(num),fw,w)
49     num=rem_b(num)
50     assert num==0, f'{label}: exact polynomial residual = {sp.factor(num)}'
51     print('  PASS',label)
52 
53 
54 def audit_exact():
55     print('Exact rational-polynomial audits:')
56     G=sp.Matrix([[5,-3*b],[b*b,-4]])
57     assert_num_zero(G.det()-1,'SL2 determinant 1')
58     assert_num_zero(sp.trace(G)-1,'matrix trace 1')
59     for i,j in zip((G*G-G+sp.eye(2)),range(4)):
60         assert_num_zero(i,'matrix cubic order' if j==0 else 'matrix component')
61     assert_num_zero(Phi.subs(x,Phi)-Phi2, 'projective Phi squared')
62     assert_num_zero(Phi.subs(x,Phi2)-x, 'projective Phi cubed')
63     assert_num_zero(Delta.subs(x,Phi)-Delta,'Delta invariant under Phi')
64     assert_num_zero(x+Phi+Phi2-b*(1+7*Delta),'cubic orbit trace')
65     assert_num_zero(x*Phi+x*Phi2+Phi*Phi2-9*b*b*Delta,'cubic orbit pair sum')
66     assert_num_zero(x*Phi*Phi2-(-1+20*Delta),'cubic orbit product')
67     p_d=z**3-b*(1+7*d)*z*z+9*b*b*d*z+1-20*d
68     assert_num_zero(sp.discriminant(p_d,z)-(49*d*d-13*d+1)**2,'perfect-square discriminant')
69     assert_num_zero(L*Lp-b*b*Qdelta,'generic Fourier norm')
70     assert_num_zero(L**3-(J**2+49*Delta)*Qdelta,'generic primitive Fourier cube')
71     assert_num_zero(Lp**3-(Jbar**2+49*Delta)*Qdelta,'generic complementary Fourier cube')
72 
73     assert_num_zero(NY**3-b*NY*NY*DY+DY**3-c*R,'Möbius inverse: cubic polynomial residual')
74     assert_num_zero(sp.diff(NY,y)*DY-NY*sp.diff(DY,y)-c,'Möbius determinant / derivative')
75     Y0=A*x*x+B*x+C
76     expr=sp.expand((DY*x-NY).subs(y,Y0)-A*A*f)
77     # This identity holds in the full polynomial ring, not merely at a root.
78     assert_num_zero(expr,'polynomial Y(x) inverse modulo f (identity)')
79 
80     # The gamma obstruction is Delta composed with the rational inverse x(Y).
81     DeltaY=c*R/(DY*(b*b*NY-4*DY)*(b*b*NY-5*DY))
82     assert_num_zero(Delta.subs(x,NY/DY)-DeltaY,'explicit rational gamma obstruction')
83 
84     # Cyclic Möbius action transported to Y coordinate.
85     M=sp.Matrix([[sp.diff(NY,y),NY.subs(y,0)],
86                  [sp.diff(DY,y),DY.subs(y,0)]])
87     assert_num_zero(M.det()-c,'transport determinant')
88     Psi0=M.adjugate()*G*M
89     invc=sp.invert(c,fb,b)
90     Psi=Psi0.applyfunc(lambda q:rem_b(q*invc))
91     assert_num_zero(Psi.det()-1,'transported C3 action determinant')
92     assert_num_zero(sp.trace(Psi)-1,'transported C3 action trace')
93     for val in list(Psi**2-Psi+sp.eye(2)):
94         assert_num_zero(val,'transported C3 action cubic relation')
95 
96     # A gamma triple on a single Psi orbit is parametrized by just Delta.
97     T=sp.Poly(sp.expand(DY*(-7*b*NY**2+9*b*b*NY*DY-20*DY**2)),y)
98     t3=rem_b(T.nth(3));t2=rem_b(T.nth(2))
99     r2=6*b*b-14*b+2
100     kappa=-(1300*b*b-3486*b+2723)/41
101     theta=-14*(2*b*b+7*b+45)/41
102     assert_num_zero((r2*t3-t2)-c*kappa,'trace normalizer numerator')
103     assert_num_zero(t3-c*theta,'trace normalizer denominator')
104 
105     assert_num_zero(f.subs(x,-2*b/7)-sp.Rational(13,49),'spurious quadratic orbit control')
106     print('Exact audit complete. None of these checks establishes Delta_gamma(1/3)=0.')
107     return M,Psi,kappa,theta
108 
109 
110 def gamma_log(zeta,t,s,N):
111     """Standard absolutely convergent fifth-smoothed gamma log at real zeta."""
112     P=mp.exp(2j*mp.pi*t); Q=mp.exp(2j*mp.pi*s)
113     ez=mp.exp(2j*mp.pi*zeta)
114     pn=qn=en=ein=mp.mpc(1)
115     total=mp.mpc(0)
116     for n in range(1,N+1):
117         pn*=P; qn*=Q; en*=ez; ein/=ez
118         if n%5:
119             total+=(pn*en-qn*ein)/(n*(1-pn)*(1-qn))
120     r=max(abs(P),abs(Q)); small=min(abs(P),abs(Q))
121     # Safe absolute analytic tail for real zeta and r>=small.
122     bound=10*r**(N+1)/((N+1)*(1-r)**2*(1-small))
123     return -5*total,bound
124 
125 
126 def numeric_experiment(zeta_fraction=(1,3),Ns=(4000,19000,34000),dps=64):
127     mp.mp.dps=dps
128     zeta=mp.mpf(zeta_fraction[0])/mp.mpf(zeta_fraction[1])
129     omega=mp.exp(2j*mp.pi/3)
130     beta=mp.root(7,3)*omega**2
131     tau=(beta**2+2*beta)/15
132     sigma=-(beta+2)/15
133     chart=[]
134     AA=4*beta**2+beta-14
135     BB=11*beta-23
136     CC=-beta**2+3*beta-3
137     print('\nNumerical diagnostic at z=',mp.nstr(zeta,20),'with',dps,'digits')
138     for (n,a,bs),N in zip([(1,0,0),(10,1,3),(23,5,-2)],Ns):
139         t=(-tau-a)/n
140         s=(sigma+bs)/n
141         tick=time.monotonic()
142         logU,tail=gamma_log(zeta,t,s,N)
143         U=mp.exp(logU)
144         Y=U+1/U
145         num=(Y-CC)*(BB+beta*AA)-AA*AA
146         den=AA*(Y-CC)+BB*BB+beta*AA*BB
147         v=num/den
148         fval=v**3-beta*v*v+1
149         delt=fval/((beta**2*v-4)*(beta**2*v-5))
150         chart.append((n,U,Y,v,delt))
151         print(' chart',n,'N',N,'time',round(time.monotonic()-tick,2),'s')
152         print('   U =',mp.nstr(U,22))
153         print('   delta_gamma =',mp.nstr(delt,15),'abs',mp.nstr(abs(delt),8))
154         print('   rigorous truncation tail for log(U) <=',mp.nstr(tail,8))
155     v0=chart[0][3]
156     orbit1=(5*v0-3*beta)/(beta**2*v0-4)
157     orbit2=(4*v0-3*beta)/(beta**2*v0-5)
158     e1=abs(chart[2][3]-orbit1)
159     e2=abs(chart[1][3]-orbit2)
160     Ys=[p[2] for p in chart]
161     target=-6*beta**2+14*beta-2
162     trace_err=abs(sum(Ys)-target)
163     print(' analytic orbit check |v_23 - Phi(v_1)| =',mp.nstr(e1,11))
164     print(' analytic orbit check |v_10 - Phi²(v_1)| =',mp.nstr(e2,11))
165     print(' analytic trace |Y_1+Y_10+Y_23-target| =',mp.nstr(trace_err,11))
166     print(' No small residual is an equality certificate.')
167     return chart
168 
169 
170 if __name__=='__main__':
171     parser=argparse.ArgumentParser()
172     parser.add_argument('--exact-only',action='store_true')
173     parser.add_argument('--dps',type=int,default=64)
174     parser.add_argument('--nbase',type=int,default=4000)
175     parser.add_argument('--n10',type=int,default=19000)
176     parser.add_argument('--n23',type=int,default=34000)
177     parser.add_argument('--negative-control',action='store_true')
178     args=parser.parse_args()
179     audit_exact()
180     if not args.exact_only:
181         numeric_experiment((1,3), (args.nbase,args.n10,args.n23),args.dps)
182         if args.negative_control:
183             numeric_experiment((1,4), (args.nbase,args.n10,args.n23),args.dps)

Back to source controls

Original file and source record

This copy matches the recorded source file. Its publication here does not change the work’s review status.

SHA-256: ba5876d37a7cbca4518d6e0e66ae495235f3982775225e0e1d80d34702a335c9

Original source on GitHub

Back to Hilbert 12: analytic Fourier branch