Главная / Где видна щель на решётке SU(2) / Численная проверка оконной оценки
"""Rational cavity and sliding-window chordal contraction inequalities."""
from fractions import Fraction as Q
from math import factorial
def upper_exp(argument):
count = 10
partial = sum((argument**i / factorial(i) for i in range(count + 1)), Q(0))
ratio = argument / (count + 1)
assert 0 <= ratio < 1
return partial + argument**count / factorial(count) * ratio / (1 - ratio)
def round_up(value, denominator=10**8):
scaled = value * denominator
return Q(-(-scaled.numerator // scaled.denominator), denominator)
def tilt_error(oscillation):
density_error = upper_exp(oscillation) - 1
return Q(3, 8) * density_error + density_error**2 / 8
beta = Q(717, 2500)
alpha = Q(1, 1000)
window = 64
linear = 5 * beta**2 / 4
oscillation = Q(89, 50000)
assert 4 * beta + linear <= 5 * beta
assert (2 * beta**2 * (5 * beta)**2) / 192 < oscillation
residual_from_incoming = beta * (upper_exp(oscillation) - 1) / 2
assert (2 * beta**2 * (4 * beta + linear)**2) / 192 + residual_from_incoming < oscillation
assert max(4 * beta + 2 * linear, 5 * beta + linear, 6 * beta) < 3
inside = round_up(beta * (Q(1, 4) + tilt_error(2 * oscillation)))
end = round_up(beta * (Q(1, 4) + tilt_error(oscillation)))
ordinary = beta / 4
weighted_time = round_up(upper_exp(alpha))
weights = [weighted_time**distance for distance in range(window + 1)]
propagation = [end**distance for distance in range(window)]
row = Q(0)
endpoints = (0, window - 1)
for output in range(window):
for source in range(window):
distance = abs(output - source)
coefficient = end if source in endpoints else inside
if distance:
coefficient *= propagation[distance - 1]
coefficient *= ordinary if output in endpoints else end
weight = 12 * weights[distance]
if source == 0:
weight += weights[output + 1]
if source == window - 1:
weight += weights[window - output]
row += coefficient * weight / window
assert row < Q(1999, 2000)
print("PASS: beta <= 717/2500, exponent 1/1000, weighted chordal row below 1999/2000")
Исходные технические записи отражают состояние работы на дату их составления. Уточнения и итоговый вывод приведены в статье.
Контрольная сумма оригинала · SHA-256
f05725bad5155ad04e79ed10d83847732adc6364e0070ea80dcc2afd83c55256