nDot.io physics
07-ilang-weight / 04-weight-of-bond
04weight of bondverified

Determines the bond profile of two held bodies bound only through the field and the weight of the pair in the field of a distant source, and whether the bond is weighed like the costs of the bodies.

Code of version 1

check_weight_of_bond.py15 KB · raw
"""Check of 07-ilang-weight/04-weight-of-bond, derivation v1.

N_f = 1 field object, t_f = 1, held pair (g1 at x1, g2 at x2 = x1 + r) and held
source (g_s at x_s = 0).  The exact lowest eigenvalue of h = C_1 + sum_i g_i P_{x_i}
(dense diagonalisation) is compared with the formulas (4.1)-(4.13).
Run from the project root:
  .venv/Scripts/python.exe 07-ilang-weight/04-weight-of-bond/code/v1/check_weight_of_bond.py
"""
import itertools
from pathlib import Path

import numpy as np
from scipy.linalg import eigh

OUT = Path(__file__).parent / "output"
OUT.mkdir(exist_ok=True)
LOG = []


def log(s=""):
    print(s)
    LOG.append(s)


def hop(D, L):
    """C_1 = -t_f * adjacency of the D-torus of side L (t_f = 1)."""
    N = L ** D
    co = np.array(list(itertools.product(range(L), repeat=D)))
    H = np.zeros((N, N))
    for mu in range(D):
        sh = co.copy()
        sh[:, mu] = (sh[:, mu] + 1) % L
        j = np.ravel_multi_index(sh.T, (L,) * D)
        H[np.arange(N), j] -= 1.0
        H[j, np.arange(N)] -= 1.0
    return H


def tables(D, L):
    """ell = Lambda^+ and ell2 = (Lambda^+)^2 as functions of the displacement (FFT)."""
    k = 2 * np.pi * np.fft.fftfreq(L)
    g = np.meshgrid(*([k] * D), indexing="ij")
    om = sum(4 * np.sin(x / 2) ** 2 for x in g)
    inv = np.zeros_like(om)
    inv[om > 1e-12] = 1 / om[om > 1e-12]
    return np.real(np.fft.ifftn(inv)), np.real(np.fft.ifftn(inv ** 2))


def site(x, L):
    return int(np.ravel_multi_index(tuple(np.mod(x, L)), (L,) * len(x)))


def emin(H0, pts, top=False):
    H = H0.copy()
    for i, g in pts:
        H[i, i] += g
    n = H.shape[0]
    idx = [n - 1, n - 1] if top else [0, 0]
    return eigh(H, eigvals_only=True, subset_by_index=idx)[0]


