Objects/Documentation
precision29.py
Shared conditionals and checks · precision29.py
Download ↓"""Certify an algebraic optimum by two rational decisions and a uniform separation bound."""
from fractions import Fraction as F
from pathlib import Path
import json,math,sympy as S
from contacts27 import TRIPLE,compact
from rayon26 import PROBES,Number,witness
from verifier26 import verify
from projection28 import planes,t
def height(laws):
M=1
for px,py in PROBES:
for h in set(planes(laws,F(px,4),F(py,4))):
ps=[S.Poly(v,t,domain=S.QQ) for v in h]
coeff=[z for p in ps for z in p.all_coeffs()]
den=math.lcm(*(int(x.q) for x in coeff))
g=math.gcd(*(int(x*den) for x in coeff)) or 1