interplane.Get Omega
Read in your language

yang

This project has not described itself yet.

Brought by drakestapleton

branch main Branches Tags History

yang / scripts / check_negative_adjoint.py

41 lines · 1847 bytes Raw Blame History
1"""Exact interval sign test of an SU(2) character coefficient at a proposed bare action."""
2from fractions import Fraction
3from math import factorial, lcm
4
5beta_f, beta_a = Fraction(23, 10), Fraction(-19, 500)
6order = 110
7# Remove the positive scalar exp(beta_a/3). On the unit circle the
8# nonconstant action is P(z)=(beta_f/2)(z+1/z)+(beta_a/3)(z^2+1/z^2).
9weights = {1:beta_f/2, -1:beta_f/2, 2:beta_a/3, -2:beta_a/3}
10scale = lcm(*(w.denominator for w in weights.values()))
11integer = {k:int(scale*w) for k,w in weights.items()}
12power, partial = {0:1}, {0:1}
13denom = 1
14for k in range(1,order+1):
15 product = {}
16 for n,coeff in power.items():
17 for shift,weight in integer.items():
18 m = n+shift
19 product[m] = product.get(m,0) + coeff*weight
20 factor = k*scale
21 partial = {n:factor*partial.get(n,0) + product.get(n,0) for n in partial.keys() | product.keys()}
22 power = product
23 denom *= factor
24
25radius = sum(abs(w) for w in weights.values())
26tail = radius**(order+1)/factorial(order+1)/(1-radius/(order+2))
27for n in range(2*order-1):
28 # Haar sine squared times chi_n reduces to cos(n theta)-cos((n+2) theta).
29 # Each omitted Laurent coefficient is bounded by the uniform exponential tail.
30 value = Fraction(partial.get(n,0)-partial.get(n+2,0),denom)
31 lo, hi = value-2*tail, value+2*tail
32 if hi < 0:
33 print("beta_F",beta_f,"beta_A",beta_a,"order",order)
34 print("first negative SU(2) character coefficient after removing exp(beta_A/3)")
35 print("n",n,"spin",Fraction(n,2),"lower",f"{float(lo):.12g}","upper",f"{float(hi):.12g}")
36 print("rigorous arithmetic: upper < 0; all preceding lower bounds > 0")
37 break
38 if lo <= 0:
39 raise ValueError(f"insufficient precision at n={n}")
40else:
41 raise ValueError("no certified negative character in range")