Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/yang/blob/main/scripts/check_negative_adjoint.py # yang This project has not described itself yet. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers 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.""" 2 from fractions import Fraction 3 from math import factorial, lcm 4 5 beta_f, beta_a = Fraction(23, 10), Fraction(-19, 500) 6 order = 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). 9 weights = {1:beta_f/2, -1:beta_f/2, 2:beta_a/3, -2:beta_a/3} 10 scale = lcm(*(w.denominator for w in weights.values())) 11 integer = {k:int(scale*w) for k,w in weights.items()} 12 power, partial = {0:1}, {0:1} 13 denom = 1 14 for 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 25 radius = sum(abs(w) for w in weights.values()) 26 tail = radius**(order+1)/factorial(order+1)/(1-radius/(order+2)) 27 for 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}") 40 else: 41 raise ValueError("no certified negative character in range")