class Graph:
    def __init__(self, D, L, build=True):
        self.D, self.L, self.X = D, L, L ** D
        self.l, self.l2 = tables(D, L)
        self.H0 = hop(D, L) if build else None

    def ell(self, a):
        return self.l[tuple(np.mod(a, self.L))]

    def ell2(self, a):
        return self.l2[tuple(np.mod(a, self.L))]

    def S(self, x1, x2, xs):
        """bracket of (4.6) without the x1-independent ell2(r) term."""
        l12, l1s, l2s = self.ell(x2 - x1), self.ell(x1 - xs), self.ell(x2 - xs)
        return l12 * (l1s + l2s) + l1s * l2s - (self.ell2(x1 - xs) + self.ell2(x2 - xs)) / self.X

    def rho0(self, x1, r, rp, e, xs):
        """leading-order ratio (4.10), lattice differences."""
        num = (self.S(x1 + e, x1 + e + r, xs) - self.S(x1, x1 + r, xs)) - (
            self.S(x1 + e, x1 + e + rp, xs) - self.S(x1, x1 + rp, xs))
        den = 2 * (self.ell(r) - self.ell(rp)) * (self.ell(x1 + e - xs) - self.ell(x1 - xs))
        return num / den

    def rho0_mid(self, xb, r, rp, e, xs):
        """leading-order ratio (4.12) with the midpoint xb as the place (r, rp with even components)."""
        S = lambda y, rr: self.S(y - rr // 2, y + rr // 2, xs)
        num = (S(xb + e, r) - S(xb, r)) - (S(xb + e, rp) - S(xb, rp))
        den = 2 * (self.ell(r) - self.ell(rp)) * (self.ell(xb + e - xs) - self.ell(xb - xs))
        return num / den


# Model D levels: M_k = m + 2 pi k / (N lambda_0), m = 1, N = 4, lambda_0 = pi
def Mk(k):
    return 1.0 + 0.5 * k


GAM2 = 0.6  # gamma_2 / gamma_1 (unequal bodies)
CHOICES = {  # (k1, s1, k2, s2) and the second level of each body used for its cost difference
    "A (k1,s1,k2,s2)=(0,+,1,+)": ((0, 1, 1, 1), ((1, 1), (2, 1))),
    "B (k1,s1,k2,s2)=(2,-,3,+)": ((2, -1, 3, 1), ((2, 1), (0, 1))),
}
ETAS = [0.08, 0.04, 0.02]


def run_exact(G, x1, r, rp, e, xb, rm, rmp, label):
    D, L, X = G.D, G.L, G.X
    xs = np.zeros(D, int)
    l0 = G.ell(np.zeros(D, int))
    gs = 0.01 / l0
    n = 1.0 / X
    s = lambda x: site(x, L)
    log(f"\n--- {label}: L={L}, x1={x1.tolist()}, r={r.tolist()}, r'={rp.tolist()}, e={e.tolist()}; "
        f"midpoint version: xbar={xb.tolist()}, r={rm.tolist()}, r'={rmp.tolist()}; ell_0={l0:.4f}, g_s={gs:.4g}")
    log(" choice | eta | rel.dev bond profile (4.2) | rel.dev W_1 (4.5) | rel.dev W_b (4.6) | "
        "rho_ex(full grip) | rho0 (4.10) | rho_ex(a)/[(1+n g1)/(n g1) rho0] (4.13) | rho_mid_ex vs rho0_mid (4.12)")
    rho_th = G.rho0(x1, r, rp, e, xs)
    rho_mid_th = G.rho0_mid(xb, rm, rmp, e, xs)
    for cname, ((k1, s1, k2, s2), lev2) in CHOICES.items():
        devs = []
        for eta in ETAS:
            gam1 = eta / l0 / 2.5
            gam = (gam1, GAM2 * gam1)
            g1, g2 = s1 * gam[0] * Mk(k1), s2 * gam[1] * Mk(k2)

            def E(pts, src):
                return emin(G.H0, pts + ([(s(xs), src)] if src else []))

            def coef(pts):  # coefficient of g_s (symmetric difference)
                return (E(pts, gs) - E(pts, -gs)) / (2 * gs)

            def Wb_ex(y1, y2):
                return (coef([(s(y1), g1), (s(y2), g2)]) - coef([(s(y1), g1)])
                        - coef([(s(y2), g2)]) + coef([]))

            def Wb_th(y1, y2):
                return 2 * n * g1 * g2 * (G.S(y1, y2, xs) - G.ell2(y2 - y1) / X)

            # item 1: bond profile
            Bex = E([(s(x1), g1), (s(x1 + r), g2)], 0) - E([(s(x1), g1), (s(x1 + rp), g2)], 0)
            Bth = -2 * n * g1 * g2 * (G.ell(r) - G.ell(rp))
            # item 2: single body 1 and bond part
            W1ex = coef([(s(x1 + e), g1)]) - coef([(s(x1), g1)])
            W1th = sum(sgn * (-2 * n * g1 * G.ell(y) + n * g1 ** 2 * (2 * l0 * G.ell(y) + G.ell(y) ** 2
                                                                     - 2 * G.ell2(y) / X))
                       for sgn, y in ((1, x1 + e), (-1, x1)))
            Wex = {}
            for tag, y1, y2 in (("r", x1, x1 + r), ("rp", x1, x1 + rp), ("er", x1 + e, x1 + e + r),
                                ("erp", x1 + e, x1 + e + rp)):
                Wex[tag] = (Wb_ex(y1, y2), Wb_th(y1, y2))
            num_ex = (Wex["er"][0] - Wex["r"][0]) - (Wex["erp"][0] - Wex["rp"][0])
            dWb_ex = Wex["er"][0] - Wex["r"][0]
            dWb_th = Wex["er"][1] - Wex["r"][1]

            # single-body place function F_i from level differences (full grip and coupling (a))
            def F(i, coupling, y):
                kk, ss = ((k1, s1), (k2, s2))[i]
                kq, sq = lev2[i]
                ga = gam[i]
                gA, gB = ss * ga * Mk(kk), sq * ga * Mk(kq)
                rest = (ss * Mk(kk) - sq * Mk(kq)) if coupling == "a" else 0.0
                dW = (coef([(s(y + e), gA)]) - coef([(s(y), gA)])) - (
                    coef([(s(y + e), gB)]) - coef([(s(y), gB)]))
                dC = rest + E([(s(y), gA)], 0) - E([(s(y), gB)], 0)
                return dW / dC

            rho_fg = [num_ex / (Bex * F(i, "fg", x1)) for i in (0, 1)]
            rho_a = [num_ex / (Bex * F(i, "a", x1)) for i in (0, 1)]
            pred_a = [(1 + n * gam[i]) / (n * gam[i]) * rho_th for i in (0, 1)]
            # midpoint version, full grip, relative to body 1
            h = lambda rr: rr // 2
            Bm = (E([(s(xb - h(rm)), g1), (s(xb + h(rm)), g2)], 0)
                  - E([(s(xb - h(rmp)), g1), (s(xb + h(rmp)), g2)], 0))
            num_m = ((Wb_ex(xb + e - h(rm), xb + e + h(rm)) - Wb_ex(xb - h(rm), xb + h(rm)))
                     - (Wb_ex(xb + e - h(rmp), xb + e + h(rmp)) - Wb_ex(xb - h(rmp), xb + h(rmp))))
            rho_m = num_m / (Bm * F(0, "fg", xb))
            dev = (abs(Bex / Bth - 1), abs(W1ex / W1th - 1), abs(dWb_ex / dWb_th - 1),
                   abs(rho_fg[0] / rho_th - 1), abs(rho_fg[1] / rho_th - 1),
                   abs(rho_a[0] / pred_a[0] - 1), abs(rho_a[1] / pred_a[1] - 1), abs(rho_m / rho_mid_th - 1))
            devs.append(dev)
            log(f" {cname[:1]} | {eta:.2f} | {dev[0]:.2e} | {dev[1]:.2e} | {dev[2]:.2e} | "
                f"{rho_fg[0]:.5f} (body1), {rho_fg[1]:.5f} (body2) | {rho_th:.5f} | "
                f"{rho_a[0] / pred_a[0]:.5f}, {rho_a[1] / pred_a[1]:.5f} | {rho_m:.5f} vs {rho_mid_th:.5f}")
        d = np.array(devs)
        ratios = d[:-1] / d[1:]
        log(f" {cname[:1]} | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, "
            "rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: "
            + "; ".join(" ".join(f"{x:.2f}" for x in row) for row in ratios))


def main():
    log("Check of 04-weight-of-bond v1 (N_f = 1, t_f = 1)")
    log("Couplings g_i = sigma_i gamma_i M_{k_i}, gamma_1 = eta/(2.5 ell_0), gamma_2 = 0.6 gamma_1;"
        " rel.dev = |exact/formula - 1|.")
    log("Expected: rel.dev of the third-order formulas proportional to eta (ratio ~2 when eta halves).")

    # ---------- exact eigenvalue checks, two sizes per graph ----------
    setups = [  # D, L, x1, r, r', e, xbar, r_mid, r'_mid
        (1, 30, [6], [3], [2], [1], [8], [4], [2]), (1, 60, [12], [6], [5], [1], [16], [8], [4]),
        (2, 12, [4, 0], [1, 1], [2, 2], [1, 0], [4, 0], [0, 2], [2, 2]),
        (2, 20, [6, 0], [1, 1], [2, 2], [1, 0], [6, 0], [0, 2], [2, 2]),
        (3, 8, [3, 0, 0], [0, 1, 0], [1, 1, 1], [1, 0, 0], [3, 0, 0], [0, 2, 0], [2, 2, 0]),
        (3, 10, [4, 0, 0], [0, 1, 0], [1, 1, 1], [1, 0, 0], [4, 0, 0], [0, 2, 0], [2, 2, 0]),
    ]
    for D, L, *geo in setups:
        G = Graph(D, L)
        run_exact(G, *[np.array(v) for v in geo], f"graph D={D}")

    # ---------- mirrored (highest) state on even L ----------
    log("\n--- mirror identity max spec h(g) = -min spec h(-g) (even L):")
    rng = np.random.default_rng(1)
    for D, L in ((1, 30), (2, 12), (3, 8)):
        G = Graph(D, L)
        pts = [(int(rng.integers(L ** D)), float(rng.normal()) * 0.3) for _ in range(3)]
        top = emin(G.H0, pts, top=True)
        low = emin(G.H0, [(i, -g) for i, g in pts])
        log(f" D={D}, L={L}: max + min(-g) = {top + low:.2e}")

    # ---------- sum rule (consistency check 3) ----------
    log("\n--- sum over x1 of the full g_s g1 g2 coefficient of (4.6) (incl. -ell2(r)/X): ")
    for D, L in ((1, 30), (2, 12), (3, 8)):
        G = Graph(D, L, build=False)
        xs = np.zeros(D, int)
        r = np.array([2] + [1] * (D - 1))
        tot = sum(G.S(np.array(x1), np.array(x1) + r, xs) - G.ell2(r) / G.X
                  for x1 in itertools.product(range(L), repeat=D))
        log(f" D={D}, L={L}: sum = {tot:.2e}")

    # ---------- item 1: ring closed form and torus forms ----------
    log("\n--- (4.3) ring: max |ell(r) - [(L^2-1)/(12L) - r(L-r)/(2L)]|:")
    for L in (30, 61, 200):
        G = Graph(1, L, build=False)
        rr = np.arange(L)
        log(f" L={L}: {np.max(np.abs(G.l - ((L*L-1)/(12*L) - rr*(L-rr)/(2*L)))):.2e}")
    log("--- (4.4) 2D: ell(0)-ell(r e1) - [ln r/(2 pi) + (2 gamma_E + 3 ln 2)/(4 pi)]:")
    cst2 = (2 * np.euler_gamma + 3 * np.log(2)) / (4 * np.pi)
    for L in (256, 1024):
        G = Graph(2, L, build=False)
        out = []
        for rr in (2, 4, 8, 16, 32):
            out.append(f"r={rr}: {G.l[0, 0] - G.l[rr, 0] - (np.log(rr) / (2 * np.pi) + cst2):+.2e}")
        log(f" L={L}: " + ", ".join(out))
    log("--- (4.4) 3D: ell(0)-ell(r e1) - [G_0 - 1/(4 pi r)], G_0 = 0.2527310098:")
    for L in (64, 128):
        G = Graph(3, L, build=False)
        out = []
        for rr in (2, 4, 8, 16):
            out.append(f"r={rr}: {G.l[0, 0, 0] - G.l[rr, 0, 0] - (0.2527310098 - 1 / (4 * np.pi * rr)):+.2e}")
        log(f" L={L}: " + ", ".join(out))

    # ---------- item 3: rho0 on large graphs, distance scaling ----------
    log("\n--- (4.12) ring: lattice rho0 (e=+1, r'=r-1) vs 2(1-w)(1-2w)/((1-2u)(1-2v)),"
        " u=(d+1/2)/L, v=(r-1/2)/L, w=u+v:")
    for (uu, vv) in ((0.2, 0.1), (0.1, 0.05), (0.6, 0.2)):
        row = []
        for L in (40, 80, 160, 320):
            G = Graph(1, L, build=False)
            d, rr = int(round(uu * L)), int(round(vv * L))
            lat = G.rho0(np.array([d]), np.array([rr]), np.array([rr - 1]), np.array([1]), np.array([0]))
            u, v = (d + 0.5) / L, (rr - 0.5) / L
            w = u + v
            fo = 2 * (1 - w) * (1 - 2 * w) / ((1 - 2 * u) * (1 - 2 * v))
            row.append(f"L={L}: {lat:.5f} vs {fo:.5f} (diff {lat - fo:+.1e})")
        log(f" u={uu}, v={vv}: " + "; ".join(row))
    log(" small-v limit 2(1-u): u=0.2 -> 1.6; u=0.1 -> 1.8")

    log("\n--- (4.11) 3D, L=128: rho0 - 1 and, in brackets, d*(rho0 - 1) vs d (x1=(d,0,0), e=e1):")
    G = Graph(3, 128, build=False)
    xs = np.zeros(3, int)
    for rv, rpv in (((0, 1, 0), (1, 1, 1)), ((0, 2, 0), (2, 3, 0)), ((0, 1, 0), (0, 2, 0)),
                    ((1, 0, 0), (2, 0, 0))):
        row = []
        for d in (8, 16, 32):
            rho = G.rho0(np.array([d, 0, 0]), np.array(rv), np.array(rpv), np.array([1, 0, 0]), xs)
            row.append(f"d={d}: {rho - 1:+.3e} ({d * (rho - 1):+.3f})")
        log(f" r={rv}, r'={rpv}: " + ", ".join(row))
    log("\n--- (4.11) 2D: rho0 - 1 and, in brackets, d*(rho0 - 1) vs d and L"
        " (x1=(d,0), e=e1, r=(2,1), r'=(4,3)):")
    for L in (128, 512, 2048):
        G = Graph(2, L, build=False)
        row = []
        for d in (8, 16, 32, 64):
            rho = G.rho0(np.array([d, 0]), np.array([2, 1]), np.array([4, 3]), np.array([1, 0]),
                         np.zeros(2, int))
            row.append(f"d={d}: {rho - 1:+.3e} ({d * (rho - 1):+.3f})")
        log(f" L={L}: " + ", ".join(row))

    log("\n--- (4.12) midpoint place: rho0_mid - 1 (ring; expected 0 up to rounding):")
    for L in (40, 160):
        G = Graph(1, L, build=False)
        row = []
        for db, rr, rrp in ((L // 4, 4, 2), (L // 5, 10, 4), (3 * L // 5, 12, 6)):
            k = G.rho0_mid(np.array([db]), np.array([rr]), np.array([rrp]), np.array([1]), np.array([0])) - 1
            row.append(f"(dbar,r,r')=({db},{rr},{rrp}): {k:+.1e}")
        log(f" L={L}: " + ", ".join(row))
    log("--- (4.12) midpoint place, 2D: rho0_mid - 1 and, in brackets, d^2*(rho0_mid - 1)"
        " (xbar=(d,0), e=e1, r=(2,2), r'=(4,2)):")
    for L in (128, 512, 2048):
        G = Graph(2, L, build=False)
        row = []
        for d in (8, 16, 32, 64):
            k = G.rho0_mid(np.array([d, 0]), np.array([2, 2]), np.array([4, 2]), np.array([1, 0]),
                           np.zeros(2, int)) - 1
            row.append(f"d={d}: {k:+.3e} ({d * d * k:+.1f})")
        log(f" L={L}: " + ", ".join(row))
    log("--- (4.12) midpoint place, 3D, L=128: rho0_mid - 1 and, in brackets, d^2*(rho0_mid - 1)"
        " (xbar=(d,0,0), e=e1):")
    G = Graph(3, 128, build=False)
    for rv, rpv in (((0, 2, 0), (2, 2, 2)), ((2, 0, 0), (4, 2, 0))):
        row = []
        for d in (8, 16, 32):
            k = G.rho0_mid(np.array([d, 0, 0]), np.array(rv), np.array(rpv), np.array([1, 0, 0]),
                           np.zeros(3, int)) - 1
            row.append(f"d={d}: {k:+.3e} ({d * d * k:+.2f})")
        log(f" r={rv}, r'={rpv}: " + ", ".join(row))

    log("\n--- 3D large separations (consistency check 2): W_b / (2 n g1 g2) = S - ell2(r)/X"
        " at |r|, d ~ L/4 shrinks with L:")
    for L in (16, 32, 64):
        G = Graph(3, L, build=False)
        q = L // 4
        val = G.S(np.array([q, 0, 0]), np.array([q, q, 0]), np.zeros(3, int)) - G.ell2(np.array([0, q, 0])) / G.X
        log(f" L={L}: {val:.3e}")

    (OUT / "check_weight_of_bond.txt").write_text("\n".join(LOG) + "\n", encoding="utf-8")


if __name__ == "__main__":
    main()
output/check_weight_of_bond.txt13 KB · raw
Check of 04-weight-of-bond v1 (N_f = 1, t_f = 1)
Couplings g_i = sigma_i gamma_i M_{k_i}, gamma_1 = eta/(2.5 ell_0), gamma_2 = 0.6 gamma_1; rel.dev = |exact/formula - 1|.
Expected: rel.dev of the third-order formulas proportional to eta (ratio ~2 when eta halves).

--- graph D=1: L=30, x1=[6], r=[3], r'=[2], e=[1]; midpoint version: xbar=[8], r=[4], r'=[2]; ell_0=2.4972, g_s=0.004004
 choice | eta | rel.dev bond profile (4.2) | rel.dev W_1 (4.5) | rel.dev W_b (4.6) | rho_ex(full grip) | rho0 (4.10) | rho_ex(a)/[(1+n g1)/(n g1) rho0] (4.13) | rho_mid_ex vs rho0_mid (4.12)
 A | 0.08 | 8.10e-02 | 2.52e-05 | 3.68e-01 | 1.23433 (body1), 1.23925 (body2) | 1.18588 | 1.12672, 1.11709 | 1.03307 vs 1.00000
 A | 0.04 | 4.14e-02 | 1.18e-05 | 1.90e-01 | 1.21058 (body1), 1.21317 (body2) | 1.18588 | 1.06230, 1.05784 | 1.01699 vs 1.00000
 A | 0.02 | 2.09e-02 | 6.29e-06 | 9.65e-02 | 1.19831 (body1), 1.19964 (body2) | 1.18588 | 1.03085, 1.02871 | 1.00861 vs 1.00000
 A | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 1.96 2.14 1.94 1.96 1.96 2.03 2.02 1.95; 1.98 1.87 1.97 1.99 1.98 2.02 2.01 1.97
 B | 0.08 | 2.56e-02 | 3.50e-04 | 1.54e-01 | 1.18085 (body1), 1.15057 (body2) | 1.18588 | 0.99252, 1.03700 | 0.99375 vs 1.00000
 B | 0.04 | 1.19e-02 | 6.87e-05 | 6.98e-02 | 1.18356 (body1), 1.16883 (body2) | 1.18588 | 0.99723, 1.01914 | 0.99692 vs 1.00000
 B | 0.02 | 5.76e-03 | 1.78e-05 | 3.29e-02 | 1.18472 (body1), 1.17746 (body2) | 1.18588 | 0.99882, 1.00968 | 0.99846 vs 1.00000
 B | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 2.14 5.10 2.21 2.17 2.07 2.70 1.93 2.03; 2.07 3.87 2.12 2.00 2.02 2.34 1.98 2.00

--- graph D=1: L=60, x1=[12], r=[6], r'=[5], e=[1]; midpoint version: xbar=[16], r=[8], r'=[4]; ell_0=4.9986, g_s=0.002001
 choice | eta | rel.dev bond profile (4.2) | rel.dev W_1 (4.5) | rel.dev W_b (4.6) | rho_ex(full grip) | rho0 (4.10) | rho_ex(a)/[(1+n g1)/(n g1) rho0] (4.13) | rho_mid_ex vs rho0_mid (4.12)
 A | 0.08 | 7.81e-02 | 4.15e-05 | 5.08e-01 | 1.22521 (body1), 1.22951 (body2) | 1.17551 | 1.12828, 1.11810 | 1.03196 vs 1.00000
 A | 0.04 | 3.98e-02 | 9.43e-06 | 2.63e-01 | 1.20079 (body1), 1.20306 (body2) | 1.17551 | 1.06300, 1.05828 | 1.01643 vs 1.00000
 A | 0.02 | 2.01e-02 | 3.48e-06 | 1.34e-01 | 1.18819 (body1), 1.18936 (body2) | 1.17551 | 1.03116, 1.02890 | 1.00833 vs 1.00000
 A | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 1.96 4.40 1.93 1.97 1.96 2.04 2.03 1.95; 1.98 2.71 1.96 1.99 1.99 2.02 2.02 1.97
 B | 0.08 | 2.47e-02 | 1.02e-04 | 2.10e-01 | 1.17234 (body1), 1.14548 (body2) | 1.17551 | 0.99405, 1.04153 | 0.99547 vs 1.00000
 B | 0.04 | 1.15e-02 | 2.58e-06 | 9.43e-02 | 1.17425 (body1), 1.16122 (body2) | 1.17551 | 0.99811, 1.02144 | 0.99776 vs 1.00000
 B | 0.02 | 5.54e-03 | 3.09e-06 | 4.44e-02 | 1.17491 (body1), 1.16849 (body2) | 1.17551 | 0.99928, 1.01083 | 0.99887 vs 1.00000
 B | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 2.15 39.56 2.23 2.52 2.10 3.15 1.94 2.02; 2.08 0.84 2.13 2.08 2.04 2.63 1.98 1.99

--- graph D=2: L=12, x1=[4, 0], r=[1, 1], r'=[2, 2], e=[1, 0]; midpoint version: xbar=[4, 0], r=[0, 2], r'=[2, 2]; ell_0=0.4441, g_s=0.02252
 choice | eta | rel.dev bond profile (4.2) | rel.dev W_1 (4.5) | rel.dev W_b (4.6) | rho_ex(full grip) | rho0 (4.10) | rho_ex(a)/[(1+n g1)/(n g1) rho0] (4.13) | rho_mid_ex vs rho0_mid (4.12)
 A | 0.08 | 6.62e-02 | 8.57e-04 | 3.61e-02 | 0.63843 (body1), 0.63918 (body2) | 0.63014 | 1.09582, 1.08369 | 0.96268 vs 0.95615
 A | 0.04 | 3.39e-02 | 2.71e-04 | 1.81e-02 | 0.63435 (body1), 0.63474 (body2) | 0.63014 | 1.04734, 1.04144 | 0.95946 vs 0.95615
 A | 0.02 | 1.72e-02 | 1.25e-04 | 9.02e-03 | 0.63226 (body1), 0.63246 (body2) | 0.63014 | 1.02353, 1.02061 | 0.95782 vs 0.95615
 A | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 1.95 3.16 2.00 1.97 1.97 2.02 2.02 1.97; 1.98 2.17 2.01 1.99 1.98 2.01 2.01 1.99
 B | 0.08 | 2.23e-02 | 3.17e-03 | 1.17e-02 | 0.62917 (body1), 0.62451 (body2) | 0.63014 | 0.99446, 1.05863 | 0.95656 vs 0.95615
 B | 0.04 | 1.01e-02 | 8.50e-04 | 5.78e-03 | 0.62985 (body1), 0.62760 (body2) | 0.63014 | 0.99853, 1.02967 | 0.95647 vs 0.95615
 B | 0.02 | 4.82e-03 | 2.70e-04 | 2.89e-03 | 0.63004 (body1), 0.62893 (body2) | 0.63014 | 0.99958, 1.01491 | 0.95634 vs 0.95615
 B | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 2.20 3.73 2.03 3.30 2.22 3.77 1.98 1.29; 2.10 3.15 2.00 2.79 2.10 3.51 1.99 1.69

--- graph D=2: L=20, x1=[6, 0], r=[1, 1], r'=[2, 2], e=[1, 0]; midpoint version: xbar=[6, 0], r=[0, 2], r'=[2, 2]; ell_0=0.5255, g_s=0.01903
 choice | eta | rel.dev bond profile (4.2) | rel.dev W_1 (4.5) | rel.dev W_b (4.6) | rho_ex(full grip) | rho0 (4.10) | rho_ex(a)/[(1+n g1)/(n g1) rho0] (4.13) | rho_mid_ex vs rho0_mid (4.12)
 A | 0.08 | 7.38e-02 | 9.64e-04 | 5.57e-02 | 0.99896 (body1), 0.99963 (body2) | 0.99147 | 1.08976, 1.07714 | 0.95031 vs 0.94577
 A | 0.04 | 3.79e-02 | 3.05e-04 | 2.84e-02 | 0.99527 (body1), 0.99562 (body2) | 0.99147 | 1.04439, 1.03822 | 0.94808 vs 0.94577
 A | 0.02 | 1.92e-02 | 1.40e-04 | 1.43e-02 | 0.99339 (body1), 0.99357 (body2) | 0.99147 | 1.02208, 1.01903 | 0.94688 vs 0.94577
 A | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 1.95 3.16 1.96 1.97 1.96 2.02 2.02 1.96; 1.97 2.17 1.99 1.98 1.97 2.01 2.01 2.08
 B | 0.08 | 2.50e-02 | 3.58e-03 | 2.29e-02 | 0.99338 (body1), 0.98914 (body2) | 0.99147 | 0.99788, 1.06566 | 0.93773 vs 0.94577
 B | 0.04 | 1.14e-02 | 9.60e-04 | 1.08e-02 | 0.99252 (body1), 0.99049 (body2) | 0.99147 | 1.00005, 1.03282 | 0.94182 vs 0.94577
 B | 0.02 | 5.41e-03 | 3.04e-04 | 5.24e-03 | 0.99201 (body1), 0.99102 (body2) | 0.99147 | 1.00029, 1.01639 | 0.94382 vs 0.94577
 B | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 2.20 3.73 2.13 1.82 2.37 44.43 2.00 2.04; 2.10 3.16 2.05 1.94 2.16 0.16 2.00 2.03

--- graph D=3: L=8, x1=[3, 0, 0], r=[0, 1, 0], r'=[1, 1, 1], e=[1, 0, 0]; midpoint version: xbar=[3, 0, 0], r=[0, 2, 0], r'=[2, 2, 0]; ell_0=0.2246, g_s=0.04452
 choice | eta | rel.dev bond profile (4.2) | rel.dev W_1 (4.5) | rel.dev W_b (4.6) | rho_ex(full grip) | rho0 (4.10) | rho_ex(a)/[(1+n g1)/(n g1) rho0] (4.13) | rho_mid_ex vs rho0_mid (4.12)
 A | 0.08 | 6.70e-02 | 1.10e-03 | 6.23e-02 | 1.10348 (body1), 1.10360 (body2) | 1.09927 | 1.08568, 1.07251 | 0.84421 vs 0.84329
 A | 0.04 | 3.44e-02 | 3.47e-04 | 3.18e-02 | 1.10140 (body1), 1.10146 (body2) | 1.09927 | 1.04240, 1.03594 | 0.84374 vs 0.84329
 A | 0.02 | 1.74e-02 | 1.60e-04 | 1.61e-02 | 1.10032 (body1), 1.10035 (body2) | 1.09927 | 1.02107, 1.01787 | 0.84352 vs 0.84329
 A | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 1.95 3.16 1.96 1.98 1.97 2.02 2.02 2.04; 1.97 2.17 1.98 2.02 2.02 2.01 2.01 2.01
 B | 0.08 | 2.28e-02 | 4.10e-03 | 2.35e-02 | 1.10014 (body1), 1.09940 (body2) | 1.09927 | 0.99671, 1.06825 | 0.84441 vs 0.84329
 B | 0.04 | 1.03e-02 | 1.10e-03 | 1.08e-02 | 1.09979 (body1), 1.09943 (body2) | 1.09927 | 0.99945, 1.03399 | 0.84388 vs 0.84329
 B | 0.02 | 4.90e-03 | 3.47e-04 | 5.22e-03 | 1.09955 (body1), 1.09938 (body2) | 1.09927 | 1.00000, 1.01696 | 0.84359 vs 0.84329
 B | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 2.21 3.74 2.17 1.68 0.80 5.99 2.01 1.90; 2.11 3.16 2.07 1.84 1.52 724.93 2.00 1.95

--- graph D=3: L=10, x1=[4, 0, 0], r=[0, 1, 0], r'=[1, 1, 1], e=[1, 0, 0]; midpoint version: xbar=[4, 0, 0], r=[0, 2, 0], r'=[2, 2, 0]; ell_0=0.2302, g_s=0.04344
 choice | eta | rel.dev bond profile (4.2) | rel.dev W_1 (4.5) | rel.dev W_b (4.6) | rho_ex(full grip) | rho0 (4.10) | rho_ex(a)/[(1+n g1)/(n g1) rho0] (4.13) | rho_mid_ex vs rho0_mid (4.12)
 A | 0.08 | 6.82e-02 | 1.10e-03 | 6.36e-02 | 1.28260 (body1), 1.28276 (body2) | 1.27776 | 1.08563, 1.07249 | 0.85054 vs 0.84964
 A | 0.04 | 3.50e-02 | 3.47e-04 | 3.25e-02 | 1.28019 (body1), 1.28028 (body2) | 1.27776 | 1.04236, 1.03591 | 0.85004 vs 0.84964
 A | 0.02 | 1.77e-02 | 1.60e-04 | 1.65e-02 | 1.27884 (body1), 1.27889 (body2) | 1.27776 | 1.02096, 1.01777 | 0.84932 vs 0.84964
 A | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 1.95 3.16 1.95 1.99 1.99 2.02 2.02 2.24; 1.97 2.17 1.97 2.24 2.23 2.02 2.02 1.25
 B | 0.08 | 2.33e-02 | 4.10e-03 | 2.30e-02 | 1.27649 (body1), 1.27546 (body2) | 1.27776 | 0.99492, 1.06621 | 0.84989 vs 0.84964
 B | 0.04 | 1.05e-02 | 1.10e-03 | 1.05e-02 | 1.27721 (body1), 1.27672 (body2) | 1.27776 | 0.99855, 1.03300 | 0.84980 vs 0.84964
 B | 0.02 | 4.99e-03 | 3.47e-04 | 5.08e-03 | 1.27754 (body1), 1.27730 (body2) | 1.27776 | 0.99958, 1.01649 | 0.84979 vs 0.84964
 B | dev(eta)/dev(eta/2) for eta=0.08; 0.04, columns [profile, W_1, W_b, rho_fg body1, rho_fg body2, rho_a body1, rho_a body2, rho_mid]: 2.21 3.74 2.18 2.34 2.22 3.51 2.01 1.63; 2.11 3.16 2.08 2.51 2.27 3.41 2.00 1.04

--- mirror identity max spec h(g) = -min spec h(-g) (even L):
 D=1, L=30: max + min(-g) = 0.00e+00
 D=2, L=12: max + min(-g) = 0.00e+00
 D=3, L=8: max + min(-g) = 0.00e+00

--- sum over x1 of the full g_s g1 g2 coefficient of (4.6) (incl. -ell2(r)/X): 
 D=1, L=30: sum = -8.88e-16
 D=2, L=12: sum = 1.39e-17
 D=3, L=8: sum = 3.47e-18

--- (4.3) ring: max |ell(r) - [(L^2-1)/(12L) - r(L-r)/(2L)]|:
 L=30: 6.66e-16
 L=61: 4.44e-15
 L=200: 7.11e-15
--- (4.4) 2D: ell(0)-ell(r e1) - [ln r/(2 pi) + (2 gamma_E + 3 ln 2)/(4 pi)]:
 L=256: r=2: -4.30e-03, r=4: -1.05e-03, r=8: -4.59e-04, r=16: -1.03e-03, r=32: -3.95e-03
 L=1024: r=2: -4.28e-03, r=4: -9.89e-04, r=8: -2.30e-04, r=16: -1.13e-04, r=32: -2.57e-04
--- (4.4) 3D: ell(0)-ell(r e1) - [G_0 - 1/(4 pi r)], G_0 = 0.2527310098:
 L=64: r=2: -3.10e-03, r=4: -4.05e-04, r=8: -8.25e-05, r=16: -1.83e-04
 L=128: r=2: -3.10e-03, r=4: -3.96e-04, r=8: -4.60e-05, r=16: -2.57e-05

--- (4.12) ring: lattice rho0 (e=+1, r'=r-1) vs 2(1-w)(1-2w)/((1-2u)(1-2v)), u=(d+1/2)/L, v=(r-1/2)/L, w=u+v:
 u=0.2, v=0.1: L=40: 1.18050 vs 1.18050 (diff +2.0e-15); L=80: 1.17316 vs 1.17316 (diff +2.9e-15); L=160: 1.16981 vs 1.16981 (diff +3.5e-14); L=320: 1.16821 vs 1.16821 (diff +1.2e-13)
 u=0.1, v=0.05: L=40: 1.65998 vs 1.65998 (diff +4.9e-15); L=80: 1.65601 vs 1.65601 (diff -2.7e-14); L=160: 1.65430 vs 1.65430 (diff -1.9e-13); L=320: 1.65352 vs 1.65352 (diff -5.0e-13)
 u=0.6, v=0.2: L=40: 1.70667 vs 1.70667 (diff +2.4e-15); L=80: 1.84394 vs 1.84394 (diff +7.3e-15); L=160: 1.91940 vs 1.91940 (diff -1.4e-13); L=320: 1.95903 vs 1.95903 (diff -3.6e-13)
 small-v limit 2(1-u): u=0.2 -> 1.6; u=0.1 -> 1.8

--- (4.11) 3D, L=128: rho0 - 1 and, in brackets, d*(rho0 - 1) vs d (x1=(d,0,0), e=e1):
 r=(0, 1, 0), r'=(1, 1, 1): d=8: +1.220e-01 (+0.976), d=16: +6.192e-02 (+0.991), d=32: +3.458e-02 (+1.106)
 r=(0, 2, 0), r'=(2, 3, 0): d=8: +2.321e-01 (+1.857), d=16: +1.238e-01 (+1.981), d=32: +6.826e-02 (+2.184)
 r=(0, 1, 0), r'=(0, 2, 0): d=8: +2.569e-02 (+0.205), d=16: +5.985e-03 (+0.096), d=32: +1.486e-03 (+0.048)
 r=(1, 0, 0), r'=(2, 0, 0): d=8: -8.986e-03 (-0.072), d=16: -4.938e-03 (-0.079), d=32: -2.950e-03 (-0.094)

--- (4.11) 2D: rho0 - 1 and, in brackets, d*(rho0 - 1) vs d and L (x1=(d,0), e=e1, r=(2,1), r'=(4,3)):
 L=128: d=8: +3.663e-01 (+2.931), d=16: +1.958e-01 (+3.133), d=32: +9.628e-02 (+3.081), d=64: -1.832e+00 (-117.227)
 L=512: d=8: +6.365e-01 (+5.092), d=16: +3.619e-01 (+5.790), d=32: +1.807e-01 (+5.783), d=64: +8.655e-02 (+5.539)
 L=2048: d=8: +9.125e-01 (+7.300), d=16: +5.357e-01 (+8.571), d=32: +2.758e-01 (+8.825), d=64: +1.327e-01 (+8.493)

--- (4.12) midpoint place: rho0_mid - 1 (ring; expected 0 up to rounding):
 L=40: (dbar,r,r')=(10,4,2): +2.2e-15, (dbar,r,r')=(8,10,4): +0.0e+00, (dbar,r,r')=(24,12,6): +7.1e-15
 L=160: (dbar,r,r')=(40,4,2): -5.3e-14, (dbar,r,r')=(32,10,4): +1.6e-14, (dbar,r,r')=(96,12,6): +1.1e-15
--- (4.12) midpoint place, 2D: rho0_mid - 1 and, in brackets, d^2*(rho0_mid - 1) (xbar=(d,0), e=e1, r=(2,2), r'=(4,2)):
 L=128: d=8: -2.734e-01 (-17.5), d=16: -6.036e-02 (-15.5), d=32: -1.385e-02 (-14.2), d=64: -5.869e-03 (-24.0)
 L=512: d=8: -5.208e-01 (-33.3), d=16: -1.243e-01 (-31.8), d=32: -2.808e-02 (-28.8), d=64: -6.302e-03 (-25.8)
 L=2048: d=8: -7.729e-01 (-49.5), d=16: -1.918e-01 (-49.1), d=32: -4.520e-02 (-46.3), d=64: -1.040e-02 (-42.6)
--- (4.12) midpoint place, 3D, L=128: rho0_mid - 1 and, in brackets, d^2*(rho0_mid - 1) (xbar=(d,0,0), e=e1):
 r=(0, 2, 0), r'=(2, 2, 2): d=8: -3.577e-02 (-2.29), d=16: -1.059e-02 (-2.71), d=32: -2.971e-03 (-3.04)
 r=(2, 0, 0), r'=(4, 2, 0): d=8: -3.812e-02 (-2.44), d=16: -7.741e-03 (-1.98), d=32: -1.755e-03 (-1.80)

--- 3D large separations (consistency check 2): W_b / (2 n g1 g2) = S - ell2(r)/X at |r|, d ~ L/4 shrinks with L:
 L=16: 3.502e-05
 L=32: 7.703e-06
 L=64: 1.877e-06

Interested in this research?

Join the readers' list and get an e-mail when a new stage or a correction is published. No password, and you can unsubscribe at any time.