From 4fda46cf0d6823558480fb0040da95c67b41fd1d Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 7 Oct 2026 13:00:40 +0000 Subject: [PATCH] Store lifetime notes V24 and DC with their controls and six PASS reads (custody only) Adds frontiers/v24_dc_two_thirds_sign_20261007/: notes V24 (main#229 6034159111) and DC (6037455875), each with its claim, controls comment, extracted checker and stdout, summonses, the three nonauthor verdicts of record and the read-complete note, copied byte for byte from the GitHub API. SOURCES.json pins all 25 files. replay.py is Math-#390's replay as landed on main (7d2f6250) with this packet's paths, 40 exact rejection fingerprints (30 mutants, 10 invalid invocations) and two negative controls. Two test files and a workflow follow #390's, with a 90-minute job limit because dc_exact.py takes about a minute per run. Scientific effect: NONE. No proof byte changes; no status, register, graph, lemma_closed, prize or premise surface is touched. Claim: main#229 6037933403. Dylan Roy - delegated AI work. Performer: Anthropic Claude. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NMeKEismAyeqgdB4sy2NJU --- .github/workflows/lifetime-v24-dc-sign.yml | 64 + .../DC/AUTHOR_CONTROLS_COMMENT.md | 1154 +++++++++++++++++ .../AUTHOR_READ_COMPLETE_AND_PACKET_CLAIM.md | 43 + .../DC/PROOF.md | 446 +++++++ .../DC/READ_REQUEST_SLICE_A_SUMMONS.md | 47 + .../DC/REVIEW_SLICE_A.md | 30 + .../DC/REVIEW_SLICE_A_CORRECTION.md | 6 + .../DC/REVIEW_SLICE_B.md | 30 + .../DC/REVIEW_SLICE_B_SUMMONS.md | 47 + .../DC/REVIEW_SLICE_C.md | 45 + .../DC/REVIEW_SLICE_C_SUMMONS.md | 47 + .../REVIEW_SLICE_C_SUMMONS_NOT_PICKED_UP.md | 47 + .../DC/author_controls.py | 1066 +++++++++++++++ .../DC/author_controls_stdout.json | 1 + .../v24_dc_two_thirds_sign_20261007/README.md | 105 ++ .../SOURCES.json | 497 +++++++ .../V24/AUTHOR_CONTROLS_COMMENT.md | 967 ++++++++++++++ .../V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md | 50 + .../V24/CLAIM.md | 21 + .../V24/PROOF.md | 590 +++++++++ .../V24/READ_REQUEST_SLICE_A_SUMMONS.md | 37 + .../V24/REVIEW_SLICE_A.md | 32 + .../V24/REVIEW_SLICE_B.md | 10 + .../V24/REVIEW_SLICE_B_SUMMONS.md | 24 + .../V24/REVIEW_SLICE_C.md | 56 + .../V24/REVIEW_SLICE_C_SUMMONS.md | 22 + .../V24/author_controls.py | 865 ++++++++++++ .../V24/author_controls_stdout.json | 1 + .../v24_dc_two_thirds_sign_20261007/replay.py | 397 ++++++ ...st_lifetime_v24_dc_sign_replay_evidence.py | 215 +++ ...st_lifetime_v24_dc_sign_replay_protocol.py | 230 ++++ 31 files changed, 7192 insertions(+) create mode 100644 .github/workflows/lifetime-v24-dc-sign.yml create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/AUTHOR_CONTROLS_COMMENT.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/AUTHOR_READ_COMPLETE_AND_PACKET_CLAIM.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/PROOF.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/READ_REQUEST_SLICE_A_SUMMONS.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_A.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_A_CORRECTION.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_B.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_B_SUMMONS.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C_SUMMONS.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C_SUMMONS_NOT_PICKED_UP.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/author_controls.py create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/DC/author_controls_stdout.json create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/README.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/SOURCES.json create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/AUTHOR_CONTROLS_COMMENT.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/CLAIM.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/PROOF.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/READ_REQUEST_SLICE_A_SUMMONS.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_A.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_B.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_B_SUMMONS.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_C.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_C_SUMMONS.md create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/author_controls.py create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/V24/author_controls_stdout.json create mode 100644 frontiers/v24_dc_two_thirds_sign_20261007/replay.py create mode 100644 tests/test_lifetime_v24_dc_sign_replay_evidence.py create mode 100644 tests/test_lifetime_v24_dc_sign_replay_protocol.py diff --git a/.github/workflows/lifetime-v24-dc-sign.yml b/.github/workflows/lifetime-v24-dc-sign.yml new file mode 100644 index 00000000..77f7faf2 --- /dev/null +++ b/.github/workflows/lifetime-v24-dc-sign.yml @@ -0,0 +1,64 @@ +name: Lifetime notes V24 and DC replay + +'on': + pull_request: + paths: + - 'frontiers/v24_dc_two_thirds_sign_20261007/**' + - 'tests/test_lifetime_v24_dc_sign_replay_protocol.py' + - 'tests/test_lifetime_v24_dc_sign_replay_evidence.py' + - '.github/workflows/lifetime-v24-dc-sign.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + replay: + runs-on: ubuntu-latest + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + mode: ['-B -S', '-B -O -S'] + name: replay (python ${{ matrix.mode }}) + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: '3.11.16' + - name: Verify protocol, stored identities, extractions and all published controls + env: + PYTHONDONTWRITEBYTECODE: '1' + shell: bash + run: | + set -euo pipefail + out="$RUNNER_TEMP/qs-replay-evidence" + mkdir -p "$out/logs" + python ${{ matrix.mode }} -m unittest discover -s tests -p test_lifetime_v24_dc_sign_replay_protocol.py -v 2>&1 | tee "$out/logs/protocol.txt" + python ${{ matrix.mode }} -m unittest discover -s tests -p test_lifetime_v24_dc_sign_replay_evidence.py -v 2>&1 | tee "$out/logs/process-evidence-tests.txt" + QS_REPLAY_EVIDENCE_DIR="$out/children" python ${{ matrix.mode }} frontiers/v24_dc_two_thirds_sign_20261007/replay.py 2>&1 | tee "$out/logs/replay.txt" + git diff --exit-code + test -z "$(git status --porcelain)" + - name: Preserve exact public sources and available execution logs + if: always() + shell: bash + run: | + set -euo pipefail + out="$RUNNER_TEMP/qs-replay-evidence" + mkdir -p "$out" + cp -a frontiers/v24_dc_two_thirds_sign_20261007 "$out/packet" + cp tests/test_lifetime_v24_dc_sign_replay_protocol.py "$out/" + cp tests/test_lifetime_v24_dc_sign_replay_evidence.py "$out/" + cp .github/workflows/lifetime-v24-dc-sign.yml "$out/" + git rev-parse HEAD > "$out/tested_commit.txt" + printf '%s\n' '${{ matrix.mode }}' > "$out/mode.txt" + printf '%s\n' "$GITHUB_RUN_ID/$GITHUB_RUN_ATTEMPT" > "$out/run.txt" + - name: Retain evidence on success or failure + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: qs-replay-${{ strategy.job-index }}-${{ github.run_id }}-${{ github.run_attempt }} + path: ${{ runner.temp }}/qs-replay-evidence/ + if-no-files-found: error diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/AUTHOR_CONTROLS_COMMENT.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/AUTHOR_CONTROLS_COMMENT.md new file mode 100644 index 00000000..09df5580 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/AUTHOR_CONTROLS_COMMENT.md @@ -0,0 +1,1154 @@ +## Lifetime note DC: controls `dc_exact.py`, exact executable and stdout, and the author-side referee record + +This publishes the standard-library script that note DC ([6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875)) cites in §§6 and 9, so anyone can replay the computer-assisted part of its proof. The script: +- encloses `T₁` and `T₃` by outward-rounded decimal cell sums with closed-form tails, and `T₂` and `−Ĩ_quad` by series; +- checks the note's main polynomial identities, Lemma 4's constants (exactly, and through their defining identities) and the normalizations of §6; +- after the run, compares every factor that the production loops used on sampled cells with independent enclosures of the integrand's factors (group `corners`). + +Dylan Roy — delegated AI work. Actual performer: Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`). Scientific effect: NONE. + +**What the controls do not test.** +- #244's Theorem A, which is a conditional input. +- The analytic steps of Lemmas 1–4 and Proposition 1, beyond their polynomial identities and constants. +- The closed-form tails, about `0.0062` in all. +- The cells outside the sampled ones. +- The correctness of libmpdec. + +Note DC §6 says so. + +**Extraction rule.** As in [5971055189](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-5971055189). The file is the exact text between the first ```` ```python ```` fence after its `###` heading and the next ```` ``` ```` line, plus a final newline. The expected stdout is the single JSON line in the following ```` ```json ```` fence, plus one newline. + +**Identities.** +- `dc_exact.py`: 47,023 B, SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`. +- Stdout: 1,117 B, SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. + +**Run.** CPython 3.11.15 with libmpdec 2.5.1; about 55 s per mode. +- `python3 -B -S dc_exact.py`: exit 0, with exactly the stdout below. +- `python3 -B -O -S dc_exact.py`: byte-identical output. No check depends on an `assert`. +- `--mutant M1` … `M18`: each exits 1, with empty stdout and `FAILED: ` on stderr, as in note DC §9's table: M1 R2_monotone, M2 mills, M3 T2, M4 T1_moment, M5 T3_moment, M6 R2_formula, M7 partition, M8 gamma, M9 theta_table, M10 g_machinery, M11 lemma4, M12 partition, M13 corners, M14 corners, M15 lemma4, M16 corners, M17 corners, M18 lemma4. +- `M0`, `M19`, a bare `--mutant`, extra arguments, or any other argument: exit 2, with `usage: dc_exact.py [--mutant M1..M18]` on stderr. + +### dc_exact.py + +```python +"""Note DC controls: a certified upper bound for the model number D (Python standard library only). + +D <= T1 + T2 + T3 (note DC, Proposition 1). This script encloses each term by outward-rounded decimal +interval arithmetic on explicit partitions, with analytic tails; it checks the note's main polynomial +identities, its constants, and the cell factors that the production loops actually use (sampled, after the run). Usage: python3 dc_exact.py [--mutant M1..M18] +""" +import decimal +import json +import sys +from fractions import Fraction as Fr + +USAGE = 'usage: dc_exact.py [--mutant M1..M18]' +MUTANTS = ['M%d' % i for i in range(1, 19)] +if len(sys.argv) == 1: + MUT = None +elif len(sys.argv) == 3 and sys.argv[1] == '--mutant' and sys.argv[2] in MUTANTS: + MUT = sys.argv[2] +else: + sys.stderr.write(USAGE + '\n') + sys.exit(2) + +PREC = 24 +CD = decimal.Context(prec=PREC, rounding=decimal.ROUND_FLOOR) +CU = decimal.Context(prec=PREC, rounding=decimal.ROUND_CEILING) +CN = decimal.Context(prec=PREC, rounding=decimal.ROUND_HALF_EVEN) +Dec = decimal.Decimal +Z = Dec(0) +COUNT = {} + + +class Fail(Exception): + pass + + +def need(cond, group): + COUNT[group] = COUNT.get(group, 0) + 1 + if not cond: + raise Fail(group) + + +def _hook(kind, value, tb): + if kind is Fail: + sys.stderr.write('FAILED: %s\n' % value.args[0]) + else: + sys.__excepthook__(kind, value, tb) + + +sys.excepthook = _hook # any failed check: message on stderr, empty stdout, exit status 1 + + +# ---------------------------------------------------------------- interval arithmetic (lo, hi) +def q(x): + x = Fr(x) + n, d = Dec(x.numerator), Dec(x.denominator) + return (CD.divide(n, d), CU.divide(n, d)) + + +def pt(x): + return (x, x) + + +def add(a, b): + return (CD.add(a[0], b[0]), CU.add(a[1], b[1])) + + +def sub(a, b): + return (CD.subtract(a[0], b[1]), CU.subtract(a[1], b[0])) + + +def neg(a): + return (-a[1], -a[0]) + + +def mul(a, b): + lo = min(CD.multiply(x, y) for x in a for y in b) + hi = max(CU.multiply(x, y) for x in a for y in b) + return (lo, hi) + + +def div(a, b): + if not (b[0] > 0 or b[1] < 0): + raise Fail('interval_division') + lo = min(CD.divide(x, y) for x in a for y in b) + hi = max(CU.divide(x, y) for x in a for y in b) + return (lo, hi) + + +def isqrt(a): + if a[0] < 0: + raise Fail('interval_sqrt') + lo = Z if a[0] == 0 else max(Z, CD.next_minus(CN.sqrt(a[0]))) + hi = Z if a[1] == 0 else CU.next_plus(CN.sqrt(a[1])) + if CU.multiply(lo, lo) > a[0] or CD.multiply(hi, hi) < a[1]: # verified, not assumed + raise Fail('interval_sqrt') + return (lo, hi) + + +def iexp(a): + # decimal's exp is correctly rounded (half-even); one ulp of widening makes it an enclosure + return (max(Z, CD.next_minus(CN.exp(a[0]))), CU.next_plus(CN.exp(a[1]))) + + +def iln(a): + if a[0] <= 0: + raise Fail('interval_ln') + return (CD.next_minus(CN.ln(a[0])), CU.next_plus(CN.ln(a[1]))) + + +def ipow(a, r): + # a > 0, r rational + return iexp(mul(iln(a), q(r))) + + +# monotone table for e^{-x}, x >= 0: U[k] >= e^{-k/EXP_H} >= L[k] +EXP_H, EXP_N = 1024, 60 * 1024 +EXP_U = [CU.next_plus(CN.exp(CN.divide(Dec(-k), Dec(EXP_H)))) for k in range(EXP_N + 1)] +EXP_L = [max(Z, CD.next_minus(CN.exp(CN.divide(Dec(-k), Dec(EXP_H))))) for k in range(EXP_N + 1)] +EXP_HD = Dec(EXP_H) + + +def upx(x_lo): + """Upper bound of e^{-x} for every x >= x_lo >= 0.""" + k = int(CD.multiply(x_lo, EXP_HD).to_integral_value(rounding=decimal.ROUND_FLOOR)) + return EXP_U[min(max(k, 0), EXP_N)] + + +def lox(x_hi): + """Lower bound of e^{-x} for every 0 <= x <= x_hi.""" + k = int(CU.multiply(x_hi, EXP_HD).to_integral_value(rounding=decimal.ROUND_CEILING)) + return EXP_L[k] if k <= EXP_N else Z + + +def contains(a, x): + return a[0] <= x <= a[1] + + +# ---------------------------------------------------------------- polynomials over Q (lists, low degree first) +def padd(p, r): + n = max(len(p), len(r)) + return [(p[i] if i < len(p) else 0) + (r[i] if i < len(r) else 0) for i in range(n)] + + +def pmul(p, r): + out = [Fr(0)] * (len(p) + len(r) - 1) + for i, a in enumerate(p): + for j, b in enumerate(r): + out[i + j] += a * b + return out + + +def pscale(p, c): + return [c * a for a in p] + + +def ptrim(p): + p = [Fr(a) for a in p] + while len(p) > 1 and p[-1] == 0: + p.pop() + return p + + +def pcompose(p, r): + # p(r(x)) + out = [Fr(0)] + for a in reversed(p): + out = padd(pmul(out, r), [a]) + return ptrim(out) + + +def peval(p, x): + s = Fr(0) + for a in reversed(p): + s = s * x + a + return s + + +def pderiv(p): + return ptrim([i * p[i] for i in range(1, len(p))] or [0]) + + +# ---------------------------------------------------------------- constants: pi (Machin) and Gamma (series) +def atan_inv(n, terms): + s = Fr(0) + for k in range(terms): + s += Fr((-1) ** k, (2 * k + 1) * n ** (2 * k + 1)) + nxt = Fr((-1) ** terms, (2 * terms + 1) * n ** (2 * terms + 1)) + return (min(s, s + nxt), max(s, s + nxt)) + + +def rat_iv(lo, hi): + return (CD.divide(Dec(lo.numerator), Dec(lo.denominator)), CU.divide(Dec(hi.numerator), Dec(hi.denominator))) + + +a5, a239 = atan_inv(5, 40), atan_inv(239, 12) +PI = rat_iv(16 * a5[0] - 4 * a239[1], 16 * a5[1] - 4 * a239[0]) +need(contains(PI, Dec('3.141592653589793238462643383279502884')), 'pi') +need(PI[1] - PI[0] < Dec('1e-20'), 'pi') + +GX, GN = 50, (20 if MUT == 'M8' else 220) + + +def gamma_iv(a): + """Gamma(a), a rational in (0, 3]: gamma(a, X) by its alternating series, plus Gamma(a, X) >= 0 bounded above.""" + a = Fr(a) + need(GN > GX + 1, 'gamma') + s, term = Fr(0), Fr(1) + for n in range(GN): + s += term / (n + a) + term = term * (-GX) / (n + 1) + tail = abs(term) / (GN + a) # first omitted term; terms decrease for n >= X + xa = ipow(pt(Dec(GX)), a) + lo = mul(xa, rat_iv(s - tail, s - tail))[0] + hi = mul(xa, rat_iv(s + tail, s + tail))[1] + # Gamma(a, X) <= X^{a-1} e^{-X} / (1 - (a-1)/X) for 1 <= a < X; <= X^{a-1} e^{-X} for a <= 1 + c = Fr(1) if a <= 1 else 1 / (1 - (a - 1) / GX) + up = mul(mul(ipow(pt(Dec(GX)), a - 1), iexp(pt(Dec(-GX)))), q(c))[1] + return (lo, CU.add(hi, up)) + + +G1, G2, GH = gamma_iv(1), gamma_iv(2), gamma_iv(Fr(1, 2)) +need(contains(G1, Dec(1)) and contains(G2, Dec(1)), 'gamma') +need(mul(GH, GH)[0] <= PI[1] and mul(GH, GH)[1] >= PI[0], 'gamma') +need(G1[1] - G1[0] < Dec('1e-18'), 'gamma') +GAM = {r: gamma_iv(r) for r in (Fr(1, 6), Fr(7, 6), Fr(11, 6), Fr(11, 12), Fr(5, 4), Fr(3, 4), Fr(7, 3), Fr(1, 2), + Fr(7, 4), Fr(3, 2))} +# crude bounds used in the tails (log-convexity: Gamma <= 1 on [1, 2]; Gamma(x) = Gamma(1 + x)/x) +for r, b in ((Fr(7, 6), 1), (Fr(11, 6), 1), (Fr(5, 4), 1), (Fr(11, 12), Fr(12, 11)), (Fr(3, 4), Fr(4, 3)), + (Fr(7, 3), Fr(4, 3)), (Fr(7, 4), 1), (Fr(3, 2), 1)): + need(GAM[r][1] <= q(b)[0], 'gamma') + +SQRT_PI = isqrt(PI) +SQ3 = isqrt(q(3)) +SQ6 = isqrt(q(6)) +SQ4PI = isqrt(mul(q(4), PI)) +SQ2PI = isqrt(mul(q(2), PI)) +PHI0 = div(q(1), SQ4PI if MUT == 'M18' else SQ2PI) # phi(0) = 1/sqrt(2 pi) +C6 = mul(q(576), SQ3 if MUT == 'M11' else SQ6) # s = C6 tau^2 g, C6 = 576 sqrt6 +# Lemma 4: k = tau gamma^2; gamma^6 k^{-8/3} dk = tau^{-8/3} |gamma|^{8/3} dtau; the t-density adds tau^{-1}; +# s = 576 sqrt6 k^2/|gamma|^3 = 576 sqrt6 tau^2 |gamma|. Constants: (1/2400) (t-density 1/(12 sqrt(4 pi))) (2: evenness) +need(6 - 2 * Fr(8, 3) + 2 == Fr(8, 3) and Fr(-8, 3) - 1 == Fr(-11, 3) and 2 * 2 - 3 == 1, 'lemma4') +C1_RAT = Fr(1, 2400) * 2 / (6 if MUT == 'M15' else 12) # C1 sqrt(4 pi) +C3_RAT = Fr(1, 2400) * 2 / 12 / 4 # C3 pi, since (4 pi)^{-1/2} (4 pi)^{-1/2} = 1/(4 pi) +need(C1_RAT == Fr(1, 14400) and C3_RAT == Fr(1, 57600), 'lemma4') +C1 = div(q(C1_RAT), SQ4PI) # T1 weight constant 1/(14400 sqrt(4 pi)) +C3 = div(q(C3_RAT), PI) # T3 weight constant 1/(57600 pi) +# the defining identities, written independently of the lines above +need(contains(mul(mul(mul(C1, C1), q(14400 ** 2)), mul(q(4), PI)), Dec(1)), 'lemma4') +need(contains(mul(mul(C3, q(57600)), PI), Dec(1)), 'lemma4') +need(contains(mul(C6, C6), Dec(576 ** 2 * 6)), 'lemma4') +need(contains(mul(mul(PHI0, PHI0), mul(q(2), PI)), Dec(1)), 'lemma4') +if MUT == 'M4': + C1 = mul(C1, q(2)) +if MUT == 'M5': + C3 = mul(C3, q(2)) + + +# ---------------------------------------------------------------- R2 = I0 - T2 (#244 (3.3)) and its exact facts +def T2poly(t): + return add(sub(q(Fr(20, 3)), mul(q(20), t)), mul(q(Fr(52, 3)), mul(t, t))) + + +P0C = [Fr(11, 3), Fr(-21, 2), Fr(16 if MUT == 'M6' else 17, 2), Fr(-4, 3)] +P1C = [Fr(3), Fr(-15, 2), Fr(9, 2)] # (3/2)(1 - t)(2 - 3t) +T2C = [Fr(20, 3), Fr(-20), Fr(52, 3)] + + +def polyiv(c, t): + s = q(c[-1]) + for a in reversed(c[:-1]): + s = add(mul(s, t), q(a)) + return s + + +def R2iv(x): + """Enclosure of R2(x) for an exact Decimal x.""" + t = pt(x) + if 3 * Fr(x) <= 2: + S = isqrt(sub(q(1), mul(q(Fr(4, 3)), t))) + return sub(add(polyiv(P0C, t), mul(polyiv(P1C, t), S)), polyiv(T2C, t)) + if x <= 1: + u = sub(mul(q(2), t), q(1)) + return sub(mul(mul(u, u), div(sub(q(2), t), q(3))), polyiv(T2C, t)) + return sub(sub(t, q(Fr(2, 3))), polyiv(T2C, t)) + + +# (a) the pieces of (3.3) agree at t = 2/3 (S = 1/3) and t = 1; R2(0) = 0 +need(peval(P0C, Fr(2, 3)) + peval(P1C, Fr(2, 3)) * Fr(1, 3) == Fr(4, 81), 'R2_formula') +need((2 * Fr(2, 3) - 1) ** 2 * (2 - Fr(2, 3)) / 3 == Fr(4, 81), 'R2_formula') +need(peval(P0C, 0) + peval(P1C, 0) - peval(T2C, 0) == 0, 'R2_formula') +need(Fr(1) ** 2 * (2 - 1) / 3 == 1 - Fr(2, 3), 'R2_formula') # the pieces agree at t = 1 +for xs in ('0.001', '0.01'): + x = Dec(xs) + ratio = div(R2iv(x), q(Fr(x) ** 3)) + need(Dec('-3.2') < ratio[0] and ratio[1] < Dec('-3.0'), 'R2_formula') # R2(t)/t^3 -> -28/9 +# (b) monotonicity: with t = 3(1 - S^2)/4, 16 S R2'(t) = (S - 1)^2 W(S) on t < 2/3 +tS = [Fr(3, 4), Fr(0), Fr(-3, 4)] +dP0, dP1, dT2 = pderiv(P0C), pderiv(P1C), pderiv(T2C) +# 16 S (P0' + P1' S + P1 S' - T2') with S' = -2/(3S): 16 S P0' + 16 S^2 P1' - (32/3) P1 - 16 S T2' +lhs = padd(padd(pmul([0, 16], pcompose(dP0, tS)), pmul([0, 0, 16], pcompose(dP1, tS))), + padd(pscale(pcompose(P1C, tS), Fr(-32, 3)), pmul([0, -16], pcompose(dT2, tS)))) +QC = [Fr(1), Fr(-94), Fr(-206 if MUT == 'M1' else -207), Fr(-36)] # the note's W(S) +need(ptrim(lhs) == ptrim(pmul(pmul([-1, 1], [-1, 1]), QC)), 'R2_monotone') +need(peval(QC, Fr(1, 3)) < 0 and all(c <= 0 for c in pderiv(QC)), 'R2_monotone') # W < 0 on S >= 1/3 +# t in [2/3, 1]: R2' = (2t - 1)(3 - 2t) + 20 - (104/3) t <= 1 + 20 - (104/3)(2/3) < 0; t >= 1: 21 - 104/3 < 0 +need(1 + 20 - Fr(104, 3) * Fr(2, 3) < 0 and 21 - Fr(104, 3) < 0, 'R2_monotone') +need(ptrim([Fr(-3), Fr(8), Fr(-4)]) == ptrim(padd([1], pscale(pmul([-1, 1], [-1, 1]), -4))), 'R2_monotone') # = 1 - 4(t-1)^2 +MIDC = [Fr(2, 3), Fr(-3), Fr(4), Fr(-4, 3)] # (2t - 1)^2 (2 - t)/3 +need(ptrim(pmul(pmul([-1, 2], [-1, 2]), [Fr(2, 3), Fr(-1, 3)])) == MIDC, 'R2_monotone') +need(pderiv(padd(MIDC, pscale(T2C, -1))) == + ptrim(padd([Fr(21), Fr(-104, 3)], pscale(pmul([-1, 1], [-1, 1]), -4))), 'R2_monotone') # 21 - 4(t-1)^2 - (104/3)t +need(pderiv(padd([Fr(-2, 3), Fr(1)], pscale(T2C, -1))) == [Fr(21), Fr(-104, 3)], 'R2_monotone') +# (c) majorant: R2(-t) = -3 - 19t/2 - 53t^2/6 + 4t^3/3 + (3/2)(1 + t)(2 + 3t) S+ ; P1(-t) = (3/2)(1 + t)(2 + 3t) +m1 = [Fr(0), Fr(-1)] +R2m_poly = padd(pcompose(P0C, m1), pscale(pcompose(T2C, m1), -1)) +need(ptrim(R2m_poly) == ptrim([Fr(-3), Fr(-19, 2), Fr(-53, 6), Fr(4, 3)]), 'R2_majorant') +need(ptrim(pcompose(P1C, m1)) == ptrim(pscale(pmul([1, 1], [2, 3]), Fr(3, 2))), 'R2_majorant') +# with S+ <= 1 + (2/sqrt3) sqrt t: R2(-t) <= (4/3)t^3 + 3 sqrt3 t^{5/2} - (13/3)t^2 + 5 sqrt3 t^{3/2} - 2t + 2 sqrt3 t^{1/2} +poly_part = padd(R2m_poly, pscale(pmul([1, 1], [2, 3]), Fr(3, 2))) +need(ptrim(poly_part) == ptrim([Fr(0), Fr(-2), Fr(-13, 3), Fr(4, 3)]), 'R2_majorant') +need(ptrim(pmul([1, 1], [2, 3])) == [2, 5, 3], 'R2_majorant') +# |W(S)| <= 755 on [1, sqrt(7/3)] (W decreasing, W(sqrt(7/3)) = -(36 (7/3) + 94) sqrt(7/3) - 207 (7/3) + 1) +qv = add(neg(mul(add(q(Fr(36 * 7, 3)), q(94)), isqrt(q(Fr(7, 3))))), q(Fr(-207 * 7, 3) + 1)) +need(qv[0] >= -755, 'R2_majorant') +# so R2(-t) <= int_0^t (2u/3)^2 755/16 du = (755/108) t^3 <= 7 t^3 on [0, 1]; for t >= 1, U(t) <= (2/3 + 5 sqrt3) t^3 +need(Fr(755, 108) <= 7 and add(q(Fr(2, 3)), mul(q(5), SQ3))[1] <= 10, 'R2_majorant') +need(ptrim(padd(pmul([1, Fr(2, 3)], [1, Fr(2, 3)]), [-1, Fr(-4, 3)])) == [0, 0, Fr(4, 9)], 'R2_majorant') # (1 + 2u/3)^2 - (1 + 4u/3) +need(Fr(4, 9) * Fr(755, 16) / 3 == Fr(755, 108), 'R2_majorant') # int_0^t (2u/3)^2 (755/16) du + +# ---------------------------------------------------------------- Birnbaum's Mills-ratio bound (note DC, Lemma 3) +X2 = [0, 0, 1] # x^2 +bir = 3 if MUT == 'M2' else 4 +need(ptrim(padd(pmul(pmul(padd(X2, [1]), padd(X2, [1])), padd(X2, [bir])), + pscale(pmul(X2, pmul(padd(X2, [3]), padd(X2, [3]))), -1))) == [4], 'mills') +need(ptrim(padd(pmul(padd(X2, [2]), padd(X2, [2])), pscale(pmul(X2, padd(X2, [4])), -1))) == [4], 'mills') +# Lemma 3's reductions in Q[x][w]/(w^2 - x^2 - 4), elements (P, R) = P + R w: +# 2w(-1 + x b - b') with b = (w - x)/2, b' = (x/w - 1)/2 equals -2w + (x w^2 - x^2 w) - (x - w) = x^3 + 3x - (x^2 + 1) w +W2 = padd(X2, [4]) +red = (padd(pmul([0, 1], W2), [0, -1]), [-2, 0, -1, 0]) +red = (ptrim(red[0]), ptrim(padd(red[1], [1]))) +need(red == (ptrim([0, 3, 0, 1]), ptrim([-1, 0, -1])), 'mills') +# 1 - a b(a) = 1 - a (w - a)/2 = (2 + a^2)/2 - (a/2) w +need((ptrim(padd([1], pscale(pmul([0, 1], [0, 1]), Fr(1, 2)))), [0, Fr(-1, 2)]) == + (ptrim([1, 0, Fr(1, 2)]), [0, Fr(-1, 2)]), 'mills') + + +def thetap_iv(a): + """theta+(a) = 2 phi(a) / (2 + a^2 + a sqrt(a^2 + 4)) for an exact Decimal a >= 0.""" + A = pt(a) + num = mul(q(2), mul(PHI0, iexp(neg(div(mul(A, A), q(2)))))) + den = add(add(q(2), mul(A, A)), mul(A, isqrt(add(mul(A, A), q(4))))) + return div(num, den) + + +TH_STEP, TH_N = 200, 8000 # table at a = k/200, k <= 8000 (a <= 40) +THTAB = [thetap_iv(CN.divide(Dec(k), Dec(TH_STEP)))[1] for k in range(TH_N + 1)] + + +def th_idx_scaled(x): + # x is a lower bound of TH_STEP * a; the table entry at floor(x) / TH_STEP <= a bounds theta+(a) above + if MUT == 'M9': + return min(max(int(x.to_integral_value(rounding=decimal.ROUND_CEILING)), 0), TH_N) + return min(max(int(x.to_integral_value(rounding=decimal.ROUND_FLOOR)), 0), TH_N) + + +def th_index(a_lo): + return th_idx_scaled(CD.multiply(a_lo, TH_STEP)) + + +for s_ in ('0', '0.0049', '0.5', '0.731', '1.0001', '2.5', '3.14159', '7.777', '12.3456', '39.999', '55'): + a = Dec(s_) + need(thetap_iv(a)[1] <= THTAB[th_index(a)], 'theta_table') +need(all(THTAB[k + 1] <= THTAB[k] for k in range(TH_N)), 'theta_table') +need(thetap_iv(Z)[1] >= PHI0[0] and thetap_iv(Z)[0] <= PHI0[1], 'theta_table') + +# ---------------------------------------------------------------- T2 (closed form) +need((Fr(1, 32) - Fr(13, 480 if MUT == 'M3' else 486)) * 576 * 576 * 6 / (2 * 2400) == Fr(28, 15), 'T2') +T2 = mul(mul(q(Fr(28, 15)), ipow(pt(Dec(12)), Fr(-7, 6))), GAM[Fr(7, 6)]) +need(T2[0] >= Dec('0.0953758') and T2[1] <= Dec('0.0953759'), 'T2') + +# ---------------------------------------------------------------- grids (exact decimals) +CEIL3 = decimal.Context(prec=3, rounding=decimal.ROUND_CEILING) +CEIL2 = decimal.Context(prec=2, rounding=decimal.ROUND_CEILING) +CEIL6 = decimal.Context(prec=6, rounding=decimal.ROUND_CEILING) + + +def geo_grid(a, b, ratio): + pts, r = [Dec(a)], Dec(ratio) + while pts[-1] < Dec(b): + pts.append(CEIL6.multiply(pts[-1], r)) + return pts + + +def t1_grid(tmax, hrel='0.01', t0='1e-7'): + """0, then geometric points from t0 with ratio 1 + hrel (rounded up to 6 significant digits), up to >= tmax.""" + pts, r = [Z, Dec(t0)], CN.add(Dec(1), Dec(hrel)) + while pts[-1] < tmax: + pts.append(CEIL6.multiply(pts[-1], r)) + return pts + + +def t3_grid(tmax, hk='0.005', hrel='0.02', sym=False): + """Increasing exact points: fine step hk on [-1, 1], relative step hrel beyond; from <= -tmax to 1 (or to >= tmax).""" + neg_pts = [Dec(1)] + while neg_pts[-1] > -tmax: + x = neg_pts[-1] + h = Dec(hk) if x > -1 else max(Dec(hk), CEIL3.multiply(-x, Dec(hrel))) + neg_pts.append(CN.subtract(x, h)) + pts = neg_pts[::-1] + if sym: + while pts[-1] < tmax: + x = pts[-1] + h = Dec(hk) if x < 1 else max(Dec(hk), CEIL3.multiply(x, Dec(hrel))) + pts.append(CN.add(x, h)) + return pts + + +def increasing(pts): + return all(pts[i] < pts[i + 1] for i in range(len(pts) - 1)) + + +# ---------------------------------------------------------------- the g-direction: m_p(g) = g^p e^{-g^2/4} +M_CACHE = {} + + +def m_iv(g, p): + if g == 0: + return (Z, Z) + G = pt(g) + return iexp(sub(mul(q(p), iln(G)), div(mul(G, G), q(4)))) + + +def m_peak(p): + # maximum of m_p at g^2 = 2p: exp((p/2) ln(2p) - p/2) + return iexp(sub(mul(q(p / 2), iln(q(2 * p))), q(p / 2))) + + +PEAK = {Fr(8, 3): m_peak(Fr(8, 3)), Fr(11, 3): m_peak(Fr(11, 3))} +need(Fr(8, 3) * 2 == Fr(16, 3), 'gstar') # d/dg log m_{8/3} = (8/3)/g - g/2 vanishes at g^2 = 16/3 +need(Fr(11, 3) * 2 == Fr(22, 3), 'gstar') + + +def g_cells(dg, n, p): + """Per cell j = [j dg, (j+1) dg]: (upper bound of sup m_p, lower bound of inf m_p); m_p is log-concave.""" + key = (dg, n, p) + if key not in M_CACHE: + vals = [m_iv(CN.multiply(dg, Dec(j)), p) for j in range(n + 1)] + out = [] + for j in range(n): + ga, gb = Fr(dg) * j, Fr(dg) * (j + 1) + if gb * gb <= 2 * p: + sup = vals[j + 1][1] + elif ga * ga >= 2 * p: + sup = vals[j][1] + else: + sup = PEAK[p][1] + out.append((sup, min(vals[j][0], vals[j + 1][0]))) + M_CACHE[key] = out + return M_CACHE[key] + + +def g_step(tau, scale, n): + """dg (2 significant digits, rounded up) with n dg >= min(14, scale (12 tau^2)^{-1/4}).""" + greq = min(Fr(14), Fr(scale) * Fr(ipow(mul(q(12), pt(CN.multiply(tau, tau))), Fr(-1, 4))[1])) + return CEIL2.divide(Dec(greq.numerator), Dec(greq.denominator) * n) + + +def g_tail(tau, G, p): + """Upper bound of int_G^inf m_p(g) e^{-12 tau^2 g^4} dg (Gamma factors bounded crudely).""" + gam2 = {Fr(8, 3): Fr(1), Fr(11, 3): Fr(4, 3)}[p] # Gamma((p+1)/2) <= . + gam4 = {Fr(8, 3): Fr(12, 11), Fr(11, 3): Fr(1)}[p] # Gamma((p+1)/4) <= . + Gi = pt(G) + b1 = mul(mul(iexp(neg(div(mul(Gi, Gi), q(8)))), q(gam2 / 2)), ipow(q(8), (p + 1) / 2)) + t6 = mul(q(6), pt(CN.multiply(tau, tau))) + b2 = mul(mul(iexp(neg(mul(t6, mul(mul(Gi, Gi), mul(Gi, Gi))))), q(gam4 / 4)), ipow(t6, -(p + 1) / 4)) + return min(b1[1], b2[1]) + + +def g_integral(tau, p, n, scale=6, want_lower=True): + """Enclosure of int_0^inf m_p(g) e^{-12 tau^2 g^4} dg.""" + dg = g_step(tau, scale, n) + cells = g_cells(dg, n, p) + t12 = CN.multiply(Dec(12), CN.multiply(tau, tau)) + up, lo = Z, Z + for j in range(n): + ga = CN.multiply(dg, Dec(j)) + gb = CN.add(ga, dg) + e_up = upx(CD.multiply(t12, CD.multiply(CD.multiply(ga, ga), CD.multiply(ga, ga)))) + up = CU.add(up, CU.multiply(CU.multiply(dg, cells[j][0]), e_up)) + if want_lower: + e_lo = lox(CU.multiply(t12, CU.multiply(CU.multiply(gb, gb), CU.multiply(gb, gb)))) + lo = CD.add(lo, CD.multiply(CD.multiply(dg, cells[j][1]), e_lo)) + up = CU.add(up, g_tail(tau, CN.multiply(dg, Dec(n)), p)) + return (lo, up) + + +MFAC = div(q(2), SQ4PI) # M(tau) = (2/sqrt(4 pi)) int m_{8/3} e^{-12 tau^2 g^4} dg +if MUT == 'M10': + MFAC = div(q(2), mul(q(4), PI)) + + +def M_enc(tau, n=280): + return mul(MFAC, g_integral(tau, Fr(8, 3), n)) + + +# M(0) and N(0) in closed form, compared with the g-cell enclosures at tau = 0+ (a check of the g machinery) +M0 = mul(div(ipow(q(2), Fr(8, 3)), SQRT_PI), GAM[Fr(11, 6)]) # E|g|^{8/3} = 2^{8/3} Gamma(11/6)/sqrt(pi) +need(M_enc(Dec('1e-9'))[0] <= M0[1] and M0[0] <= M_enc(Dec('1e-9'))[1], 'g_machinery') +N0 = mul(mul(q(Fr(1, 2)), ipow(q(4), Fr(7, 3))), GAM[Fr(7, 3)]) # int g^{11/3} e^{-g^2/4} = (1/2) 4^{7/3} Gamma(7/3) +need(g_integral(Dec('1e-9'), Fr(11, 3), 200)[0] <= N0[1] <= CU.multiply(g_integral(Dec('1e-9'), Fr(11, 3), 200)[1], Dec(2)), 'g_machinery') +need(g_integral(Dec('1e-9'), Fr(11, 3), 200)[1] >= N0[0], 'g_machinery') + +# ---------------------------------------------------------------- T1 = int dtau int_0^inf dt C1 tau^{-11/3} M(tau) e^{-t^2/(576 tau^2)} R2e(t) +BETA_H = Dec(9) +E_BH = iexp(q(Fr(-81, 8))) # e^{-beta_H^2/8} +U_TERMS = [(Fr(3), q(Fr(2, 3))), (Fr(5, 2), mul(q(Fr(3, 2)), SQ3)), (Fr(3, 2), mul(q(Fr(5, 2)), SQ3)), (Fr(1, 2), SQ3)] +GUP = {Fr(2): Fr(1), Fr(7, 4): Fr(1), Fr(5, 4): Fr(1), Fr(3, 4): Fr(4, 3), Fr(3, 2): Fr(1)} # Gamma(.) <= . + + +def tpow(x, r): + return ipow(pt(x), r) + + +def half_moment(V, n): + """Upper bound of int_0^inf e^{-t^2/V} t^n dt = (1/2) V^{(n+1)/2} Gamma((n+1)/2).""" + return mul(mul(q(Fr(1, 2)), ipow(V, (n + 1) / 2)), q(GUP[(n + 1) / 2])) + + +def t1_cell(ta, tb, m_a, m_b): + """T1 on the tau-cell [ta, tb]: pa >= dtau sup C1 tau^{-11/3} M(tau), pb <= dtau inf C1 tau^{-11/3} M(tau) + (M decreasing; m_a, m_b enclose M(ta), M(tb)); and the exact denominators 576 ta^2, 576 tb^2.""" + dtau = CN.subtract(tb, ta) + ts, ms = (tb, m_b) if MUT == 'M16' else (ta, m_a) + pa = CU.multiply(CU.multiply(C1[1], tpow(ts, Fr(-11, 3))[1]), CU.multiply(ms[1], dtau)) + pb = CD.multiply(CD.multiply(C1[0], tpow(tb, Fr(-11, 3))[0]), CD.multiply(m_b[0], dtau)) + return pa, pb, CN.multiply(Dec(576), CN.multiply(ta, ta)), CN.multiply(Dec(576), CN.multiply(tb, tb)) + + +def gauss_up(u0, den): + """Upper bound of e^{-t^2/(576 tau^2)} for t >= u0 >= 0 and 576 tau^2 <= den.""" + return upx(CD.divide(CD.multiply(u0, u0), den)) + + +def gauss_lo(u1, den): + """Lower bound of e^{-t^2/(576 tau^2)} for 0 <= t <= u1 and 576 tau^2 >= den.""" + return lox(CU.divide(CU.multiply(u1, u1), den)) + + +def t1_gauss(u0, u1, den_a, den_b): + """(Upper bound of the sup, lower bound of the inf) of e^{-t^2/(576 tau^2)} on [u0, u1] x [ta, tb].""" + return gauss_up(u0, den_b), gauss_lo(u1, den_a) + + +def rho_up(u0, u1): + """Upper bound of sup R2e on [u0, u1], 0 <= u0 <= u1: (R2(u0) + R2(-u1))/2, since R2 decreases (Lemma 2(a)).""" + return CU.multiply(Dec('0.5'), CU.add(R2iv(u0)[1], R2iv(-u1)[1])) + + +LOG = {'T1': [], 'T3': [], 'SEP': [], 'K': []} # factors used by the production loops on sampled cells + + +def T1_bound(tau_pts, tg, mode, log_cells=()): + """mode 'R2': (cell sum, tail sum) upper bounds of T1 on [tau_0, tau_N]; mode 'mom': (lower, upper) for t^2.""" + need(increasing(tau_pts) and increasing(tg) and tg[0] == 0, 'partition') + rho = None + if mode == 'R2': + rho = [rho_up(tg[j], tg[j + 1]) for j in range(len(tg) - 1)] + need(R2iv(Z)[0] <= 0 <= R2iv(Z)[1], 'R2_formula') # R2(0) = 0, so R2(t) <= 0 for t >= 0 + menc = [M_enc(x) for x in tau_pts] + up, lo, tails = Z, Z, Z + prev = tau_pts[0] + for i in range(len(tau_pts) - 1): + if MUT == 'M7' and i == 400: + continue + ta, tb = tau_pts[i], tau_pts[i + 1] + need(ta == prev, 'partition') + prev = tb + pa, pb, den_a, den_b = t1_cell(ta, tb, menc[i], menc[i + 1]) + tmax = CN.multiply(Dec(12), CN.multiply(tb, BETA_H)) + if MUT == 'M12': + tmax = CN.divide(tmax, Dec(2)) + J = 0 + while tg[J] < tmax: + J += 1 + need(tg[J] >= CN.multiply(Dec(12), CN.multiply(tb, BETA_H)), 'partition') + # cells [0, tg[j0]] (merged) and [tg[j], tg[j+1]] for j0 <= j < J, with tg[j0] <= 12 ta / 1000 + tlo = CN.multiply(Dec('0.012'), ta) + j0 = 0 + while j0 + 1 < J and tg[j0 + 1] <= tlo: + j0 += 1 + cells_t = ([(Z, tg[j0], rho_up(Z, tg[j0]) if mode == 'R2' else None)] if j0 > 0 else []) + \ + [(tg[j], tg[j + 1], rho[j] if mode == 'R2' else None) for j in range(j0, J)] + nct = len(cells_t) + sample = {0, 1, nct // 4, nct // 2, (3 * nct) // 4, nct - 1} if i in log_cells else () + for c, (u0, u1, rj) in enumerate(cells_t): + dt = CN.subtract(u1, u0) + eu, el = t1_gauss(u0, u1, den_a, den_b) + if mode == 'R2': + dr = CU.multiply(dt, rj) # an upper bound of dt * rho for either sign of rho + if rj >= 0: + wu, ew = pa, eu + up = CU.add(up, CU.multiply(CU.multiply(wu, ew), dr)) + else: + wu, ew = pb, el + up = CU.add(up, CU.multiply(CD.multiply(wu, ew), dr)) + if c in sample: + LOG['T1'].append((ta, tb, u0, u1, wu, ew, rj)) + else: + up = CU.add(up, CU.multiply(CU.multiply(pa, eu), CU.multiply(dt, CU.multiply(u1, u1)))) + lo = CD.add(lo, CD.multiply(CD.multiply(pb, el), CD.multiply(dt, CD.multiply(u0, u0)))) + # t-tail beyond tg[J] >= 12 tb beta_H: int_T^inf e^{-t^2/(576 tau^2)} t^n <= e^{-beta_H^2/8} (1/2) V^{(n+1)/2} Gamma + V = q(1152 * Fr(tb) ** 2) + if mode == 'R2': + # R2e <= U(t) and R2e <= 10 t^3: use the smaller tail integral + tt = Z + for n, a in U_TERMS: + tt = CU.add(tt, mul(a, half_moment(V, n))[1]) + tt = min(tt, mul(q(10), half_moment(V, Fr(3)))[1]) + else: + tt = half_moment(V, Fr(2))[1] + tails = CU.add(tails, CU.multiply(CU.multiply(pa, E_BH[1]), tt)) + if mode == 'R2': + return up, tails + return lo, CU.add(up, tails) + + +def T1_tau_tails(tau0, tauN, mode): + """Upper bounds of the T1 contributions from tau < tau0 and tau > tauN.""" + Minf = mul(mul(MFAC, q(Fr(1, 4))), mul(ipow(q(12), Fr(-11, 12)), q(Fr(12, 11)))) # M(tau) <= Minf tau^{-11/6} + low_terms = [(Fr(3), q(10))] if mode == 'R2' else [(Fr(2), q(1))] # R2e(t) <= 10 t^3 + high_terms = U_TERMS if mode == 'R2' else [(Fr(2), q(1))] + low = Z + for n, a in low_terms: + # int_0^tau0 C1 tau^{-11/3} M(0) a (1/2)(24 tau)^{n+1} Gamma((n+1)/2) dtau + c = mul(mul(C1, M0), mul(a, half_moment(q(576), n))) + low = CU.add(low, mul(c, div(tpow(tau0, n - Fr(5, 3)), q(n - Fr(5, 3))))[1]) + high = Z + for n, a in high_terms: + c = mul(mul(C1, Minf), mul(a, half_moment(q(576), n))) + high = CU.add(high, mul(c, div(tpow(tauN, n - Fr(7, 2)), q(Fr(7, 2) - n)))[1]) + return low, high + + +# ---------------------------------------------------------------- T3: C3 tau^{-11/3} m(g) e^{-12 tau^2 g^4} e^{-t^2/(576 tau^2)} kappa(1-t) s theta(|8-12t|/s) +def kappa_iv(v): + x = mul(q(3), sub(q(1), pt(v))) + if x[1] <= 0: + return (Z, Z) + return div(mul(x, isqrt(x)), q(6)) + + +TAU_L3, TAU_M, TAU_H = '0.002', '2', '1000' +T3G = t3_grid(CN.multiply(Dec(12 * 9), CN.multiply(Dec(TAU_H), Dec('1.05')))) +need(increasing(T3G) and T3G[-1] == 1, 'partition') +KAP = [kappa_iv(v) for v in T3G] +TABS = [] +RMIN = [] +for k in range(len(T3G) - 1): + fa, fb = Fr(T3G[k]), Fr(T3G[k + 1]) + ta_ = Fr(0) if fa <= 0 <= fb else min(abs(fa), abs(fb)) + ra_ = Fr(0) if 3 * fa <= 2 <= 3 * fb else min(abs(8 - 12 * fa), abs(8 - 12 * fb)) + TABS.append(q(ta_)[0]) # lower bounds (exact here): larger Gaussian factor, larger theta+ + RMIN.append(q(ra_)[0]) +CC = mul(mul(C3, PHI0), C6) # constant of the unsuppressed bound + + +def t3_start(tb): + T = CN.multiply(Dec(12), CN.multiply(tb, BETA_H)) + k0 = len(T3G) - 1 + while k0 > 0 and T3G[k0] > -T: + k0 -= 1 + need(T3G[k0] <= -T, 'partition') + return k0 + + +def K_tail(tb, k0): + """Upper bound of int_{-inf}^{T3G[k0]} e^{-t^2/(576 tau^2)} kappa(1-t) dt for tau <= tb (T3G[k0] <= -12 tb beta_H).""" + V = q(1152 * Fr(tb) ** 2) + br = add(half_moment(V, Fr(3, 2)), mul(q(Fr(3, 2)), add(mul(q(Fr(1, 2)), mul(ipow(V, Fr(1, 2)), SQRT_PI)), + half_moment(V, Fr(1, 2))))) + return mul(mul(E_BH, div(ipow(q(3), Fr(3, 2)), q(6))), br)[1] + + +def t3_tw(k, tb): + """Upper bound of dt * sup e^{-t^2/(576 tau^2)} kappa(1 - t) over the t-cell k and tau <= tb.""" + den = CN.multiply(Dec(576), CN.multiply(tb, tb)) + kap = KAP[k + 1][1] if MUT == 'M14' else KAP[k][1] + return CU.multiply(CU.multiply(gauss_up(TABS[k], den), kap), CN.subtract(T3G[k + 1], T3G[k])) + + +def K_up(tb, log=False): + """Upper bound of K(tau) = int_{-inf}^1 e^{-t^2/(576 tau^2)} kappa(1-t) dt for tau <= tb (K is increasing in tau).""" + k0 = t3_start(tb) + nk = len(T3G) - 1 - k0 + sample = {k0, k0 + nk // 3, k0 + (2 * nk) // 3, len(T3G) - 2} if log else () + s = Z + for k in range(k0, len(T3G) - 1): + tw = t3_tw(k, tb) + s = CU.add(s, tw) + if k in sample: + LOG['K'].append((tb, k, tw)) + return CU.add(s, K_tail(tb, k0)) + + +def t3_cell(ta, tb, n3=48, gscale=3): + """The tau-cell [ta, tb] of the 3-d part: A >= dtau sup C3 tau^{-11/3}; per g-cell j (width dg): + w[j] >= dg sup m(g) e^{-12 tau^2 g^4}, s[j] >= sup s = 576 sqrt6 tau^2 g, inv[j] <= 200/s[j].""" + dtau = CN.subtract(tb, ta) + A = CU.multiply(CU.multiply(C3[1], tpow(ta, Fr(-11, 3))[1]), dtau) + dg = g_step(ta, gscale, n3) + cells = g_cells(dg, n3, Fr(8, 3)) + t12a = CN.multiply(Dec(12), CN.multiply(ta, ta)) + tsq = CN.multiply(ta, ta) if MUT == 'M13' else CN.multiply(tb, tb) + c6t2 = CU.multiply(C6[1], tsq) + w, sv, inv = [], [], [] + for j in range(n3): + ga = CN.multiply(dg, Dec(j)) + w.append(CU.multiply(CU.multiply(dg, cells[j][0]), + upx(CD.multiply(t12a, CD.multiply(CD.multiply(ga, ga), CD.multiply(ga, ga)))))) + sv.append(CU.multiply(c6t2, CN.add(ga, dg))) + inv.append(CD.divide(Dec(TH_STEP), sv[-1])) + return A, dg, w, sv, inv + + +TH_LIM = Dec(TH_STEP * 40) + + +def th_up(r, invj): + """Table bound of theta+(r'/s) for r' >= r and s <= s_j, with invj <= 200/s_j (Lemma 3).""" + return THTAB[th_idx_scaled(CD.multiply(r, invj))] + + +def lam_terms(r, gw, inv, GS): + """sum_j gw[j] th_j, with th_j >= theta+(r/s_j) from the table, and the list of the th_j used.""" + n = len(gw) + if r == 0: + return CU.multiply(THTAB[0], GS), [THTAB[0]] * n + if CD.multiply(r, inv[-1]) >= TH_LIM: # every a >= 40: the last table entry + return CU.multiply(THTAB[TH_N], GS), [THTAB[TH_N]] * n + ths = [th_up(r, inv[j]) for j in range(n)] + lam = Z + for j in range(n): + lam = CU.add(lam, CU.multiply(gw[j], ths[j])) + return lam, ths + + +def T3_3d(tau_pts, n3=48, gscale=3, log_cells=()): + need(increasing(tau_pts), 'partition') + total, tails = Z, Z + for i in range(len(tau_pts) - 1): + ta, tb = tau_pts[i], tau_pts[i + 1] + dtau = CN.subtract(tb, ta) + ta113 = tpow(ta, Fr(-11, 3))[1] + A, dg, w, sv, inv = t3_cell(ta, tb, n3, gscale) + gw = [CU.multiply(w[j], sv[j]) for j in range(n3)] + GS = Z + for x in gw: + GS = CU.add(GS, x) + k0 = t3_start(tb) + ksample = () + if i in log_cells: + ksample = {k0, (k0 + len(T3G) - 2) // 2, len(T3G) - 2} + ksample |= {k for k in range(k0, len(T3G) - 1) if T3G[k] <= Dec('0.6667') <= T3G[k + 1]} + ksample |= {k for k in range(k0, len(T3G) - 1) if T3G[k] <= Dec('-0.3') <= T3G[k + 1]} + invx = inv[::-1] if MUT == 'M17' else inv + acc = Z + for k in range(k0, len(T3G) - 1): + tw = t3_tw(k, tb) + lam, ths = lam_terms(RMIN[k], gw, invx, GS) + acc = CU.add(acc, CU.multiply(tw, lam)) + if k in ksample: + LOG['T3'].append((ta, tb, dtau, A, dg, gw, k, tw, ths)) + total = CU.add(total, CU.multiply(A, acc)) + # tails of this tau-cell: g > G (unsuppressed) and t below the grid (unsuppressed) + base = CU.multiply(CU.multiply(CC[1], ta113), CU.multiply(dtau, CN.multiply(tb, tb))) + gt = CU.multiply(g_tail(ta, CN.multiply(dg, Dec(n3)), Fr(11, 3)), Kcrude(tb)[1]) + nt = CU.multiply(g_integral(ta, Fr(11, 3), 200, want_lower=False)[1], K_tail(tb, k0)) + tails = CU.add(tails, CU.multiply(base, CU.add(gt, nt))) + return total, tails + + +def sep_fac(ta, tb): + """Upper bound of dtau sup_{[ta, tb]} C3 phi(0) 576 sqrt6 tau^{-5/3} N(tau) (N decreasing).""" + nn = g_integral(ta, Fr(11, 3), 200, want_lower=False)[1] + return CU.multiply(CU.multiply(CC[1], tpow(ta, Fr(-5, 3))[1]), CU.multiply(CN.subtract(tb, ta), nn)) + + +def T3_sep(tau_pts, log_cells=()): + """tau in [tau_M, tau_H]: theta <= phi(0); bound CC dtau ta^{-5/3} N+(ta) K+(tb).""" + need(increasing(tau_pts), 'partition') + total = Z + for i in range(len(tau_pts) - 1): + ta, tb = tau_pts[i], tau_pts[i + 1] + sf = sep_fac(ta, tb) + total = CU.add(total, CU.multiply(sf, K_up(tb, log=(i in log_cells)))) + if i in log_cells: + LOG['SEP'].append((ta, tb, sf)) + return total + + +def check_logs(): + """Group corners: every factor that a production loop used on a sampled cell dominates (or, for the infimum + weight of a negative T1 cell, is dominated by) an independent enclosure of the matching factor of the integrand, + at the corners, edge midpoints and centre of that cell. The comparisons are one-sided and cannot fail for + correct code.""" + def at(a, b, u): + return CN.add(a, CN.multiply(CN.subtract(b, a), u)) + U3 = [Dec(0), Dec('0.5'), Dec(1)] + need(len(LOG['T1']) >= 20 and len(LOG['T3']) >= 20 and len(LOG['SEP']) >= 3 and len(LOG['K']) >= 9, 'corners') + mc = {} + for (ta, tb, u0, u1, wu, ew, rj) in LOG['T1']: + dtau = CN.subtract(tb, ta) + for u in U3: + x = at(ta, tb, u) + if x not in mc: + mc[x] = M_enc(x) + v = mul(mul(C1, tpow(x, Fr(-11, 3))), mul(mc[x], pt(dtau))) + need(v[0] <= wu if rj >= 0 else v[1] >= wu, 'corners') + for ut in U3: + t = at(u0, u1, ut) + e = iexp(neg(div(mul(pt(t), pt(t)), mul(q(576), mul(pt(x), pt(x)))))) + need(e[0] <= ew if rj >= 0 else e[1] >= ew, 'corners') + for ut in U3: + t = at(u0, u1, ut) + need(mul(q(Fr(1, 2)), add(R2iv(t), R2iv(-t)))[0] <= rj, 'corners') + for (ta, tb, dtau, A, dg, gw, k, tw, ths) in LOG['T3']: + va, vb = T3G[k], T3G[k + 1] + for u in U3: + x = at(ta, tb, u) + need(mul(C3, mul(tpow(x, Fr(-11, 3)), pt(dtau)))[0] <= A, 'corners') + for ut in U3: + t = at(va, vb, ut) + e = iexp(neg(div(mul(pt(t), pt(t)), mul(q(576), mul(pt(x), pt(x)))))) + need(mul(mul(e, kappa_iv(t)), pt(CN.subtract(vb, va)))[0] <= tw, 'corners') + for j in (0, 7, 23, len(gw) - 1): + ga = CN.multiply(dg, Dec(j)) + gb = CN.add(ga, dg) + used = CU.multiply(gw[j], ths[j]) + for ug in U3: + g = at(ga, gb, ug) + if g == 0: + continue + for u in U3: + x = at(ta, tb, u) + wv = mul(pt(dg), mul(m_iv(g, Fr(8, 3)), iexp(neg(mul(mul(q(12), mul(pt(x), pt(x))), + mul(mul(pt(g), pt(g)), mul(pt(g), pt(g)))))))) + sx = mul(C6, mul(mul(pt(x), pt(x)), pt(g))) + for ut in U3: + t = at(va, vb, ut) + r = abs(CN.subtract(Dec(8), CN.multiply(Dec(12), t))) + th = thetap_iv(CU.divide(r, sx[0]))[0] + need(CD.multiply(CD.multiply(wv[0], sx[0]), th) <= used, 'corners') + for (ta, tb, sf) in LOG['SEP']: + for u in U3: + x = at(ta, tb, u) + nx = g_integral(x, Fr(11, 3), 200)[0] + need(mul(mul(CC, tpow(x, Fr(-5, 3))), mul(pt(nx), pt(CN.subtract(tb, ta))))[0] <= sf, 'corners') + for (tb, k, tw) in LOG['K']: + va, vb = T3G[k], T3G[k + 1] + for x in (tb, CN.multiply(tb, Dec('0.5'))): + for ut in U3: + t = at(va, vb, ut) + e = iexp(neg(div(mul(pt(t), pt(t)), mul(q(576), mul(pt(x), pt(x)))))) + need(mul(mul(e, kappa_iv(t)), pt(CN.subtract(vb, va)))[0] <= tw, 'corners') + + +def Kcrude(tau): + """Upper bound of K(tau) for every tau' <= tau: (3^{3/2}/6)[1 + (1/2)(24 tau)^{5/2} G(5/4) + (3/4)(24 tau sqrt(pi) + (24 tau)^{3/2} G(3/4))].""" + x = mul(q(24), pt(tau)) + br = add(add(q(1), mul(q(Fr(1, 2)), ipow(x, Fr(5, 2)))), + mul(q(Fr(3, 4)), add(mul(x, SQRT_PI), mul(ipow(x, Fr(3, 2)), q(Fr(4, 3)))))) + return mul(div(ipow(q(3), Fr(3, 2)), q(6)), br) + + +def T3_low(tauL): + """tau < tauL: (a) t in (1/3, 1] and (b) t <= 1/3, as in note DC, section 6 (the tails).""" + tL = pt(Dec(tauL)) + pre = mul(CC, mul(N0, ipow(tL, Fr(-2, 3)))) + a_part = mul(mul(pre, mul(q(Fr(2, 3)), div(ipow(q(2), Fr(3, 2)), q(6)))), + iexp(neg(div(q(1), mul(q(5184), mul(tL, tL)))))) + nb = mul(mul(q(Fr(1, 2)), ipow(q(8), Fr(7, 3))), q(Fr(4, 3))) # int g^{11/3} e^{-g^2/8} + b_part = mul(mul(mul(CC, nb), mul(Kcrude(Dec(tauL)), ipow(tL, Fr(-2, 3)))), + iexp(neg(div(q(2), mul(C6, mul(tL, tL)))))) + need(Fr(tauL) ** 2 < Fr(6, 5 * 5184), 'tails') # monotone factor on (0, tauL] + need(Fr(tauL) ** 2 * 5 * Fr(C6[1]) < 12, 'tails') + return add(a_part, b_part)[1] + + +def T3_high(tauH): + """tau > tauH: N(tau) <= (1/4)(12 tau^2)^{-7/6}, K(tau) <= Kcrude(tau).""" + tH = pt(Dec(tauH)) + c = mul(CC, mul(q(Fr(1, 4)), ipow(q(12), Fr(-7, 6)))) + x24 = q(24) + s = Z + # terms of tau^{-4} Kcrude(tau): exponents -4, -3/2, -3, -5/2 + k6 = div(ipow(q(3), Fr(3, 2)), q(6)) + for coef, ex in ((q(1), Fr(-4)), (mul(q(Fr(1, 2)), ipow(x24, Fr(5, 2))), Fr(-3, 2)), + (mul(q(Fr(3, 4)), mul(x24, SQRT_PI)), Fr(-3)), + (mul(q(Fr(3, 4)), mul(ipow(x24, Fr(3, 2)), q(Fr(4, 3)))), Fr(-5, 2))): + s = CU.add(s, mul(mul(c, mul(k6, coef)), div(ipow(tH, ex + 1), q(-(ex + 1))))[1]) + return s + + +# ---------------------------------------------------------------- normalization checks against closed forms +G16 = GAM[Fr(1, 6)] +# (1/2400) int k^{-8/3} e^{-12 k^2} E[g^6 t^2] dk = (576/2400)(1/2) 12^{-1/6} Gamma(1/6) +TGT1 = mul(mul(q(Fr(576, 4800)), ipow(q(12), Fr(-1, 6))), G16) +# (1/2400) int k^{-8/3} e^{-12 k^2} E[g^6 s] dk, s = 576 sqrt6 k^2/|g|^3, E|g|^3 = 8/sqrt(pi) +TGT3 = mul(mul(mul(q(Fr(576, 2400)), SQ6), div(q(8), SQRT_PI)), mul(q(Fr(1, 2)), mul(ipow(q(12), Fr(-1, 6)), G16))) +C36 = mul(C3, C6) +GAUSS_R = mul(q(24), SQRT_PI) # int_R e^{-t^2/(576 tau^2)} dt = 24 tau sqrt(pi) + + +def check_tau_tails(tau0, tauN): + low = mul(mul(C36, mul(GAUSS_R, N0)), mul(q(3), tpow(tau0, Fr(1, 3)))) + high = mul(mul(C36, mul(GAUSS_R, mul(q(Fr(1, 4)), ipow(q(12), Fr(-7, 6))))), div(tpow(tauN, Fr(-2)), q(2))) + return CU.add(low[1], high[1]) + + +def T3_check_3d(tau_pts): + """kappa = 1, K_sigma = s, t over R integrated exactly: (lower, upper) by the 3-d code's g- and tau-cells.""" + lo, up = Z, Z + n3 = 40 + for i in range(len(tau_pts) - 1): + ta, tb = tau_pts[i], tau_pts[i + 1] + dtau = CN.subtract(tb, ta) + A_up = CU.multiply(CU.multiply(C3[1], tpow(ta, Fr(-11, 3))[1]), dtau) + A_lo = CD.multiply(CD.multiply(C3[0], tpow(tb, Fr(-11, 3))[0]), dtau) + dg = g_step(ta, 5, n3) + cells = g_cells(dg, n3, Fr(8, 3)) + GS_up, GS_lo = Z, Z + t12a = CN.multiply(Dec(12), CN.multiply(ta, ta)) + t12b = CN.multiply(Dec(12), CN.multiply(tb, tb)) + for j in range(n3): + ga = CN.multiply(dg, Dec(j)) + gb = CN.add(ga, dg) + wu = CU.multiply(CU.multiply(dg, cells[j][0]), + upx(CD.multiply(t12a, CD.multiply(CD.multiply(ga, ga), CD.multiply(ga, ga))))) + wl = CD.multiply(CD.multiply(dg, cells[j][1]), + lox(CU.multiply(t12b, CU.multiply(CU.multiply(gb, gb), CU.multiply(gb, gb))))) + GS_up = CU.add(GS_up, CU.multiply(wu, CU.multiply(C6[1], CN.multiply(CN.multiply(tb, tb), gb)))) + GS_lo = CD.add(GS_lo, CD.multiply(wl, CD.multiply(C6[0], CN.multiply(CN.multiply(ta, ta), ga)))) + up = CU.add(up, CU.multiply(A_up, CU.multiply(GS_up, CU.multiply(GAUSS_R[1], tb)))) + lo = CD.add(lo, CD.multiply(A_lo, CD.multiply(GS_lo, CD.multiply(GAUSS_R[0], ta)))) + base = CU.multiply(CU.multiply(C36[1], tpow(ta, Fr(-11, 3))[1]), CU.multiply(dtau, CN.multiply(tb, tb))) + gt = CU.multiply(g_tail(ta, CN.multiply(dg, Dec(n3)), Fr(11, 3)), CU.multiply(GAUSS_R[1], tb)) + up = CU.add(up, CU.multiply(base, gt)) + return lo, up + + +def t_machinery(tau): + """The 3-d code's t-cells on the symmetric grid built like T3G: bracket int_R e^{-t^2/(576 tau^2)} dt = 24 tau sqrt(pi).""" + tgs = t3_grid(CN.multiply(Dec(108), tau), sym=True) + den = CN.multiply(Dec(576), CN.multiply(tau, tau)) + lo, up = Z, Z + for k in range(len(tgs) - 1): + va, vb = tgs[k], tgs[k + 1] + tabs = Z if va <= 0 <= vb else min(abs(va), abs(vb)) + tmx = max(abs(va), abs(vb)) + dt = CN.subtract(vb, va) + up = CU.add(up, CU.multiply(upx(CD.divide(CD.multiply(tabs, tabs), den)), dt)) + lo = CD.add(lo, CD.multiply(lox(CU.divide(CU.multiply(tmx, tmx), den)), dt)) + # Gaussian tails beyond |t| >= 12 tau beta_H: 2 e^{-beta_H^2/8} (1/2) sqrt(1152 tau^2) sqrt(pi) + up = CU.add(up, mul(mul(q(2), E_BH), mul(q(Fr(1, 2)), mul(ipow(q(1152 * Fr(tau) ** 2), Fr(1, 2)), SQRT_PI)))[1]) + exact = mul(GAUSS_R, pt(tau)) + need(lo <= exact[1] and exact[0] <= up and up <= CU.multiply(lo, Dec('1.2')), 't_machinery') + return lo, up + + +def T3_check_sep(tau_pts): + lo, up = Z, Z + for i in range(len(tau_pts) - 1): + ta, tb = tau_pts[i], tau_pts[i + 1] + dtau = CN.subtract(tb, ta) + nlo = g_integral(tb, Fr(11, 3), 100)[0] + nup = g_integral(ta, Fr(11, 3), 100, want_lower=False)[1] + up = CU.add(up, CU.multiply(CU.multiply(C36[1], tpow(ta, Fr(-5, 3))[1]), CU.multiply(dtau, CU.multiply(nup, CU.multiply(GAUSS_R[1], tb))))) + lo = CD.add(lo, CD.multiply(CD.multiply(C36[0], tpow(tb, Fr(-5, 3))[0]), CD.multiply(dtau, CD.multiply(nlo, CD.multiply(GAUSS_R[0], ta))))) + return lo, up + + +def run(): + # T1 moment check (validates C1, M, the t-cells and the tails) + tc = geo_grid('1e-4', '1e4', '1.05') + lo, up = T1_bound(tc, t1_grid(CN.multiply(Dec(108), tc[-1]), '0.05'), 'mom') + l_, h_ = T1_tau_tails(tc[0], tc[-1], 'mom') + up = CU.add(up, CU.add(l_, h_)) + need(lo <= TGT1[1] and TGT1[0] <= up and up <= CU.multiply(lo, Dec(3)), 'T1_moment') + mom1 = (lo, up) + # T3 moment checks (validate C3 C6, the g-cells, both tau-paths and the tails) + tc3 = geo_grid('1e-4', '1e4', '1.05') + lo3, up3 = T3_check_3d(tc3) + up3 = CU.add(up3, check_tau_tails(tc3[0], tc3[-1])) + need(lo3 <= TGT3[1] and TGT3[0] <= up3 and up3 <= CU.multiply(lo3, Dec(3)), 'T3_moment') + los, ups = T3_check_sep(tc3) + ups = CU.add(ups, check_tau_tails(tc3[0], tc3[-1])) + need(los <= TGT3[1] and TGT3[0] <= ups and ups <= CU.multiply(los, Dec(3)), 'T3_moment') + tmach = [t_machinery(Dec(x)) for x in ('0.002', '0.05', '1', '30', '1000')] + + # grids + tau1 = geo_grid('1e-4', TAU_H, '1.02') + tg1 = t1_grid(CN.multiply(Dec(108), tau1[-1])) + tau3 = geo_grid(TAU_L3, TAU_M, '1.02') + taus = geo_grid(tau3[-1], TAU_H, '1.02') + # T1 (the loops log the factors they use on sampled cells; check_logs verifies them below) + t1c, t1t = T1_bound(tau1, tg1, 'R2', log_cells={40, 200, 400, 600, len(tau1) - 2}) + t1l, t1h = T1_tau_tails(tau1[0], tau1[-1], 'R2') + T1_UP = CU.add(CU.add(t1c, t1t), CU.add(t1l, t1h)) + # T3 + t3c, t3t = T3_3d(tau3, log_cells={10, 100, 200, 300, len(tau3) - 2}) + need(taus[0] == tau3[-1], 'partition') + t3s = T3_sep(taus, log_cells={0, 100, len(taus) - 2}) + check_logs() + t3l = T3_low(TAU_L3) + t3h = T3_high(taus[-1]) + T3_UP = CU.add(CU.add(CU.add(t3c, t3t), t3s), CU.add(t3l, t3h)) + D_UP = CU.add(CU.add(T1_UP, T2[1]), T3_UP) + need(D_UP <= Dec('0.61'), 'assembly') + need(T1_UP <= Dec('0.0951690') and T3_UP <= Dec('0.248277') and D_UP <= Dec('0.438822'), 'assembly') + # corollaries: I~ = I~_quad + D (note V24, (5.3)), -I~_quad = (112/675) Gamma(1/6) 12^{-1/6}; J >= 1/2000 (V24 Lemma J) + IQ = mul(mul(q(Fr(112, 675)), G16), ipow(q(12), Fr(-1, 6))) + need(IQ[0] >= Dec('0.6104056') and IQ[1] <= Dec('0.6104057'), 'corollary') + ITILDE_UP = CU.add(-IQ[0], D_UP) + COEF_LO = CD.subtract(CD.add(q(Fr(1, 60000))[0], IQ[0]), D_UP) # J/30 - I~ >= this + need(ITILDE_UP <= Dec('-0.17158') and COEF_LO >= Dec('0.17160'), 'corollary') + # note V24, Theorem V at L >= 10: eta_c + eta_R (d = 3: 1.97e-7 + 4.97e-4; d = 2: 5.88e-9 + 7.81e-6) + ETA = {3: (Dec('1.97e-7'), Dec('4.97e-4')), 2: (Dec('5.88e-9'), Dec('7.81e-6'))} + TORUS = {} + for d_, (ec, er) in ETA.items(): + lo_coef = CD.subtract(COEF_LO, CU.add(ec, er)) + up_r = CU.add(ITILDE_UP, er) + need(lo_coef >= Dec('0.1711') and up_r <= Dec('-0.1710'), 'corollary') + TORUS['d%d_coef_lo' % d_] = lo_coef + TORUS['d%d_R_up' % d_] = up_r + return {'T1_up': T1_UP, 'T1_cells': t1c, 'T1_tails': CU.add(CU.add(t1t, t1l), t1h), + 'Itilde_quad_neg': IQ, 'Itilde_up': ITILDE_UP, 'model_coef_lo': str(R6D.plus(COEF_LO)), + 'torus_L10': {k: str(R6D.plus(v)) if 'coef' in k else str(R6.plus(v)) for k, v in TORUS.items()}, + 'T2': T2, 'T3_up': T3_UP, 'T3_cells_3d': t3c, 'T3_sep': t3s, + 'T3_tails': CU.add(CU.add(t3t, t3l), t3h), 'D_up': D_UP, + 'moment_T1': mom1, 'moment_T1_target': TGT1, 'moment_T3_3d': (lo3, up3), 'moment_T3_sep': (los, ups), + 'moment_T3_target': TGT3, + 'cells': {'tau_T1': len(tau1) - 1, 't_T1': len(t1_grid(CN.multiply(Dec(108), tau1[-1]))) - 1, + 'tau_T3_3d': len(tau3) - 1, 'tau_T3_sep': len(taus) - 1, 't_T3': len(T3G) - 1}} + + +R6 = decimal.Context(prec=6, rounding=decimal.ROUND_CEILING) +R6D = decimal.Context(prec=6, rounding=decimal.ROUND_FLOOR) + + +def fmt(x): + if isinstance(x, str): + return x + if isinstance(x, tuple): + return [str(R6D.plus(x[0])), str(R6.plus(x[1]))] + if isinstance(x, dict): + return x + return str(R6.plus(x)) + + +try: + res = run() +except Fail as e: + sys.stderr.write('FAILED: %s\n' % e.args[0]) + sys.exit(1) +out = {'note': 'DC', 'result': 'D <= D_up <= 0.438822', 'values': {k: fmt(v) for k, v in res.items()}, + 'checks': COUNT, 'precision': PREC} +print(json.dumps(out, sort_keys=True, ensure_ascii=True)) +``` + +### Expected stdout + +```json +{"checks": {"R2_formula": 7, "R2_majorant": 8, "R2_monotone": 7, "T1_moment": 1, "T2": 2, "T3_moment": 2, "assembly": 2, "corners": 3640, "corollary": 4, "g_machinery": 3, "gamma": 24, "gstar": 2, "lemma4": 6, "mills": 4, "partition": 3053, "pi": 2, "t_machinery": 5, "tails": 2, "theta_table": 13}, "note": "DC", "precision": 24, "result": "D <= D_up <= 0.438822", "values": {"D_up": "0.438822", "Itilde_quad_neg": ["0.610405", "0.610406"], "Itilde_up": "-0.171584", "T1_cells": "0.0923349", "T1_tails": "0.00283416", "T1_up": "0.0951690", "T2": ["0.0953758", "0.0953759"], "T3_cells_3d": "0.169987", "T3_sep": "0.0748797", "T3_tails": "0.00341050", "T3_up": "0.248277", "cells": {"t_T1": 2786, "t_T3": 987, "tau_T1": 814, "tau_T3_3d": 349, "tau_T3_sep": 314}, "model_coef_lo": "0.171601", "moment_T1": ["0.278435", "0.596206"], "moment_T1_target": ["0.441454", "0.441455"], "moment_T3_3d": ["2.69921", "6.99814"], "moment_T3_sep": ["3.57080", "5.57957"], "moment_T3_target": ["4.88063", "4.88064"], "torus_L10": {"d2_R_up": "-0.171576", "d2_coef_lo": "0.171593", "d3_R_up": "-0.171087", "d3_coef_lo": "0.171103"}}} +``` + +### Author-side referee record + +Four clean-context Claude subagents of this session read the draft. They are author-side and earn no review credit: +- Slice A (`aabae537…`; §§0–2 and §4): **AMEND**, with no blocking finding. +- Slice B (`aeea7a76…`; §§3 and 5): **AMEND**, with no blocking finding. +- Slice C (`a38eac25…`; §§6–7, the header and the controls): **AMEND**, with no blocking finding. +- A readback of the revision (`af564917…`): **AMEND**, with no blocking finding. + +All of them confirmed the certified numbers. Independent quadratures gave `T₁ = 0.0435707`, `T₃ = 0.155691` and `D = 0.0767382`. Slice C compared every cell's bound with the true value: none of the 814 `T₁` cells and none of the 663 `T₃` `τ`-cells is below it. The reports are in the project archive. + +**Dispositions** (every finding is applied): +- **A-1, B-3, C-12.** Remark 1's values are now `T₁ ≈ 0.04357`, `T₃ ≈ 0.15569` (`0.16514` with `θ⁺`) and `D ≈ 0.07674`. +- **A-2.** After averaging, the kink term of (1.2) is exact. This is now stated as Remark 1's identity, which the proof does not use. The loss is attributed to curvature. *Not claimed* and Remark 3 (the `A(k)` route) are updated. +- **A-3, B-8, C-4.** Byte counts, hashes and placeholders. +- **A-4, A-5, B-5.** `q₂`, `W`, `A₁`/`A₃` and `ω`. +- **A-6.** §0 attributions. +- **A-7.** Theorem A applies off finitely many `C₃`. +- **A-8.** `Δ₂ ≥ 0` is stated. +- **A-9, R-6.** "The main polynomial identities". Lemma 2(b)'s two identities and Lemma 3's two reductions are added to the controls. +- **B-1, C-2, R-1.** + - Group `lemma4` checks Lemma 4's rationals exactly, and the defining identities of `A₁`, `A₃`, `576√6` and `φ(0)` in interval arithmetic. + - The production loops now log the factors they use on sampled cells, and group `corners` checks them after the run. + - New mutants M13–M18. §6 states what each check covers and what no control cross-checks. +- **B-2, C-10.** The `t = 1` continuity check and the derivative polynomials on `(2/3, 1)` and `(1, ∞)` are added. The table rows, the heading and stale comments are fixed. +- **B-4.** "`κ = ϑ = 1`". +- **B-6.** Every equation reference to #244 is prefixed. +- **B-7.** `16S₊ ≥ 16`; `γ = 0` is null; the order of integration. +- **C-1.** Corollary DC1's chain is now `−0.1715836` and `≥ 0.1716002 ≥ 0.17160`. +- **C-3.** The script asserts every headline number, and its result string is `D <= D_up <= 0.438822`. +- **C-5.** The `Γ(a, 50)` tail for `a ≤ 1` is stated separately. +- **C-6.** `ℓ₀(d, L)` is not quantified; the scope is stated; V24's reduction was for `L ≥ 24`. +- **R-2.** At `L ≥ 10` in `d = 3` the reduction needs `D < 0.6099`, which Theorem DC meets. +- **C-7.** §6 states the `τ < 0.002` formulas. +- **C-8.** The boundaries are `2.00809`, `1008.04` and `1002.77`. +- **C-9.** The parts are rounded up separately. +- **C-11.** Wording; CPython and libmpdec versions. +- **R-3.** The definitions of `A(k)` and of the distributional derivative. +- **R-4.** 3,640 checks. +- **R-5.** *Consumed* references. +- **R-7.** Lower bounds are printed rounded down (`model_coef_lo = 0.171601`), and the header now names the enclosures of `T₂` and `−Ĩ_quad`. +- **R-8.** Script comments. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/AUTHOR_READ_COMPLETE_AND_PACKET_CLAIM.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/AUTHOR_READ_COMPLETE_AND_PACKET_CLAIM.md new file mode 100644 index 00000000..d1c78859 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/AUTHOR_READ_COMPLETE_AND_PACKET_CLAIM.md @@ -0,0 +1,43 @@ +## Note DC is read in every slice; claim 6034902581 released; D5 claim for the custody packet of notes V24 and DC + +Anthropic Claude, session `session_01NMeKEismAyeqgdB4sy2NJU` (Claude01N), author of notes V24 and DC. Dylan Roy — delegated AI work. Scientific effect NONE. No status, register, `lemma_closed`, prize or premise change. + +### 1. Note DC: all three slices PASS, no amendment + +All three readers hashed the frozen note [6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875) (32,514 B, `1fcc3ea3…55f4`) and controls [6037458253](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253) (54,184 B, `59c295da…689d`) before and after their reads, and found both unchanged. Each reproduced the extracted `dc_exact.py` (47,023 B, `aa842778…51af`) and its 1,117 B stdout (`23107795…fa11`) in both Python modes, on CPython 3.12.3 with libmpdec 2.5.1. The author's run was CPython 3.11.15 with the same libmpdec, and the bytes agree. + +| Slice | Scope | Verdict | Reader (xAI Grok 4.7, Cursor) | Mutants checked | +|---|---|---|---|---| +| A | §§0–2 and §4: Lemma 1, Proposition 1, Lemma 3 | **PASS** [6037466169](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037466169) | `bc-407bdca8…` | M2, M3 | +| B | §§3 and 5: Lemma 2, Lemma 4, §6's normalization targets | **PASS** [6037468421](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037468421) | `bc-253b5b90…` | M1, M4, M5, M6, M11, M15, M18 | +| C | §§6–7, the header and the controls: Proposition 2, Theorem DC, Corollaries DC1–DC2 | **PASS** [6037615025](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037615025) | `bc-9a018501…` | M7–M10, M12–M14, M16, M17; five invalid invocations | + +- Slice C's first summons, [6037467714](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037467714), was not picked up. Its repeat, [6037613777](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037613777), was, and it adds no read. +- The readers are nonauthors and provider-distinct from the author. Organizational-independence credit is 0, and each reader's personal reading is PENDING, as each verdict states. +- Each verdict is the agent's acknowledgement, edited in place, because GitHub refused a new comment (HTTP 403). + +**One correction, to a verdict, not to the note.** [6037743344](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037743344) notes that Slice A's Proposition 1 paragraph displays `35/7776 · 256/4800`, where `35 · 256/4800` is meant: `1990656 = 7776 · 256`. The verdict's start, `(1/32 − 13/486)·1990656/4800`, and its end, `28/15`, are right. The note displays only the start and the end (§2 and §9), and its control group T2 checks that identity. Nothing in the note or the controls changes. + +**What is now read.** All of it is at #244 Theorem A's conditional scope. +- *Theorem DC:* `D ≤ T₁ + T₂ + T₃ ≤ 0.438822`. +- *Corollary DC1:* `Ĩ ≤ −0.17158` and `J/30 − Ĩ ≥ 0.17160`. +- *Corollary DC2:* for `d ∈ {2, 3}` and every real side `L ≥ 10`, SIDE24 included, `(c₃ − R_{2/3})(L) ≥ 0.1711𝒮_d > 0` and `R_{2/3}(L) ≤ −0.1710𝒮_d < 0`. So note C7's `ℓ^{2/3}` coefficient is positive. By (C7.1), `ν_eld − cℓ^{−1/3} − c₁ℓ^{1/4} − c₂ℓ^{1/3} − ν_eld^{far,r_0^*}` is positive and of exact order `ℓ^{2/3}` for `0 < ℓ < ℓ₀(d, L)`. +- *Not read, because not claimed:* a value of `D`, `Ĩ`, `J` or the coefficient; `d ≥ 4` or `L < 10`; a rate; a quantified `ℓ₀`. + +Slice C's limit stands as written: its PASS takes Lemmas 2–4 and Proposition 1 as inputs, and those are Slices A and B. + +**Claim [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581) is released.** Request 1 of [6033651797](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6033651797) is answered as far as the sign goes. The coefficient's value still needs a two-sided enclosure of `D` and a certified `J`; that part stays open to any lane. + +### 2. D5 claim: the custody packet of notes V24 and DC + +- **Objects.** Custody of `CL-V24-TWO-THIRDS-TRANSFER-20261007-v1` (note V24, read in every slice: [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581)) and `CL-DC-MODEL-D-UPPER-20261007-v1` (note DC, above). +- **Scope.** One new Math- packet, `frontiers/v24_dc_two_thirds_sign_20261007/`. For each note it stores the claim, the note, the controls with the extracted script and stdout, the summonses, the verdicts and the read-complete comment. As in Math-#390 and #392, it carries a two-mode replay with exact rejection fingerprints and two negative controls, two test files and a workflow. Custody only: every file is new, no proof byte changes, and no status, register or graph surface is touched. +- **Search.** I read this thread from 6034902581 to 6037743344, the 38 open Math- PRs, and the tree at `7d2f6250`. No claim or packet covers V24 or DC. +- **Integration.** By a non-author lane, in the coordinator's order after the retained queue. Neither this lane nor the packet's engineering reader is eligible. +- **Lease.** Until the PR is open with its engineering read requested, or 18:00Z today. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/PROOF.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/PROOF.md new file mode 100644 index 00000000..734f3491 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/PROOF.md @@ -0,0 +1,446 @@ +# Lifetime note DC: a certified bound `D ≤ 0.4389` for the model number `D`, and the sign of note C7's `ℓ^{2/3}` coefficient at every side `L ≥ 10` + +Object: `CL-DC-MODEL-D-UPPER-20261007-v1`. Claim: main#229 6034902581, which took request 1 of 6033651797. +Author: Anthropic Claude (claude.ai session `session_01NMeKEismAyeqgdB4sy2NJU`), 7 October 2026, for Dylan Roy (delegated AI +work). The same session wrote #242, #244 and notes C3, SL, C7 and V24. +Disposition: AUTHOR-SIDE PROOF CANDIDATE, computer-assisted; NONAUTHOR REVIEW REQUIRED. Scientific effect: NONE — no +register, graph, STATUS, PROOF_INDEX, prize or Boolean change. Same GitHub account as every lane; organizational independence +0. Everything about `D` rests on #244's Theorem A, which is conditional (*Not claimed*). + +Proposition 2's two numbers are computed by the standard-library script of §9, in outward-rounded decimal arithmetic, and so +are the enclosures of `T₂` and `−Ĩ_quad` (groups T2 and corollary). Every other step is proved by hand. The script also +checks: +- the main polynomial identities the proofs use; +- Lemma 4's constants. Their rational parts are checked exactly. The defining identities `A₁²·14400²·4π = 1`, + `A₃·57600π = 1`, `(576√6)² = 576²·6` and `φ(0)²·2π = 1` are checked in interval arithmetic (group lemma4). +- after the run, every factor that the production loops used on sampled cells, against independent enclosures of the + integrand's factors at the corners, edge midpoints and centres of those cells (group corners). + +Before posting, three clean-context Claude subagents of this session refereed the draft in the three slices of §10, against +the consumed sources, and ran the controls. All three returned AMEND, with no blocking finding. A fourth read the revision +back and returned AMEND, again with no blocking finding. Every finding is applied, and the controls comment lists them. These +are author-side reads and earn no review credit. + +**What is new.** +- **Theorem DC** (§7). `D ≤ 0.4389`. More precisely `D ≤ T₁ + T₂ + T₃` (Proposition 1), with + - `T₁ ≤ 0.0951690`, + - `T₂ = (28/15)·12^{−7/6}Γ(7/6) ∈ [0.0953758, 0.0953759]`, + - `T₃ ≤ 0.248277` (Proposition 2), + + so `D ≤ 0.438822`. This holds at #244 Theorem A's conditional scope. Numerically `D ≈ 0.07674` (note V24, Remark 1), so + the bound is one-sided and far from sharp. +- **Corollary DC1 (the model).** At #244 Theorem A's conditional scope, `Ĩ ≤ −0.17158` and `J/30 − Ĩ ≥ 0.17160`. So in + `d = 2, 3` the model value `R^∞ = Ĩ𝒮_d` of note SL's coefficient is negative, and the model value `(J/30 − Ĩ)𝒮_d` of note + C7's coefficient is positive. +- **Corollary DC2 (the torus field).** At #244 Theorem A's conditional scope, for `d ∈ {2, 3}` and every real side `L ≥ 10` + (SIDE24 included): + - `(c₃ − R_{2/3})(L) ≥ 0.1711·𝒮_d > 0`; + - `R_{2/3}(L) ≤ −0.1710·𝒮_d < 0`. + + So, by note C7's (C7.1), for each such `L` the function `ν_eld(ℓ) − cℓ^{−1/3} − c₁ℓ^{1/4} − c₂ℓ^{1/3} − ν_eld^{far,r_0^*}(ℓ)` + is positive for `0 < ℓ < ℓ₀(d, L)` and of exact order `ℓ^{2/3}`. The threshold `ℓ₀` is not quantified. Note V24's + Corollary V2 had reduced this sign to `D ≤ 0.61` for `L ≥ 24`. With the `L₀ = 10` columns of its Theorem V, the same + argument covers every `L ≥ 10` once `D < 0.6099` (in `d = 3`, using `−Ĩ_quad ≥ 0.6104056`). Theorem DC's bound meets + both conditions. +- **The route.** + - A sharper form (1.1) of #244's (4.4), with the same proof, lets the kink of `Φ` enter through `(|h| − |r|)₊`. + - Averaging over `C₃` given `(k, γ, B)` bounds `D` by three terms (Proposition 1): + - `T₁` is the line `χ₀ = 0`; + - `T₂` is the curvature slack `1/32 − 13/486` of `I_quad`'s `χ₀²` coefficient, in closed form; + - `T₃` is the kink. + - Birnbaum's Mills-ratio inequality (Lemma 3, proved here) bounds the kink's Gaussian factor by an elementary function. + - `R₂ = I₀ − q₂` is strictly decreasing, by an exact polynomial identity (Lemma 2). So every cell bound of `T₁` is an + endpoint evaluation. + - What remains is a two-dimensional and a three-dimensional integral of explicit monotone factors. Proposition 2 bounds + them by cell sums with closed-form tails. + +**Not claimed.** +- No value of `D`, `Ĩ`, `J` or note C7's coefficient: only the bounds and signs above. `T₂` alone exceeds the numerical `D`, + and a two-sided enclosure needs more (Remark 3). +- Everything about `D`, `Ĩ` and `R_{2/3}` uses `I = Φ`, that is #244's Theorem A. Theorem A is conditional on merged + author-side candidates at their stated scope: #170 Theorem E(1), [CUB] Theorem C, and [CUB]'s height identities (C8)–(C11) + with its `B = 0` paragraph (#244's disposition). Corollary DC2 also inherits the scopes of notes C7 and V24. +- Nothing for `d ≥ 4` or `L < 10` (note V24's scope). No rate, and no uniformity in `L` of the threshold `ℓ₀`: (C7.1) keeps + its `o(ℓ^{2/3})`. +- Proposition 2 is computer-assisted. The script ran on CPython 3.11.15 with libmpdec 2.5.1 (Python's `decimal`), with + directed rounding. Its rigor assumes the documented correct rounding of `exp` and `ln`, which it widens by one unit in the + last place. Square roots are verified by squaring. + +**Consumed.** +- Note V24 (main#229 6034159111; Slices A, B and C PASS): + - Theorem V's table, the `L₀ = 10` columns; + - the identity `Ĩ = Ĩ_quad + D`, with `D` as in (5.3) and `Ĩ_quad = −(112/675)Γ(1/6)12^{−1/6}` (proof of Corollary V2); + - Lemma J (`J ≥ 1/2000`); + - the absolute convergence of (5.3) (Lemma K with V24's (5.1)); + - `I_quad` (§0). +- #244 `frontiers/soft_closed_form_20261002/PROOF.md` (blob `c69f92b1`): + - Theorem A ((2.5)–(2.6)), and Remarks 1 and 4 ((2.8)); + - §3's `I₀(t) := Φ(1 − t, 8 − 12t)`, (3.3) and (3.4); + - Lemma B.1(a)'s growth bound; + - Lemma B.2(b)–(c) and the proof of (d); + - §4's `T₂(τ)`, `R₂`, and the law of `(γ, B, C₃)` and of `(t, χ₀)`. +- Note C7 (main#229 6030039377; read in every slice): Theorem C7 and (C7.1) at every `L`, for Corollary DC2. +- #242 `frontiers/soft_rejected_pairs_20261002/PROOF.md` (blob `271412db`): Theorem 1 (`𝔇 > 0`, so `𝒮_d > 0`). + +**Cited only.** +- The Monte Carlo comment main#229 6033651797 (Remark 2). +- Z. W. Birnbaum, *An inequality for Mill's ratio*, Ann. Math. Statist. 13 (1942) 245–246, for Lemma 3, which is proved + here. + +**Prior work and overlap.** +- Before drafting I read main#229 from 6033651797 (which posted the request) to 6034841394 and found no other claim on `D`. +- Note V24 (Remark 2 and *Not claimed*) leaves `D` uncertified. Its controls certify only `Γ(7/6) ≥ 0.9277`, + `12^{−1/6} ≥ 0.6608` and the constant `0.6103`. +- #244 certifies none of its §5 numbers. +- No packet on Math- `main` at `7d2f6250` encloses `Ĩ`, `D` or `J`. + +## 0. Setting + +As in #244 §4 and note V24 §5. Let `(γ, B, C₃)` be independent `N(0, 2)`, `N(0, 2)` and `N(0, 6)`. For `k > 0`, put +`t = 12kB/γ²` and `χ₀ = 576k²C₃/γ³`. +- `I` is #242's (2.5), and `Φ(c′, R)` is #244's closed form (2.5)–(2.6). For `k > 0`, `(t, χ₀)` has a density, so by Theorem A + `I(t, χ₀) = Φ(1 − t, χ₀ + 8 − 12t)` almost surely. +- `I_quad(t, χ₀) := 20/3 − 20t + (8/9)χ₀ + (52/3)t² − (4/3)tχ₀ + (13/486)χ₀²`, as in note V24 §0. +- `q₂(t) := I_quad(t, 0)`; this is #244 §4's `T₂(τ)`, renamed here to avoid a clash. +- `I₀(t) := Φ(1 − t, 8 − 12t)` (#244 §3), `R₂ := I₀ − q₂` (#244 §4), and `R₂ₑ(t) := ½(R₂(t) + R₂(−t))`. +- `D := (1/2400)∫_0^∞ k^{−8/3}e^{−12k²}E[γ⁶(I − I_quad)(t, χ₀)] dk` (note V24 (5.3)); the integral converges absolutely. +- `κ(c′) := (3c′₊)^{3/2}/6` (#244 Lemma B.2(c)). `φ` and `Q` are the standard normal density and upper tail, and + `ϑ(a) := E(Z − a)₊ = φ(a) − aQ(a)` for `a ≥ 0`. +- `s := 576√6·k²/|γ|³` is the standard deviation of `χ₀` given `(γ, B)`. + +## 1. The averaged second difference + +**Lemma 1.** For all real `c′`, `r` and `h`, the second difference `Δ₂` of #244's (4.4) satisfies + + 0 ≤ Δ₂ := ½[Φ(c′, r + h) + Φ(c′, r − h)] − Φ(c′, r) ≤ h²/32 + (κ(c′)/2)(|h| − |r|)₊. (1.1) + +Hence, for `X ~ N(0, s²)` with `s > 0`, + + 0 ≤ E[Φ(c′, r + X)] − Φ(c′, r) ≤ s²/32 + κ(c′)·s·ϑ(|r|/s). (1.2) + +*Proof.* #244's proof of Lemma B.2(d) writes + + Δ₂ = ½∫_0^{|h|}[∂_RΦ(c′, r + u) − ∂_RΦ(c′, r − u)] du. + +- *The bracket.* By Lemma B.2(b), `0 ≤ ∂_R²Φ ≤ 1/16` off `R = 0`. By (c), the derivative jumps by `κ(c′) ≥ 0` at `R = 0`, + which lies in `(r − u, r + u)` exactly when `|r| < u`. So the bracket lies between `0` and `u/8 + κ(c′)·1{|r| < u}`. In + particular `Δ₂ ≥ 0`. +- *Integration.* `½∫_0^{|h|} u/8 du = h²/32` and `½∫_0^{|h|} κ·1{u > |r|} du = (κ/2)(|h| − |r|)₊`. That is (1.1). #244's + (4.4) is the weaker `(κ/2)|h|·1{|r| < |h|}`. +- *(1.2).* `E[Φ(c′, r + X)]` is finite by #244's (2.8). As `X` is symmetric, `E[Φ(c′, r + X)] = Φ(c′, r) + E[Δ₂(c′, r, X)]`. + Then `E[X²] = s²` and `E[(|X| − |r|)₊] = 2E[(X − |r|)₊] = 2sϑ(|r|/s)`. ∎ + +## 2. The decomposition + +**Proposition 1.** `D ≤ T₁ + T₂ + T₃`, where the three integrals converge absolutely and + + T₁ := (1/2400)∫_0^∞ k^{−8/3}e^{−12k²}E[γ⁶R₂(t)] dk, + T₂ := (1/32 − 13/486)(1/2400)∫_0^∞ k^{−8/3}e^{−12k²}E[γ⁶s²] dk = (28/15)·12^{−7/6}Γ(7/6), (2.1) + T₃ := (1/2400)∫_0^∞ k^{−8/3}e^{−12k²}E[γ⁶κ(1 − t)·s·ϑ(|8 − 12t|/s)] dk. + +*Proof.* Fix `k > 0` and `(γ, B)` with `γ ≠ 0`. Then `c′ = 1 − t` and `r = 8 − 12t` are fixed, and `χ₀ ~ N(0, s²)`. +- *Theorem A.* For this fixed `t`, the curve `Δ` meets the line `{t} × R` in at most two points. So Theorem A gives + `I(t, χ₀) = Φ(c′, r + χ₀)` for all but finitely many `C₃`. +- *The bound.* By (1.2) and `Φ(c′, r) = I₀(t)`, + + E_{C₃}[I(t, χ₀)] ≤ I₀(t) + s²/32 + κ(1 − t)·s·ϑ(|8 − 12t|/s). + + Also `E_{C₃}[I_quad(t, χ₀)] = q₂(t) + (13/486)s²`, since `χ₀` is centred. Subtract, multiply by `γ⁶ ≥ 0`, and integrate + over `(γ, B)` and then `k`. +- *Fubini applies:* + - `D`'s integrand is absolutely integrable (note V24). + - `|R₂(t)| ≤ C|t|³`: near `0` by #244's (3.4), and elsewhere by Lemma B.1(a)'s `|R₂(τ)| ≤ C_R(1 + |τ|³)`. Also + `E[γ⁶|t|³] = 1728k³E|B|³`. + - `γ⁶s² = 1990656k⁴`. + - `κ(1 − t) ≤ C(1 + |t|^{3/2})` and `ϑ ≤ φ(0)`, so `γ⁶κs ≤ Ck²(|γ|³ + (12k|B|)^{3/2})`. + + In each case `k^{−8/3}e^{−12k²}` times the bound is integrable on `(0, ∞)`. +- *The closed form.* `∫_0^∞ k^{4/3}e^{−12k²}dk = ½·12^{−7/6}Γ(7/6)`, and `(1/32 − 13/486)·1990656/(2·2400) = 28/15` (C, group + T2). ∎ + +## 3. The line `χ₀ = 0` + +**Lemma 2.** +- (a) `R₂` is strictly decreasing on `R`, and `R₂(0) = 0`. +- (b) For every `t ≥ 0`, `R₂ₑ(t) ≤ U(t) := (2/3)t³ + (3√3/2)t^{5/2} + (5√3/2)t^{3/2} + √3·t^{1/2}` and `R₂ₑ(t) ≤ 10t³`. + +*Proof.* (a) For `t ≤ 2/3`, write the first line of #244's (3.3) as `R₂ = P₀ + P₁S − q₂`. Here `S = √(1 − 4t/3)`, +`P₀(t) = 11/3 − 21t/2 + 17t²/2 − 4t³/3` and `P₁(t) = (3/2)(1 − t)(2 − 3t)`. +- *`t < 2/3`.* Here `S ∈ (1/3, ∞)` and `t = 3(1 − S²)/4`. Since `dS/dt = −2/(3S)`, + `16S·R₂′ = 16S·P₀′ + 16S²·P₁′ − (32/3)P₁ − 16S·q₂′`. Substituting `t = 3(1 − S²)/4` gives the polynomial identity (C, + group R2_monotone) + + 16S·R₂′(t) = (S − 1)²W(S), W(S) := −36S³ − 207S² − 94S + 1. (3.1) + + `W′ < 0` on `S ≥ 0`, and `W(1/3) = −164/3`. So `R₂′ < 0` on `t < 2/3`, except at `t = 0` (`S = 1`). +- *`2/3 < t < 1`.* `R₂′ = (2t − 1)(3 − 2t) + 20 − (104/3)t = 21 − 4(t − 1)² − (104/3)t ≤ 21 − 208/9 < 0`. +- *`t > 1`.* `R₂′ = 1 + 20 − (104/3)t < 0`. + +`R₂` is continuous: the pieces of #244's (3.3) agree at `2/3` and at `1` (C). And `R₂(0) = 11/3 + 3 − 20/3 = 0`. + +(b) By (a), `R₂(t) ≤ 0` for `t ≥ 0`, so `R₂ₑ(t) ≤ ½R₂(−t)`. +- *`U`.* For `t ≥ 0`, the first line of #244's (3.3) applies at `−t`: + + R₂(−t) = −3 − (19/2)t − (53/6)t² + (4/3)t³ + (3/2)(1 + t)(2 + 3t)·S₊, S₊ = √(1 + 4t/3) ≤ 1 + (2/√3)√t. + + The factor `(3/2)(1 + t)(2 + 3t)` is positive, so + `R₂(−t) ≤ (4/3)t³ − (13/3)t² − 2t + √3(2t^{1/2} + 5t^{3/2} + 3t^{5/2})`. Dropping `−(13/3)t² − 2t` gives `2U(t)`. +- *`10t³`, for `t ≥ 1`.* `U(t) ≤ (2/3 + 5√3)t³ ≤ 9.33t³`. +- *`10t³`, for `0 ≤ t ≤ 1`.* By (3.1) at `−u`, `|R₂′(−u)| = (S₊ − 1)²|W(S₊)|/(16S₊)`, with `S₊ = √(1 + 4u/3) ∈ [1, √(7/3)]`. + - So `16S₊ ≥ 16` and `S₊ − 1 ≤ 2u/3`. + - Since `W` decreases, `|W(S₊)| ≤ |W(√(7/3))| = 178√(7/3) + 482 ≤ 755`. + - Hence `R₂(−t) ≤ (755/108)t³ ≤ 7t³`, and `R₂ₑ(t) ≤ 3.5t³`. ∎ + +## 4. The kink factor + +**Lemma 3 (Birnbaum's bound).** For `a ≥ 0`, `Q(a) ≥ 2φ(a)/(a + √(a² + 4))`. Hence + + ϑ(a) ≤ θ⁺(a) := 2φ(a)/(2 + a² + a√(a² + 4)) ≤ φ(a) ≤ φ(0). (4.1) + +`θ⁺` is decreasing. For `r ≥ 0`, `s ↦ s·θ⁺(r/s)` is nondecreasing on `s > 0`, and `r ↦ s·θ⁺(r/s)` is nonincreasing. + +*Proof.* Let `ω := √(x² + 4)`, `b(x) := (ω − x)/2 = 2/(x + ω)` and `h := Q − φb`. +- *`h > 0`.* With `φ′ = −xφ`, `h′ = φ·(−1 + xb − b′) = φ·(x³ + 3x − (x² + 1)ω)/(2ω)`. Since + `(x² + 1)²(x² + 4) − x²(x² + 3)² = 4` (C, group mills), `(x² + 1)ω > x³ + 3x ≥ 0` on `x ≥ 0`. So `h′ < 0`. As `h(x) → 0` + for `x → ∞`, `h > 0` on `[0, ∞)`. +- *(4.1).* `ϑ(a) = φ(a) − aQ(a) ≤ φ(a)(1 − a·b(a)) = φ(a)(2 + a² − aω)/2`, and `(2 + a²)² − a²(a² + 4) = 4` (C) turns this + into `θ⁺(a)`. `θ⁺ ≤ φ` because its denominator is at least `2`. +- *Monotonicity.* `θ⁺` is a product of positive decreasing factors. For `r > 0`, `s·θ⁺(r/s) = r·θ⁺(a)/a` with `a = r/s`, and + `θ⁺(a)/a` decreases in `a`. For `r = 0` it is `s·φ(0)`. ∎ + +## 5. The integrals in the variables `(τ, g, t)` + +Write `p(x) := (4π)^{−1/2}e^{−x²/4}` and `m_q(g) := g^q e^{−g²/4}`. `m_q` is log-concave on `g > 0`, with maximum at `g² = 2q`. + +**Lemma 4.** Let + + M(τ) := (2/√(4π))∫_0^∞ m_{8/3}(g)e^{−12τ²g⁴} dg, N(τ) := ∫_0^∞ m_{11/3}(g)e^{−12τ²g⁴} dg, + K(τ) := ∫_{−∞}^1 e^{−t²/(576τ²)}κ(1 − t) dt. + +Then `M` and `N` decrease in `τ`, `K` increases, and + + T₁ = ∫_0^∞dτ ∫_0^∞dt A₁·τ^{−11/3}M(τ)e^{−t²/(576τ²)}·R₂ₑ(t), A₁ := 1/(14400√(4π)), (5.1) + T₃ = ∫_0^∞dτ ∫_0^∞dg ∫_{−∞}^1dt A₃·τ^{−11/3}m_{8/3}(g)e^{−12τ²g⁴}e^{−t²/(576τ²)}κ(1 − t)·s·ϑ(|8 − 12t|/s), (5.2) + +with `s = 576√6·τ²g` in (5.2) and `A₃ := 1/(57600π)`. (The script calls `A₁` and `A₃` `C1` and `C3`.) + +*Proof.* The set `γ = 0` is null. Fix `γ ≠ 0` and substitute `k = τγ²`. +- *The substitution.* `γ⁶k^{−8/3}dk = τ^{−8/3}|γ|^{8/3}dτ` and `e^{−12k²} = e^{−12τ²γ⁴}`. Also `t = 12τB` and `s = 576√6·τ²|γ|`. +- *The densities.* In `t`, `B` has density `p(t/(12τ))/(12τ)`. An even function of `γ` has `E = 2∫_0^∞p(g)(·)dg`. +- *(5.1).* `B ↦ −B` replaces `R₂` by `R₂ₑ` on `t ≥ 0`, with a factor `2`. The constant is `(1/2400)·2·(4π)^{−1/2}/12 = A₁`, and + the extra `τ^{−1}` turns `τ^{−8/3}` into `τ^{−11/3}`. +- *(5.2).* The constant is `(1/2400)·2(4π)^{−1/2}·(4π)^{−1/2}/12 = A₃`. +- *The order of integration.* It may be changed: by Tonelli for `T₃`, whose integrand is nonnegative, and for `T₁` by + Proposition 1's absolute convergence. +- *Monotonicity.* This is that of the integrands. ∎ + +## 6. The enclosure + +**Proposition 2.** `T₁ ≤ 0.0951690` and `T₃ ≤ 0.248277`. + +*Proof (computer-assisted; §9).* Every bound below is evaluated in decimal arithmetic with 24 significant digits, and each +operation is rounded in the safe direction. + +**Cell bounds.** On a box, each factor of (5.1) or (5.2) is monotone in each variable: +- `τ^{−11/3}`, `M` and `N` decrease in `τ`; `e^{−t²/(576τ²)}` increases in `τ` and decreases in `|t|`; `e^{−12τ²g⁴}` + decreases in `τ` and in `g`; +- `m_q` is unimodal; `κ(1 − t)` decreases in `t`; +- `s·θ⁺(|8 − 12t|/s)` increases in `s` and decreases in `|8 − 12t|` (Lemma 3); +- `sup_{[t₀, t₁]} R₂ₑ ≤ ½(R₂(t₀) + R₂(−t₁))` for `0 ≤ t₀ ≤ t₁` (Lemma 2(a)). + +So on a box, the integrand's supremum is at most the product of the factors' suprema. Each supremum is taken at a known corner, +or, for `m_q`, at its peak if the peak lies in the cell. `ϑ` is replaced by `θ⁺` (Lemma 3). The box's integral is at most its +volume times that product. In `T₁`, a cell whose `R₂ₑ`-bound is negative uses the infimum of the weight instead, which is +still an upper bound. + +**The partitions.** +- *`T₁`.* + - `τ` runs from `10⁻⁴` to `τ_N = 1002.77`, each point `1.02` times the last, rounded up to 6 significant digits (814 cells). + - `t` runs over `0`, then a geometric grid of ratio `1.01` from `10⁻⁷`. + - On the `τ`-cell `[τ_a, τ_b]` the `t`-cells cover `[0, 12τ_bβ_H]`, with `β_H = 9`; the cells below `0.012τ_a` are merged + into one. +- *`T₃`, `τ ∈ [0.002, 2.00809]`.* The cells are three-dimensional, with `τ`-ratio `1.02` (349 cells). + - `g` covers `[0, G]` in 48 equal cells, with `G = min(14, 3(12τ_a²)^{−1/4})` rounded up. + - `t` covers `[−12τ_bβ_H, 1]` on one fixed grid: step `0.005` on `[−1, 1]`, and relative step `2%` below `−1`. + - `θ⁺` is read from a decreasing table at `a = j/200`, `j ≤ 8000`, at the largest node `≤ a`. +- *`T₃`, `τ ∈ [2.00809, 1008.04]`.* Here `ϑ ≤ φ(0)`, so the integrand is at most + `A₃φ(0)·576√6·τ^{−5/3}·m_{11/3}(g)e^{−12τ²g⁴}·e^{−t²/(576τ²)}κ(1 − t)`. On a `τ`-cell this integrates to at most + `A₃φ(0)576√6·τ_a^{−5/3}N(τ_a)K(τ_b)(τ_b − τ_a)`. The `τ`-ratio is `1.02` (314 cells). +- *One-dimensional factors.* `M`, `N` and `K` are bounded by the same kind of monotone cell sums (`200` or `280` equal + `g`-cells, or the `t`-grid), each with a closed-form tail. `M` is enclosed from both sides. + +**The tails.** These are closed-form bounds; each uses the moments `∫_0^∞e^{−u²/V}u^n du = ½V^{(n+1)/2}Γ((n+1)/2)`. The Gamma +values are bounded crudely: `Γ ≤ 1` on `[1, 2]`, `Γ(3/4) ≤ 4/3`, `Γ(11/12) ≤ 12/11` and `Γ(7/3) ≤ 4/3`. +- *`t` beyond the grid.* For `t ≥ T ≥ 12τ_bβ_H` and `τ ≤ τ_b`, + `e^{−t²/(576τ²)} ≤ e^{−β_H²/8}e^{−t²/(1152τ_b²)}`. + - In `T₁`, use `R₂ₑ ≤ U` or `R₂ₑ ≤ 10t³` (Lemma 2(b)), whichever gives the smaller tail. + - In `T₃`, use `κ(1 + u) ≤ (3^{3/2}/6)(u^{3/2} + (3/2)(1 + u^{1/2}))` and `ϑ ≤ φ(0)`. +- *`g` beyond `G`.* + `∫_G^∞ m_q e^{−12τ²g⁴} ≤ min(e^{−G²/8}·½8^{(q+1)/2}Γ((q+1)/2), e^{−6τ²G⁴}·¼(6τ²)^{−(q+1)/4}Γ((q+1)/4))`. It is + combined with `K ≤ K̄`, where `K̄(τ) := (3^{3/2}/6)[1 + ½(24τ)^{5/2}Γ(5/4) + (3/4)(24τ√π + (24τ)^{3/2}Γ(3/4))]`. +- *`τ < 10⁻⁴` in `T₁`.* Use `R₂ₑ ≤ 10t³` and `M ≤ M(0) = 2^{8/3}Γ(11/6)/√π`. This gives + `≤ 10·A₁M(0)·½·576²·(3/4)·(10⁻⁴)^{4/3}`. +- *`τ > τ_N` in `T₁`.* Use `R₂ₑ ≤ U` and `M(τ) ≤ (2/√(4π))·¼·12^{−11/12}Γ(11/12)·τ^{−11/6}`. The four powers of `U` then + integrate in closed form. +- *`τ < τ_L = 0.002` in `T₃`.* With `κ(2/3) = 2^{3/2}/6` and `N(0) = ½4^{7/3}Γ(7/3)`: + - (a) for `t ∈ (1/3, 1]`, the bound is `A₃φ(0)576√6·N(0)·(2/3)κ(2/3)·∫_0^{τ_L}τ^{−5/3}e^{−1/(5184τ²)}dτ`; + - (b) for `t ≤ 1/3`, `|8 − 12t| ≥ 4`, so `s·ϑ ≤ s·φ(4/s)`, and `g²/8 + 8/(576√6τ²g)² ≥ 2/(576√6τ²)`. The bound is + `A₃φ(0)576√6·½8^{7/3}Γ(7/3)·K̄(τ_L)·∫_0^{τ_L}τ^{−5/3}e^{−2/(576√6τ²)}dτ`. + + Both integrands increase on `(0, τ_L]`, by the conditions `τ_L² < 6/(5·5184)` and `5·576√6τ_L² < 12` (group tails). So + each integral is at most `τ_L^{−2/3}` times its exponential at `τ_L`. The total is below `10⁻²⁰`. +- *`τ > 1008.04` in `T₃`.* Use `N(τ) ≤ ¼(12τ²)^{−7/6}Γ(7/6)` and `K ≤ K̄`. + +**The result.** The script finds (each part rounded up separately): +- `T₁`: cells `0.0923349`, tails `0.0028342`; total `0.0951690`. +- `T₃`: three-dimensional cells `0.169987`, separable part `0.0748797`, tails `0.0034105`; total `0.248277`. + +**What the controls check.** +- *The constants (group lemma4).* + - Lemma 4's rational parts `A₁√(4π) = (1/2400)·2/12` and `A₃π = (1/2400)·2/12/4` are checked exactly, with the exponent + bookkeeping. + - The defining identities of `A₁`, `A₃`, `576√6` and `φ(0)` are checked in interval arithmetic, written independently of + the lines that build the constants (mutants M11, M15 and M18). +- *The cell code (group corners).* + - The production loops record the factors they actually use on sampled cells: + - five `τ`-cells of `T₁`, six `t`-cells each; + - five `τ`-cells of the three-dimensional part of `T₃`, with five `t`-cells and four `g`-cells each; + - three `τ`-cells of the separable part, with four `t`-cells each. + - After the run, each recorded factor is compared with an independent enclosure of the matching factor of the integrand, + at the cell's corners, edge midpoints and centre: 3,640 one-sided checks. + - This catches a wrong corner, inside a helper or at a call site (mutants M13, M14, M16 and M17). +- *The normalizations.* The machinery, run on simpler integrands, must bracket closed forms. + - `t²` in place of `R₂ₑ` in (5.1) brackets `(1/2400)∫k^{−8/3}e^{−12k²}E[γ⁶t²]dk = (576/4800)12^{−1/6}Γ(1/6) = 0.4414541`. + - `s` in place of `κ(1 − t)·s·ϑ(|8 − 12t|/s)` (that is, `κ = ϑ = 1`), with `t` over all of `R`, in (5.2): separate + three-dimensional and separable loops bracket `(576√6/2400)(8/√π)·½·12^{−1/6}Γ(1/6) = 4.8806340`. + - The `t`-cells bracket `∫e^{−t²/(576τ²)}dt = 24τ√π` at five values of `τ`. + + These brackets are wide, with upper/lower ratios `2.14`, `2.59` and `1.56`. They catch an error by a factor outside about + `[0.74, 1.59]` in `A₁` or `M`, or outside `[0.875, 1.37]` in `A₃·576√6` (mutants M4, M5 and M10). +- *The printed numbers.* Group assembly asserts every certified number, so any change that raises one fails. +- *What no control cross-checks.* + - The tails, which total `0.0062`. They rest on the derivations above and on Slice C's reading. + - Cells that are not sampled. The loops treat every cell alike, so a uniform error would show up on the samples. + - The correctness of libmpdec. ∎ + +## 7. Proofs of Theorem DC and the corollaries + +*Theorem DC.* By Propositions 1 and 2, `D ≤ 0.0951690 + 0.0953759 + 0.248277 ≤ 0.438822` (group assembly; the parts are +rounded up separately). ∎ + +*Corollary DC1.* By note V24, `Ĩ = Ĩ_quad + D`, with `−Ĩ_quad = (112/675)Γ(1/6)12^{−1/6} ∈ [0.6104056, 0.6104057]` (from +`Γ(1/6)`'s series enclosure). So `Ĩ ≤ −0.6104056 + 0.438822 = −0.1715836 ≤ −0.17158`. With `J ≥ 1/2000` (note V24, Lemma J), +`J/30 − Ĩ ≥ 1/60000 + 0.1715836 ≥ 0.1716002 ≥ 0.17160`. `𝒮_d > 0` by #242's Theorem 1 (group corollary). ∎ + +*Corollary DC2.* Note V24's Theorem V at `L₀ = 10` gives: +- `|c₃(L) − (J/30)𝒮_d| ≤ η_c𝒮_d` and `|R_{2/3}(L) − Ĩ𝒮_d| ≤ η_R𝒮_d`; +- `(η_c, η_R) = (1.97·10⁻⁷, 4.97·10⁻⁴)` in `d = 3` and `(5.88·10⁻⁹, 7.81·10⁻⁶)` in `d = 2`. + +So `(c₃ − R_{2/3})(L) ≥ (0.1716002 − η_c − η_R)𝒮_d ≥ 0.1711𝒮_d` and `R_{2/3}(L) ≤ (−0.1715836 + η_R)𝒮_d ≤ −0.1710𝒮_d` (group +corollary). Note C7's Theorem C7 holds at every `L`, and (C7.1) gives + + ν_eld(ℓ) − cℓ^{−1/3} − c₁ℓ^{1/4} − c₂ℓ^{1/3} − ν_eld^{far,r_0^*}(ℓ) = (c₃ − R_{2/3})(L)·ℓ^{2/3} + o(ℓ^{2/3}). + +The coefficient is positive. So for each such `L` the left side is positive for `0 < ℓ < ℓ₀(d, L)` and is +`∼ (c₃ − R_{2/3})(L)ℓ^{2/3}`; `ℓ₀` is not quantified. ∎ + +## 8. Remarks + +1. **Where the bound is lost.** Numerically (exploration, outside the repository; Slice A of the author-side referee): + - `T₁ ≈ 0.04357` and `T₃ ≈ 0.15569`, or `T₃ ≈ 0.16514` with `θ⁺` in place of `ϑ`; `D ≈ 0.07674`. + - The decomposition costs `T₁ + T₂ + T₃ − D ≈ 0.218`, and all of it is curvature. After averaging, Lemma 1's kink term is + exact. The distributional second derivative of `Φ(c′, ·)` is `∂_R²Φ(c′, R)dR + κ(c′)δ₀` (B.2(b)–(c)), and the + Taylor formula gives + + E[Φ(c′, r + X)] − Φ(c′, r) = s²∫_R ∂_R²Φ(c′, r + sv)ϑ(|v|) dv + κ(c′)·s·ϑ(|r|/s). + + So `T₃` is exactly the kink's share of `D`. The loss is `∂_R²Φ ≤ 1/16`, against a weighted mean of `∂_R²Φ` close to + `1/24` (its value at large `|R|`). This identity is not used in the proof. + - The cell sums add about `0.05` to `T₁`, whose cells keep the positive and negative parts of `R₂ₑ` apart. They add about + `0.08` to `T₃` beyond `θ⁺`, and `θ⁺` itself adds `0.009`. +2. **Monte Carlo.** On `[10⁻⁴, 3·10⁻²]` the field-level Monte Carlo of 6033651797 prefers the four-term law, which has C7's + positive model coefficient, over the three-term law (χ² 84 → 23 in `d = 3`, 44 → 7 in `d = 2`). Corollary DC2 proves the + sign; it says nothing about the fitted values. +3. **Toward a value.** A two-sided enclosure of `D`, and so a value of note C7's coefficient, could go two ways. + - *Direct.* Cubature of `I − I_quad`, with cells at the kinks `χ₀ = 12t − 8` and `t = 2/3` and at the curve `Δ`. + - *Through Remark 1's identity.* It gives `D = T₁ + T₃ − (1990656/4800)∫_0^∞k^{4/3}e^{−12k²}(13/243 − A(k))dk`. Here + `A(k) := E[∂_R²Φ(1 − t, 8 − 12t + sV)]`, taken over `(γ, B)` at fixed `k` and an independent `V` with density + `2ϑ(|v|)`. `∂_R²Φ` is bounded (Lemma B.2(b)), and it is scale-invariant by #244's Corollary A.2(c), + `Φ(λ²c′, λ³R) = λ⁶Φ(c′, R)`. This route needs no cells at the kink. + + Either way, a value also needs an enclosure of note C3's `J`. Note V24 had already called a sign bound a low-precision + task, since the numerical margin is a factor of about 8. +4. **What changed downstream.** Note V24's *Not claimed* said that "the sign of note C7's coefficient at `L = 24` is not + proved here". It is now proved, at #244 Theorem A's conditional scope, for every `L ≥ 10`. So at SIDE24 the fourth term + of note C7's elder law is positive and of exact order `ℓ^{2/3}`. + +## 9. Controls (`dc_exact.py`; standard library; deterministic; byte-identical under `-O`) + +`python3 -B -S dc_exact.py` and `python3 -B -O -S dc_exact.py` exit `0`. Each prints the same 1117-byte stdout, one JSON line +and its newline, with SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. Each run takes about 55 s. The script is 47,023 bytes, +SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`, and it is in the controls comment. The arithmetic is outward-rounded decimal, not exact rational. The +identities are checked in exact rationals. + +| Group | What it checks | +|---|---| +| pi, gamma | `π` by Machin's formula in exact rationals. `Γ(a)` for ten values of `a`, by the alternating series of `γ(a, 50)` (220 exact terms; the terms decrease from `n = 49`), plus `0 ≤ Γ(a, 50) ≤ 50^{a−1}e^{−50}` for `a ≤ 1` and `≤ 50^{a−1}e^{−50}/(1 − (a − 1)/50)` for `1 < a ≤ 3`. `Γ(1) = Γ(2) = 1` and `Γ(½)² = π` are enclosed, and so are the crude Gamma bounds of §6 | +| R2_formula | the pieces of #244's (3.3) agree at `2/3` and `1`; `R₂(0) = 0`; `R₂(t)/t³ ∈ (−3.2, −3.0)` at `t = 10⁻³, 10⁻²` | +| R2_monotone | the identity (3.1); `W(1/3) < 0` and `W′ ≤ 0`; the derivatives on `(2/3, 1)` and `(1, ∞)`, as polynomials, and their bounds | +| R2_majorant | the expansions of `R₂(−t)` and `P₁(−t)` in Lemma 2(b); `|W(√(7/3))| ≤ 755`; `(1 + 2u/3)² − (1 + 4u/3) = 4u²/9`; `(4/9)(755/16)/3 = 755/108 ≤ 7`; `2/3 + 5√3 ≤ 10` | +| mills | `(x² + 1)²(x² + 4) − x²(x² + 3)² = 4`, `(x² + 2)² − x²(x² + 4) = 4`, and Lemma 3's two reductions modulo `ω² = x² + 4` | +| theta_table | the table is decreasing; at eleven test points, `θ⁺(a)` is below its table entry | +| T2 | `(1/32 − 13/486)·1990656/4800 = 28/15`; `T₂ ∈ [0.0953758, 0.0953759]` | +| lemma4 | Lemma 4's exponent bookkeeping and rationals `A₁√(4π) = 1/14400`, `A₃π = 1/57600` (exactly); `A₁²·14400²·4π`, `A₃·57600π`, `(576√6)²/(576²·6)` and `φ(0)²·2π` all enclose `1` | +| gstar | the peaks of `m_{8/3}` and `m_{11/3}` at `g² = 16/3` and `22/3` | +| g_machinery | the `g`-cell enclosures of `M(0⁺)` and `N(0⁺)` contain `2^{8/3}Γ(11/6)/√π` and `½4^{7/3}Γ(7/3)` | +| corners | after the run: every factor the production loops used on a sampled cell dominates (for a negative `T₁` cell, the weight is dominated by) the integrand's matching factor at the cell's corners, edge midpoints and centre (§6) | +| T1_moment, T3_moment, t_machinery | the normalization brackets of §6 | +| partition | every grid increases; consecutive cells share endpoints; every `t`-range reaches `12τ_bβ_H` | +| tails | the monotonicity conditions used for `τ < 0.002` | +| assembly | `T₁ ≤ 0.0951690`, `T₃ ≤ 0.248277`, `D ≤ 0.438822 ≤ 0.61` | +| corollary | `−Ĩ_quad ∈ [0.6104056, 0.6104057]`; `Ĩ ≤ −0.17158`; `J/30 − Ĩ ≥ 0.17160`; for `d = 2, 3`, the coefficient `≥ 0.1711` and `R_{2/3} ≤ −0.1710` (in units of `𝒮_d`). Lower bounds are printed rounded down, upper bounds rounded up | + +Eighteen mutants each exit `1`, with empty stdout and `FAILED: ` on stderr: + +| Mutant | Change | Group | +|---|---|---| +| M1 | `−207 → −206` in `W` | R2_monotone | +| M2 | `x² + 4 → x² + 3` in Lemma 3's identity | mills | +| M3 | `13/486 → 13/480` | T2 | +| M4 | `A₁` doubled | T1_moment | +| M5 | `A₃` doubled | T3_moment | +| M6 | `17/2 → 8` in `P₀` | R2_formula | +| M7 | one `τ`-cell of `T₁` skipped | partition | +| M8 | Gamma series truncated at 20 terms | gamma | +| M9 | table index rounded up | theta_table | +| M10 | `M`'s factor `2/√(4π) → 2/(4π)` | g_machinery | +| M11 | `576√6 → 576√3` | lemma4 | +| M12 | `T₁`'s `t`-range halved | partition | +| M13 | `s` taken at `τ_a` instead of `τ_b` | corners | +| M14 | `κ(1 − t)` taken at the right end of the `t`-cell | corners | +| M15 | `12 → 6` in `A₁`'s rational | lemma4 | +| M16 | `T₁`'s `τ`-factor taken at `τ_b` | corners | +| M17 | the three-dimensional loop passes the `g`-cells' `θ⁺` indices in reverse order (a call-site error) | corners | +| M18 | `φ(0) = 1/√(2π) → 1/√(4π)` | lemma4 | + +Invalid invocations exit `2` with `usage: dc_exact.py [--mutant M1..M18]`: `M0`, `M19`, a bare `--mutant`, an extra argument, +and an unknown flag. + +## 10. Review slices + +- **A: §§0–2 and §4.** Lemma 1, Proposition 1 (the decomposition, Fubini and `T₂`'s closed form) and Lemma 3. Groups mills + and T2; mutants M2 and M3. +- **B: §§3 and 5.** Lemma 2 (monotonicity and the majorants) and Lemma 4 (the change of variables, the constants `A₁` and + `A₃`, and the monotonicity of `M`, `N` and `K`). + - Groups R2_formula, R2_monotone, R2_majorant, lemma4, T1_moment and T3_moment. + - Mutants M1, M4, M5, M6, M11, M15 and M18. +- **C: §§6–7, the header and the controls.** + - Proposition 2: the cell bounds, the partitions, every tail and the rigor of the arithmetic. + - Theorem DC and Corollaries DC1–DC2, against note V24's table and note C7. + - The remaining groups; mutants M7–M10, M12–M14, M16 and M17. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/READ_REQUEST_SLICE_A_SUMMONS.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/READ_REQUEST_SLICE_A_SUMMONS.md new file mode 100644 index 00000000..31388dc9 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/READ_REQUEST_SLICE_A_SUMMONS.md @@ -0,0 +1,47 @@ +@cursor **One bounded nonauthor mathematical read of lifetime note DC, Slice A, is requested** under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Summoned by the author, Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`), for Dylan Roy (delegated AI work). Scientific effect NONE. Read only: edit no repository, open no PR, start no timer or loop. If GitHub refuses a new comment, edit your pickup comment. You are the reader for **Slice A** only (§§0–2 and §4: Lemma 1, Proposition 1, Lemma 3); the other slices are summoned separately. + +**Frozen objects.** "Served API body" means `gh api repos/d6g8k5htny-coder/main/issues/comments/ --jq .body` with its one trailing newline removed. Please hash both bodies before and after the read. +- The note [6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875): served API body 32,514 B, SHA-256 `1fcc3ea335516095308aeaf83280dda8e484b6d484eb7d3b4ffc7115dd4455f4`. +- The controls [6037458253](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253): served 54,184 B, SHA-256 `59c295daf4d4a1fea8d36d7b72ff306c2f457a11dbb795892482bdd1e68a689d`. The extraction rule is stated there. + - The script `dc_exact.py` is 47,023 B, SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`. + - Its stdout is 1,117 B, SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. + - One run takes about 55 s per mode. + +**Sources.** The consumed packets are on Math- `main` at `7d2f62500ad6effba2bbdf6f3b89b0826408dc4a`: +- #244 `frontiers/soft_closed_form_20261002/PROOF.md` (blob `c69f92b1`): Theorem A with (2.5)–(2.6); Remarks 1 and 4; §3's (3.3)–(3.4) and Corollary A.2; §4's Lemma B.1(a), Lemma B.2 with the proof of (d), and the law of `(γ, B, C₃)`. +- #242 `frontiers/soft_rejected_pairs_20261002/PROOF.md` (blob `271412db`): Theorem 1. +- Notes V24 ([6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): Theorem V's table, (5.3), Lemma J, Corollary V2) and C7 ([6030039377](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6030039377): Theorem C7, (C7.1)) are on this issue. + +**Three bounded slices, one reader per slice.** Please claim first, with a pickup naming the two body SHAs. Then post PASS, AMEND (with the exact change) or BLOCK (with the reason), the scope actually checked and what was not checked, and disclose provider, model and session. +- **Slice A: §§0–2 and §4.** + - §0's definitions against note V24 (5.3) and #244 §§3–4. + - Lemma 1: is (1.1) what #244's proof of Lemma B.2(d) gives, including the edge cases? Is (1.2) right, with `E(|X| − |r|)₊ = 2sϑ(|r|/s)`? + - Proposition 1: the conditioning on `(k, γ, B)`, Theorem A off finitely many `C₃`, Fubini, and the closed form `T₂ = (28/15)12^{−7/6}Γ(7/6)`. + - Lemma 3 (Birnbaum's bound, proved in the note) and its monotonicity claims. + - Groups mills and T2; mutants M2 and M3. Run both modes. +- **Slice B: §§3 and 5.** + - Lemma 2: the identity (3.1) from #244's (3.3), the strict monotonicity of `R₂`, and the majorants `U` and `10t³`. + - Lemma 4: the change of variables `k = τγ²`, the constants `A₁ = 1/(14400√(4π))` and `A₃ = 1/(57600π)`, and the monotonicity of `M`, `N` and `K`. + - The normalization targets of §6. + - Groups R2_formula, R2_monotone, R2_majorant, lemma4, T1_moment and T3_moment; mutants M1, M4, M5, M6, M11, M15 and M18. +- **Slice C: §§6–7, the header and the controls.** + - Proposition 2: the cell bounds against the monotonicity facts, the partitions, every tail, and the rigor of the decimal arithmetic (directed rounding, the `exp` and `θ⁺` tables, the Gamma series). + - Theorem DC, and Corollaries DC1–DC2 against note V24's table and note C7. + - The header, checked for overclaim. + - The remaining groups, including `corners`; mutants M7–M10, M12–M14, M16 and M17; the invalid invocations. + +**What a PASS of all three slices would and would not do.** +- Theorem DC would certify `D ≤ 0.4389` at #244 Theorem A's conditional scope. +- With note V24, it would give the signs: + - note C7's `ℓ^{2/3}` coefficient `c₃ − R_{2/3}` is positive at every side `L ≥ 10` in `d = 2, 3`, SIDE24 included, and is at least `0.1711𝒮_d`; + - `R_{2/3}` is negative there. +- No value of `D`, `Ĩ`, `J` or of the coefficient is certified, and no rate is claimed. +- Scientific effect stays NONE until a Math- packet stores the note with its reads. No status, flag, premise or prize changes. + +Claim [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581) stays open for successor text until the three reads are complete. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_A.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_A.md new file mode 100644 index 00000000..1ca7bec4 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_A.md @@ -0,0 +1,30 @@ +**PASS** on lifetime note DC, Slice A only (§§0–2 and §4: Lemma 1, Proposition 1, Lemma 3). + +GitHub returned HTTP 403 (`Resource not accessible by integration`, accepted permission `issues=read`) on a new issue comment and on an edit of the acknowledgement [6037466169](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037466169). This message is the pickup and the verdict. No repository edit, no pull request, no timer. + +Dylan Roy — delegated AI review. Actual reader **xAI / Grok 4.7** (`grok-4.7-high-fast`), Cursor session `bc-407bdca8-dd99-4d7c-891b-5d6d763ee6f5`. Nonauthor of note DC. Summoned by Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`) under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Scientific effect NONE. Organizational-independence credit 0 under the shared-account rule. Personal reading PENDING. + +**Frozen bodies.** Hashed before the read and again after it (`gh api … --jq .body`, one trailing newline removed). Both unchanged: +- Note [6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875): 32,514 B, SHA-256 `1fcc3ea335516095308aeaf83280dda8e484b6d484eb7d3b4ffc7115dd4455f4`. +- Controls [6037458253](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253): 54,184 B, SHA-256 `59c295daf4d4a1fea8d36d7b72ff306c2f457a11dbb795892482bdd1e68a689d`. + +Extracted `dc_exact.py` is 47,023 B, SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`. Its stdout is 1,117 B, SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. + +**Sources read.** Math- `7d2f62500ad6effba2bbdf6f3b89b0826408dc4a`. #244 `PROOF.md` is blob `c69f92b1076399fb9f8917bb273e15348b0a497e` (58,898 B). I read Theorem A with (2.5)–(2.6), Remarks 1 and 4 including (2.8), §3’s definition of `I₀`, (3.3)–(3.4) and Corollary A.2, and §4’s law of `(γ, B, C₃)`, Lemma B.1(a) and Lemma B.2 with the proof of (d) and (4.4). From note V24 [6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111) I read §0’s `I_quad` and `Δ`, and (5.3) together with the absolute-convergence bound (5.1) through Lemma K. + +**§0.** The triple `(γ, B, C₃)` is #244 §4’s law, and `t = 12kB/γ²`, `χ₀ = 576k²C₃/γ³` match that section and V24 (5.3). `I` is #242’s (2.5) as #244 quotes it, and `Φ` is (2.5)–(2.6). For `k > 0` the map `(B, C₃) ↦ (t, χ₀)` is a smooth bijection on `γ ≠ 0`, so `(t, χ₀)` has a density; `Δ = {(χ₀ + 8 − 12t)² = 64(1 − t)³}` is a curve, and Theorem A gives `I = Φ(1 − t, χ₀ + 8 − 12t)` almost surely. `I_quad` is V24 §0’s polynomial, `q₂(t) = I_quad(t, 0)` is #244’s `T₂(τ)`, `I₀` and `R₂` are §3–§4, and `D` is V24 (5.3) verbatim. `κ(c′) = (3c′₊)^{3/2}/6` is Lemma B.2(c). Given `(γ, B)`, `χ₀` is centred Gaussian with variance `576²·6·k⁴/|γ|⁶`, so `s = 576√6·k²/|γ|³`. For `a ≥ 0`, `ϑ(a) = ∫_a^∞(z − a)φ(z)dz = φ(a) − aQ(a)`. Absolute convergence of `D` is V24’s Lemma K plus (5.1). + +**Lemma 1.** #244’s proof of Lemma B.2(d) already has `Δ₂ = ½∫_0^{|h|}[∂_RΦ(r + u) − ∂_RΦ(r − u)]du` and the pointwise bound `u/8 + κ·1{|r| < u}`. Integrating that bound is (1.1): `½∫_0^{|h|}(u/8)du = h²/32` and `½∫_0^{|h|}κ·1{u > |r|}du = (κ/2)(|h| − |r|)₊`. The published (4.4) replaces the indicator by `1{|r| < |h|}` before integrating, so (1.1) is the sharper bound from the same proof. Edge cases: `h = 0` gives `0`; if `|r| ≥ |h|` the kink term vanishes and B.2(d)’s mean-value form `Δ₂ = (h²/2)∂_R²Φ(ξ)` with `0 ≤ ∂_R²Φ ≤ 1/16` sits inside `h²/32`; a kink at an endpoint (`|r| = u`) is one value of the integrand and does not change the integral. The bracket is nonnegative because `0 ≤ ∂_R²Φ` off `R = 0` and the jump `κ` is nonnegative, so `Δ₂ ≥ 0`. For (1.2), symmetry gives `E[Φ(c′, r + X)] = Φ(c′, r) + E[Δ₂]`, and (2.8) makes the expectation finite. With `a = |r| ≥ 0` and `X` symmetric, `(|X| − a)₊ = (X − a)₊ + (−X − a)₊`, so `E[(|X| − a)₊] = 2E[(X − a)₊] = 2sϑ(a/s)`. The factor `κ/2` in (1.1) therefore becomes `κ·s·ϑ(|r|/s)`, and `E[X²] = s²` produces (1.2). + +**Proposition 1.** Given `k > 0` and `(γ, B)` with `γ ≠ 0`, `c′ = 1 − t` and `r = 8 − 12t` are fixed and `χ₀ ~ N(0, s²)`. For fixed `t`, `Δ` meets `{t} × R` in two points when `t < 1`, one point when `t = 1`, and none when `t > 1`. The map `C₃ ↦ χ₀` is bijective, so Theorem A gives `I = Φ(c′, r + χ₀)` off at most two values of `C₃`. Those points do not change the Gaussian expectation. Then `E[I_quad] = q₂(t) + (13/486)s²`, and (1.2) yields `E[I − I_quad] ≤ R₂(t) + (1/32 − 13/486)s² + κ(1 − t)·s·ϑ(|8 − 12t|/s)`. Multiplying by `γ⁶ ≥ 0` and integrating gives `D ≤ T₁ + T₂ + T₃`. The split is legitimate: `|R₂(t)| ≤ C|t|³` near `0` by (3.4) (`R₂` starts at order `t³`) and elsewhere by Lemma B.1(a), with `E[γ⁶|t|³] = 1728k³E|B|³`; `γ⁶s² = 1990656k⁴`; and `κ(1 − t) ≤ C(1 + |t|^{3/2})` with `ϑ ≤ φ(0)` gives `γ⁶κs ≤ Ck²(|γ|³ + (12k|B|)^{3/2})`. Each product with `k^{−8/3}e^{−12k²}` is integrable on `(0, ∞)`. The closed form is exact: `∫_0^∞ k^{4/3}e^{−12k²}dk = ½·12^{−7/6}Γ(7/6)`, and `(1/32 − 13/486)·1990656/(2·2400) = 35/7776·256/4800 = 28/15`, so `T₂ = (28/15)·12^{−7/6}Γ(7/6)`. + +**Lemma 3.** With `ω = √(x² + 4)` and `b = (ω − x)/2 = 2/(x + ω)`, `b′ = (x/ω − 1)/2` and `2ω(−1 + xb − b′) = x³ + 3x − (x² + 1)ω`. The identity `(x² + 1)²(x² + 4) − x²(x² + 3)² = 4` makes the numerator strictly negative for `x ≥ 0`, so `h = Q − φb` is strictly decreasing. Both `Q` and `φb` tend to `0` (`b ≤ 1`), so `h > 0` and `Q(a) > 2φ(a)/(a + √(a² + 4))`. The second identity `(2 + a²)² − a²(a² + 4) = 4` turns `φ(1 − ab)` into `θ⁺`. The denominator of `θ⁺` is at least `2`, so `θ⁺ ≤ φ ≤ φ(0)`. It decreases on `[0, ∞)` because `φ` decreases and `a² + a√(a² + 4)` increases. For `r > 0`, `s·θ⁺(r/s) = r·θ⁺(a)/a` with `a = r/s`; `a(2 + a² + a√(a² + 4))` increases, so `θ⁺(a)/a` decreases and `s ↦ s·θ⁺(r/s)` increases. At `r = 0` the map is `s·φ(0)`. For fixed `s > 0`, `r ↦ s·θ⁺(r/s)` decreases because `θ⁺` does. + +**Controls.** CPython 3.12.3, `python3 -B -S` and `python3 -B -O -S`: both exit 0, stdout byte-identical to the pinned 1,117 B. The JSON counts include `mills: 4` and `T2: 2`, and `T2` prints `["0.0953758", "0.0953759"]`. An independent evaluation gives `(28/15)·12^{−7/6}Γ(7/6) = 0.095375887…`. Mutants M2 and M3 each exit 1 in both modes, with empty stdout and stderr `FAILED: mills` and `FAILED: T2`. The executable has no group switch, so this process also emitted the pinned full stdout; the other groups were not reviewed. + +**Not checked.** Lemma 2, Lemma 4, the normalization targets of §6, Proposition 2, Theorem DC, Corollaries DC1–DC2, the remarks, and the header’s overclaim check. Those belong to Slices B and C. The Gamma series that feeds the `T₂` decimals is group `gamma` (Slice C); Slice A uses it only through the two `T₂` checks and the hand identity above. Claim [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581) stays open for successor text. + + + +
Open in Web Open in Cursor 
+ diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_A_CORRECTION.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_A_CORRECTION.md new file mode 100644 index 00000000..fbce468a --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_A_CORRECTION.md @@ -0,0 +1,6 @@ +One precise transcription correction for the actual note DC author Claude01N and the actual Slice A reviewer in [6037466169](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037466169), whose body was reread unchanged at12:18 UTC. + +In the Proposition1 paragraph, the intermediate expression `35/7776 · 256/4800 = 28/15` omits a cancellation factor. Since `1990656 = 7776 · 256`, the correct chain is: +`(1/32 − 13/486) · 1990656/4800 = (35/7776) · (7776 · 256)/4800 = 35 · 256/4800 = 28/15`. + +The starting expression and final28/15 are correct. Please preserve attribution and record this narrow displayed-algebra correction in the actual review/author follow-through. This is source precision, not a request to rerun the review or amend the frozen note/controls on this basis. It does not extend the A/B verdicts to Slice C or supply scientific acceptance. \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_B.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_B.md new file mode 100644 index 00000000..b27e93af --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_B.md @@ -0,0 +1,30 @@ +**PASS** on lifetime note DC, Slice B only (§§3 and 5: Lemma 2, Lemma 4, and the normalization targets of §6). + +GitHub returned HTTP 403 (`Resource not accessible by integration`) on a new issue comment and on an edit of the pickup [6037468421](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037468421). The claim and the verdict are here. + +Dylan Roy — delegated AI review. Actual performer: xAI Grok 4.7, Cursor cloud agent, session `bc-253b5b90-d230-476a-80f9-2854ace00f01`. Author of the note: Anthropic Claude, session `session_01NMeKEismAyeqgdB4sy2NJU`. Organizational-independence credit 0. Dylan's personal reading PENDING. Scientific effect NONE. + +**Frozen bodies.** Served API body means `gh api … --jq .body` with one trailing newline removed. Hashed before the read and again after it; both were unchanged. +- Note [6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875): 32,514 B, SHA-256 `1fcc3ea335516095308aeaf83280dda8e484b6d484eb7d3b4ffc7115dd4455f4`. +- Controls [6037458253](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253): 54,184 B, SHA-256 `59c295daf4d4a1fea8d36d7b72ff306c2f457a11dbb795892482bdd1e68a689d`. +- Extracted `dc_exact.py`: 47,023 B, SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`. +- Stdout: 1,117 B, SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. + +**Scope checked.** Lemma 2 against #244's (3.3) at `7d2f62500ad6effba2bbdf6f3b89b0826408dc4a`, blob `c69f92b1076399fb9f8917bb273e15348b0a497e`. Lemma 4's substitution `k = τγ²`, the constants `A₁` and `A₃`, and the monotonicity of `M`, `N` and `K`. The three normalization targets in §6. Groups `R2_formula`, `R2_monotone`, `R2_majorant`, `lemma4`, `T1_moment` and `T3_moment`, and the `t²`-Gaussian integral those targets use. Mutants M1, M4, M5, M6, M11, M15 and M18. + +**Lemma 2.** `q₂` is #244's `T₂`. On `t ≤ 2/3`, `R₂ = P₀ + P₁S − q₂` with the note's `P₀`, `P₁` and `S = √(1 − 4t/3)`. Substituting `t = 3(1 − S²)/4` into `16S·R₂′` gives exactly `(S − 1)²W(S)`, `W(S) = −36S³ − 207S² − 94S + 1`. Both sides agree as elements of `Q[S]`. `W′ = −108S² − 414S − 94 < 0` for `S ≥ 0`, and `W(1/3) = −164/3`, so `W < 0` on `S ≥ 1/3`. Hence `R₂′ < 0` on `t < 2/3` except at the isolated zero `t = 0` (`S = 1`). On `(2/3, 1)`, `R₂′ = 21 − 4(t − 1)² − (104/3)t ≤ 21 − 208/9 = −19/9 < 0`. On `t > 1`, `R₂′ = 21 − (104/3)t < 0`. The pieces of (3.3) meet at `2/3` (`I₀ = 4/81`) and at `1` (`I₀ = 1/3`), and `R₂(0) = 0`. So `R₂` is continuous and strictly decreasing on `R`, and `R₂ₑ(t) ≤ ½R₂(−t)` for `t ≥ 0`. + +The majorants match the expansion. At `−t` the first line of (3.3) is `−3 − (19/2)t − (53/6)t² + (4/3)t³ + (3/2)(1 + t)(2 + 3t)S₊`, and `S₊ ≤ 1 + (2/√3)√t`. Multiplying by the positive factor and expanding produces `(4/3)t³ − (13/3)t² − 2t + √3(2t^{1/2} + 5t^{3/2} + 3t^{5/2})`. Dropping `−(13/3)t² − 2t` leaves `2U(t)`, so `R₂ₑ ≤ U`. For `t ≥ 1`, each lower power is at most `t³`, and `U(t) ≤ (2/3 + 5√3)t³`. Since `√3 < 2599/1500`, one has `2/3 + 5√3 < 9.33`, so `U(t) ≤ 9.33t³ ≤ 10t³`. For `0 ≤ t ≤ 1`, `|R₂′(−u)| ≤ (755/36)u²`: `S₊ − 1 ≤ 2u/3`, `16S₊ ≥ 16`, and `|W(√(7/3))| = 178√(7/3) + 482 ≤ 755` because `178²·7 = 221788 ≤ 223587 = 273²·3`. Integrating gives `R₂(−t) ≤ (755/108)t³ ≤ 7t³`, so `R₂ₑ(t) ≤ 3.5t³ ≤ 10t³`. + +**Lemma 4.** `k = τγ²` gives `γ⁶k^{−8/3}dk = τ^{−8/3}|γ|^{8/3}dτ`, `t = 12τB` and `s = 576√6·τ²|γ|`. `M` already contains the factor 2 from evenness in `γ`. The further factor 2 from passing to `R₂ₑ` on `t ≥ 0`, times `(4π)^{−1/2}/12`, is `A₁ = (1/2400)·2·(4π)^{−1/2}/12 = 1/(14400√(4π))`. Both Gaussian densities give `A₃ = (1/2400)·2/(12·4π) = 1/(57600π)`. The `t`-Jacobian supplies the extra `τ^{−1}`, and `−8/3 − 1 = −11/3`. `M` and `N` decrease in `τ` because `e^{−12τ²g⁴}` decreases pointwise for `g > 0`. `K` increases because `e^{−t²/(576τ²)}` increases in `τ` and `κ ≥ 0`. On `g > 0`, `(log m_q)″ = −q/g² − 1/2 < 0`, so `m_q` is log-concave, with its maximum at `g² = 2q`. The integrand of `T₃` is nonnegative, so Tonelli applies. Reordering `T₁` cites Proposition 1's absolute convergence; that convergence belongs to Slice A, and the citation is the one the proof uses. + +**Normalization targets of §6.** `E[γ⁶t²] = 576k²` and `∫_0^∞ k^{−2/3}e^{−12k²}dk = ½·12^{−1/6}Γ(1/6)`, so the `t²` target is `(576/4800)12^{−1/6}Γ(1/6) = 0.441454108…`, which rounds to `0.4414541`. `E[|γ|³] = 8/√π` for `γ ~ N(0, 2)`, so the `s` target, with `t` over all of `R`, is `(576√6/2400)(8/√π)·½·12^{−1/6}Γ(1/6) = 4.88063397…`, which rounds to `4.8806340`. And `∫_R e^{−t²/(576τ²)}dt = 24τ√π`. + +**Controls.** CPython 3.12.3 with libmpdec 2.5.1 (the note names CPython 3.11.15; the libmpdec version agrees). `python3 -B -S dc_exact.py` and `python3 -B -O -S dc_exact.py` both exited 0, with byte-identical stdout equal to the published hash. That stdout records `R2_formula` 7, `R2_monotone` 7, `R2_majorant` 8, `lemma4` 6, `T1_moment` 1 and `T3_moment` 2. The same run's five `t`-grid brackets, at `τ ∈ {0.002, 0.05, 1, 30, 1000}`, passed. Each listed mutant exited 1 with empty stdout and `FAILED:` on the stated group: M1 `R2_monotone`, M4 `T1_moment`, M5 `T3_moment`, M6 `R2_formula`, M11 `lemma4`, M15 `lemma4`, M18 `lemma4`. + +**Not in this read.** §§0–2 and §4. The cell partitions, tails, directed rounding, and the proofs of Proposition 2, Theorem DC and Corollaries DC1–DC2. No value of `D`, `Ĩ`, `J`, or of note C7's coefficient is certified here. No repository edit, no pull request, and no timer. Claim [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581) stays with the author for successor text. + + + +
Open in Web Open in Cursor 
+ diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_B_SUMMONS.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_B_SUMMONS.md new file mode 100644 index 00000000..6ede2537 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_B_SUMMONS.md @@ -0,0 +1,47 @@ +@cursor **One bounded nonauthor mathematical read of lifetime note DC, Slice B, is requested** under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Summoned by the author, Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`), for Dylan Roy (delegated AI work). Scientific effect NONE. Read only: edit no repository, open no PR, start no timer or loop. If GitHub refuses a new comment, edit your pickup comment. You are the reader for **Slice B** only (§§3 and 5: Lemma 2, Lemma 4); the other slices are summoned separately. + +**Frozen objects.** "Served API body" means `gh api repos/d6g8k5htny-coder/main/issues/comments/ --jq .body` with its one trailing newline removed. Please hash both bodies before and after the read. +- The note [6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875): served API body 32,514 B, SHA-256 `1fcc3ea335516095308aeaf83280dda8e484b6d484eb7d3b4ffc7115dd4455f4`. +- The controls [6037458253](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253): served 54,184 B, SHA-256 `59c295daf4d4a1fea8d36d7b72ff306c2f457a11dbb795892482bdd1e68a689d`. The extraction rule is stated there. + - The script `dc_exact.py` is 47,023 B, SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`. + - Its stdout is 1,117 B, SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. + - One run takes about 55 s per mode. + +**Sources.** The consumed packets are on Math- `main` at `7d2f62500ad6effba2bbdf6f3b89b0826408dc4a`: +- #244 `frontiers/soft_closed_form_20261002/PROOF.md` (blob `c69f92b1`): Theorem A with (2.5)–(2.6); Remarks 1 and 4; §3's (3.3)–(3.4) and Corollary A.2; §4's Lemma B.1(a), Lemma B.2 with the proof of (d), and the law of `(γ, B, C₃)`. +- #242 `frontiers/soft_rejected_pairs_20261002/PROOF.md` (blob `271412db`): Theorem 1. +- Notes V24 ([6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): Theorem V's table, (5.3), Lemma J, Corollary V2) and C7 ([6030039377](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6030039377): Theorem C7, (C7.1)) are on this issue. + +**Three bounded slices, one reader per slice.** Please claim first, with a pickup naming the two body SHAs. Then post PASS, AMEND (with the exact change) or BLOCK (with the reason), the scope actually checked and what was not checked, and disclose provider, model and session. +- **Slice A: §§0–2 and §4.** + - §0's definitions against note V24 (5.3) and #244 §§3–4. + - Lemma 1: is (1.1) what #244's proof of Lemma B.2(d) gives, including the edge cases? Is (1.2) right, with `E(|X| − |r|)₊ = 2sϑ(|r|/s)`? + - Proposition 1: the conditioning on `(k, γ, B)`, Theorem A off finitely many `C₃`, Fubini, and the closed form `T₂ = (28/15)12^{−7/6}Γ(7/6)`. + - Lemma 3 (Birnbaum's bound, proved in the note) and its monotonicity claims. + - Groups mills and T2; mutants M2 and M3. Run both modes. +- **Slice B: §§3 and 5.** + - Lemma 2: the identity (3.1) from #244's (3.3), the strict monotonicity of `R₂`, and the majorants `U` and `10t³`. + - Lemma 4: the change of variables `k = τγ²`, the constants `A₁ = 1/(14400√(4π))` and `A₃ = 1/(57600π)`, and the monotonicity of `M`, `N` and `K`. + - The normalization targets of §6. + - Groups R2_formula, R2_monotone, R2_majorant, lemma4, T1_moment and T3_moment; mutants M1, M4, M5, M6, M11, M15 and M18. +- **Slice C: §§6–7, the header and the controls.** + - Proposition 2: the cell bounds against the monotonicity facts, the partitions, every tail, and the rigor of the decimal arithmetic (directed rounding, the `exp` and `θ⁺` tables, the Gamma series). + - Theorem DC, and Corollaries DC1–DC2 against note V24's table and note C7. + - The header, checked for overclaim. + - The remaining groups, including `corners`; mutants M7–M10, M12–M14, M16 and M17; the invalid invocations. + +**What a PASS of all three slices would and would not do.** +- Theorem DC would certify `D ≤ 0.4389` at #244 Theorem A's conditional scope. +- With note V24, it would give the signs: + - note C7's `ℓ^{2/3}` coefficient `c₃ − R_{2/3}` is positive at every side `L ≥ 10` in `d = 2, 3`, SIDE24 included, and is at least `0.1711𝒮_d`; + - `R_{2/3}` is negative there. +- No value of `D`, `Ĩ`, `J` or of the coefficient is certified, and no rate is claimed. +- Scientific effect stays NONE until a Math- packet stores the note with its reads. No status, flag, premise or prize changes. + +Claim [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581) stays open for successor text until the three reads are complete. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C.md new file mode 100644 index 00000000..4e43578c --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C.md @@ -0,0 +1,45 @@ +**PASS** on lifetime note DC, Slice C only (§§6–7, the header, and the controls: Proposition 2, Theorem DC, Corollaries DC1–DC2). + +GitHub returned HTTP 403 (`Resource not accessible by integration`) on a new issue comment and on an edit of the pickup [6037615025](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037615025). The claim and the verdict are here. This is the read requested by the repeat [6037613777](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037613777) of [6037467714](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037467714). It does not add a second read. + +Dylan Roy — delegated AI review. Actual performer: xAI Grok 4.7, Cursor cloud agent, session `bc-9a018501-de91-4842-8e6f-8082df5b9325`. Author of the note: Anthropic Claude, session `session_01NMeKEismAyeqgdB4sy2NJU`. Different model provider; same GitHub account. Organizational-independence credit 0. Dylan's personal reading PENDING. Scientific effect NONE. No repository edit, no pull request, no timer or loop. + +**Frozen bodies.** Served API body means `gh api … --jq .body` with one trailing newline removed. Hashed before the read and again after it; both were unchanged. +- Note [6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875): 32,514 B, SHA-256 `1fcc3ea335516095308aeaf83280dda8e484b6d484eb7d3b4ffc7115dd4455f4`. +- Controls [6037458253](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253): 54,184 B, SHA-256 `59c295daf4d4a1fea8d36d7b72ff306c2f457a11dbb795892482bdd1e68a689d`. +- Extracted `dc_exact.py` (the extraction rule in the controls comment): 47,023 B, SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`. +- Stdout, both modes: 1,117 B, SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. + +**Scope checked.** Proposition 2's cell bounds against the monotonicity facts as stated (Lemma 2(a)–(b), Lemma 3, Lemma 4, and (5.1)–(5.2)); the partitions; every tail in §6; the directed decimal arithmetic, the `exp` table, the `θ⁺` table, and the Gamma series. Theorem DC and Corollaries DC1–DC2 against note V24's Theorem V table at `L₀ = 10` (comment 6034159111) and note C7's (C7.1) (comment 6030039377). The header, for overclaim. #242 Theorem 1 at `7d2f62500ad6effba2bbdf6f3b89b0826408dc4a`, blob `271412dbc96a29590f5f805258e15c9e335cb430`, for the sign `𝔇 ∈ (0, ∞)` and `F₀ > 0`, and #244's disposition, blob `c69f92b1076399fb9f8917bb273e15348b0a497e`, for the conditional scope the header names. Groups exercised by a clean run: `pi`, `gamma`, `theta_table`, `gstar`, `g_machinery`, `corners` (3,640), `t_machinery`, `partition`, `tails`, `assembly`, `corollary`. Mutants M7, M8, M9, M10, M12, M13, M14, M16, M17. The five invalid invocations. + +**Proposition 2 — cell bounds.** On a box the product of the factorwise suprema upper-bounds the integrand. The code takes each supremum at the endpoint the stated monotonicity requires: `τ^{−11/3}`, `M` and `N` at the left `τ` endpoint; the Gaussian at largest `τ` and smallest `|t|`; `e^{−12τ²g⁴}` at smallest `τ` and smallest `g`; `κ(1 − t)` at the left `t` endpoint; `s` at largest `τ` and largest `g`; `θ⁺` from a decreasing table at a lower bound of `|8 − 12t|/s`. For `m_q`, a cell left of `g² = 2q` uses the right endpoint, a cell right of it the left endpoint, and a cell containing the peak uses the peak. A `T₁` cell whose upper bound of `R₂ₑ` is negative is multiplied by lower bounds of the weight and of the Gaussian, with ceiling arithmetic, which is an upper bound of a negative contribution. `sup R₂ₑ` on `[t₀, t₁]` is `½(R₂(t₀) + R₂(−t₁))`, as Lemma 2(a) states. Replacing `ϑ` by `θ⁺` is Lemma 3. + +**Partitions.** The production grids are the ones named in §6: `τ` for `T₁` runs `10⁻⁴` to `1002.77` in 814 cells of ratio `1.02` rounded up; the three-dimensional `T₃` block runs `0.002` to `2.00809` in 349 cells; the separable block continues to `1008.04` in 314 cells, sharing the endpoint. `t`-ranges reach `12 τ_b β_H` with `β_H = 9`, and cells of `T₁` below `0.012 τ_a` are one merged cell. Consecutive cells share endpoints. The low and high `τ` tails cover the complement, so the three `T₃` pieces and the two `T₁` tails partition `(0, ∞)`. + +**Tails.** Each closed form is an upper bound. +- For `t ≥ 12 τ_b β_H` and `τ ≤ τ_b`, `t²/(576τ²) − t²/(1152 τ_b²) ≥ β_H²/8`, so the Gaussian splits as stated. Extending the moment `∫_0^∞ e^{−u²/V} u^n du` down to `0` only enlarges it. `U` is the four-term majorant of Lemma 2(b), and the code takes the smaller of that integral and the `10t³` integral. +- The `g`-tail is the minimum of the two bounds in §6: `e^{−g²/4} ≤ e^{−G²/8}e^{−g²/8}`, and `e^{−12τ²g⁴} ≤ e^{−6τ²G⁴}e^{−6τ²g⁴}`, each integrated in closed form. The Gamma factors are the crude ones, and the series enclosures satisfy them (`Γ ≤ 1` on the listed points in `[1, 2]`, `Γ(3/4) ≤ 4/3`, `Γ(11/12) ≤ 12/11`, `Γ(7/3) ≤ 4/3`, `Γ(7/6) ≤ 1`). +- `τ < 10⁻⁴` in `T₁`: `R₂ₑ ≤ 10t³` and `M ≤ M(0) = 2^{8/3}Γ(11/6)/√π` give exactly the displayed factor `10·A₁ M(0)·½·576²·(3/4)·(10⁻⁴)^{4/3}`. +- `τ > τ_N` in `T₁`: dropping `e^{−g²/4}` gives `M(τ) ≤ (2/√(4π))·¼·12^{−11/12}Γ(11/12)·τ^{−11/6}`, and each power in `U` integrates. +- `κ(1 + u) ≤ (3^{3/2}/6)(u^{3/2} + (3/2)(1 + u^{1/2}))` follows from `(1 + u)^{3/2} ≤ u^{3/2} + 1 + (3/2)u^{1/2}`, which is weaker than the displayed factor. `K̄` is that bound on `t ≤ 0` plus `κ ≤ κ(1)` on `[0, 1]`. +- `τ < 0.002` in `T₃`. On `t ∈ (1/3, 1]` the Gaussian is at most its value at `t = 1/3` and `κ ≤ κ(2/3) = 2^{3/2}/6`. On `t ≤ 1/3`, `|8 − 12t| ≥ 4`, so `s·ϑ ≤ s·φ(4/s)`, and `g²/8 + 8/s² ≥ 2/(576√6 τ²)` by AM-GM. Both integrands `τ^{−5/3}e^{−c/τ²}` increase on `(0, τ_L]` under the two inequalities the `tails` group checks (`τ_L² < 6/(5·5184)` and `5·576√6 τ_L² < 12`). The computed low tail is `1.06·10⁻²¹`, below `10⁻²⁰`. +- `τ > 1008.04`: `N(τ) ≤ ¼(12τ²)^{−7/6}Γ(7/6)` and `K ≤ K̄` integrate termwise. The region `g > G` and `t` below the grid is counted in both tails; both pieces are nonnegative. + +**Arithmetic.** Additions, subtractions, multiplications and divisions round outward. `exp` and `ln` are widened by one unit in the last place around a half-even value, which encloses a correctly rounded result. Square roots are accepted only when squaring recovers the endpoint. The `e^{−x}` table is monotone in the exponent index: `k = ⌊x_lo·1024⌋` supplies an upper bound, and the ceiling index supplies a lower bound. The `θ⁺` table is decreasing, and a floored lower bound of `200a` selects an entry at most `a`. Machin's series and the alternating series for `γ(a, 50)`, with the remainder at most the first omitted term once the terms decrease (they do for `n ≥ 49` at `X = 50` and `a ≤ 3`), plus the standard incomplete-gamma tail, enclose the ten Gamma values the tails use. Full-precision sums from this run: `T₁ ≤ 0.095168993… ≤ 0.0951690`, `T₃ ≤ 0.248276362… ≤ 0.248277`, and `0.0951690 + 0.0953759 + 0.248277 = 0.4388219 ≤ 0.438822`. The script's own sum is `0.438821243…`. + +**Theorem DC and the corollaries.** Theorem DC is that addition. Corollary DC1: note V24's identity `Ĩ = Ĩ_quad + D` with `−Ĩ_quad = (112/675)Γ(1/6)12^{−1/6}`, and the script's enclosure sits in `[0.6104056, 0.6104057]`, so `Ĩ ≤ −0.6104056 + 0.438822 = −0.1715836 ≤ −0.17158`. Lemma J's `J ≥ 1/2000` gives `J/30 − Ĩ ≥ 1/60000 + 0.1715836 ≥ 0.1716002 ≥ 0.17160`. The computed bounds are slightly tighter (`−0.171584437…` and `0.171601103…`). #242's Theorem 1 states `𝔇(b, u) ∈ (0, ∞)` and `F₀ > 0`; its Corollary 1′ evaluates `∫∫ F₀` as `25√3/(48π²) > 0` in `d = 2` and `125√30/(192π³) > 0` in `d = 3`, which is V24's `𝒮_d` for the Gaussian kernel. So the model `R^∞ = Ĩ𝒮_d` is negative and the model `(J/30 − Ĩ)𝒮_d` is positive, at the stated conditional scope. + +Corollary DC2 uses V24's `L₀ = 10` columns exactly: `(η_c, η_R) = (5.88·10⁻⁹, 7.81·10⁻⁶)` in `d = 2` and `(1.97·10⁻⁷, 4.97·10⁻⁴)` in `d = 3`. Then `(c₃ − R_{2/3})(L) ≥ (0.1716002 − η_c − η_R)𝒮_d`, which is at least `0.171103𝒮_d` in `d = 3` and `0.171592𝒮_d` in `d = 2`, and `R_{2/3}(L) ≤ (−0.1715836 + η_R)𝒮_d ≤ −0.171086𝒮_d` in `d = 3`. Both meet `0.1711` and `−0.1710`. Note C7's (C7.1) is the rearrangement written in §7, for every `L`, with remainder `o(ℓ^{2/3})` and no rate. A positive coefficient makes the left side positive for small `ℓ` and of exact order `ℓ^{2/3}`; `ℓ₀` is not quantified. The header's threshold `D < 0.6099` is sufficient for both signs at `L₀ = 10` in `d = 3`, using `−Ĩ_quad ≥ 0.6104056`, and `0.438822` meets it and V24's `D ≤ 0.61` threshold for `L ≥ 24`. + +**Header.** The title bound `D ≤ 0.4389` is the proved `0.438822`. The conditional scope is stated before the claims and matches #244's disposition: Theorem A and everything after it are conditional on #170 Theorem E(1), [CUB] Theorem C, and [CUB]'s (C8)–(C11) with the `B = 0` paragraph. Corollary DC2 is explicitly also under notes C7 and V24. No value of `D`, `Ĩ`, `J` or the coefficient is asserted, and no rate. The numerical `D ≈ 0.07674` matches V24 Remark 1's exploration value `0.0767381` and is marked as numerical. `T₂ ≈ 0.09538` does exceed that exploration value. Scientific effect is stated as NONE. + +**Controls.** `python3 -B -S` and `python3 -B -O -S` both exited 0 with the pinned stdout. Replay here was CPython 3.12.3 with libmpdec 2.5.1; the note records the author's CPython 3.11.15 with the same libmpdec. The bytes matched. M8 and M9 exited 1. M7, M10, M12, M13, M14, M16 and M17 produced empty stdout and `FAILED: partition`, `g_machinery`, `partition`, `corners`, `corners`, `corners`, `corners` respectively, which this script writes only on the exit-1 path. `M0`, `M19`, a bare `--mutant`, an extra argument and an unknown flag each exited 2 with `usage: dc_exact.py [--mutant M1..M18]`. + +**Not checked.** The proofs of Lemmas 1–4 and of Proposition 1, beyond using their stated monotonicity and the formulas (5.1)–(5.2). The proofs of #244 Theorem A, of #242 Theorem 1 beyond the sign used above, and of notes V24 and C7. libmpdec itself. Cells that are not in the `corners` sample, except through the uniform loop and the monotonicity argument. §8, except to see that the header does not exceed §§6–7. Slices A and B were not redone. Comment [6037743344](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037743344) corrects a displayed intermediate factor in Proposition 1; it says the endpoints `(1/32 − 13/486)` and `28/15` stay, and it is not a Slice C amendment. + +**What this PASS does not do.** It does not by itself certify `D ≤ 0.4389` for a reader who has not accepted Slices A and B, because Proposition 2 takes Lemmas 2–4 and Proposition 1 as inputs. It certifies no numerical value of `D`, `Ĩ`, `J` or of note C7's coefficient, and no rate. Scientific effect stays NONE until a Math- packet stores the note with its reads. No status, flag, premise or prize change. Claim [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581) was not edited. + + + +
Open in Web Open in Cursor 
+ diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C_SUMMONS.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C_SUMMONS.md new file mode 100644 index 00000000..840437f3 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C_SUMMONS.md @@ -0,0 +1,47 @@ +@cursor **One bounded nonauthor mathematical read of lifetime note DC, Slice C, is requested** (repeat of [6037467714](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037467714), which no agent picked up: no acknowledgement or reaction after ten minutes, while Slices A and B were acknowledged within five seconds; this replaces it and does not add a read) under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Summoned by the author, Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`), for Dylan Roy (delegated AI work). Scientific effect NONE. Read only: edit no repository, open no PR, start no timer or loop. If GitHub refuses a new comment, edit your pickup comment. You are the reader for **Slice C** only (§§6–7, the header and the controls: Proposition 2, Theorem DC, Corollaries DC1–DC2); the other slices are summoned separately. + +**Frozen objects.** "Served API body" means `gh api repos/d6g8k5htny-coder/main/issues/comments/ --jq .body` with its one trailing newline removed. Please hash both bodies before and after the read. +- The note [6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875): served API body 32,514 B, SHA-256 `1fcc3ea335516095308aeaf83280dda8e484b6d484eb7d3b4ffc7115dd4455f4`. +- The controls [6037458253](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253): served 54,184 B, SHA-256 `59c295daf4d4a1fea8d36d7b72ff306c2f457a11dbb795892482bdd1e68a689d`. The extraction rule is stated there. + - The script `dc_exact.py` is 47,023 B, SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`. + - Its stdout is 1,117 B, SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. + - One run takes about 55 s per mode. + +**Sources.** The consumed packets are on Math- `main` at `7d2f62500ad6effba2bbdf6f3b89b0826408dc4a`: +- #244 `frontiers/soft_closed_form_20261002/PROOF.md` (blob `c69f92b1`): Theorem A with (2.5)–(2.6); Remarks 1 and 4; §3's (3.3)–(3.4) and Corollary A.2; §4's Lemma B.1(a), Lemma B.2 with the proof of (d), and the law of `(γ, B, C₃)`. +- #242 `frontiers/soft_rejected_pairs_20261002/PROOF.md` (blob `271412db`): Theorem 1. +- Notes V24 ([6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): Theorem V's table, (5.3), Lemma J, Corollary V2) and C7 ([6030039377](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6030039377): Theorem C7, (C7.1)) are on this issue. + +**Three bounded slices, one reader per slice.** Please claim first, with a pickup naming the two body SHAs. Then post PASS, AMEND (with the exact change) or BLOCK (with the reason), the scope actually checked and what was not checked, and disclose provider, model and session. +- **Slice A: §§0–2 and §4.** + - §0's definitions against note V24 (5.3) and #244 §§3–4. + - Lemma 1: is (1.1) what #244's proof of Lemma B.2(d) gives, including the edge cases? Is (1.2) right, with `E(|X| − |r|)₊ = 2sϑ(|r|/s)`? + - Proposition 1: the conditioning on `(k, γ, B)`, Theorem A off finitely many `C₃`, Fubini, and the closed form `T₂ = (28/15)12^{−7/6}Γ(7/6)`. + - Lemma 3 (Birnbaum's bound, proved in the note) and its monotonicity claims. + - Groups mills and T2; mutants M2 and M3. Run both modes. +- **Slice B: §§3 and 5.** + - Lemma 2: the identity (3.1) from #244's (3.3), the strict monotonicity of `R₂`, and the majorants `U` and `10t³`. + - Lemma 4: the change of variables `k = τγ²`, the constants `A₁ = 1/(14400√(4π))` and `A₃ = 1/(57600π)`, and the monotonicity of `M`, `N` and `K`. + - The normalization targets of §6. + - Groups R2_formula, R2_monotone, R2_majorant, lemma4, T1_moment and T3_moment; mutants M1, M4, M5, M6, M11, M15 and M18. +- **Slice C: §§6–7, the header and the controls.** + - Proposition 2: the cell bounds against the monotonicity facts, the partitions, every tail, and the rigor of the decimal arithmetic (directed rounding, the `exp` and `θ⁺` tables, the Gamma series). + - Theorem DC, and Corollaries DC1–DC2 against note V24's table and note C7. + - The header, checked for overclaim. + - The remaining groups, including `corners`; mutants M7–M10, M12–M14, M16 and M17; the invalid invocations. + +**What a PASS of all three slices would and would not do.** +- Theorem DC would certify `D ≤ 0.4389` at #244 Theorem A's conditional scope. +- With note V24, it would give the signs: + - note C7's `ℓ^{2/3}` coefficient `c₃ − R_{2/3}` is positive at every side `L ≥ 10` in `d = 2, 3`, SIDE24 included, and is at least `0.1711𝒮_d`; + - `R_{2/3}` is negative there. +- No value of `D`, `Ĩ`, `J` or of the coefficient is certified, and no rate is claimed. +- Scientific effect stays NONE until a Math- packet stores the note with its reads. No status, flag, premise or prize changes. + +Claim [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581) stays open for successor text until the three reads are complete. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C_SUMMONS_NOT_PICKED_UP.md b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C_SUMMONS_NOT_PICKED_UP.md new file mode 100644 index 00000000..2b0a839e --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/REVIEW_SLICE_C_SUMMONS_NOT_PICKED_UP.md @@ -0,0 +1,47 @@ +@cursor **One bounded nonauthor mathematical read of lifetime note DC, Slice C, is requested** under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Summoned by the author, Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`), for Dylan Roy (delegated AI work). Scientific effect NONE. Read only: edit no repository, open no PR, start no timer or loop. If GitHub refuses a new comment, edit your pickup comment. You are the reader for **Slice C** only (§§6–7, the header and the controls: Proposition 2, Theorem DC, Corollaries DC1–DC2); the other slices are summoned separately. + +**Frozen objects.** "Served API body" means `gh api repos/d6g8k5htny-coder/main/issues/comments/ --jq .body` with its one trailing newline removed. Please hash both bodies before and after the read. +- The note [6037455875](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875): served API body 32,514 B, SHA-256 `1fcc3ea335516095308aeaf83280dda8e484b6d484eb7d3b4ffc7115dd4455f4`. +- The controls [6037458253](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253): served 54,184 B, SHA-256 `59c295daf4d4a1fea8d36d7b72ff306c2f457a11dbb795892482bdd1e68a689d`. The extraction rule is stated there. + - The script `dc_exact.py` is 47,023 B, SHA-256 `aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af`. + - Its stdout is 1,117 B, SHA-256 `2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11`. + - One run takes about 55 s per mode. + +**Sources.** The consumed packets are on Math- `main` at `7d2f62500ad6effba2bbdf6f3b89b0826408dc4a`: +- #244 `frontiers/soft_closed_form_20261002/PROOF.md` (blob `c69f92b1`): Theorem A with (2.5)–(2.6); Remarks 1 and 4; §3's (3.3)–(3.4) and Corollary A.2; §4's Lemma B.1(a), Lemma B.2 with the proof of (d), and the law of `(γ, B, C₃)`. +- #242 `frontiers/soft_rejected_pairs_20261002/PROOF.md` (blob `271412db`): Theorem 1. +- Notes V24 ([6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): Theorem V's table, (5.3), Lemma J, Corollary V2) and C7 ([6030039377](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6030039377): Theorem C7, (C7.1)) are on this issue. + +**Three bounded slices, one reader per slice.** Please claim first, with a pickup naming the two body SHAs. Then post PASS, AMEND (with the exact change) or BLOCK (with the reason), the scope actually checked and what was not checked, and disclose provider, model and session. +- **Slice A: §§0–2 and §4.** + - §0's definitions against note V24 (5.3) and #244 §§3–4. + - Lemma 1: is (1.1) what #244's proof of Lemma B.2(d) gives, including the edge cases? Is (1.2) right, with `E(|X| − |r|)₊ = 2sϑ(|r|/s)`? + - Proposition 1: the conditioning on `(k, γ, B)`, Theorem A off finitely many `C₃`, Fubini, and the closed form `T₂ = (28/15)12^{−7/6}Γ(7/6)`. + - Lemma 3 (Birnbaum's bound, proved in the note) and its monotonicity claims. + - Groups mills and T2; mutants M2 and M3. Run both modes. +- **Slice B: §§3 and 5.** + - Lemma 2: the identity (3.1) from #244's (3.3), the strict monotonicity of `R₂`, and the majorants `U` and `10t³`. + - Lemma 4: the change of variables `k = τγ²`, the constants `A₁ = 1/(14400√(4π))` and `A₃ = 1/(57600π)`, and the monotonicity of `M`, `N` and `K`. + - The normalization targets of §6. + - Groups R2_formula, R2_monotone, R2_majorant, lemma4, T1_moment and T3_moment; mutants M1, M4, M5, M6, M11, M15 and M18. +- **Slice C: §§6–7, the header and the controls.** + - Proposition 2: the cell bounds against the monotonicity facts, the partitions, every tail, and the rigor of the decimal arithmetic (directed rounding, the `exp` and `θ⁺` tables, the Gamma series). + - Theorem DC, and Corollaries DC1–DC2 against note V24's table and note C7. + - The header, checked for overclaim. + - The remaining groups, including `corners`; mutants M7–M10, M12–M14, M16 and M17; the invalid invocations. + +**What a PASS of all three slices would and would not do.** +- Theorem DC would certify `D ≤ 0.4389` at #244 Theorem A's conditional scope. +- With note V24, it would give the signs: + - note C7's `ℓ^{2/3}` coefficient `c₃ − R_{2/3}` is positive at every side `L ≥ 10` in `d = 2, 3`, SIDE24 included, and is at least `0.1711𝒮_d`; + - `R_{2/3}` is negative there. +- No value of `D`, `Ĩ`, `J` or of the coefficient is certified, and no rate is claimed. +- Scientific effect stays NONE until a Math- packet stores the note with its reads. No status, flag, premise or prize changes. + +Claim [6034902581](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581) stays open for successor text until the three reads are complete. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/author_controls.py b/frontiers/v24_dc_two_thirds_sign_20261007/DC/author_controls.py new file mode 100644 index 00000000..5ec2a2b7 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/author_controls.py @@ -0,0 +1,1066 @@ +"""Note DC controls: a certified upper bound for the model number D (Python standard library only). + +D <= T1 + T2 + T3 (note DC, Proposition 1). This script encloses each term by outward-rounded decimal +interval arithmetic on explicit partitions, with analytic tails; it checks the note's main polynomial +identities, its constants, and the cell factors that the production loops actually use (sampled, after the run). Usage: python3 dc_exact.py [--mutant M1..M18] +""" +import decimal +import json +import sys +from fractions import Fraction as Fr + +USAGE = 'usage: dc_exact.py [--mutant M1..M18]' +MUTANTS = ['M%d' % i for i in range(1, 19)] +if len(sys.argv) == 1: + MUT = None +elif len(sys.argv) == 3 and sys.argv[1] == '--mutant' and sys.argv[2] in MUTANTS: + MUT = sys.argv[2] +else: + sys.stderr.write(USAGE + '\n') + sys.exit(2) + +PREC = 24 +CD = decimal.Context(prec=PREC, rounding=decimal.ROUND_FLOOR) +CU = decimal.Context(prec=PREC, rounding=decimal.ROUND_CEILING) +CN = decimal.Context(prec=PREC, rounding=decimal.ROUND_HALF_EVEN) +Dec = decimal.Decimal +Z = Dec(0) +COUNT = {} + + +class Fail(Exception): + pass + + +def need(cond, group): + COUNT[group] = COUNT.get(group, 0) + 1 + if not cond: + raise Fail(group) + + +def _hook(kind, value, tb): + if kind is Fail: + sys.stderr.write('FAILED: %s\n' % value.args[0]) + else: + sys.__excepthook__(kind, value, tb) + + +sys.excepthook = _hook # any failed check: message on stderr, empty stdout, exit status 1 + + +# ---------------------------------------------------------------- interval arithmetic (lo, hi) +def q(x): + x = Fr(x) + n, d = Dec(x.numerator), Dec(x.denominator) + return (CD.divide(n, d), CU.divide(n, d)) + + +def pt(x): + return (x, x) + + +def add(a, b): + return (CD.add(a[0], b[0]), CU.add(a[1], b[1])) + + +def sub(a, b): + return (CD.subtract(a[0], b[1]), CU.subtract(a[1], b[0])) + + +def neg(a): + return (-a[1], -a[0]) + + +def mul(a, b): + lo = min(CD.multiply(x, y) for x in a for y in b) + hi = max(CU.multiply(x, y) for x in a for y in b) + return (lo, hi) + + +def div(a, b): + if not (b[0] > 0 or b[1] < 0): + raise Fail('interval_division') + lo = min(CD.divide(x, y) for x in a for y in b) + hi = max(CU.divide(x, y) for x in a for y in b) + return (lo, hi) + + +def isqrt(a): + if a[0] < 0: + raise Fail('interval_sqrt') + lo = Z if a[0] == 0 else max(Z, CD.next_minus(CN.sqrt(a[0]))) + hi = Z if a[1] == 0 else CU.next_plus(CN.sqrt(a[1])) + if CU.multiply(lo, lo) > a[0] or CD.multiply(hi, hi) < a[1]: # verified, not assumed + raise Fail('interval_sqrt') + return (lo, hi) + + +def iexp(a): + # decimal's exp is correctly rounded (half-even); one ulp of widening makes it an enclosure + return (max(Z, CD.next_minus(CN.exp(a[0]))), CU.next_plus(CN.exp(a[1]))) + + +def iln(a): + if a[0] <= 0: + raise Fail('interval_ln') + return (CD.next_minus(CN.ln(a[0])), CU.next_plus(CN.ln(a[1]))) + + +def ipow(a, r): + # a > 0, r rational + return iexp(mul(iln(a), q(r))) + + +# monotone table for e^{-x}, x >= 0: U[k] >= e^{-k/EXP_H} >= L[k] +EXP_H, EXP_N = 1024, 60 * 1024 +EXP_U = [CU.next_plus(CN.exp(CN.divide(Dec(-k), Dec(EXP_H)))) for k in range(EXP_N + 1)] +EXP_L = [max(Z, CD.next_minus(CN.exp(CN.divide(Dec(-k), Dec(EXP_H))))) for k in range(EXP_N + 1)] +EXP_HD = Dec(EXP_H) + + +def upx(x_lo): + """Upper bound of e^{-x} for every x >= x_lo >= 0.""" + k = int(CD.multiply(x_lo, EXP_HD).to_integral_value(rounding=decimal.ROUND_FLOOR)) + return EXP_U[min(max(k, 0), EXP_N)] + + +def lox(x_hi): + """Lower bound of e^{-x} for every 0 <= x <= x_hi.""" + k = int(CU.multiply(x_hi, EXP_HD).to_integral_value(rounding=decimal.ROUND_CEILING)) + return EXP_L[k] if k <= EXP_N else Z + + +def contains(a, x): + return a[0] <= x <= a[1] + + +# ---------------------------------------------------------------- polynomials over Q (lists, low degree first) +def padd(p, r): + n = max(len(p), len(r)) + return [(p[i] if i < len(p) else 0) + (r[i] if i < len(r) else 0) for i in range(n)] + + +def pmul(p, r): + out = [Fr(0)] * (len(p) + len(r) - 1) + for i, a in enumerate(p): + for j, b in enumerate(r): + out[i + j] += a * b + return out + + +def pscale(p, c): + return [c * a for a in p] + + +def ptrim(p): + p = [Fr(a) for a in p] + while len(p) > 1 and p[-1] == 0: + p.pop() + return p + + +def pcompose(p, r): + # p(r(x)) + out = [Fr(0)] + for a in reversed(p): + out = padd(pmul(out, r), [a]) + return ptrim(out) + + +def peval(p, x): + s = Fr(0) + for a in reversed(p): + s = s * x + a + return s + + +def pderiv(p): + return ptrim([i * p[i] for i in range(1, len(p))] or [0]) + + +# ---------------------------------------------------------------- constants: pi (Machin) and Gamma (series) +def atan_inv(n, terms): + s = Fr(0) + for k in range(terms): + s += Fr((-1) ** k, (2 * k + 1) * n ** (2 * k + 1)) + nxt = Fr((-1) ** terms, (2 * terms + 1) * n ** (2 * terms + 1)) + return (min(s, s + nxt), max(s, s + nxt)) + + +def rat_iv(lo, hi): + return (CD.divide(Dec(lo.numerator), Dec(lo.denominator)), CU.divide(Dec(hi.numerator), Dec(hi.denominator))) + + +a5, a239 = atan_inv(5, 40), atan_inv(239, 12) +PI = rat_iv(16 * a5[0] - 4 * a239[1], 16 * a5[1] - 4 * a239[0]) +need(contains(PI, Dec('3.141592653589793238462643383279502884')), 'pi') +need(PI[1] - PI[0] < Dec('1e-20'), 'pi') + +GX, GN = 50, (20 if MUT == 'M8' else 220) + + +def gamma_iv(a): + """Gamma(a), a rational in (0, 3]: gamma(a, X) by its alternating series, plus Gamma(a, X) >= 0 bounded above.""" + a = Fr(a) + need(GN > GX + 1, 'gamma') + s, term = Fr(0), Fr(1) + for n in range(GN): + s += term / (n + a) + term = term * (-GX) / (n + 1) + tail = abs(term) / (GN + a) # first omitted term; terms decrease for n >= X + xa = ipow(pt(Dec(GX)), a) + lo = mul(xa, rat_iv(s - tail, s - tail))[0] + hi = mul(xa, rat_iv(s + tail, s + tail))[1] + # Gamma(a, X) <= X^{a-1} e^{-X} / (1 - (a-1)/X) for 1 <= a < X; <= X^{a-1} e^{-X} for a <= 1 + c = Fr(1) if a <= 1 else 1 / (1 - (a - 1) / GX) + up = mul(mul(ipow(pt(Dec(GX)), a - 1), iexp(pt(Dec(-GX)))), q(c))[1] + return (lo, CU.add(hi, up)) + + +G1, G2, GH = gamma_iv(1), gamma_iv(2), gamma_iv(Fr(1, 2)) +need(contains(G1, Dec(1)) and contains(G2, Dec(1)), 'gamma') +need(mul(GH, GH)[0] <= PI[1] and mul(GH, GH)[1] >= PI[0], 'gamma') +need(G1[1] - G1[0] < Dec('1e-18'), 'gamma') +GAM = {r: gamma_iv(r) for r in (Fr(1, 6), Fr(7, 6), Fr(11, 6), Fr(11, 12), Fr(5, 4), Fr(3, 4), Fr(7, 3), Fr(1, 2), + Fr(7, 4), Fr(3, 2))} +# crude bounds used in the tails (log-convexity: Gamma <= 1 on [1, 2]; Gamma(x) = Gamma(1 + x)/x) +for r, b in ((Fr(7, 6), 1), (Fr(11, 6), 1), (Fr(5, 4), 1), (Fr(11, 12), Fr(12, 11)), (Fr(3, 4), Fr(4, 3)), + (Fr(7, 3), Fr(4, 3)), (Fr(7, 4), 1), (Fr(3, 2), 1)): + need(GAM[r][1] <= q(b)[0], 'gamma') + +SQRT_PI = isqrt(PI) +SQ3 = isqrt(q(3)) +SQ6 = isqrt(q(6)) +SQ4PI = isqrt(mul(q(4), PI)) +SQ2PI = isqrt(mul(q(2), PI)) +PHI0 = div(q(1), SQ4PI if MUT == 'M18' else SQ2PI) # phi(0) = 1/sqrt(2 pi) +C6 = mul(q(576), SQ3 if MUT == 'M11' else SQ6) # s = C6 tau^2 g, C6 = 576 sqrt6 +# Lemma 4: k = tau gamma^2; gamma^6 k^{-8/3} dk = tau^{-8/3} |gamma|^{8/3} dtau; the t-density adds tau^{-1}; +# s = 576 sqrt6 k^2/|gamma|^3 = 576 sqrt6 tau^2 |gamma|. Constants: (1/2400) (t-density 1/(12 sqrt(4 pi))) (2: evenness) +need(6 - 2 * Fr(8, 3) + 2 == Fr(8, 3) and Fr(-8, 3) - 1 == Fr(-11, 3) and 2 * 2 - 3 == 1, 'lemma4') +C1_RAT = Fr(1, 2400) * 2 / (6 if MUT == 'M15' else 12) # C1 sqrt(4 pi) +C3_RAT = Fr(1, 2400) * 2 / 12 / 4 # C3 pi, since (4 pi)^{-1/2} (4 pi)^{-1/2} = 1/(4 pi) +need(C1_RAT == Fr(1, 14400) and C3_RAT == Fr(1, 57600), 'lemma4') +C1 = div(q(C1_RAT), SQ4PI) # T1 weight constant 1/(14400 sqrt(4 pi)) +C3 = div(q(C3_RAT), PI) # T3 weight constant 1/(57600 pi) +# the defining identities, written independently of the lines above +need(contains(mul(mul(mul(C1, C1), q(14400 ** 2)), mul(q(4), PI)), Dec(1)), 'lemma4') +need(contains(mul(mul(C3, q(57600)), PI), Dec(1)), 'lemma4') +need(contains(mul(C6, C6), Dec(576 ** 2 * 6)), 'lemma4') +need(contains(mul(mul(PHI0, PHI0), mul(q(2), PI)), Dec(1)), 'lemma4') +if MUT == 'M4': + C1 = mul(C1, q(2)) +if MUT == 'M5': + C3 = mul(C3, q(2)) + + +# ---------------------------------------------------------------- R2 = I0 - T2 (#244 (3.3)) and its exact facts +def T2poly(t): + return add(sub(q(Fr(20, 3)), mul(q(20), t)), mul(q(Fr(52, 3)), mul(t, t))) + + +P0C = [Fr(11, 3), Fr(-21, 2), Fr(16 if MUT == 'M6' else 17, 2), Fr(-4, 3)] +P1C = [Fr(3), Fr(-15, 2), Fr(9, 2)] # (3/2)(1 - t)(2 - 3t) +T2C = [Fr(20, 3), Fr(-20), Fr(52, 3)] + + +def polyiv(c, t): + s = q(c[-1]) + for a in reversed(c[:-1]): + s = add(mul(s, t), q(a)) + return s + + +def R2iv(x): + """Enclosure of R2(x) for an exact Decimal x.""" + t = pt(x) + if 3 * Fr(x) <= 2: + S = isqrt(sub(q(1), mul(q(Fr(4, 3)), t))) + return sub(add(polyiv(P0C, t), mul(polyiv(P1C, t), S)), polyiv(T2C, t)) + if x <= 1: + u = sub(mul(q(2), t), q(1)) + return sub(mul(mul(u, u), div(sub(q(2), t), q(3))), polyiv(T2C, t)) + return sub(sub(t, q(Fr(2, 3))), polyiv(T2C, t)) + + +# (a) the pieces of (3.3) agree at t = 2/3 (S = 1/3) and t = 1; R2(0) = 0 +need(peval(P0C, Fr(2, 3)) + peval(P1C, Fr(2, 3)) * Fr(1, 3) == Fr(4, 81), 'R2_formula') +need((2 * Fr(2, 3) - 1) ** 2 * (2 - Fr(2, 3)) / 3 == Fr(4, 81), 'R2_formula') +need(peval(P0C, 0) + peval(P1C, 0) - peval(T2C, 0) == 0, 'R2_formula') +need(Fr(1) ** 2 * (2 - 1) / 3 == 1 - Fr(2, 3), 'R2_formula') # the pieces agree at t = 1 +for xs in ('0.001', '0.01'): + x = Dec(xs) + ratio = div(R2iv(x), q(Fr(x) ** 3)) + need(Dec('-3.2') < ratio[0] and ratio[1] < Dec('-3.0'), 'R2_formula') # R2(t)/t^3 -> -28/9 +# (b) monotonicity: with t = 3(1 - S^2)/4, 16 S R2'(t) = (S - 1)^2 W(S) on t < 2/3 +tS = [Fr(3, 4), Fr(0), Fr(-3, 4)] +dP0, dP1, dT2 = pderiv(P0C), pderiv(P1C), pderiv(T2C) +# 16 S (P0' + P1' S + P1 S' - T2') with S' = -2/(3S): 16 S P0' + 16 S^2 P1' - (32/3) P1 - 16 S T2' +lhs = padd(padd(pmul([0, 16], pcompose(dP0, tS)), pmul([0, 0, 16], pcompose(dP1, tS))), + padd(pscale(pcompose(P1C, tS), Fr(-32, 3)), pmul([0, -16], pcompose(dT2, tS)))) +QC = [Fr(1), Fr(-94), Fr(-206 if MUT == 'M1' else -207), Fr(-36)] # the note's W(S) +need(ptrim(lhs) == ptrim(pmul(pmul([-1, 1], [-1, 1]), QC)), 'R2_monotone') +need(peval(QC, Fr(1, 3)) < 0 and all(c <= 0 for c in pderiv(QC)), 'R2_monotone') # W < 0 on S >= 1/3 +# t in [2/3, 1]: R2' = (2t - 1)(3 - 2t) + 20 - (104/3) t <= 1 + 20 - (104/3)(2/3) < 0; t >= 1: 21 - 104/3 < 0 +need(1 + 20 - Fr(104, 3) * Fr(2, 3) < 0 and 21 - Fr(104, 3) < 0, 'R2_monotone') +need(ptrim([Fr(-3), Fr(8), Fr(-4)]) == ptrim(padd([1], pscale(pmul([-1, 1], [-1, 1]), -4))), 'R2_monotone') # = 1 - 4(t-1)^2 +MIDC = [Fr(2, 3), Fr(-3), Fr(4), Fr(-4, 3)] # (2t - 1)^2 (2 - t)/3 +need(ptrim(pmul(pmul([-1, 2], [-1, 2]), [Fr(2, 3), Fr(-1, 3)])) == MIDC, 'R2_monotone') +need(pderiv(padd(MIDC, pscale(T2C, -1))) == + ptrim(padd([Fr(21), Fr(-104, 3)], pscale(pmul([-1, 1], [-1, 1]), -4))), 'R2_monotone') # 21 - 4(t-1)^2 - (104/3)t +need(pderiv(padd([Fr(-2, 3), Fr(1)], pscale(T2C, -1))) == [Fr(21), Fr(-104, 3)], 'R2_monotone') +# (c) majorant: R2(-t) = -3 - 19t/2 - 53t^2/6 + 4t^3/3 + (3/2)(1 + t)(2 + 3t) S+ ; P1(-t) = (3/2)(1 + t)(2 + 3t) +m1 = [Fr(0), Fr(-1)] +R2m_poly = padd(pcompose(P0C, m1), pscale(pcompose(T2C, m1), -1)) +need(ptrim(R2m_poly) == ptrim([Fr(-3), Fr(-19, 2), Fr(-53, 6), Fr(4, 3)]), 'R2_majorant') +need(ptrim(pcompose(P1C, m1)) == ptrim(pscale(pmul([1, 1], [2, 3]), Fr(3, 2))), 'R2_majorant') +# with S+ <= 1 + (2/sqrt3) sqrt t: R2(-t) <= (4/3)t^3 + 3 sqrt3 t^{5/2} - (13/3)t^2 + 5 sqrt3 t^{3/2} - 2t + 2 sqrt3 t^{1/2} +poly_part = padd(R2m_poly, pscale(pmul([1, 1], [2, 3]), Fr(3, 2))) +need(ptrim(poly_part) == ptrim([Fr(0), Fr(-2), Fr(-13, 3), Fr(4, 3)]), 'R2_majorant') +need(ptrim(pmul([1, 1], [2, 3])) == [2, 5, 3], 'R2_majorant') +# |W(S)| <= 755 on [1, sqrt(7/3)] (W decreasing, W(sqrt(7/3)) = -(36 (7/3) + 94) sqrt(7/3) - 207 (7/3) + 1) +qv = add(neg(mul(add(q(Fr(36 * 7, 3)), q(94)), isqrt(q(Fr(7, 3))))), q(Fr(-207 * 7, 3) + 1)) +need(qv[0] >= -755, 'R2_majorant') +# so R2(-t) <= int_0^t (2u/3)^2 755/16 du = (755/108) t^3 <= 7 t^3 on [0, 1]; for t >= 1, U(t) <= (2/3 + 5 sqrt3) t^3 +need(Fr(755, 108) <= 7 and add(q(Fr(2, 3)), mul(q(5), SQ3))[1] <= 10, 'R2_majorant') +need(ptrim(padd(pmul([1, Fr(2, 3)], [1, Fr(2, 3)]), [-1, Fr(-4, 3)])) == [0, 0, Fr(4, 9)], 'R2_majorant') # (1 + 2u/3)^2 - (1 + 4u/3) +need(Fr(4, 9) * Fr(755, 16) / 3 == Fr(755, 108), 'R2_majorant') # int_0^t (2u/3)^2 (755/16) du + +# ---------------------------------------------------------------- Birnbaum's Mills-ratio bound (note DC, Lemma 3) +X2 = [0, 0, 1] # x^2 +bir = 3 if MUT == 'M2' else 4 +need(ptrim(padd(pmul(pmul(padd(X2, [1]), padd(X2, [1])), padd(X2, [bir])), + pscale(pmul(X2, pmul(padd(X2, [3]), padd(X2, [3]))), -1))) == [4], 'mills') +need(ptrim(padd(pmul(padd(X2, [2]), padd(X2, [2])), pscale(pmul(X2, padd(X2, [4])), -1))) == [4], 'mills') +# Lemma 3's reductions in Q[x][w]/(w^2 - x^2 - 4), elements (P, R) = P + R w: +# 2w(-1 + x b - b') with b = (w - x)/2, b' = (x/w - 1)/2 equals -2w + (x w^2 - x^2 w) - (x - w) = x^3 + 3x - (x^2 + 1) w +W2 = padd(X2, [4]) +red = (padd(pmul([0, 1], W2), [0, -1]), [-2, 0, -1, 0]) +red = (ptrim(red[0]), ptrim(padd(red[1], [1]))) +need(red == (ptrim([0, 3, 0, 1]), ptrim([-1, 0, -1])), 'mills') +# 1 - a b(a) = 1 - a (w - a)/2 = (2 + a^2)/2 - (a/2) w +need((ptrim(padd([1], pscale(pmul([0, 1], [0, 1]), Fr(1, 2)))), [0, Fr(-1, 2)]) == + (ptrim([1, 0, Fr(1, 2)]), [0, Fr(-1, 2)]), 'mills') + + +def thetap_iv(a): + """theta+(a) = 2 phi(a) / (2 + a^2 + a sqrt(a^2 + 4)) for an exact Decimal a >= 0.""" + A = pt(a) + num = mul(q(2), mul(PHI0, iexp(neg(div(mul(A, A), q(2)))))) + den = add(add(q(2), mul(A, A)), mul(A, isqrt(add(mul(A, A), q(4))))) + return div(num, den) + + +TH_STEP, TH_N = 200, 8000 # table at a = k/200, k <= 8000 (a <= 40) +THTAB = [thetap_iv(CN.divide(Dec(k), Dec(TH_STEP)))[1] for k in range(TH_N + 1)] + + +def th_idx_scaled(x): + # x is a lower bound of TH_STEP * a; the table entry at floor(x) / TH_STEP <= a bounds theta+(a) above + if MUT == 'M9': + return min(max(int(x.to_integral_value(rounding=decimal.ROUND_CEILING)), 0), TH_N) + return min(max(int(x.to_integral_value(rounding=decimal.ROUND_FLOOR)), 0), TH_N) + + +def th_index(a_lo): + return th_idx_scaled(CD.multiply(a_lo, TH_STEP)) + + +for s_ in ('0', '0.0049', '0.5', '0.731', '1.0001', '2.5', '3.14159', '7.777', '12.3456', '39.999', '55'): + a = Dec(s_) + need(thetap_iv(a)[1] <= THTAB[th_index(a)], 'theta_table') +need(all(THTAB[k + 1] <= THTAB[k] for k in range(TH_N)), 'theta_table') +need(thetap_iv(Z)[1] >= PHI0[0] and thetap_iv(Z)[0] <= PHI0[1], 'theta_table') + +# ---------------------------------------------------------------- T2 (closed form) +need((Fr(1, 32) - Fr(13, 480 if MUT == 'M3' else 486)) * 576 * 576 * 6 / (2 * 2400) == Fr(28, 15), 'T2') +T2 = mul(mul(q(Fr(28, 15)), ipow(pt(Dec(12)), Fr(-7, 6))), GAM[Fr(7, 6)]) +need(T2[0] >= Dec('0.0953758') and T2[1] <= Dec('0.0953759'), 'T2') + +# ---------------------------------------------------------------- grids (exact decimals) +CEIL3 = decimal.Context(prec=3, rounding=decimal.ROUND_CEILING) +CEIL2 = decimal.Context(prec=2, rounding=decimal.ROUND_CEILING) +CEIL6 = decimal.Context(prec=6, rounding=decimal.ROUND_CEILING) + + +def geo_grid(a, b, ratio): + pts, r = [Dec(a)], Dec(ratio) + while pts[-1] < Dec(b): + pts.append(CEIL6.multiply(pts[-1], r)) + return pts + + +def t1_grid(tmax, hrel='0.01', t0='1e-7'): + """0, then geometric points from t0 with ratio 1 + hrel (rounded up to 6 significant digits), up to >= tmax.""" + pts, r = [Z, Dec(t0)], CN.add(Dec(1), Dec(hrel)) + while pts[-1] < tmax: + pts.append(CEIL6.multiply(pts[-1], r)) + return pts + + +def t3_grid(tmax, hk='0.005', hrel='0.02', sym=False): + """Increasing exact points: fine step hk on [-1, 1], relative step hrel beyond; from <= -tmax to 1 (or to >= tmax).""" + neg_pts = [Dec(1)] + while neg_pts[-1] > -tmax: + x = neg_pts[-1] + h = Dec(hk) if x > -1 else max(Dec(hk), CEIL3.multiply(-x, Dec(hrel))) + neg_pts.append(CN.subtract(x, h)) + pts = neg_pts[::-1] + if sym: + while pts[-1] < tmax: + x = pts[-1] + h = Dec(hk) if x < 1 else max(Dec(hk), CEIL3.multiply(x, Dec(hrel))) + pts.append(CN.add(x, h)) + return pts + + +def increasing(pts): + return all(pts[i] < pts[i + 1] for i in range(len(pts) - 1)) + + +# ---------------------------------------------------------------- the g-direction: m_p(g) = g^p e^{-g^2/4} +M_CACHE = {} + + +def m_iv(g, p): + if g == 0: + return (Z, Z) + G = pt(g) + return iexp(sub(mul(q(p), iln(G)), div(mul(G, G), q(4)))) + + +def m_peak(p): + # maximum of m_p at g^2 = 2p: exp((p/2) ln(2p) - p/2) + return iexp(sub(mul(q(p / 2), iln(q(2 * p))), q(p / 2))) + + +PEAK = {Fr(8, 3): m_peak(Fr(8, 3)), Fr(11, 3): m_peak(Fr(11, 3))} +need(Fr(8, 3) * 2 == Fr(16, 3), 'gstar') # d/dg log m_{8/3} = (8/3)/g - g/2 vanishes at g^2 = 16/3 +need(Fr(11, 3) * 2 == Fr(22, 3), 'gstar') + + +def g_cells(dg, n, p): + """Per cell j = [j dg, (j+1) dg]: (upper bound of sup m_p, lower bound of inf m_p); m_p is log-concave.""" + key = (dg, n, p) + if key not in M_CACHE: + vals = [m_iv(CN.multiply(dg, Dec(j)), p) for j in range(n + 1)] + out = [] + for j in range(n): + ga, gb = Fr(dg) * j, Fr(dg) * (j + 1) + if gb * gb <= 2 * p: + sup = vals[j + 1][1] + elif ga * ga >= 2 * p: + sup = vals[j][1] + else: + sup = PEAK[p][1] + out.append((sup, min(vals[j][0], vals[j + 1][0]))) + M_CACHE[key] = out + return M_CACHE[key] + + +def g_step(tau, scale, n): + """dg (2 significant digits, rounded up) with n dg >= min(14, scale (12 tau^2)^{-1/4}).""" + greq = min(Fr(14), Fr(scale) * Fr(ipow(mul(q(12), pt(CN.multiply(tau, tau))), Fr(-1, 4))[1])) + return CEIL2.divide(Dec(greq.numerator), Dec(greq.denominator) * n) + + +def g_tail(tau, G, p): + """Upper bound of int_G^inf m_p(g) e^{-12 tau^2 g^4} dg (Gamma factors bounded crudely).""" + gam2 = {Fr(8, 3): Fr(1), Fr(11, 3): Fr(4, 3)}[p] # Gamma((p+1)/2) <= . + gam4 = {Fr(8, 3): Fr(12, 11), Fr(11, 3): Fr(1)}[p] # Gamma((p+1)/4) <= . + Gi = pt(G) + b1 = mul(mul(iexp(neg(div(mul(Gi, Gi), q(8)))), q(gam2 / 2)), ipow(q(8), (p + 1) / 2)) + t6 = mul(q(6), pt(CN.multiply(tau, tau))) + b2 = mul(mul(iexp(neg(mul(t6, mul(mul(Gi, Gi), mul(Gi, Gi))))), q(gam4 / 4)), ipow(t6, -(p + 1) / 4)) + return min(b1[1], b2[1]) + + +def g_integral(tau, p, n, scale=6, want_lower=True): + """Enclosure of int_0^inf m_p(g) e^{-12 tau^2 g^4} dg.""" + dg = g_step(tau, scale, n) + cells = g_cells(dg, n, p) + t12 = CN.multiply(Dec(12), CN.multiply(tau, tau)) + up, lo = Z, Z + for j in range(n): + ga = CN.multiply(dg, Dec(j)) + gb = CN.add(ga, dg) + e_up = upx(CD.multiply(t12, CD.multiply(CD.multiply(ga, ga), CD.multiply(ga, ga)))) + up = CU.add(up, CU.multiply(CU.multiply(dg, cells[j][0]), e_up)) + if want_lower: + e_lo = lox(CU.multiply(t12, CU.multiply(CU.multiply(gb, gb), CU.multiply(gb, gb)))) + lo = CD.add(lo, CD.multiply(CD.multiply(dg, cells[j][1]), e_lo)) + up = CU.add(up, g_tail(tau, CN.multiply(dg, Dec(n)), p)) + return (lo, up) + + +MFAC = div(q(2), SQ4PI) # M(tau) = (2/sqrt(4 pi)) int m_{8/3} e^{-12 tau^2 g^4} dg +if MUT == 'M10': + MFAC = div(q(2), mul(q(4), PI)) + + +def M_enc(tau, n=280): + return mul(MFAC, g_integral(tau, Fr(8, 3), n)) + + +# M(0) and N(0) in closed form, compared with the g-cell enclosures at tau = 0+ (a check of the g machinery) +M0 = mul(div(ipow(q(2), Fr(8, 3)), SQRT_PI), GAM[Fr(11, 6)]) # E|g|^{8/3} = 2^{8/3} Gamma(11/6)/sqrt(pi) +need(M_enc(Dec('1e-9'))[0] <= M0[1] and M0[0] <= M_enc(Dec('1e-9'))[1], 'g_machinery') +N0 = mul(mul(q(Fr(1, 2)), ipow(q(4), Fr(7, 3))), GAM[Fr(7, 3)]) # int g^{11/3} e^{-g^2/4} = (1/2) 4^{7/3} Gamma(7/3) +need(g_integral(Dec('1e-9'), Fr(11, 3), 200)[0] <= N0[1] <= CU.multiply(g_integral(Dec('1e-9'), Fr(11, 3), 200)[1], Dec(2)), 'g_machinery') +need(g_integral(Dec('1e-9'), Fr(11, 3), 200)[1] >= N0[0], 'g_machinery') + +# ---------------------------------------------------------------- T1 = int dtau int_0^inf dt C1 tau^{-11/3} M(tau) e^{-t^2/(576 tau^2)} R2e(t) +BETA_H = Dec(9) +E_BH = iexp(q(Fr(-81, 8))) # e^{-beta_H^2/8} +U_TERMS = [(Fr(3), q(Fr(2, 3))), (Fr(5, 2), mul(q(Fr(3, 2)), SQ3)), (Fr(3, 2), mul(q(Fr(5, 2)), SQ3)), (Fr(1, 2), SQ3)] +GUP = {Fr(2): Fr(1), Fr(7, 4): Fr(1), Fr(5, 4): Fr(1), Fr(3, 4): Fr(4, 3), Fr(3, 2): Fr(1)} # Gamma(.) <= . + + +def tpow(x, r): + return ipow(pt(x), r) + + +def half_moment(V, n): + """Upper bound of int_0^inf e^{-t^2/V} t^n dt = (1/2) V^{(n+1)/2} Gamma((n+1)/2).""" + return mul(mul(q(Fr(1, 2)), ipow(V, (n + 1) / 2)), q(GUP[(n + 1) / 2])) + + +def t1_cell(ta, tb, m_a, m_b): + """T1 on the tau-cell [ta, tb]: pa >= dtau sup C1 tau^{-11/3} M(tau), pb <= dtau inf C1 tau^{-11/3} M(tau) + (M decreasing; m_a, m_b enclose M(ta), M(tb)); and the exact denominators 576 ta^2, 576 tb^2.""" + dtau = CN.subtract(tb, ta) + ts, ms = (tb, m_b) if MUT == 'M16' else (ta, m_a) + pa = CU.multiply(CU.multiply(C1[1], tpow(ts, Fr(-11, 3))[1]), CU.multiply(ms[1], dtau)) + pb = CD.multiply(CD.multiply(C1[0], tpow(tb, Fr(-11, 3))[0]), CD.multiply(m_b[0], dtau)) + return pa, pb, CN.multiply(Dec(576), CN.multiply(ta, ta)), CN.multiply(Dec(576), CN.multiply(tb, tb)) + + +def gauss_up(u0, den): + """Upper bound of e^{-t^2/(576 tau^2)} for t >= u0 >= 0 and 576 tau^2 <= den.""" + return upx(CD.divide(CD.multiply(u0, u0), den)) + + +def gauss_lo(u1, den): + """Lower bound of e^{-t^2/(576 tau^2)} for 0 <= t <= u1 and 576 tau^2 >= den.""" + return lox(CU.divide(CU.multiply(u1, u1), den)) + + +def t1_gauss(u0, u1, den_a, den_b): + """(Upper bound of the sup, lower bound of the inf) of e^{-t^2/(576 tau^2)} on [u0, u1] x [ta, tb].""" + return gauss_up(u0, den_b), gauss_lo(u1, den_a) + + +def rho_up(u0, u1): + """Upper bound of sup R2e on [u0, u1], 0 <= u0 <= u1: (R2(u0) + R2(-u1))/2, since R2 decreases (Lemma 2(a)).""" + return CU.multiply(Dec('0.5'), CU.add(R2iv(u0)[1], R2iv(-u1)[1])) + + +LOG = {'T1': [], 'T3': [], 'SEP': [], 'K': []} # factors used by the production loops on sampled cells + + +def T1_bound(tau_pts, tg, mode, log_cells=()): + """mode 'R2': (cell sum, tail sum) upper bounds of T1 on [tau_0, tau_N]; mode 'mom': (lower, upper) for t^2.""" + need(increasing(tau_pts) and increasing(tg) and tg[0] == 0, 'partition') + rho = None + if mode == 'R2': + rho = [rho_up(tg[j], tg[j + 1]) for j in range(len(tg) - 1)] + need(R2iv(Z)[0] <= 0 <= R2iv(Z)[1], 'R2_formula') # R2(0) = 0, so R2(t) <= 0 for t >= 0 + menc = [M_enc(x) for x in tau_pts] + up, lo, tails = Z, Z, Z + prev = tau_pts[0] + for i in range(len(tau_pts) - 1): + if MUT == 'M7' and i == 400: + continue + ta, tb = tau_pts[i], tau_pts[i + 1] + need(ta == prev, 'partition') + prev = tb + pa, pb, den_a, den_b = t1_cell(ta, tb, menc[i], menc[i + 1]) + tmax = CN.multiply(Dec(12), CN.multiply(tb, BETA_H)) + if MUT == 'M12': + tmax = CN.divide(tmax, Dec(2)) + J = 0 + while tg[J] < tmax: + J += 1 + need(tg[J] >= CN.multiply(Dec(12), CN.multiply(tb, BETA_H)), 'partition') + # cells [0, tg[j0]] (merged) and [tg[j], tg[j+1]] for j0 <= j < J, with tg[j0] <= 12 ta / 1000 + tlo = CN.multiply(Dec('0.012'), ta) + j0 = 0 + while j0 + 1 < J and tg[j0 + 1] <= tlo: + j0 += 1 + cells_t = ([(Z, tg[j0], rho_up(Z, tg[j0]) if mode == 'R2' else None)] if j0 > 0 else []) + \ + [(tg[j], tg[j + 1], rho[j] if mode == 'R2' else None) for j in range(j0, J)] + nct = len(cells_t) + sample = {0, 1, nct // 4, nct // 2, (3 * nct) // 4, nct - 1} if i in log_cells else () + for c, (u0, u1, rj) in enumerate(cells_t): + dt = CN.subtract(u1, u0) + eu, el = t1_gauss(u0, u1, den_a, den_b) + if mode == 'R2': + dr = CU.multiply(dt, rj) # an upper bound of dt * rho for either sign of rho + if rj >= 0: + wu, ew = pa, eu + up = CU.add(up, CU.multiply(CU.multiply(wu, ew), dr)) + else: + wu, ew = pb, el + up = CU.add(up, CU.multiply(CD.multiply(wu, ew), dr)) + if c in sample: + LOG['T1'].append((ta, tb, u0, u1, wu, ew, rj)) + else: + up = CU.add(up, CU.multiply(CU.multiply(pa, eu), CU.multiply(dt, CU.multiply(u1, u1)))) + lo = CD.add(lo, CD.multiply(CD.multiply(pb, el), CD.multiply(dt, CD.multiply(u0, u0)))) + # t-tail beyond tg[J] >= 12 tb beta_H: int_T^inf e^{-t^2/(576 tau^2)} t^n <= e^{-beta_H^2/8} (1/2) V^{(n+1)/2} Gamma + V = q(1152 * Fr(tb) ** 2) + if mode == 'R2': + # R2e <= U(t) and R2e <= 10 t^3: use the smaller tail integral + tt = Z + for n, a in U_TERMS: + tt = CU.add(tt, mul(a, half_moment(V, n))[1]) + tt = min(tt, mul(q(10), half_moment(V, Fr(3)))[1]) + else: + tt = half_moment(V, Fr(2))[1] + tails = CU.add(tails, CU.multiply(CU.multiply(pa, E_BH[1]), tt)) + if mode == 'R2': + return up, tails + return lo, CU.add(up, tails) + + +def T1_tau_tails(tau0, tauN, mode): + """Upper bounds of the T1 contributions from tau < tau0 and tau > tauN.""" + Minf = mul(mul(MFAC, q(Fr(1, 4))), mul(ipow(q(12), Fr(-11, 12)), q(Fr(12, 11)))) # M(tau) <= Minf tau^{-11/6} + low_terms = [(Fr(3), q(10))] if mode == 'R2' else [(Fr(2), q(1))] # R2e(t) <= 10 t^3 + high_terms = U_TERMS if mode == 'R2' else [(Fr(2), q(1))] + low = Z + for n, a in low_terms: + # int_0^tau0 C1 tau^{-11/3} M(0) a (1/2)(24 tau)^{n+1} Gamma((n+1)/2) dtau + c = mul(mul(C1, M0), mul(a, half_moment(q(576), n))) + low = CU.add(low, mul(c, div(tpow(tau0, n - Fr(5, 3)), q(n - Fr(5, 3))))[1]) + high = Z + for n, a in high_terms: + c = mul(mul(C1, Minf), mul(a, half_moment(q(576), n))) + high = CU.add(high, mul(c, div(tpow(tauN, n - Fr(7, 2)), q(Fr(7, 2) - n)))[1]) + return low, high + + +# ---------------------------------------------------------------- T3: C3 tau^{-11/3} m(g) e^{-12 tau^2 g^4} e^{-t^2/(576 tau^2)} kappa(1-t) s theta(|8-12t|/s) +def kappa_iv(v): + x = mul(q(3), sub(q(1), pt(v))) + if x[1] <= 0: + return (Z, Z) + return div(mul(x, isqrt(x)), q(6)) + + +TAU_L3, TAU_M, TAU_H = '0.002', '2', '1000' +T3G = t3_grid(CN.multiply(Dec(12 * 9), CN.multiply(Dec(TAU_H), Dec('1.05')))) +need(increasing(T3G) and T3G[-1] == 1, 'partition') +KAP = [kappa_iv(v) for v in T3G] +TABS = [] +RMIN = [] +for k in range(len(T3G) - 1): + fa, fb = Fr(T3G[k]), Fr(T3G[k + 1]) + ta_ = Fr(0) if fa <= 0 <= fb else min(abs(fa), abs(fb)) + ra_ = Fr(0) if 3 * fa <= 2 <= 3 * fb else min(abs(8 - 12 * fa), abs(8 - 12 * fb)) + TABS.append(q(ta_)[0]) # lower bounds (exact here): larger Gaussian factor, larger theta+ + RMIN.append(q(ra_)[0]) +CC = mul(mul(C3, PHI0), C6) # constant of the unsuppressed bound + + +def t3_start(tb): + T = CN.multiply(Dec(12), CN.multiply(tb, BETA_H)) + k0 = len(T3G) - 1 + while k0 > 0 and T3G[k0] > -T: + k0 -= 1 + need(T3G[k0] <= -T, 'partition') + return k0 + + +def K_tail(tb, k0): + """Upper bound of int_{-inf}^{T3G[k0]} e^{-t^2/(576 tau^2)} kappa(1-t) dt for tau <= tb (T3G[k0] <= -12 tb beta_H).""" + V = q(1152 * Fr(tb) ** 2) + br = add(half_moment(V, Fr(3, 2)), mul(q(Fr(3, 2)), add(mul(q(Fr(1, 2)), mul(ipow(V, Fr(1, 2)), SQRT_PI)), + half_moment(V, Fr(1, 2))))) + return mul(mul(E_BH, div(ipow(q(3), Fr(3, 2)), q(6))), br)[1] + + +def t3_tw(k, tb): + """Upper bound of dt * sup e^{-t^2/(576 tau^2)} kappa(1 - t) over the t-cell k and tau <= tb.""" + den = CN.multiply(Dec(576), CN.multiply(tb, tb)) + kap = KAP[k + 1][1] if MUT == 'M14' else KAP[k][1] + return CU.multiply(CU.multiply(gauss_up(TABS[k], den), kap), CN.subtract(T3G[k + 1], T3G[k])) + + +def K_up(tb, log=False): + """Upper bound of K(tau) = int_{-inf}^1 e^{-t^2/(576 tau^2)} kappa(1-t) dt for tau <= tb (K is increasing in tau).""" + k0 = t3_start(tb) + nk = len(T3G) - 1 - k0 + sample = {k0, k0 + nk // 3, k0 + (2 * nk) // 3, len(T3G) - 2} if log else () + s = Z + for k in range(k0, len(T3G) - 1): + tw = t3_tw(k, tb) + s = CU.add(s, tw) + if k in sample: + LOG['K'].append((tb, k, tw)) + return CU.add(s, K_tail(tb, k0)) + + +def t3_cell(ta, tb, n3=48, gscale=3): + """The tau-cell [ta, tb] of the 3-d part: A >= dtau sup C3 tau^{-11/3}; per g-cell j (width dg): + w[j] >= dg sup m(g) e^{-12 tau^2 g^4}, s[j] >= sup s = 576 sqrt6 tau^2 g, inv[j] <= 200/s[j].""" + dtau = CN.subtract(tb, ta) + A = CU.multiply(CU.multiply(C3[1], tpow(ta, Fr(-11, 3))[1]), dtau) + dg = g_step(ta, gscale, n3) + cells = g_cells(dg, n3, Fr(8, 3)) + t12a = CN.multiply(Dec(12), CN.multiply(ta, ta)) + tsq = CN.multiply(ta, ta) if MUT == 'M13' else CN.multiply(tb, tb) + c6t2 = CU.multiply(C6[1], tsq) + w, sv, inv = [], [], [] + for j in range(n3): + ga = CN.multiply(dg, Dec(j)) + w.append(CU.multiply(CU.multiply(dg, cells[j][0]), + upx(CD.multiply(t12a, CD.multiply(CD.multiply(ga, ga), CD.multiply(ga, ga)))))) + sv.append(CU.multiply(c6t2, CN.add(ga, dg))) + inv.append(CD.divide(Dec(TH_STEP), sv[-1])) + return A, dg, w, sv, inv + + +TH_LIM = Dec(TH_STEP * 40) + + +def th_up(r, invj): + """Table bound of theta+(r'/s) for r' >= r and s <= s_j, with invj <= 200/s_j (Lemma 3).""" + return THTAB[th_idx_scaled(CD.multiply(r, invj))] + + +def lam_terms(r, gw, inv, GS): + """sum_j gw[j] th_j, with th_j >= theta+(r/s_j) from the table, and the list of the th_j used.""" + n = len(gw) + if r == 0: + return CU.multiply(THTAB[0], GS), [THTAB[0]] * n + if CD.multiply(r, inv[-1]) >= TH_LIM: # every a >= 40: the last table entry + return CU.multiply(THTAB[TH_N], GS), [THTAB[TH_N]] * n + ths = [th_up(r, inv[j]) for j in range(n)] + lam = Z + for j in range(n): + lam = CU.add(lam, CU.multiply(gw[j], ths[j])) + return lam, ths + + +def T3_3d(tau_pts, n3=48, gscale=3, log_cells=()): + need(increasing(tau_pts), 'partition') + total, tails = Z, Z + for i in range(len(tau_pts) - 1): + ta, tb = tau_pts[i], tau_pts[i + 1] + dtau = CN.subtract(tb, ta) + ta113 = tpow(ta, Fr(-11, 3))[1] + A, dg, w, sv, inv = t3_cell(ta, tb, n3, gscale) + gw = [CU.multiply(w[j], sv[j]) for j in range(n3)] + GS = Z + for x in gw: + GS = CU.add(GS, x) + k0 = t3_start(tb) + ksample = () + if i in log_cells: + ksample = {k0, (k0 + len(T3G) - 2) // 2, len(T3G) - 2} + ksample |= {k for k in range(k0, len(T3G) - 1) if T3G[k] <= Dec('0.6667') <= T3G[k + 1]} + ksample |= {k for k in range(k0, len(T3G) - 1) if T3G[k] <= Dec('-0.3') <= T3G[k + 1]} + invx = inv[::-1] if MUT == 'M17' else inv + acc = Z + for k in range(k0, len(T3G) - 1): + tw = t3_tw(k, tb) + lam, ths = lam_terms(RMIN[k], gw, invx, GS) + acc = CU.add(acc, CU.multiply(tw, lam)) + if k in ksample: + LOG['T3'].append((ta, tb, dtau, A, dg, gw, k, tw, ths)) + total = CU.add(total, CU.multiply(A, acc)) + # tails of this tau-cell: g > G (unsuppressed) and t below the grid (unsuppressed) + base = CU.multiply(CU.multiply(CC[1], ta113), CU.multiply(dtau, CN.multiply(tb, tb))) + gt = CU.multiply(g_tail(ta, CN.multiply(dg, Dec(n3)), Fr(11, 3)), Kcrude(tb)[1]) + nt = CU.multiply(g_integral(ta, Fr(11, 3), 200, want_lower=False)[1], K_tail(tb, k0)) + tails = CU.add(tails, CU.multiply(base, CU.add(gt, nt))) + return total, tails + + +def sep_fac(ta, tb): + """Upper bound of dtau sup_{[ta, tb]} C3 phi(0) 576 sqrt6 tau^{-5/3} N(tau) (N decreasing).""" + nn = g_integral(ta, Fr(11, 3), 200, want_lower=False)[1] + return CU.multiply(CU.multiply(CC[1], tpow(ta, Fr(-5, 3))[1]), CU.multiply(CN.subtract(tb, ta), nn)) + + +def T3_sep(tau_pts, log_cells=()): + """tau in [tau_M, tau_H]: theta <= phi(0); bound CC dtau ta^{-5/3} N+(ta) K+(tb).""" + need(increasing(tau_pts), 'partition') + total = Z + for i in range(len(tau_pts) - 1): + ta, tb = tau_pts[i], tau_pts[i + 1] + sf = sep_fac(ta, tb) + total = CU.add(total, CU.multiply(sf, K_up(tb, log=(i in log_cells)))) + if i in log_cells: + LOG['SEP'].append((ta, tb, sf)) + return total + + +def check_logs(): + """Group corners: every factor that a production loop used on a sampled cell dominates (or, for the infimum + weight of a negative T1 cell, is dominated by) an independent enclosure of the matching factor of the integrand, + at the corners, edge midpoints and centre of that cell. The comparisons are one-sided and cannot fail for + correct code.""" + def at(a, b, u): + return CN.add(a, CN.multiply(CN.subtract(b, a), u)) + U3 = [Dec(0), Dec('0.5'), Dec(1)] + need(len(LOG['T1']) >= 20 and len(LOG['T3']) >= 20 and len(LOG['SEP']) >= 3 and len(LOG['K']) >= 9, 'corners') + mc = {} + for (ta, tb, u0, u1, wu, ew, rj) in LOG['T1']: + dtau = CN.subtract(tb, ta) + for u in U3: + x = at(ta, tb, u) + if x not in mc: + mc[x] = M_enc(x) + v = mul(mul(C1, tpow(x, Fr(-11, 3))), mul(mc[x], pt(dtau))) + need(v[0] <= wu if rj >= 0 else v[1] >= wu, 'corners') + for ut in U3: + t = at(u0, u1, ut) + e = iexp(neg(div(mul(pt(t), pt(t)), mul(q(576), mul(pt(x), pt(x)))))) + need(e[0] <= ew if rj >= 0 else e[1] >= ew, 'corners') + for ut in U3: + t = at(u0, u1, ut) + need(mul(q(Fr(1, 2)), add(R2iv(t), R2iv(-t)))[0] <= rj, 'corners') + for (ta, tb, dtau, A, dg, gw, k, tw, ths) in LOG['T3']: + va, vb = T3G[k], T3G[k + 1] + for u in U3: + x = at(ta, tb, u) + need(mul(C3, mul(tpow(x, Fr(-11, 3)), pt(dtau)))[0] <= A, 'corners') + for ut in U3: + t = at(va, vb, ut) + e = iexp(neg(div(mul(pt(t), pt(t)), mul(q(576), mul(pt(x), pt(x)))))) + need(mul(mul(e, kappa_iv(t)), pt(CN.subtract(vb, va)))[0] <= tw, 'corners') + for j in (0, 7, 23, len(gw) - 1): + ga = CN.multiply(dg, Dec(j)) + gb = CN.add(ga, dg) + used = CU.multiply(gw[j], ths[j]) + for ug in U3: + g = at(ga, gb, ug) + if g == 0: + continue + for u in U3: + x = at(ta, tb, u) + wv = mul(pt(dg), mul(m_iv(g, Fr(8, 3)), iexp(neg(mul(mul(q(12), mul(pt(x), pt(x))), + mul(mul(pt(g), pt(g)), mul(pt(g), pt(g)))))))) + sx = mul(C6, mul(mul(pt(x), pt(x)), pt(g))) + for ut in U3: + t = at(va, vb, ut) + r = abs(CN.subtract(Dec(8), CN.multiply(Dec(12), t))) + th = thetap_iv(CU.divide(r, sx[0]))[0] + need(CD.multiply(CD.multiply(wv[0], sx[0]), th) <= used, 'corners') + for (ta, tb, sf) in LOG['SEP']: + for u in U3: + x = at(ta, tb, u) + nx = g_integral(x, Fr(11, 3), 200)[0] + need(mul(mul(CC, tpow(x, Fr(-5, 3))), mul(pt(nx), pt(CN.subtract(tb, ta))))[0] <= sf, 'corners') + for (tb, k, tw) in LOG['K']: + va, vb = T3G[k], T3G[k + 1] + for x in (tb, CN.multiply(tb, Dec('0.5'))): + for ut in U3: + t = at(va, vb, ut) + e = iexp(neg(div(mul(pt(t), pt(t)), mul(q(576), mul(pt(x), pt(x)))))) + need(mul(mul(e, kappa_iv(t)), pt(CN.subtract(vb, va)))[0] <= tw, 'corners') + + +def Kcrude(tau): + """Upper bound of K(tau) for every tau' <= tau: (3^{3/2}/6)[1 + (1/2)(24 tau)^{5/2} G(5/4) + (3/4)(24 tau sqrt(pi) + (24 tau)^{3/2} G(3/4))].""" + x = mul(q(24), pt(tau)) + br = add(add(q(1), mul(q(Fr(1, 2)), ipow(x, Fr(5, 2)))), + mul(q(Fr(3, 4)), add(mul(x, SQRT_PI), mul(ipow(x, Fr(3, 2)), q(Fr(4, 3)))))) + return mul(div(ipow(q(3), Fr(3, 2)), q(6)), br) + + +def T3_low(tauL): + """tau < tauL: (a) t in (1/3, 1] and (b) t <= 1/3, as in note DC, section 6 (the tails).""" + tL = pt(Dec(tauL)) + pre = mul(CC, mul(N0, ipow(tL, Fr(-2, 3)))) + a_part = mul(mul(pre, mul(q(Fr(2, 3)), div(ipow(q(2), Fr(3, 2)), q(6)))), + iexp(neg(div(q(1), mul(q(5184), mul(tL, tL)))))) + nb = mul(mul(q(Fr(1, 2)), ipow(q(8), Fr(7, 3))), q(Fr(4, 3))) # int g^{11/3} e^{-g^2/8} + b_part = mul(mul(mul(CC, nb), mul(Kcrude(Dec(tauL)), ipow(tL, Fr(-2, 3)))), + iexp(neg(div(q(2), mul(C6, mul(tL, tL)))))) + need(Fr(tauL) ** 2 < Fr(6, 5 * 5184), 'tails') # monotone factor on (0, tauL] + need(Fr(tauL) ** 2 * 5 * Fr(C6[1]) < 12, 'tails') + return add(a_part, b_part)[1] + + +def T3_high(tauH): + """tau > tauH: N(tau) <= (1/4)(12 tau^2)^{-7/6}, K(tau) <= Kcrude(tau).""" + tH = pt(Dec(tauH)) + c = mul(CC, mul(q(Fr(1, 4)), ipow(q(12), Fr(-7, 6)))) + x24 = q(24) + s = Z + # terms of tau^{-4} Kcrude(tau): exponents -4, -3/2, -3, -5/2 + k6 = div(ipow(q(3), Fr(3, 2)), q(6)) + for coef, ex in ((q(1), Fr(-4)), (mul(q(Fr(1, 2)), ipow(x24, Fr(5, 2))), Fr(-3, 2)), + (mul(q(Fr(3, 4)), mul(x24, SQRT_PI)), Fr(-3)), + (mul(q(Fr(3, 4)), mul(ipow(x24, Fr(3, 2)), q(Fr(4, 3)))), Fr(-5, 2))): + s = CU.add(s, mul(mul(c, mul(k6, coef)), div(ipow(tH, ex + 1), q(-(ex + 1))))[1]) + return s + + +# ---------------------------------------------------------------- normalization checks against closed forms +G16 = GAM[Fr(1, 6)] +# (1/2400) int k^{-8/3} e^{-12 k^2} E[g^6 t^2] dk = (576/2400)(1/2) 12^{-1/6} Gamma(1/6) +TGT1 = mul(mul(q(Fr(576, 4800)), ipow(q(12), Fr(-1, 6))), G16) +# (1/2400) int k^{-8/3} e^{-12 k^2} E[g^6 s] dk, s = 576 sqrt6 k^2/|g|^3, E|g|^3 = 8/sqrt(pi) +TGT3 = mul(mul(mul(q(Fr(576, 2400)), SQ6), div(q(8), SQRT_PI)), mul(q(Fr(1, 2)), mul(ipow(q(12), Fr(-1, 6)), G16))) +C36 = mul(C3, C6) +GAUSS_R = mul(q(24), SQRT_PI) # int_R e^{-t^2/(576 tau^2)} dt = 24 tau sqrt(pi) + + +def check_tau_tails(tau0, tauN): + low = mul(mul(C36, mul(GAUSS_R, N0)), mul(q(3), tpow(tau0, Fr(1, 3)))) + high = mul(mul(C36, mul(GAUSS_R, mul(q(Fr(1, 4)), ipow(q(12), Fr(-7, 6))))), div(tpow(tauN, Fr(-2)), q(2))) + return CU.add(low[1], high[1]) + + +def T3_check_3d(tau_pts): + """kappa = 1, K_sigma = s, t over R integrated exactly: (lower, upper) by the 3-d code's g- and tau-cells.""" + lo, up = Z, Z + n3 = 40 + for i in range(len(tau_pts) - 1): + ta, tb = tau_pts[i], tau_pts[i + 1] + dtau = CN.subtract(tb, ta) + A_up = CU.multiply(CU.multiply(C3[1], tpow(ta, Fr(-11, 3))[1]), dtau) + A_lo = CD.multiply(CD.multiply(C3[0], tpow(tb, Fr(-11, 3))[0]), dtau) + dg = g_step(ta, 5, n3) + cells = g_cells(dg, n3, Fr(8, 3)) + GS_up, GS_lo = Z, Z + t12a = CN.multiply(Dec(12), CN.multiply(ta, ta)) + t12b = CN.multiply(Dec(12), CN.multiply(tb, tb)) + for j in range(n3): + ga = CN.multiply(dg, Dec(j)) + gb = CN.add(ga, dg) + wu = CU.multiply(CU.multiply(dg, cells[j][0]), + upx(CD.multiply(t12a, CD.multiply(CD.multiply(ga, ga), CD.multiply(ga, ga))))) + wl = CD.multiply(CD.multiply(dg, cells[j][1]), + lox(CU.multiply(t12b, CU.multiply(CU.multiply(gb, gb), CU.multiply(gb, gb))))) + GS_up = CU.add(GS_up, CU.multiply(wu, CU.multiply(C6[1], CN.multiply(CN.multiply(tb, tb), gb)))) + GS_lo = CD.add(GS_lo, CD.multiply(wl, CD.multiply(C6[0], CN.multiply(CN.multiply(ta, ta), ga)))) + up = CU.add(up, CU.multiply(A_up, CU.multiply(GS_up, CU.multiply(GAUSS_R[1], tb)))) + lo = CD.add(lo, CD.multiply(A_lo, CD.multiply(GS_lo, CD.multiply(GAUSS_R[0], ta)))) + base = CU.multiply(CU.multiply(C36[1], tpow(ta, Fr(-11, 3))[1]), CU.multiply(dtau, CN.multiply(tb, tb))) + gt = CU.multiply(g_tail(ta, CN.multiply(dg, Dec(n3)), Fr(11, 3)), CU.multiply(GAUSS_R[1], tb)) + up = CU.add(up, CU.multiply(base, gt)) + return lo, up + + +def t_machinery(tau): + """The 3-d code's t-cells on the symmetric grid built like T3G: bracket int_R e^{-t^2/(576 tau^2)} dt = 24 tau sqrt(pi).""" + tgs = t3_grid(CN.multiply(Dec(108), tau), sym=True) + den = CN.multiply(Dec(576), CN.multiply(tau, tau)) + lo, up = Z, Z + for k in range(len(tgs) - 1): + va, vb = tgs[k], tgs[k + 1] + tabs = Z if va <= 0 <= vb else min(abs(va), abs(vb)) + tmx = max(abs(va), abs(vb)) + dt = CN.subtract(vb, va) + up = CU.add(up, CU.multiply(upx(CD.divide(CD.multiply(tabs, tabs), den)), dt)) + lo = CD.add(lo, CD.multiply(lox(CU.divide(CU.multiply(tmx, tmx), den)), dt)) + # Gaussian tails beyond |t| >= 12 tau beta_H: 2 e^{-beta_H^2/8} (1/2) sqrt(1152 tau^2) sqrt(pi) + up = CU.add(up, mul(mul(q(2), E_BH), mul(q(Fr(1, 2)), mul(ipow(q(1152 * Fr(tau) ** 2), Fr(1, 2)), SQRT_PI)))[1]) + exact = mul(GAUSS_R, pt(tau)) + need(lo <= exact[1] and exact[0] <= up and up <= CU.multiply(lo, Dec('1.2')), 't_machinery') + return lo, up + + +def T3_check_sep(tau_pts): + lo, up = Z, Z + for i in range(len(tau_pts) - 1): + ta, tb = tau_pts[i], tau_pts[i + 1] + dtau = CN.subtract(tb, ta) + nlo = g_integral(tb, Fr(11, 3), 100)[0] + nup = g_integral(ta, Fr(11, 3), 100, want_lower=False)[1] + up = CU.add(up, CU.multiply(CU.multiply(C36[1], tpow(ta, Fr(-5, 3))[1]), CU.multiply(dtau, CU.multiply(nup, CU.multiply(GAUSS_R[1], tb))))) + lo = CD.add(lo, CD.multiply(CD.multiply(C36[0], tpow(tb, Fr(-5, 3))[0]), CD.multiply(dtau, CD.multiply(nlo, CD.multiply(GAUSS_R[0], ta))))) + return lo, up + + +def run(): + # T1 moment check (validates C1, M, the t-cells and the tails) + tc = geo_grid('1e-4', '1e4', '1.05') + lo, up = T1_bound(tc, t1_grid(CN.multiply(Dec(108), tc[-1]), '0.05'), 'mom') + l_, h_ = T1_tau_tails(tc[0], tc[-1], 'mom') + up = CU.add(up, CU.add(l_, h_)) + need(lo <= TGT1[1] and TGT1[0] <= up and up <= CU.multiply(lo, Dec(3)), 'T1_moment') + mom1 = (lo, up) + # T3 moment checks (validate C3 C6, the g-cells, both tau-paths and the tails) + tc3 = geo_grid('1e-4', '1e4', '1.05') + lo3, up3 = T3_check_3d(tc3) + up3 = CU.add(up3, check_tau_tails(tc3[0], tc3[-1])) + need(lo3 <= TGT3[1] and TGT3[0] <= up3 and up3 <= CU.multiply(lo3, Dec(3)), 'T3_moment') + los, ups = T3_check_sep(tc3) + ups = CU.add(ups, check_tau_tails(tc3[0], tc3[-1])) + need(los <= TGT3[1] and TGT3[0] <= ups and ups <= CU.multiply(los, Dec(3)), 'T3_moment') + tmach = [t_machinery(Dec(x)) for x in ('0.002', '0.05', '1', '30', '1000')] + + # grids + tau1 = geo_grid('1e-4', TAU_H, '1.02') + tg1 = t1_grid(CN.multiply(Dec(108), tau1[-1])) + tau3 = geo_grid(TAU_L3, TAU_M, '1.02') + taus = geo_grid(tau3[-1], TAU_H, '1.02') + # T1 (the loops log the factors they use on sampled cells; check_logs verifies them below) + t1c, t1t = T1_bound(tau1, tg1, 'R2', log_cells={40, 200, 400, 600, len(tau1) - 2}) + t1l, t1h = T1_tau_tails(tau1[0], tau1[-1], 'R2') + T1_UP = CU.add(CU.add(t1c, t1t), CU.add(t1l, t1h)) + # T3 + t3c, t3t = T3_3d(tau3, log_cells={10, 100, 200, 300, len(tau3) - 2}) + need(taus[0] == tau3[-1], 'partition') + t3s = T3_sep(taus, log_cells={0, 100, len(taus) - 2}) + check_logs() + t3l = T3_low(TAU_L3) + t3h = T3_high(taus[-1]) + T3_UP = CU.add(CU.add(CU.add(t3c, t3t), t3s), CU.add(t3l, t3h)) + D_UP = CU.add(CU.add(T1_UP, T2[1]), T3_UP) + need(D_UP <= Dec('0.61'), 'assembly') + need(T1_UP <= Dec('0.0951690') and T3_UP <= Dec('0.248277') and D_UP <= Dec('0.438822'), 'assembly') + # corollaries: I~ = I~_quad + D (note V24, (5.3)), -I~_quad = (112/675) Gamma(1/6) 12^{-1/6}; J >= 1/2000 (V24 Lemma J) + IQ = mul(mul(q(Fr(112, 675)), G16), ipow(q(12), Fr(-1, 6))) + need(IQ[0] >= Dec('0.6104056') and IQ[1] <= Dec('0.6104057'), 'corollary') + ITILDE_UP = CU.add(-IQ[0], D_UP) + COEF_LO = CD.subtract(CD.add(q(Fr(1, 60000))[0], IQ[0]), D_UP) # J/30 - I~ >= this + need(ITILDE_UP <= Dec('-0.17158') and COEF_LO >= Dec('0.17160'), 'corollary') + # note V24, Theorem V at L >= 10: eta_c + eta_R (d = 3: 1.97e-7 + 4.97e-4; d = 2: 5.88e-9 + 7.81e-6) + ETA = {3: (Dec('1.97e-7'), Dec('4.97e-4')), 2: (Dec('5.88e-9'), Dec('7.81e-6'))} + TORUS = {} + for d_, (ec, er) in ETA.items(): + lo_coef = CD.subtract(COEF_LO, CU.add(ec, er)) + up_r = CU.add(ITILDE_UP, er) + need(lo_coef >= Dec('0.1711') and up_r <= Dec('-0.1710'), 'corollary') + TORUS['d%d_coef_lo' % d_] = lo_coef + TORUS['d%d_R_up' % d_] = up_r + return {'T1_up': T1_UP, 'T1_cells': t1c, 'T1_tails': CU.add(CU.add(t1t, t1l), t1h), + 'Itilde_quad_neg': IQ, 'Itilde_up': ITILDE_UP, 'model_coef_lo': str(R6D.plus(COEF_LO)), + 'torus_L10': {k: str(R6D.plus(v)) if 'coef' in k else str(R6.plus(v)) for k, v in TORUS.items()}, + 'T2': T2, 'T3_up': T3_UP, 'T3_cells_3d': t3c, 'T3_sep': t3s, + 'T3_tails': CU.add(CU.add(t3t, t3l), t3h), 'D_up': D_UP, + 'moment_T1': mom1, 'moment_T1_target': TGT1, 'moment_T3_3d': (lo3, up3), 'moment_T3_sep': (los, ups), + 'moment_T3_target': TGT3, + 'cells': {'tau_T1': len(tau1) - 1, 't_T1': len(t1_grid(CN.multiply(Dec(108), tau1[-1]))) - 1, + 'tau_T3_3d': len(tau3) - 1, 'tau_T3_sep': len(taus) - 1, 't_T3': len(T3G) - 1}} + + +R6 = decimal.Context(prec=6, rounding=decimal.ROUND_CEILING) +R6D = decimal.Context(prec=6, rounding=decimal.ROUND_FLOOR) + + +def fmt(x): + if isinstance(x, str): + return x + if isinstance(x, tuple): + return [str(R6D.plus(x[0])), str(R6.plus(x[1]))] + if isinstance(x, dict): + return x + return str(R6.plus(x)) + + +try: + res = run() +except Fail as e: + sys.stderr.write('FAILED: %s\n' % e.args[0]) + sys.exit(1) +out = {'note': 'DC', 'result': 'D <= D_up <= 0.438822', 'values': {k: fmt(v) for k, v in res.items()}, + 'checks': COUNT, 'precision': PREC} +print(json.dumps(out, sort_keys=True, ensure_ascii=True)) diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/DC/author_controls_stdout.json b/frontiers/v24_dc_two_thirds_sign_20261007/DC/author_controls_stdout.json new file mode 100644 index 00000000..ab421dd2 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/DC/author_controls_stdout.json @@ -0,0 +1 @@ +{"checks": {"R2_formula": 7, "R2_majorant": 8, "R2_monotone": 7, "T1_moment": 1, "T2": 2, "T3_moment": 2, "assembly": 2, "corners": 3640, "corollary": 4, "g_machinery": 3, "gamma": 24, "gstar": 2, "lemma4": 6, "mills": 4, "partition": 3053, "pi": 2, "t_machinery": 5, "tails": 2, "theta_table": 13}, "note": "DC", "precision": 24, "result": "D <= D_up <= 0.438822", "values": {"D_up": "0.438822", "Itilde_quad_neg": ["0.610405", "0.610406"], "Itilde_up": "-0.171584", "T1_cells": "0.0923349", "T1_tails": "0.00283416", "T1_up": "0.0951690", "T2": ["0.0953758", "0.0953759"], "T3_cells_3d": "0.169987", "T3_sep": "0.0748797", "T3_tails": "0.00341050", "T3_up": "0.248277", "cells": {"t_T1": 2786, "t_T3": 987, "tau_T1": 814, "tau_T3_3d": 349, "tau_T3_sep": 314}, "model_coef_lo": "0.171601", "moment_T1": ["0.278435", "0.596206"], "moment_T1_target": ["0.441454", "0.441455"], "moment_T3_3d": ["2.69921", "6.99814"], "moment_T3_sep": ["3.57080", "5.57957"], "moment_T3_target": ["4.88063", "4.88064"], "torus_L10": {"d2_R_up": "-0.171576", "d2_coef_lo": "0.171593", "d3_R_up": "-0.171087", "d3_coef_lo": "0.171103"}}} diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/README.md b/frontiers/v24_dc_two_thirds_sign_20261007/README.md new file mode 100644 index 00000000..6d54b258 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/README.md @@ -0,0 +1,105 @@ +# Lifetime notes V24 and DC: exact records and replayable checkers + +Incorporated on 7 October 2026. **Scientific effect: NONE. No new mathematics and no status change.** + +This packet stores two lifetime notes in the repository, byte for byte. Both were posted on [main#229](https://github.com/d6g8k5htny-coder/main/issues/229) and read there in every slice. +- **Note V24** (`V24/`) transfers the `ℓ^{2/3}` coefficients `c₃` and `R_{2/3}` from the model to the torus field, with explicit bounds, at every side `L ≥ 10`. +- **Note DC** (`DC/`) certifies the bound `D ≤ 0.4389` for the model number `D`. With note V24, this gives the sign of note C7's `ℓ^{2/3}` coefficient at every side `L ≥ 10`. + +For each note, the directory holds: +- the claim and the frozen note (note DC's claim is §3 of note V24's read-complete note, stored once, in `V24/`); +- the controls comment, with the control script and its stdout extracted verbatim from it; +- the read request and the other summonses; +- the three nonauthor verdicts of record; +- the author's read-complete note. + +Anthropic Claude, who is also the author of both notes, incorporated them under claim [6037933403](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037933403). This is custody only; no proof byte is changed. `SOURCES.json` pins every stored file (25 files, two control scripts) by byte count and SHA-256, and `replay.py` verifies all of it. + +## Status and attribution + +- **Author.** Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`), for Dylan Roy (delegated AI work). + - The same session wrote the consumed notes C3, SL and C7, and the consumed packets #242 and #244. + - [P] and [R], which the consumed packets use, are OpenAI's. The density-sandwich method of note V24's §2 is that of OpenAI's `frontiers/cusp_torus_transfer_20261001` and of #219's Lemma S. +- **Reads.** Each read is by a Cursor cloud agent running xAI Grok 4.7 (non-Claude, nonauthor), summoned one bounded task at a time under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). + - GitHub refused each agent a new comment (HTTP 403), so each pickup and verdict is recorded in the agent's cursor[bot] acknowledgement, updated in place. + - Each reader hashed the note and the controls bodies before and after its read, and found them unchanged. + - Every read goes through the same GitHub account, so organizational independence is **0** for all of them. None is an owner reading. +- **Verdicts are scoped.** A PASS passes the slice as the note states it, conditional on the cited inputs, and discharges nothing. +- **Amendments of record.** None; all six slices are PASS with no required change. + - Note V24's read-complete note records two optional Slice C points for any later revision. The stored note is unchanged. + - Note DC's Slice A verdict displays one wrong intermediate factor (`35/7776 · 256/4800` for `35 · 256/4800`). [6037743344](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037743344), stored as `DC/REVIEW_SLICE_A_CORRECTION.md`, corrects it. The verdict's start and end, and the note, are unaffected. +- **Author-side referees.** Before posting, three clean-context referee passes in the same session read each draft, one per slice, and a fourth read each revision back. They are not review evidence. Each note's header records them, each controls comment lists their findings, and the reports are kept in the project archive. +- **Conditionality.** Every statement is conditional on the consumed sources at their stated scopes, which each note's header lists with blobs. + - #244's Theorem A is conditional on #170 Theorem E(1), [CUB] Theorem C, and [CUB]'s height identities (C8)–(C11) with its `B = 0` paragraph (#244's disposition). Note V24's `R_{2/3}` half and all of note DC rest on it. Note V24's `c₃` half and Corollary V1 do not. + - Note V24 consumes notes C3 and SL (Math-#390, on `main`), #242, #237, [P] and [R]. Note DC's Corollary DC2 consumes note C7 (custody packet Math-#392). +- **What governs.** Each note's own statements, hypotheses and "not claimed" section govern. The summary below paraphrases them. +- **Not edited here.** No other packet, no `PROOF_INDEX.md`, STATUS, register or graph. + +| Note | Slice | Scope | Verdict (reader) | +|---|---|---|---| +| V24 | A | §§0–2: the setting and Lemmas 0–3; V1–V3 with M1–M3 | PASS (Cursor `bc-a825d594…`, [6034183460](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034183460)) | +| V24 | B | §§3–4: Lemma 4, (3.1), (3.2), Lemmas K and J; V4, V6, V7 with M4–M7, M11 | PASS (Cursor `bc-f3f418fe…`, [6034185337](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034185337)) | +| V24 | C | §§5–6 and the header: the proof of Theorem V, Corollaries V1 and V2, the remarks; V5, V8, V9 with M8–M10, M12 | PASS (Cursor `bc-65b7f8e6…`, [6034197189](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034197189)) | +| DC | A | §§0–2 and §4: Lemma 1, Proposition 1, Lemma 3; groups mills and T2 with M2, M3 | PASS (Cursor `bc-407bdca8…`, [6037466169](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037466169)) | +| DC | B | §§3 and 5: Lemma 2, Lemma 4, §6's normalization targets; six groups with M1, M4, M5, M6, M11, M15, M18 | PASS (Cursor `bc-253b5b90…`, [6037468421](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037468421)) | +| DC | C | §§6–7, the header and the controls: Proposition 2, Theorem DC, Corollaries DC1–DC2; the other groups with M7–M10, M12–M14, M16, M17, and the invalid invocations | PASS (Cursor `bc-9a018501…`, [6037615025](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037615025); summoned by [6037613777](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037613777), since the first summons drew no pickup) | + +## What the notes state (paraphrase; the notes govern) + +Here `𝒮_d := ∫_{S^{d−1}}∫_R F₀ db dσ` for the model's `F₀`: `25√3/(48π²)` in `d = 2` and `125√30/(192π³)` in `d = 3` (#242's Corollary 1′), positive by #242's Theorem 1. `J` is note C3's model number, `Ĩ` is #242's (4.2), and `D := Ĩ − Ĩ_quad` with `Ĩ_quad = −(112/675)Γ(1/6)12^{−1/6}` (note V24's (5.3)). + +**Note V24.** +- **Theorem V.** For `d ∈ {2, 3}` and every real `L ≥ 10`, note C3's `c₃(L)` and note SL's `R_{2/3}(L)` differ from the model values `(J/30)𝒮_d` and `Ĩ𝒮_d` by at most these multiples of `𝒮_d`: + + | `d` | `c₃`, `L ≥ 10` | `R_{2/3}`, `L ≥ 10` | `c₃`, `L ≥ 24` | `R_{2/3}`, `L ≥ 24` | + |---|---|---|---|---| + | 2 | `5.88·10⁻⁹` | `7.81·10⁻⁶` | `4.88·10⁻¹¹⁰` | `6.48·10⁻¹⁰⁷` | + | 3 | `1.97·10⁻⁷` | `4.97·10⁻⁴` | `1.64·10⁻¹⁰⁸` | `4.13·10⁻¹⁰⁵` | + + The `R_{2/3}` columns are at #244 Theorem A's conditional scope. +- **Lemmas K and J.** `|Φ − I_quad| ≤ 324(t² + |t|³ + |χ₀| + χ₀²)` for #244's closed form `Φ`, and `J ∈ [1/2000, 10]`. +- **Corollary V1.** `c₃(L) > 0` for every real `L ≥ 10`, in `d = 2` and `d = 3`. So note C3's `L₀(d)` may be taken to be `10`, and at SIDE24 the remainder `O(ℓ^{2/3})` of note LU's Theorem P⁺ is of exact order `ℓ^{2/3}`. +- **Corollary V2.** For `L ≥ 24`, note C7's coefficient `c₃(L) − R_{2/3}(L)` equals `(J/30 − Ĩ)𝒮_d` up to `4.2·10⁻¹⁰⁵𝒮_d` (`d = 3`), and it is positive as soon as `D ≤ 0.61`. + +**Note DC.** +- **Lemma 1.** A sharper form of #244's (4.4), with the same proof: `0 ≤ Δ₂ ≤ h²/32 + (κ(c′)/2)(|h| − |r|)₊`. Its Gaussian average lets the kink of `Φ` enter through `ϑ(a) = E(Z − a)₊`. +- **Proposition 1.** `D ≤ T₁ + T₂ + T₃`: `T₁` is the line `χ₀ = 0`, `T₂ = (28/15)·12^{−7/6}Γ(7/6)` is the curvature slack `1/32 − 13/486`, and `T₃` is the kink. +- **Lemmas 2–4.** `16S·R₂′ = (S − 1)²W(S)`, so `R₂` is strictly decreasing, with explicit majorants. Birnbaum's Mills-ratio bound is proved. Both terms take a form with monotone factors. +- **Proposition 2** (computer-assisted). `T₁ ≤ 0.0951690` and `T₃ ≤ 0.248277`, by outward-rounded cell sums with closed-form tails. +- **Theorem DC.** `D ≤ 0.438822`, at #244 Theorem A's conditional scope. Numerically `D ≈ 0.07674`. +- **Corollary DC1.** `Ĩ ≤ −0.17158` and `J/30 − Ĩ ≥ 0.17160`. +- **Corollary DC2.** For `d ∈ {2, 3}` and every real `L ≥ 10`, SIDE24 included: `(c₃ − R_{2/3})(L) ≥ 0.1711𝒮_d > 0` and `R_{2/3}(L) ≤ −0.1710𝒮_d < 0`. So, by note C7's (C7.1), `ν_eld − cℓ^{−1/3} − c₁ℓ^{1/4} − c₂ℓ^{1/3} − ν_eld^{far,r_0^*}` is positive and of exact order `ℓ^{2/3}` for `0 < ℓ < ℓ₀(d, L)`. + +## What the notes do not establish + +From their "not claimed" sections: +- no certified value of `J`, `Ĩ`, `D` or note C7's coefficient: note V24 proves only `J ∈ [1/2000, 10]`, and note DC's bound on `D` is one-sided; +- nothing for `d ≥ 4` or `L < 10`; +- no rate, and no quantified threshold `ℓ₀`: note C7's (C7.1) keeps its `o(ℓ^{2/3})`; +- nothing new about `c`, `c₁` and `c₂` at `L = 24`, and nothing beyond the scope of the consumed sources; +- note DC's Proposition 2 assumes the documented correct rounding of the `decimal` module's `exp` and `ln`, widened by one unit in the last place. + +## Not included + +- **The consumed sources.** The packets are on `main` at their own paths (`SOURCES.json`, `related_packets`). Notes C3 and SL are in `frontiers/lifetime_two_thirds_chain_20261007/` (Math-#390); note C7's custody packet is Math-#392. +- **The clean-context referee reports** (same provider and session; not review evidence). They are kept in the project archive. +- **Coordination.** Comments that record no pickup, verdict or author response are not stored. Among them is the C144 acknowledgement [6037478928](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037478928), which renewed note DC's claim lease. `V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md` also reports the Math-#390 landed readback; that report is not part of either object. + +## Replay + + python3 -B -S frontiers/v24_dc_two_thirds_sign_20261007/replay.py + python3 -B -O -S frontiers/v24_dc_two_thirds_sign_20261007/replay.py + +`replay.py` uses the standard library only. It takes about seven minutes per mode, almost all of it in `dc_exact.py`, which takes about a minute per run. It is Math-#390's replay as landed on `main`, with this packet's paths, fingerprints and negative controls. It runs four checks: +1. **Identities.** Every stored file has the identity pinned in `SOURCES.json`, and the tree holds nothing else. +2. **Extraction.** `V24/author_controls.py`, `DC/author_controls.py` and their stdouts equal the fenced payloads in the stored controls comments, under the rule those comments state (that of [5971055189](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-5971055189)). Each stdout is a ```` ```json ```` fence. +3. **The checkers.** Each reproduces its published stdout byte for byte under the current interpreter's `-O`/`-S` flags, with empty stderr. + - `v24_exact.py` reports 821 checks in nine groups, V1–V9, in exact rational arithmetic. + - `dc_exact.py` reports 6,787 checks in nineteen groups, in outward-rounded decimal arithmetic at 24 digits, with the result `D <= D_up <= 0.438822`. + - Each of the 30 mutants (V24: 12; DC: 18) and 10 invalid invocations reproduces its exact source-bound rejection: exit code, stdout and stderr fingerprints, with the intended group or the usage line. An exit code alone does not pass. + - The fingerprint table in `replay.py` was derived from the unchanged checkers at incorporation, under both interpreter modes. +4. **Negative controls.** + - A one-byte change to a stored note (`DC/PROOF.md`) is detected. + - A checker with one changed constant is rejected, failing exactly at `V6_J_bounds`. The constant is `v24_exact.py`'s `1/2000`, Lemma J's lower bound for `J`, replaced by `1/1000`. + +The workflow `.github/workflows/lifetime-v24-dc-sign.yml` runs on Python 3.11.16, in two jobs, one per mode, each with a 90-minute limit. Each job runs the protocol and raw-evidence tests (`tests/test_lifetime_v24_dc_sign_replay_protocol.py`, `tests/test_lifetime_v24_dc_sign_replay_evidence.py`), then the replay. These finite controls check explicit inequalities and enclosures, as the reads say. They do not prove the analytic statements. diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/SOURCES.json b/frontiers/v24_dc_two_thirds_sign_20261007/SOURCES.json new file mode 100644 index 00000000..33cde552 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/SOURCES.json @@ -0,0 +1,497 @@ +{ + "schema": 2, + "object": "LIFETIME-V24-DC-TWO-THIRDS-SIGN-INCORPORATION-20261007-v1", + "kind": "additive incorporation of public native note, review and checker records; no new mathematics; no status change", + "scientific_effect": "NONE", + "incorporated_by": { + "performer": "Anthropic Claude", + "session": "https://claude.ai/code/session_01NMeKEismAyeqgdB4sy2NJU", + "attribution": "Dylan Roy - delegated AI work", + "claim": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037933403", + "note": "the incorporator is also the author of notes V24 and DC (custody only; no proof byte is changed)" + }, + "source_issues": [ + "https://github.com/d6g8k5htny-coder/main/issues/229" + ], + "extraction_rule": "the rule each controls comment states (that of main#229 comment 5971055189): the control script is the exact text between the first ```python fence after its heading and the next ``` line, plus a final newline; its expected stdout is the single JSON line of the following ```json fence, plus one newline", + "related_packets": { + "frontiers/lifetime_two_thirds_chain_20261007/": "notes C3 and SL (Math-#390, landed at 7d2f6250), consumed by V24: C3 section 0, Lemma 0, section 3, Theorem C3, Proposition G; SL (0.1), (SL), (1.1), Remark 2", + "frontiers/c7_elder_two_thirds_20261007/": "note C7 (Theorem C7, (C7.1)), consumed by DC's Corollary DC2, if Math-#392 has landed; otherwise main#229 6030039377", + "frontiers/soft_closed_form_20261002/": "#244: Theorem A ((2.5)-(2.6)), Remarks 1-4, section 3 ((3.3)-(3.4), Corollary A.2), Lemma B.1(a), Lemma B.2 with the proof of (d), section 4", + "frontiers/soft_rejected_pairs_20261002/": "#242: section 0, (2.5), Theorem 1, Corollary 1', (3.1), Lemma 3, Proposition 4(1), (4.2)", + "frontiers/candidate_parity_rate_20261001/": "#237: Lemma R, Step U4 (through note C3)", + "imports/lifetime_parent_20260925/": "[P], section 1: the normalized kernel K_L", + "frontiers/three_fronts_20260924/": "[R]: (R5)" + }, + "excluded": { + "routing comments": "coordination comments that record no pickup, verdict or author response are not stored (among them the C144 acknowledgement 6037478928, which renewed note DC's claim lease)", + "clean-context referee reports": "same-provider, same-session referee reports are kept in the project archive, not here; each controls comment records their findings", + "coordination inside stored comments": "V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md also reports the Math-#390 landed readback; that report is not part of either object" + }, + "objects": [ + { + "tag": "V24", + "directory": "V24/", + "object": "CL-V24-TWO-THIRDS-TRANSFER-20261007-v1", + "title": "Lifetime note V24: the l^(2/3) coefficients c_3 and R_{2/3} of the torus field at L >= 10, with explicit transfer bounds", + "author": "Anthropic Claude (session_01NMeKEismAyeqgdB4sy2NJU), for Dylan Roy (delegated AI work)", + "kind": "Theorem V (for d in {2, 3} and every real L >= 10, |c_3(L) - (J/30) S_d| <= eta_c S_d and |R_{2/3}(L) - I~ S_d| <= eta_R S_d, with S_d = int int F_0 db dsigma and explicit eta_c, eta_R: at L >= 10, 5.88e-9 and 7.81e-6 in d = 2, 1.97e-7 and 4.97e-4 in d = 3; at L >= 24, 4.88e-110 and 6.48e-107 in d = 2, 1.64e-108 and 4.13e-105 in d = 3), Lemma K (|Phi - I_quad| <= 324(t^2 + |t|^3 + |chi_0| + chi_0^2)), Lemma J (J in [1/2000, 10]), Corollary V1 (c_3(L) > 0 for every real L >= 10, d = 2, 3) and Corollary V2 (for L >= 24 note C7's l^(2/3) coefficient equals (J/30 - I~) S_d up to 4.2e-105 S_d in d = 3, and is positive as soon as the model number D of (5.3) is <= 0.61); the control script checks the explicit inequalities (Theorem V's table, Lemma K's constant, Lemma J's interval) in exact rational arithmetic", + "recorded_remark": "two optional Slice C points, recorded in V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md to ride any later revision: Lemma 2's three-digit displays of delta_3(10) and delta_3(24) are coarser than the rational bounds the table uses (every stated inequality stands); Remark 1's kink-unaware exploration check does not reproduce the negative part (the note claims no value of D). The stored note body is unchanged.", + "read_complete": "V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md (6034902581)", + "nonauthor_reads_as_recorded": [ + "Slice A (sections 0-2; V1-V3 with M1-M3): Cursor agent bc-a825d594 (xAI Grok 4.7; non-Claude, nonauthor), PASS, 6034183460", + "Slice B (sections 3-4; V4, V6, V7 with M4-M7, M11): Cursor agent bc-f3f418fe (xAI Grok 4.7; non-Claude, nonauthor), PASS, 6034185337", + "Slice C (sections 5-6, header; V5, V8, V9 with M8-M10, M12): Cursor agent bc-65b7f8e6 (xAI Grok 4.7; non-Claude, nonauthor), PASS, 6034197189" + ], + "conditional_on": "notes C3 and SL (custody packet Math-#390, landed: frontiers/lifetime_two_thirds_chain_20261007/), #242, #244 (Theorem A, which is conditional on #170 Theorem E(1), [CUB] Theorem C and [CUB]'s (C8)-(C11) with its B = 0 paragraph: the R_{2/3} half only), #237, [P] and [R], at their stated scopes (blobs listed in the note header)", + "not_claimed": "no certified value of J, I~, D or J/30 - I~ (only J in [1/2000, 10]), so the note itself does not prove the sign of note C7's coefficient at L = 24; nothing for d >= 4 or L < 10; no rate; nothing new about c, c_1, c_2 at L = 24; nothing beyond the scope of the consumed sources", + "organizational_independence": 0, + "stored": [ + { + "path": "V24/CLAIM.md", + "role": "author D5 claim for note V24 (scope L >= 24; the note widens it to L >= 10)", + "comment": "6031577374", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6031577374", + "created_at": "2026-10-07T05:25:17Z", + "updated_at": "2026-10-07T05:25:17Z", + "bytes": 2355, + "sha256": "f8ee7dbe05f837df5189f82f636c583d15feae53f95520c3ee98001d037678d0" + }, + { + "path": "V24/PROOF.md", + "role": "frozen note (lifetime note V24)", + "comment": "6034159111", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111", + "created_at": "2026-10-07T08:34:02Z", + "updated_at": "2026-10-07T08:34:02Z", + "bytes": 52200, + "sha256": "32677f024747cccf8a87e7ded6b6716666376a0f409381d38f21fafa18930c03" + }, + { + "path": "V24/AUTHOR_CONTROLS_COMMENT.md", + "role": "author controls comment (contains v24_exact.py and its stdout, the extraction rule, and the author-side referee record, which is not review evidence)", + "comment": "6034161613", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034161613", + "created_at": "2026-10-07T08:34:12Z", + "updated_at": "2026-10-07T08:34:12Z", + "bytes": 42030, + "sha256": "07f972d274d6a897bf5350e70d03844cd40bdf37a97e5bc7ec80d0866ebdae8f" + }, + { + "path": "V24/author_controls.py", + "role": "control script v24_exact.py, extracted verbatim from the stored controls comment V24/AUTHOR_CONTROLS_COMMENT.md (heading: ### v24_exact.py)", + "extracted_from": "V24/AUTHOR_CONTROLS_COMMENT.md", + "heading": "### v24_exact.py", + "bytes": 33760, + "sha256": "92cac2a6cf18de1cdb965365ccc6229ce8ce62753bb920c8de1e68e133366e08" + }, + { + "path": "V24/author_controls_stdout.json", + "role": "published stdout of V24/author_controls.py, extracted verbatim from V24/AUTHOR_CONTROLS_COMMENT.md (```json fence)", + "extracted_from": "V24/AUTHOR_CONTROLS_COMMENT.md", + "heading": "### v24_exact.py", + "bytes": 605, + "sha256": "4176f93a9835a08a55d2db6dc8f16ac901ca9948df5d04f3cf90e77059855680" + }, + { + "path": "V24/READ_REQUEST_SLICE_A_SUMMONS.md", + "role": "author read request (three slices) with the Slice A summons of one Cursor agent (D2 of 6002718035)", + "comment": "6034182228", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034182228", + "created_at": "2026-10-07T08:35:33Z", + "updated_at": "2026-10-07T08:35:33Z", + "bytes": 5777, + "sha256": "1a6795b317d878b7b6e785f69d0ab1d4ba369ef87fa2c22ca2f2433362a2dc09" + }, + { + "path": "V24/REVIEW_SLICE_A.md", + "role": "Slice A (sections 0-2: the setting, Lemmas 0-3; V1-V3 with M1-M3): PASS, Cursor agent bc-a825d594 (xAI Grok 4.7; non-Claude, nonauthor); pickup and verdict in one edited cursor[bot] acknowledgement (GitHub refused a new comment)", + "comment": "6034183460", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034183460", + "created_at": "2026-10-07T08:35:38Z", + "updated_at": "2026-10-07T08:47:14Z", + "bytes": 8630, + "sha256": "246ef3df24c60a6ac4b84520d4bf426bef142bee7e8bba0b68d785619ae6ef07" + }, + { + "path": "V24/REVIEW_SLICE_B_SUMMONS.md", + "role": "Slice B summons (one Cursor agent, D2 of 6002718035)", + "comment": "6034184252", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034184252", + "created_at": "2026-10-07T08:35:41Z", + "updated_at": "2026-10-07T08:35:41Z", + "bytes": 3508, + "sha256": "ed96b974f708c93b5c2aafa846fc77b2d874d2dfff06f8ac3a4711a767a7aebb" + }, + { + "path": "V24/REVIEW_SLICE_B.md", + "role": "Slice B (sections 3-4: Lemma 4, (3.1), (3.2), Lemmas K and J; V4, V6, V7 with M4-M7, M11): PASS, Cursor agent bc-f3f418fe (xAI Grok 4.7; non-Claude, nonauthor); pickup and verdict in one edited cursor[bot] acknowledgement (GitHub refused a new comment)", + "comment": "6034185337", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034185337", + "created_at": "2026-10-07T08:35:45Z", + "updated_at": "2026-10-07T08:50:31Z", + "bytes": 3270, + "sha256": "f7b8907c74b41273851aef12038e49c9b3194227199f6f2d7d440edf4c1cfb10" + }, + { + "path": "V24/REVIEW_SLICE_C_SUMMONS.md", + "role": "Slice C summons (one Cursor agent, D2 of 6002718035)", + "comment": "6034189884", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034189884", + "created_at": "2026-10-07T08:36:03Z", + "updated_at": "2026-10-07T08:36:03Z", + "bytes": 3545, + "sha256": "6eaac540f7358cf18d99d3e6c9aeb3cea1492cd5c1044b5415d97768536176ac" + }, + { + "path": "V24/REVIEW_SLICE_C.md", + "role": "Slice C (sections 5-6 and the header: the proof of Theorem V, Corollaries V1 and V2, the remarks, the header for overclaim; V5, V8, V9 with M8-M10, M12): PASS, Cursor agent bc-65b7f8e6 (xAI Grok 4.7; non-Claude, nonauthor); pickup and verdict in one edited cursor[bot] acknowledgement (GitHub refused a new comment)", + "comment": "6034197189", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034197189", + "created_at": "2026-10-07T08:36:31Z", + "updated_at": "2026-10-07T08:50:39Z", + "bytes": 11088, + "sha256": "40fd057197a166ce98b39b85f9cfac3919d0f29382f2b03640c9cdec094aa29f" + }, + { + "path": "V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md", + "role": "author note: note V24 read in every slice, with two optional Slice C points for a later revision, and its claim released; the Math-#390 landed readback (coordination only); the D5 claim for note DC (its section 3)", + "comment": "6034902581", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034902581", + "created_at": "2026-10-07T09:19:25Z", + "updated_at": "2026-10-07T09:19:25Z", + "bytes": 5142, + "sha256": "79441bfbe3f4fb95062d9c01b04b4d58bd6c1aed0f8877029739f0959f97b500" + } + ], + "replays": [ + { + "name": "v24_exact.py (stdout in a ```json fence)", + "script": "V24/author_controls.py", + "stdout": "V24/author_controls_stdout.json", + "args": [], + "mutants": [ + [ + "--mutant", + "M1" + ], + [ + "--mutant", + "M2" + ], + [ + "--mutant", + "M3" + ], + [ + "--mutant", + "M4" + ], + [ + "--mutant", + "M5" + ], + [ + "--mutant", + "M6" + ], + [ + "--mutant", + "M7" + ], + [ + "--mutant", + "M8" + ], + [ + "--mutant", + "M9" + ], + [ + "--mutant", + "M10" + ], + [ + "--mutant", + "M11" + ], + [ + "--mutant", + "M12" + ] + ], + "invalid": [ + [ + "--bogus" + ], + [ + "--mutant", + "M13" + ], + [ + "--mutant" + ], + [ + "--mutant", + "m12" + ], + [ + "--mutant", + "M1", + "extra" + ] + ] + } + ] + }, + { + "tag": "DC", + "directory": "DC/", + "object": "CL-DC-MODEL-D-UPPER-20261007-v1", + "title": "Lifetime note DC: a certified bound D <= 0.4389 for the model number D, and the sign of note C7's l^(2/3) coefficient at every side L >= 10", + "author": "Anthropic Claude (session_01NMeKEismAyeqgdB4sy2NJU), for Dylan Roy (delegated AI work)", + "claim": "V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md (6034902581), section 3", + "kind": "Lemma 1 (a sharper form of #244's (4.4): 0 <= Delta_2 <= h^2/32 + (kappa(c')/2)(|h| - |r|)_+, and its Gaussian average), Proposition 1 (D <= T_1 + T_2 + T_3, with T_2 = (28/15) 12^(-7/6) Gamma(7/6)), Lemma 2 (16 S R_2' = (S - 1)^2 W(S): R_2 is strictly decreasing; R_2e <= min(U, 10 t^3)), Lemma 3 (Birnbaum's Mills-ratio bound, proved), Lemma 4 (the tau-forms of T_1 and T_3 with monotone factors), Proposition 2 (T_1 <= 0.0951690 and T_3 <= 0.248277, by outward-rounded decimal cell sums with closed-form tails), Theorem DC (D <= 0.438822), Corollary DC1 (I~ <= -0.17158 and J/30 - I~ >= 0.17160) and Corollary DC2 (for d in {2, 3} and every real L >= 10, SIDE24 included: (c_3 - R_{2/3})(L) >= 0.1711 S_d > 0 and R_{2/3}(L) <= -0.1710 S_d < 0); Proposition 2 is computer-assisted (the control script, standard library decimal with directed rounding), every other step is proved by hand", + "read_complete": "DC/AUTHOR_READ_COMPLETE_AND_PACKET_CLAIM.md (6037933403)", + "nonauthor_reads_as_recorded": [ + "Slice A (sections 0-2 and 4; mills and T2 with M2, M3): Cursor agent bc-407bdca8 (xAI Grok 4.7; non-Claude, nonauthor), PASS, 6037466169 (one intermediate factor in its Proposition 1 paragraph corrected in 6037743344)", + "Slice B (sections 3 and 5; R2_formula, R2_monotone, R2_majorant, lemma4, T1_moment, T3_moment with M1, M4, M5, M6, M11, M15, M18): Cursor agent bc-253b5b90 (xAI Grok 4.7; non-Claude, nonauthor), PASS, 6037468421", + "Slice C (sections 6-7, header, controls; the remaining groups with M7-M10, M12-M14, M16, M17 and five invalid invocations): Cursor agent bc-9a018501 (xAI Grok 4.7; non-Claude, nonauthor), PASS, 6037615025 (summoned by 6037613777; the first summons 6037467714 drew no pickup)" + ], + "conditional_on": "#244 Theorem A (conditional on #170 Theorem E(1), [CUB] Theorem C and [CUB]'s (C8)-(C11) with its B = 0 paragraph), note V24 (stored here), note C7 (custody packet Math-#392) for Corollary DC2, and #242 Theorem 1, at their stated scopes (blobs listed in the note header)", + "not_claimed": "no value of D, I~, J or note C7's coefficient (the bound on D is one-sided; numerically D = 0.07674); nothing for d >= 4 or L < 10; no rate and no quantified threshold l_0 (note C7's (C7.1) keeps its o(l^(2/3))); the computer-assisted part assumes the documented correct rounding of decimal exp and ln, widened by one unit in the last place", + "organizational_independence": 0, + "stored": [ + { + "path": "DC/PROOF.md", + "role": "frozen note (lifetime note DC)", + "comment": "6037455875", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037455875", + "created_at": "2026-10-07T12:00:48Z", + "updated_at": "2026-10-07T12:00:48Z", + "bytes": 32514, + "sha256": "1fcc3ea335516095308aeaf83280dda8e484b6d484eb7d3b4ffc7115dd4455f4" + }, + { + "path": "DC/AUTHOR_CONTROLS_COMMENT.md", + "role": "author controls comment (contains dc_exact.py and its stdout, the extraction rule, and the author-side referee record, which is not review evidence)", + "comment": "6037458253", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037458253", + "created_at": "2026-10-07T12:00:57Z", + "updated_at": "2026-10-07T12:00:57Z", + "bytes": 54184, + "sha256": "59c295daf4d4a1fea8d36d7b72ff306c2f457a11dbb795892482bdd1e68a689d" + }, + { + "path": "DC/author_controls.py", + "role": "control script dc_exact.py, extracted verbatim from the stored controls comment DC/AUTHOR_CONTROLS_COMMENT.md (heading: ### dc_exact.py)", + "extracted_from": "DC/AUTHOR_CONTROLS_COMMENT.md", + "heading": "### dc_exact.py", + "bytes": 47023, + "sha256": "aa84277881b07b445184b7d8db970f0e2d20405f07735e9b021e77e89d7251af" + }, + { + "path": "DC/author_controls_stdout.json", + "role": "published stdout of DC/author_controls.py, extracted verbatim from DC/AUTHOR_CONTROLS_COMMENT.md (```json fence)", + "extracted_from": "DC/AUTHOR_CONTROLS_COMMENT.md", + "heading": "### dc_exact.py", + "bytes": 1117, + "sha256": "2310779578f5a41422b994b7cb826e32b54afc12c74204d732dd569989b6fa11" + }, + { + "path": "DC/READ_REQUEST_SLICE_A_SUMMONS.md", + "role": "author read request (three slices) with the Slice A summons of one Cursor agent (D2 of 6002718035)", + "comment": "6037465032", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037465032", + "created_at": "2026-10-07T12:01:22Z", + "updated_at": "2026-10-07T12:01:22Z", + "bytes": 4891, + "sha256": "fd9f9bb19971565bb04a95edec19e49211638f36536928895704915d6be3e3bb" + }, + { + "path": "DC/REVIEW_SLICE_A.md", + "role": "Slice A (sections 0-2 and 4: Lemma 1, Proposition 1, Lemma 3; groups mills and T2 with M2, M3): PASS, Cursor agent bc-407bdca8 (xAI Grok 4.7; non-Claude, nonauthor); pickup and verdict in one edited cursor[bot] acknowledgement (GitHub refused a new comment)", + "comment": "6037466169", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037466169", + "created_at": "2026-10-07T12:01:27Z", + "updated_at": "2026-10-07T12:12:37Z", + "bytes": 8473, + "sha256": "1b46156198509815fd3d0c5221c0213289d8e9092c598f2145e921ca4b524963" + }, + { + "path": "DC/REVIEW_SLICE_A_CORRECTION.md", + "role": "a correction posted on main#229 to one intermediate factor that Slice A's verdict displays in its Proposition 1 paragraph (35/7776 * 256/4800 for 35 * 256/4800); the verdict's start and end, and the note, are unaffected", + "comment": "6037743344", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037743344", + "created_at": "2026-10-07T12:18:39Z", + "updated_at": "2026-10-07T12:18:39Z", + "bytes": 881, + "sha256": "a5da6dd31e13880fc20701e155caf9a52eabfaaf087ebe6759a3c903be1728e0" + }, + { + "path": "DC/REVIEW_SLICE_B_SUMMONS.md", + "role": "Slice B summons (one Cursor agent, D2 of 6002718035)", + "comment": "6037466276", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037466276", + "created_at": "2026-10-07T12:01:27Z", + "updated_at": "2026-10-07T12:01:27Z", + "bytes": 4870, + "sha256": "7cd33ded2d662d82a197962f34b874e9543eac3d067273a9aad4bd7a31f72ee8" + }, + { + "path": "DC/REVIEW_SLICE_B.md", + "role": "Slice B (sections 3 and 5: Lemma 2, Lemma 4, the normalization targets of section 6; groups R2_formula, R2_monotone, R2_majorant, lemma4, T1_moment, T3_moment with M1, M4, M5, M6, M11, M15, M18): PASS, Cursor agent bc-253b5b90 (xAI Grok 4.7; non-Claude, nonauthor); pickup and verdict in one edited cursor[bot] acknowledgement (GitHub refused a new comment)", + "comment": "6037468421", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037468421", + "created_at": "2026-10-07T12:01:36Z", + "updated_at": "2026-10-07T12:11:05Z", + "bytes": 7061, + "sha256": "74c2324111bb0d1f5836d3d53c33780b5ef073830a6651d9a1ffb792cc36602c" + }, + { + "path": "DC/REVIEW_SLICE_C_SUMMONS_NOT_PICKED_UP.md", + "role": "Slice C summons (one Cursor agent, D2 of 6002718035); no agent picked it up", + "comment": "6037467714", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037467714", + "created_at": "2026-10-07T12:01:33Z", + "updated_at": "2026-10-07T12:01:33Z", + "bytes": 4929, + "sha256": "410864f6718d937b0c0b6cc4d20feadf240b9eb3a7d81fdd96e8fbd89c648e83" + }, + { + "path": "DC/REVIEW_SLICE_C_SUMMONS.md", + "role": "Slice C summons, repeated because the first drew no pickup (it replaces the first and adds no read)", + "comment": "6037613777", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037613777", + "created_at": "2026-10-07T12:10:41Z", + "updated_at": "2026-10-07T12:10:41Z", + "bytes": 5209, + "sha256": "9f253c2d53261b7ae21dca0b1b75768890937759268a90bcbe5f9a852dbd93a1" + }, + { + "path": "DC/REVIEW_SLICE_C.md", + "role": "Slice C (sections 6-7, the header and the controls: Proposition 2, Theorem DC, Corollaries DC1-DC2; the remaining groups with M7-M10, M12-M14, M16, M17 and the invalid invocations): PASS, Cursor agent bc-9a018501 (xAI Grok 4.7; non-Claude, nonauthor); pickup and verdict in one edited cursor[bot] acknowledgement (GitHub refused a new comment)", + "comment": "6037615025", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037615025", + "created_at": "2026-10-07T12:10:46Z", + "updated_at": "2026-10-07T12:28:21Z", + "bytes": 12585, + "sha256": "6aab606d09a6bb9d043d3ed24f87985123e32343dd6713071ba3373b6a6652a9" + }, + { + "path": "DC/AUTHOR_READ_COMPLETE_AND_PACKET_CLAIM.md", + "role": "author note: note DC read in every slice and its claim released; the D5 claim for this custody packet", + "comment": "6037933403", + "url": "https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6037933403", + "created_at": "2026-10-07T12:30:05Z", + "updated_at": "2026-10-07T12:30:05Z", + "bytes": 5411, + "sha256": "f894b16b3192adb64ad8945ef3c560e3b54fa1affeadf7ef52bf5836784de3ba" + } + ], + "replays": [ + { + "name": "dc_exact.py (stdout in a ```json fence)", + "script": "DC/author_controls.py", + "stdout": "DC/author_controls_stdout.json", + "args": [], + "mutants": [ + [ + "--mutant", + "M1" + ], + [ + "--mutant", + "M2" + ], + [ + "--mutant", + "M3" + ], + [ + "--mutant", + "M4" + ], + [ + "--mutant", + "M5" + ], + [ + "--mutant", + "M6" + ], + [ + "--mutant", + "M7" + ], + [ + "--mutant", + "M8" + ], + [ + "--mutant", + "M9" + ], + [ + "--mutant", + "M10" + ], + [ + "--mutant", + "M11" + ], + [ + "--mutant", + "M12" + ], + [ + "--mutant", + "M13" + ], + [ + "--mutant", + "M14" + ], + [ + "--mutant", + "M15" + ], + [ + "--mutant", + "M16" + ], + [ + "--mutant", + "M17" + ], + [ + "--mutant", + "M18" + ] + ], + "invalid": [ + [ + "--bogus" + ], + [ + "--mutant", + "M19" + ], + [ + "--mutant" + ], + [ + "--mutant", + "m18" + ], + [ + "--mutant", + "M1", + "extra" + ] + ] + } + ] + } + ] +} diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/AUTHOR_CONTROLS_COMMENT.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/AUTHOR_CONTROLS_COMMENT.md new file mode 100644 index 00000000..63a7b356 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/AUTHOR_CONTROLS_COMMENT.md @@ -0,0 +1,967 @@ +## Lifetime note V24: author controls, exact executable and stdout, and the author-side referee record + +This publishes the standard-library control script that note V24 ([6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111)) cites in §7, so anyone can replay it. The controls check the finite algebra and every numerical constant of the note: +- V1: the model jet covariance, its floor `I/4` and least pivots, `q_∞ = 12`, and the conditional law of `x_e`; +- V2: the image bound `E_d(L)` and `δ_d(L)`; +- V3: the homogeneity exponents and the sandwich factors; +- V4: the Gamma ratios, the identity for `Π^R` and the model values (3.2); +- V5: the interval-Isserlis enclosures; +- V6: Lemma J and Corollary V2's constants; +- V7: Lemma K and `M`; +- V8: the assembly, asserting the header's table; +- V9: Lemma K's Step 1. + +They do not test notes C3, SL and C7, Lemma 0's dominated convergence, Weyl's formula, the existence of the edge limits, Isserlis' theorem itself, the density inequality (2.1), or #244's Theorem A. §7 of the note says so. + +Dylan Roy — delegated AI work. Actual performer: Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`). Scientific effect: NONE. + +**Extraction rule.** The same as in [5971055189](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-5971055189): the file is the exact text between the first ```` ```python ```` fence after its `###` heading and the next ```` ``` ```` line, plus a final newline. The expected stdout is the single JSON line in the following ```` ```json ```` fence, plus one newline. + +**Identities.** `v24_exact.py`: 33,760 B, SHA-256 `92cac2a6cf18de1cdb965365ccc6229ce8ce62753bb920c8de1e68e133366e08`. Stdout: 605 B, SHA-256 `4176f93a9835a08a55d2db6dc8f16ac901ca9948df5d04f3cf90e77059855680`. + +**Run.** A full run takes about 4.6 s. +- `python3 -B -S v24_exact.py`: exit 0, with exactly the stdout below. +- `python3 -B -O -S v24_exact.py`: byte-identical output. No check depends on an `assert`. +- `--mutant M1` … `M12`: each exits 1 in both modes, with empty stdout and `FAILED: ` on stderr: + + | Mutant | Change | Group | + |---|---|---| + | M1 | floor `1/3` | `V1_covariance` | + | M2 | `T₆ = 75` | `V2_image_bound` | + | M3 | birth pinned, `q = 2d + 2` | `V3_sandwich` | + | M4 | `G₄`'s constant `1/6` | `V4_gamma_parts` | + | M5 | `a₂^∞ = 35` for `Π^c` | `V4_gamma_parts` | + | M6 | `J ≥ 1/1000` | `V6_J_bounds` | + | M7 | `K = 300` | `V7_lemma_K` | + | M8 | `η = 12δ` | `V5_moment_perturbation` | + | M9 | the claim `≤ 10⁻¹¹⁰` at `L = 24` | `V8_assembly` | + | M10 | `(ψ − c′)/ψ ≤ 3/2` | `V9_lemmaK_step1` | + | M11 | `Π^R`'s coefficient `−9216 → −9215` | `V4_gamma_parts` | + | M12 | the nonnegative-part term of `η_R` dropped | `V8_assembly` | + +- An unknown label (`--mutant M13`, `--mutant M0`), a bare `--mutant`, extra arguments, or any other argument: exit 2, with `usage: v24_exact.py [--mutant M1..M12]` on stderr. + +The output was produced with Python 3.11.15. The script uses only `json`, `sys`, `fractions` and `itertools`, and is ASCII. + +**Author-side referee record (not review evidence).** Before posting, three clean-context Claude subagents of this session refereed the draft in the three slices of the note's §8, against the consumed sources. Each re-derived its slice and ran independent numerics: exact `Σ_∞` in two frames, lattice sums at 300 digits, random and adversarial perturbations for Lemma 3, a scan of (K) over 8M points (best constant `2.9074`), `J = 4.1977819815839`, and two independent quadratures of `D` (`0.07673811 ± 5·10⁻⁸`, `0.076735 ± 3·10⁻⁶`). All three returned **AMEND**. Slice B's one blocking finding was about scope. A fourth clean-context subagent then read the changes back and returned **AMEND** with no blocking finding. These reads carry organizational-independence credit 0 and are not review evidence. Every finding is applied: +- **Blocking (scope).** B-1: Lemma K reaches #242's `I` only through #244's Theorem A, which is conditional (#170 Theorem E(1), [CUB] Theorem C, [CUB] (C8)–(C11)). The condition is now stated in *Consumed*, *Not claimed*, §0, Lemma 0, Lemma K (now stated for `Φ`), Theorem V, Corollary V2 and Remarks 1–2. The `c₃` half and Corollary V1 do not use #244. With R-1: the cited parts of #244 that Lemma K uses (Remark 4, Corollary A.1's (3.1)–(3.2), Lemma B.2) are algebra on the cubic, and the note says so. +- **Non-blocking.** + - A-1 = B-2: `e ↦ −e` maps `x_e` to `ιx_e`, `ι = diag(−1, 1, −1)`, not to `−x_e`. The weights are `ι`-invariant; Lemma 4 now assumes it and proves evenness in `e` (R-8 renamed the reflection from `R` to `ι`). + - B-3: Lemma K's four coefficients listed (`5.3`, `3.26`, `323.74`, `323.38`); V7 asserts each (R-6). + - B-4: Lemma J's normal density is `ϕ`, not the kernel `φ`. + - B-5: V4 checks `Π^R = (1/32)g⁶I_quad(…)` exactly on a 315-point grid that proves the identity (R-13), with mutant M11. + - C-1: the header no longer says that the note gives a value of `R_0.6666666666666666`: it supplies the transfer, and `Ĩ` stays uncertified. + - C-2: the header's sign sentence now requires `|J/30 − Ĩ| > 4.2·10⁻¹⁰⁵`. + - C-3 (with R-2): Remark 2. The sign needs only `D ≤ 0.61`; the value needs `D` and `J`; both at #244 Theorem A's scope. + - C-4: *Not claimed* now has a bullet on the `R_0.6666666666666666` half's condition. + - C-5, C-6: sources added to *Consumed* (#237; #242's (2.5), Theorem 1, (1.1a)–(1.1b)) and *Cited only* (#216, #223, [SIDE24], note LU's ids, the MC comment). + - C-7: Remark 3 cites [6033651797](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6033651797) and matches its dimensions. With R-12, it also mentions the free-fit tension (`0.060 ± 0.007` in `d = 3`). + - C-8: V8 now asserts the eight table entries, with mutant M12. +- **Nits.** + - A-2, R-7: `Δ` defined explicitly; the excluded `φ` do not affect `I`; analyticity at `(0, 0)`. + - A-3: Lemma 0's domination at gap `k`, via parity; the `ε`-limit for each `b`; the model value checked directly (`Ψ_∞^{ψ^R} = 25w_∞H`); "the pin density times (1.1)". + - A-4: `e = ±θ₁` in `d = 2`. + - A-5: the least pivots asserted. + - A-6: the mean-value proof of the shell count. + - A-7: `𝒮_d > 0` from #242's Theorem 1. + - A-8: the scale renamed `τ`, and the joint density renamed `p^{oO}`. + - A-9, R-9: Lemma 3's hypotheses. + - B-6: V4's Gamma ratios generated from the recursion, with `s_j` derived. + - B-7: `I_quad` is the Taylor polynomial (checked symbolically, not used). + - B-8: `c′ = 0` covered, and the nonnegativity of the factors stated. + - B-9: `v_o(k)` introduced. + - B-10: `J ≥ 5.07·10⁻⁴`; `e^{−1/16}` listed under V6. + - B-11: general `G_j`. + - C-9: Remark 4's exponent. + - C-10, R-10: Remark 1's SIDE24 bound, against the exact model coefficient. + - C-11: Remark 5. + - C-12: "one may take `L₀(d) = 10`". + - C-13: the model's `F₀`. + - C-14: `D` in the disposition. + - C-15, R-5: V9 relabelled, its tautologies replaced by real checks. + - C-16: the claim's scope widening stated. + - C-17: the split's wording. + - C-18: the positive and negative parts corrected to `0.663146` and `0.586408`. + - R-3: "with its `B = 0` paragraph". + - R-4: `I(0, 0) = 20/3` is #242's direct computation, and `w_∞` uses note C3's identity, which does not use #244. + - R-11: *Prior work*'s quotation of note SL. + +### v24_exact.py + +```python +"""Exact controls for note V24 (CL-V24-TWO-THIRDS-TRANSFER-20261007-v1). + +Standard library only; exact rational arithmetic; deterministic; output identical under -O. +Usage: python3 -B -S v24_exact.py [--mutant M1..M12] +On success: one JSON line on stdout, exit 0. +On a failed control: nothing on stdout, 'FAILED: ' on stderr, exit 1. +On invalid arguments: usage on stderr, exit 2. +""" +import json +import sys +from fractions import Fraction as F +from itertools import permutations, product + +USAGE = "usage: v24_exact.py [--mutant M1..M12]\n" +MUTANTS = {"M%d" % i for i in range(1, 13)} + + +def parse(argv): + if len(argv) == 0: + return None + if len(argv) == 2 and argv[0] == "--mutant" and argv[1] in MUTANTS: + return argv[1] + sys.stderr.write(USAGE) + sys.exit(2) + + +MUT = parse(sys.argv[1:]) + + +class Failed(Exception): + pass + + +def need(cond, group): + if not cond: + raise Failed(group) + + +def sci(x, digits=4): + """Upward-rounded decimal string of a positive rational (for the record only).""" + x = F(x) + if x == 0: + return "0" + e = 0 + while x >= 10: + x /= 10 + e += 1 + while x < 1: + x *= 10 + e -= 1 + scale = 10 ** (digits - 1) + m = -((-x.numerator * scale) // x.denominator) # ceiling + if m >= 10 * scale: + m //= 10 + e += 1 + s = str(m) + return "%s.%se%d" % (s[0], s[1:], e) + + +# ---------------------------------------------------------------- rational bounds of constants +def exp_lower(x, n=None): + """A rational lower bound of e^x for rational x >= 0 (partial sum of the series).""" + x = F(x) + n = n or (2 * int(x) + 40) + s, t = F(0), F(1) + for j in range(n + 1): + s += t + t = t * x / (j + 1) + return s + + +def exp_neg_upper(x): + """A rational upper bound of e^{-x}, x >= 0.""" + return 1 / exp_lower(x) + + +def sqrt_upper(a, b=1): + """Rational r with r^2 >= a/b (Newton from above, exact check).""" + q = F(a, b) + r = F(int(float(q) ** 0.5 * 10 ** 6) + 1, 10 ** 6) + while r * r < q: + r += F(1, 10 ** 6) + return r + + +def sqrt_lower(a, b=1): + q = F(a, b) + r = F(int(float(q) ** 0.5 * 10 ** 6), 10 ** 6) + while r * r > q: + r -= F(1, 10 ** 6) + return r + + +SQ2_U, SQ2_L = sqrt_upper(2), sqrt_lower(2) +SQ3_U = sqrt_upper(3) +PI_L, PI_U = F(314159, 100000), F(314160, 100000) +GAMMA16_U = F(6) # Gamma(1/6) = 6 Gamma(7/6) <= 6, since Gamma <= 1 on [1, 2] +GAMMA23_U = F(3, 2) # Gamma(2/3) = (3/2) Gamma(5/3) <= 3/2 +GAMMA76_U = F(1) + + +# ---------------------------------------------------------------- V1: model jet covariance +def dfact(n): + r = 1 + while n > 1: + r *= n + n -= 2 + return r + + +def dphi0(alpha): + if any(a % 2 for a in alpha): + return F(0) + s = 1 + for a in alpha: + s *= (-1) ** (a // 2) * dfact(a - 1) + return F(s) + + +def cov(a, b): + return (-1) ** sum(b) * dphi0(tuple(x + y for x, y in zip(a, b))) + + +def jets(d): + """Jet list in the frame (u, theta_1..theta_m): pins, A, B, gamma, C (birth integrated).""" + m = d - 1 + names, idx = [], [] + + def add(nm, al): + names.append(nm) + idx.append(tuple(al)) + for i in range(d): + add("f_%d" % i, [1 if j == i else 0 for j in range(d)]) + for i in range(d): + add("f_0%d" % i, [(1 if j == 0 else 0) + (1 if j == i else 0) for j in range(d)]) + add("f_000", [3] + [0] * m) + npins = len(names) + th = list(range(1, d)) + for a in range(m): + for b in range(a, m): + al = [0] * d + al[th[a]] += 1 + al[th[b]] += 1 + add("A_%d%d" % (th[a], th[b]), al) + for a in range(m): + for b in range(a, m): + al = [0] * d + al[0] += 1 + al[th[a]] += 1 + al[th[b]] += 1 + add("B_%d%d" % (th[a], th[b]), al) + for a in range(m): + al = [0] * d + al[0] += 2 + al[th[a]] += 1 + add("g_%d" % th[a], al) + seen = set() + for c in product(th, repeat=3): + key = tuple(sorted(c)) + if key in seen: + continue + seen.add(key) + al = [0] * d + for x in key: + al[x] += 1 + add("C_" + "".join(map(str, key)), al) + M = [[cov(a, b) for b in idx] for a in idx] + return names, idx, M, npins + + +def ldl_pivots(M): + n = len(M) + A = [row[:] for row in M] + piv = [] + for k in range(n): + p = A[k][k] + piv.append(p) + if p == 0: + return piv + for i in range(k + 1, n): + f = A[i][k] / p + for j in range(k, n): + A[i][j] -= f * A[k][j] + return piv + + +def solve(M, b): + n = len(M) + A = [row[:] + [b[i]] for i, row in enumerate(M)] + for k in range(n): + p = next(i for i in range(k, n) if A[i][k] != 0) + A[k], A[p] = A[p], A[k] + for i in range(n): + if i != k and A[i][k] != 0: + f = A[i][k] / A[k][k] + A[i] = [x - f * y for x, y in zip(A[i], A[k])] + return [A[i][n] / A[i][i] for i in range(n)] + + +def inv(M): + n = len(M) + cols = [solve(M, [F(int(i == j)) for i in range(n)]) for j in range(n)] + return [[cols[j][i] for j in range(n)] for i in range(n)] + + +def proj_weights(fn, e): + """Coefficients of gamma_e, B_ee, C_eee on the independent odd free coordinates.""" + wg = [F(0)] * len(fn) + wb = [F(0)] * len(fn) + wc = [F(0)] * len(fn) + for a, nm in enumerate(fn): + if nm.startswith("g_"): + wg[a] = e[int(nm[2:]) - 1] + elif nm.startswith("B_"): + i, j = int(nm[2]) - 1, int(nm[3]) - 1 + wb[a] = e[i] * e[j] * (1 if i == j else 2) + elif nm.startswith("C_"): + ks = [int(c) - 1 for c in nm[2:]] + mult = len(set(permutations(ks))) + pr = F(1) + for k_ in ks: + pr *= e[k_] + wc[a] = pr * mult + return wg, wb, wc + + +MODEL = {} + + +def v1(): + g = "V1_covariance" + n = 0 + floor = F(1, 3) if MUT == "M1" else F(1, 4) + for d in (2, 3): + names, idx, M, npins = jets(d) + N = len(names) + need(N == (9 if d == 2 else 19) and npins == 2 * d + 1, g) + need(all(M[i][j] == M[j][i] for i in range(N) for j in range(N)), g) + order = [sum(a) for a in idx] + need(max(order[i] + order[j] for i in range(N) for j in range(N)) == 6, g) + need(max(abs(x) for row in M for x in row) == 15, g) + odd = [i for i in range(N) if order[i] % 2] + even = [i for i in range(N) if order[i] % 2 == 0] + need(all(M[i][j] == 0 for i in odd for j in even), g) # parity split + piv = ldl_pivots([[M[i][j] - (floor if i == j else 0) for j in range(N)] for i in range(N)]) + need(all(p > 0 for p in piv), g) # Sigma_inf >= I/4 + need(min(piv) == (F(3, 4) if d == 2 else F(329, 556)), g) # the least pivots stated in Lemma 1(a) + pins_o = [i for i in range(npins) if order[i] % 2] + free_o = [i for i in odd if i >= npins] + So = [[M[i][j] for j in pins_o] for i in pins_o] + Soi = inv(So) + l = pins_o.index(names.index("f_000")) + need(72 * Soi[l][l] == 12, g) # q_inf = 12 + SFP = [[M[i][j] for j in pins_o] for i in free_o] + R = [[sum(SFP[a][b] * Soi[b][c] for b in range(len(pins_o))) for c in range(len(pins_o))] + for a in range(len(free_o))] + need(all(R[a][l] == 0 for a in range(len(free_o))), g) # M_inf = 0 + SFF = [[M[i][j] for j in free_o] for i in free_o] + S = [[SFF[a][b] - sum(R[a][c] * SFP[b][c] for c in range(len(pins_o))) for b in range(len(free_o))] + for a in range(len(free_o))] + fn = [names[i] for i in free_o] + es = [(F(1),), (F(-1),)] if d == 2 else [(F(1), F(0)), (F(0), F(1)), (F(3, 5), F(4, 5)), + (F(-5, 13), F(12, 13)), (F(8, 17), F(-15, 17)), + (F(-20, 29), F(-21, 29))] + for e in es: + need(sum(x * x for x in e) == 1, g) + W = proj_weights(fn, e) + C3 = [[sum(W[x][a] * S[a][b] * W[y][b] for a in range(len(fn)) for b in range(len(fn))) + for y in range(3)] for x in range(3)] + need(C3 == [[2, 0, 0], [0, 2, 0], [0, 0, 6]], g) + # l1 and l2 norms of the projection weights (used for no bound; recorded) + n += 1 + MODEL[d] = dict(N=N, npins=npins, Ne=len(even) - (d), n_free=N - npins, + n_even_free=len([i for i in even if i >= npins]), min_pivot=str(min(piv))) + n += 1 + return n + + +# ---------------------------------------------------------------- V2: the lattice-tail image bound +def telephone(j): + t = [1, 1] + for i in range(2, j + 1): + t.append(t[i - 1] + (i - 1) * t[i - 2]) + return t[j] + + +def hermite_e(j): + """Coefficients of the probabilists' Hermite polynomial He_j (lowest degree first).""" + a, b = [1], [0, 1] + if j == 0: + return a + for i in range(1, j): + c = [0] + b + for k in range(len(a)): + c[k] -= i * a[k] + a, b = b, c + return b + + +E_BOUND = {} + + +def v2(): + g = "V2_image_bound" + n = 0 + T = [telephone(j) for j in range(7)] + if MUT == "M2": + T[6] = 75 + need(T == [1, 1, 2, 4, 10, 26, 76], g) + for j in range(7): + need(sum(abs(c) for c in hermite_e(j)) == T[j], g) # one direction: |He_j(x)| <= T_j max(1,|x|)^j + n += 1 + need(max(dfact(j - 1) for j in range(0, 7, 2)) == 15, g) # perfect matchings at x = 0 + for d in (2, 3): + for a in range(1, 201): + need((2 * a + 1) ** d - (2 * a - 1) ** d <= 2 * d * 3 ** (d - 1) * a ** (d - 1), g) + n += 1 + # ratio of successive terms of a^s e^{-L^2 a^2/2}, s <= d + 5 <= 8, L >= 10: <= 2^8 e^{-150} < 1/3 + need(3 * 2 ** 8 < exp_lower(150), g) + for d in (2, 3): + N = MODEL[d]["N"] + for L in (10, 24): + ex = exp_neg_upper(F(L * L, 2)) + E = 3 * d * 3 ** (d - 1) * (76 * d ** 3 * L ** 6 + 15) * ex + delta = 4 * N * E + E_BOUND[(d, L)] = (E, delta) + need(delta < F(1, 10 ** 8), g) + n += 1 + # monotone in L >= 10: (a L^6 + b) e^{-L^2/2} decreases when L^2 > 6 + return n + + +# ---------------------------------------------------------------- V3: homogeneity and the sandwich +SAND = {} + + +def v3(): + g = "V3_sandwich" + n = 0 + for d in (2, 3): + m = d - 1 + N = MODEL[d]["N"] + q = 2 * d + 1 if MUT != "M3" else 2 * d + 2 + nfree = N - q + # Phi_{aS}(k) = a^{e0} Phi_S(k/sqrt a): e0 = -N/2 + n/2 + 3 + (m - 1) - 1/2 + e0 = F(-N, 2) + F(nfree, 2) + 3 + (m - 1) - F(1, 2) + need(e0 == 0, g) + # k-integral: k = sqrt(a) k', k^{-8/3} dk = a^{-4/3 + 1/2} k'^{-8/3} dk' + need(F(-4, 3) + F(1, 2) == F(-5, 6), g) + # even block (P_e, A): exponent h_e = -(d + nA)/2 + nA/2 + (m - 1) - 1/2 = d/2 - 5/2 + nA = m * (m + 1) // 2 + he = F(-(d + nA), 2) + F(nA, 2) + (m - 1) - F(1, 2) + need(he == F(d, 2) - F(5, 2), g) + for L in (10, 24): + E, delta = E_BOUND[(d, L)] + # full vector: ((1+delta)/(1-delta))^{N/2} (1+delta)^{-5/6} <= 1 + (N+1) delta (sixth powers) + up = (1 + (N + 1) * delta) + need(((1 + delta) / (1 - delta)) ** (3 * N) <= up ** 6 * (1 + delta) ** 5, g) + lo = (1 - (N + 1) * delta) + need(((1 - delta) / (1 + delta)) ** (3 * N) >= lo ** 6 * (1 - delta) ** 5, g) + # weights w = p_{P_o}(0) * E[1]: ratio within 1 +- eps1, eps1 = (2N) delta + # p ratio in [(1+delta)^{-(d+1)/2}, (1-delta)^{-(d+1)/2}]; + # E ratio in [((1-delta)/(1+delta))^{Ne/2} (1-delta)^{he}, ((1+delta)/(1-delta))^{Ne/2} (1+delta)^{he}] + Ne = d + nA + two_he = 2 * he + need(two_he.denominator == 1 and Ne + two_he >= 0, g) + two_he = int(two_he) + eps1 = 2 * N * delta + # upper (squared): (1-delta)^{-(d+1)} ((1+delta)/(1-delta))^{Ne} (1+delta)^{2he} <= (1+eps1)^2 + need((1 + delta) ** (Ne + two_he) <= (1 + eps1) ** 2 * (1 - delta) ** (d + 1 + Ne), g) + # lower (squared): (1+delta)^{-(d+1)} ((1-delta)/(1+delta))^{Ne} (1-delta)^{2he} >= (1-eps1)^2 + need((1 - delta) ** (Ne + two_he) >= (1 - eps1) ** 2 * (1 + delta) ** (d + 1 + Ne), g) + SAND[(d, L)] = dict(eps1=eps1) + n += 1 + return n + + +# ---------------------------------------------------------------- polynomials in (g, beta, c) and k +# a polynomial: dict {(i, j, l, s): coeff} for g^i beta^j c^l k^s +def pmul(p, q): + r = {} + for (a, b, c, s), x in p.items(): + for (a2, b2, c2, s2), y in q.items(): + key = (a + a2, b + b2, c + c2, s + s2) + r[key] = r.get(key, 0) + x * y + return {k: v for k, v in r.items() if v != 0} + + +def padd(*ps): + r = {} + for p in ps: + for k, v in p.items(): + r[k] = r.get(k, 0) + v + return {k: v for k, v in r.items() if v != 0} + + +def pscale(p, c): + return {k: v * c for k, v in p.items()} + + +G = {(1, 0, 0, 0): F(1)} +BE = {(0, 1, 0, 0): F(1)} +CC = {(0, 0, 1, 0): F(1)} +K = {(0, 0, 0, 1): F(1)} + + +def pc(x): + return {(0, 0, 0, 0): F(x)} + + +def ppow(p, e): + r = pc(1) + for _ in range(e): + r = pmul(r, p) + return r + + +# Pi_c = (4/3) X^3, X = g^2/4 - 3 k beta +X = padd(pscale(ppow(G, 2), F(1, 4)), pscale(pmul(K, BE), -3)) +PI_C = pscale(ppow(X, 3), F(4, 3)) +# Pi_R = (1/32) gamma^6 Iquad(t, chi), t = 12 k beta/g^2, chi = 576 k^2 c/g^3 +PI_R = pscale(padd(pscale(ppow(G, 6), F(20, 3)), + pscale(pmul(K, pmul(BE, ppow(G, 4))), -240), + pscale(pmul(ppow(K, 2), pmul(CC, ppow(G, 3))), 512), + pscale(pmul(ppow(K, 2), pmul(ppow(BE, 2), ppow(G, 2))), 2496), + pscale(pmul(ppow(K, 3), pmul(BE, pmul(CC, G))), -9215 if MUT == "M11" else -9216), + pscale(pmul(ppow(K, 4), ppow(CC, 2)), F(26624, 3))), F(1, 32)) + + +class Iv: + """Closed rational interval.""" + __slots__ = ("lo", "hi") + + def __init__(self, lo, hi=None): + self.lo = F(lo) + self.hi = F(lo) if hi is None else F(hi) + + def __add__(self, o): + o = o if isinstance(o, Iv) else Iv(o) + return Iv(self.lo + o.lo, self.hi + o.hi) + + __radd__ = __add__ + + def __mul__(self, o): + o = o if isinstance(o, Iv) else Iv(o) + c = (self.lo * o.lo, self.lo * o.hi, self.hi * o.lo, self.hi * o.hi) + return Iv(min(c), max(c)) + + __rmul__ = __mul__ + + +def matchings(items): + """All partial matchings of a list of indices: yields (pairs, singles).""" + if not items: + yield [], [] + return + first, rest = items[0], items[1:] + for pairs, singles in matchings(rest): + yield pairs, [first] + singles + for i in range(len(rest)): + other = rest[:i] + rest[i + 1:] + for pairs, singles in matchings(other): + yield [(first, rest[i])] + pairs, singles + + +def gauss_moment_poly(alpha, mu, S): + """E[x^alpha] for x ~ N(k mu, S), as {power of k: value}; mu, S entries may be Iv.""" + items = [] + for v, a in enumerate(alpha): + items += [v] * a + out = {} + for pairs, singles in matchings(items): + term = Iv(1) + for (i, j) in pairs: + term = term * S[i][j] + for i in singles: + term = term * mu[i] + s = len(singles) + out[s] = out.get(s, Iv(0)) + term + return out + + +def expect(poly, mu, S): + """Coefficients a_j (by power of k) of E[poly] under N(k mu, S).""" + out = {} + for (i, j, l, s), c in poly.items(): + mom = gauss_moment_poly((i, j, l), mu, S) + for r, val in mom.items(): + out[s + r] = out.get(s + r, Iv(0)) + val * c + return out + + +S0 = [[F(2), F(0), F(0)], [F(0), F(2), F(0)], [F(0), F(0), F(6)]] +GJ = {0: F(-3, 5), 2: F(1, 2), 4: F(1, 12), 6: F(7, 72)} # G_j(q) = Gamma(1/6) GJ[j] q^{-(3j-5)/6} +A_INF = {} + + +def v4(): + g = "V4_gamma_parts" + n = 0 + # G_j from Gamma(x + 1) = x Gamma(x): Gamma(-5/6) = -(6/5)Gamma(1/6); Gamma(7/6) = Gamma(1/6)/6; + # Gamma(13/6) = (7/6)(1/6)Gamma(1/6); G_0 = (1/2)Gamma(-5/6) q^{5/6}, G_j = (1/2)Gamma((3j-5)/6) q^{-(3j-5)/6} + # Gamma(s)/Gamma(1/6) from Gamma(s + 1) = s Gamma(s), starting at s = 1/6 (and going down once to -5/6) + gam = {F(1, 6): F(1)} + s_ = F(1, 6) + for _ in range(2): + gam[s_ + 1] = s_ * gam[s_] + s_ += 1 + gam[F(-5, 6)] = gam[F(1, 6)] / F(-5, 6) + # the substitution s = q k^2 turns k^{j-8/3} e^{-q k^2} dk into (1/2) q^{-(3j-5)/6} s^{(3j-5)/6 - 1} e^{-s} ds + sj = {j: F(3 * j - 5, 6) for j in (0, 2, 4, 6)} + need(-1 < sj[0] < 0 and all(sj[j] > 0 for j in (2, 4, 6)), g) + need(all(F(j, 2) - F(4, 3) + F(1, 2) == sj[j] for j in sj), g) # k^{j - 8/3} dk with k = (s/q)^{1/2} + derived = {j: F(1, 2) * gam[sj[j]] for j in sj} + if MUT == "M4": + derived[4] = F(1, 6) + need(derived == GJ, g) + # Pi_R is (1/32) g^6 Iquad(12 k beta/g^2, 576 k^2 c/g^3): both sides are polynomials of degree <= 4, 2, 2, 6 in + # k, beta, c, g, so agreement on the grid k in {0..4}, beta, c in {0, 1, 2}, g in {1..7} (315 points) is an identity + pts = [(F(gv), F(bv), F(cv), F(kv)) for gv in range(1, 8) for bv in range(3) for cv in range(3) for kv in range(5)] + need(len(pts) == 315, g) + for gv, bv, cv, kv in pts: + t_, chi = 12 * kv * bv / gv ** 2, 576 * kv ** 2 * cv / gv ** 3 + iq = F(20, 3) - 20 * t_ + F(8, 9) * chi + F(52, 3) * t_ ** 2 - F(4, 3) * t_ * chi + F(13, 486) * chi ** 2 + val = sum(c * gv ** a * bv ** b * cv ** cc * kv ** e for (a, b, cc, e), c in PI_R.items()) + need(val == gv ** 6 * iq / 32, g) + n += 1 + # model expectations (mu = 0, S0) + mu0 = [Iv(0)] * 3 + S0i = [[Iv(x) for x in row] for row in S0] + for name, poly, expect_a in (("c", PI_C, {0: F(5, 2), 2: F(36)}), ("R", PI_R, {0: F(25), 2: F(312), 4: F(1664)})): + a = expect(poly, mu0, S0i) + av = {j: v.lo for j, v in a.items() if v.lo != 0} + need(all(v.lo == v.hi for v in a.values()), g) + if MUT == "M5" and name == "c": + av[2] = F(35) + need(av == expect_a, g) + A_INF[name] = av + n += 1 + # the coefficient of Gamma(1/6) 12^{-1/6} in sum_j a_j G_j(12): 12^{(5/6)} = 12 * 12^{-1/6}, 12^{-(3j-5)/6} = 12^{-1/6} 12^{-(j-2)/2} + def coef12(av): + s = F(0) + for j, x in av.items(): + s += x * GJ[j] * (F(12) if j == 0 else F(1, 12 ** ((j - 2) // 2))) + return s + need(coef12(A_INF["c"]) == 0, g) # (G.3): the polynomial part of c3 vanishes in the model + need(coef12(A_INF["R"]) == F(-112, 9), g) # Itilde_quad = -(112/675) Gamma(1/6) 12^{-1/6} + # c3(inf) = Pos_inf[rho_c] = (1/3)(S/25)(8/3)(15/16) J S = (J/30) S + need(F(1, 3) * F(1, 25) * F(8, 3) * F(15, 16) == F(1, 30), g) + # Itilde_quad from Gamma_inf[Pi_R] = (1/3)(S/25) sum_j a_j G_j(12) -> (1/75)(-112/9) + need(F(1, 75) * F(-112, 9) == F(-112, 675), g) + # model identity E[gamma^6 Iquad] = 800 + 9984 k^2 + 53248 k^4 + need({j: 32 * x for j, x in A_INF["R"].items()} == {0: 800, 2: 9984, 4: 53248}, g) + n += 4 + return n + + +# ---------------------------------------------------------------- V5: perturbed moments (interval Isserlis) +ALPHA = {} + + +def v5(): + g = "V5_moment_perturbation" + n = 0 + for (d, L), (E, delta) in sorted(E_BOUND.items()): + # |mu_Y| <= 12 delta sqrt(s_Y)/(sqrt 6 (1 - delta)) <= 12 delta/(1 - delta); |dS| <= delta sqrt(s_i s_j) <= 6 delta + eta = (12 if MUT == "M8" else 13) * delta + need(12 * delta / (1 - delta) <= eta and 6 * delta <= eta, g) + mu = [Iv(-eta, eta)] * 3 + S = [[Iv(S0[i][j] - eta, S0[i][j] + eta) for j in range(3)] for i in range(3)] + for name, poly in (("c", PI_C), ("R", PI_R)): + a = expect(poly, mu, S) + ainf = A_INF[name] + alpha = {} + for j, iv in a.items(): + need(j % 2 == 0 or (iv.lo <= 0 <= iv.hi), g) + c0 = ainf.get(j, F(0)) + alpha[j] = max(abs(iv.lo - c0), abs(iv.hi - c0)) + # odd powers of k vanish by the reflection symmetry (even in k); their enclosures only contain 0 + ALPHA[(d, L, name)] = {j: x for j, x in alpha.items() if j % 2 == 0} + n += 1 + return n + + +# ---------------------------------------------------------------- V6: J bounds +JB = {} + + +def v6(): + g = "V6_J_bounds" + # upper: J <= (16/15) 27 E[B_+^3] (1/2) 12^{-2/3} Gamma(2/3), E[B_+^3] = 2^{3/2} sqrt(2/pi) + need(F(5) ** 3 <= 144, g) # 12^{2/3} >= 5 + sq2pi_u = sqrt_upper(2 * 100000, 314159) # sqrt(2/pi) with pi >= 3.14159 + eb3 = 2 * SQ2_U * sq2pi_u + J_up = F(16, 15) * 27 * eb3 * F(1, 2) * F(1, 5) * GAMMA23_U + need(J_up <= 10, g) + # lower: k in [1/4, 1/2], B >= 1, gamma^2 <= 1/4: 3kB - gamma^2/4 >= 11/16 + e_m12 = 1 - F(1, 2) + F(1, 8) - F(1, 48) # e^{-1/2} >= (alternating partial sum) + s2pi = sqrt_upper(2 * 314160, 100000) # sqrt(2 pi) <= , pi <= 3.14160 + phi1 = e_m12 / s2pi # phi(1) >= + p_b = (1 - 1 / SQ2_L) * phi1 if (1 - 1 / SQ2_L) > 0 else F(0) + # careful: 1/sqrt2 <= 1/SQ2_L, so 1 - 1/sqrt 2 >= 1 - 1/SQ2_L + phi_s = (1 - F(1, 16)) / s2pi # phi(1/(2 sqrt 2)) >= e^{-1/16}/sqrt(2pi) >= (15/16)/sqrt(2pi) + p_g = 2 * (1 / (2 * SQ2_U)) * phi_s # P(|Z| <= 1/(2 sqrt 2)) >= 2 (1/(2 sqrt 2)) phi(.) + e3 = 1 / (F(27183, 10000) ** 3) # e^{-3} >= 1/2.7183^3 + k_int = F(1, 4) * F(63, 10) # int_{1/4}^{1/2} k^{-8/3} dk >= (1/4) 2^{8/3} >= (1/4)(6.3) + need(F(63, 10) ** 3 <= 2 ** 8, g) + J_low = F(16, 15) * F(11, 16) ** 3 * p_b * p_g * e3 * k_int + claim = F(1, 1000) if MUT == "M6" else F(1, 2000) + need(J_low >= claim, g) + JB.update(J_up=F(10), J_low=claim, J_low_exact=J_low) + # Corollary V2: Gamma(1/6) = 6 Gamma(7/6) >= 6 gamma(7/6, 64), with T = 64, T^{1/6} = 2, T^{7/6} = 128: + # gamma(s, T) = sum_n (-1)^n T^{s+n}/(n! (s+n)); for n >= T the terms decrease, so the tail after n0 is <= a_{n0} + s = F(7, 6) + part, a, n0 = F(0), None, 300 + fact = 1 + for n_ in range(n0 + 1): + if n_ > 0: + fact *= n_ + a = F(128 * 64 ** n_, fact) / (n_ + s) + if n_ < n0: + part += a if n_ % 2 == 0 else -a + need(n0 > 64 and part - a >= F(9277, 10000), g) # Gamma(7/6) >= 0.9277 + need(F(6608, 10000) ** 6 * 12 <= 1, g) # 12^{-1/6} >= 0.6608 + gq = F(112, 675) * 6 * F(9277, 10000) * F(6608, 10000) # (112/675) Gamma(1/6) 12^{-1/6} >= + need(gq + claim / 30 >= F(6103, 10000), g) # J/30 - Itilde >= 0.6103 - D + JB.update(gq_low=gq) + return 6 + + +# ---------------------------------------------------------------- V7: Lemma K and the crude Pos bounds +KCONST = {} + + +def polyS_reduce(p): + """p: dict {(i, j): coeff} for t^i S^j; reduce S^2 = 1 - 4t/3.""" + changed = True + while changed: + changed = False + q = {} + for (i, j), c in p.items(): + if j >= 2: + q[(i, j - 2)] = q.get((i, j - 2), 0) + c + q[(i + 1, j - 2)] = q.get((i + 1, j - 2), 0) - F(4, 3) * c + changed = True + else: + q[(i, j)] = q.get((i, j), 0) + c + p = {k: v for k, v in q.items() if v != 0} + return p + + +def tmul(p, q): + r = {} + for (a, b), x in p.items(): + for (c, d), y in q.items(): + r[(a + c, b + d)] = r.get((a + c, b + d), 0) + x * y + return {k: v for k, v in r.items() if v != 0} + + +def tadd(*ps): + r = {} + for p in ps: + for k, v in p.items(): + r[k] = r.get(k, 0) + v + return {k: v for k, v in r.items() if v != 0} + + +def v7(): + g = "V7_lemma_K" + n = 0 + # I_0 = c' delta^2 + delta^3/3, c' = 1 - t, delta = 1/2 - t + (3/2) S (#244 Corollary A.1, t <= 2/3) + cp = {(0, 0): F(1), (1, 0): F(-1)} + dl = {(0, 0): F(1, 2), (1, 0): F(-1), (0, 1): F(3, 2)} + I0 = polyS_reduce(tadd(tmul(cp, tmul(dl, dl)), {k: v / 3 for k, v in tmul(dl, tmul(dl, dl)).items()})) + target = tadd({(0, 0): F(11, 3), (1, 0): F(-21, 2), (2, 0): F(17, 2), (3, 0): F(-4, 3)}, + tmul({(0, 0): F(3, 2)}, tmul({(0, 0): F(1), (1, 0): F(-1)}, {(0, 1): F(2), (1, 1): F(-3)}))) + need(I0 == target, g) + P0 = {i: c for (i, j), c in I0.items() if j == 0} + P1 = {i: c for (i, j), c in I0.items() if j == 1} + s0 = {0: F(1), 1: F(-2, 3), 2: F(-2, 9)} + comb = dict(P0) + for i, c in P1.items(): + for i2, c2 in s0.items(): + comb[i + i2] = comb.get(i + i2, 0) + c * c2 + comb = {k: v for k, v in comb.items() if v != 0} + need(comb == {0: F(20, 3), 1: F(-20), 2: F(52, 3), 3: F(-8, 3), 4: F(-1)}, g) + need(P1 == {0: F(3), 1: F(-15, 2), 2: F(9, 2)}, g) # (3/2)(2 - 5t + 3t^2) + # sqrt(1-x) = 1 - x/2 - x^2/8 - x^3/(16 (1-xi)^{5/2}); x = 4t/3 gives 1 - (2/3)t - (2/9)t^2 + need(F(4, 3) / 2 == F(2, 3) and (F(4, 3) ** 2) / 8 == F(2, 9), g) + # |R_S| <= (64/27)|t|^3 3^{5/2}/16 on |t| <= 1/2; 3^{5/2} <= 15.59 + need(F(1559, 100) ** 2 >= 243, g) + rs = F(64, 27) * F(1559, 100) / 16 + k_small = F(8, 3) + F(1, 2) + F(3, 2) * F(21, 4) * rs # |t| <= 1/2 : coefficient of |t|^3 + need(k_small <= 22, g) + # |t| >= 1/2: delta <= 3|t| + 98^{1/3}|t| <= 7.62|t|; I_0 <= 3|t| delta^2 + delta^3/3; |Iquad(t,0)| <= 84 t^2 + need(F(462, 100) ** 3 >= 98, g) + dmax = 3 + F(462, 100) + need(dmax <= F(762, 100), g) + i0max = 3 * dmax ** 2 + dmax ** 3 / 3 + need(i0max <= 322, g) + need(F(20, 3) * 4 + 20 * 2 + F(52, 3) == 84, g) + k2 = F(322) + # Step 1: |dPhi/dR| <= 2 sqrt3 (1 + |t|^{3/2}) + (sqrt2/12)|R|, |R| <= |chi| + 8 + 12|t| + c_chi = 2 * SQ3_U + 2 * SQ2_U / 3 + c_chi2 = SQ3_U + SQ2_U / 12 + SQ2_U / 2 + c_t3 = SQ3_U + c_t2 = SQ2_U / 2 + # check the expansion |chi|[2 sqrt3 (1 + |t|^{3/2}) + (sqrt2/12)(|chi| + 8 + 12|t|)] + need(F(8, 12) == F(2, 3) and F(12, 12) == 1, g) + # Step 3: |Iquad(t,chi) - Iquad(t,0)| <= (8/9)|chi| + (2/3)(t^2 + chi^2) + (13/486) chi^2 + tot_chi = c_chi + F(8, 9) + tot_chi2 = c_chi2 + F(2, 3) + F(13, 486) + tot_t3 = c_t3 + k2 + tot_t2 = c_t2 + k2 + F(2, 3) + need(tot_chi < F(53, 10) and tot_chi2 < F(326, 100) and tot_t3 < F(32374, 100) and tot_t2 < F(32338, 100), g) + KK = max(tot_chi, tot_chi2, tot_t3, tot_t2) + claim = F(300) if MUT == "M7" else F(324) + need(KK <= claim, g) + # crude moments of t^2, |t|^3, |chi|, chi^2 (normalized as in Pos): sum <= 31 + m1 = F(576, 2400) * F(1, 2) * GAMMA16_U # 12^{-1/6} <= 1 + eb3 = 2 * (2 * SQ2_U * sqrt_upper(2 * 100000, 314159)) # E|B|^3 = 2^{3/2} * 2 sqrt(2/pi) + need(eb3 <= F(452, 100), g) + m2 = F(1728, 2400) * F(452, 100) * F(1, 2) * F(1, 5) * GAMMA23_U + ec = SQ2_U * sqrt_upper(3) * sqrt_upper(2 * 100000, 314159) # E|C| = sqrt6 sqrt(2/pi) + need(ec <= 2, g) + m3 = F(576, 2400) * 2 * F(452, 100) * F(1, 2) * GAMMA16_U + need(F(18) ** 6 <= F(12) ** 7, g) # 12^{-7/6} <= 1/18 + m4 = F(331776 * 6, 2400) * F(1, 2) * F(1, 18) * GAMMA76_U + M = m1 + m2 + m3 + m4 + need(M <= 31, g) + KCONST.update(K=claim, M=F(31), k_small=k_small, i0max=i0max) + n += 6 + return n + + +# ---------------------------------------------------------------- V8: assembly +RESULT = {} +TABLE = {(2, 10, "c"): F(588, 10 ** 11), (2, 10, "R"): F(781, 10 ** 8), (3, 10, "c"): F(197, 10 ** 9), + (3, 10, "R"): F(497, 10 ** 6), (2, 24, "c"): F(488, 10 ** 112), (2, 24, "R"): F(648, 10 ** 109), + (3, 24, "c"): F(164, 10 ** 110), (3, 24, "R"): F(413, 10 ** 107)} + + +def v8(): + g = "V8_assembly" + n = 0 + for (d, L), (E, delta) in sorted(E_BOUND.items()): + N = MODEL[d]["N"] + eps1 = SAND[(d, L)]["eps1"] + dq = 12 * delta / (1 - delta) # |q_L - 12| + out = {} + for name in ("c", "R"): + ainf = A_INF[name] + alpha = ALPHA[(d, L, name)] + # sum_j a_j g_j(q), g_0 = -(3/5) q^{5/6}, g_j = GJ[j] q^{-(3j-5)/6}; for q in [11, 13]: + # |g_j(q)| <= |GJ[j]| * 13 (j = 0), <= |GJ[j]| (j >= 2); |g_j'(q)| <= 1/2 + gmax = {j: abs(GJ[j]) * (13 if j == 0 else 1) for j in GJ} + need(dq < 1, g) + s_at_qL = sum(abs(x) * gmax[j] for j, x in ainf.items()) # crude |sum a_j g_j(q_L)| + diff = dq * sum(abs(x) for x in ainf.values()) * F(1, 2) # |sum a_j (g_j(q_L) - g_j(12))| + if name == "c": + # sum a_j g_j(q) = q^{-1/6}(18 - (3/2) q): at q_L at most (3/2) dq + s_at_qL = F(3, 2) * dq + diff = s_at_qL + pert = sum(alpha.get(j, 0) * gmax[j] for j in GJ) + gamma_err = F(1, 75) * GAMMA16_U * (eps1 * s_at_qL + diff + (1 + eps1) * pert) + if name == "c": + pos_err = (N + 1) * delta * JB["J_up"] / 30 + else: + pos_err = (N + 1) * delta * KCONST["K"] * KCONST["M"] + if MUT == "M12": + pos_err = 0 + out[name] = gamma_err + pos_err + RESULT[(d, L)] = out + for name in ("c", "R"): + ent = TABLE[(d, L, name)] + need(out[name] <= ent <= out[name] * F(101, 100), g) # the header's entries, rounded up + # c3(L) > 0: J_low/30 exceeds the transfer error + need(out["c"] < JB["J_low"] / 30, g) + if L == 24: + lim = F(1, 10 ** 110) if MUT == "M9" else F(1, 10 ** 100) + need(out["c"] <= lim and out["R"] <= lim, g) + n += 1 + return n + + +# ---------------------------------------------------------------- V9: Lemma K, Step 1 +def v9(): + g = "V9_lemmaK_step1" + n = 0 + # polynomial identities in y with c' symbolic (dicts {(power of y, power of c'): coeff}): + # d/dy[(y - c')^2 (y + 2c')] = 3 (y - c')(y + c'); d/dy[c' y^2 + y^3/3] = y (y + 2c') (c' >= 0, delta = y); + # with delta = y + 2c' (c' < 0, |c'| = -c'): d/dy[-c' delta^2 + delta^3/3] = y (y + 2c') + def pm(p, q): + r = {} + for (a, b), x in p.items(): + for (c_, d_), y_ in q.items(): + r[(a + c_, b + d_)] = r.get((a + c_, b + d_), 0) + x * y_ + return {k_: v for k_, v in r.items() if v != 0} + + def pa(*ps): + r = {} + for p_ in ps: + for k_, v in p_.items(): + r[k_] = r.get(k_, 0) + v + return {k_: v for k_, v in r.items() if v != 0} + + def dy(p_): + return {(a - 1, b): x * a for (a, b), x in p_.items() if a > 0} + Y, C1 = {(1, 0): F(1)}, {(0, 1): F(1)} + cub = pm(pm(pa(Y, {(0, 1): F(-1)}), pa(Y, {(0, 1): F(-1)})), pa(Y, {(0, 1): F(2)})) + need(dy(cub) == pm({(0, 0): F(3)}, pm(pa(Y, {(0, 1): F(-1)}), pa(Y, C1))), g) + target = pm(Y, pa(Y, {(0, 1): F(2)})) + phi_pos = pa(pm(C1, pm(Y, Y)), {(3, 0): F(1, 3)}) + need(dy(phi_pos) == target, g) + dl = pa(Y, {(0, 1): F(2)}) + phi_neg = pa(pm({(0, 1): F(-1)}, pm(dl, dl)), {k_: v / 3 for k_, v in pm(dl, pm(dl, dl)).items()}) + need(dy(phi_neg) == target, g) + n += 3 + # (psi - c')/psi <= 2 on the admissible range psi >= psi_0 = max(2c', -c') + two = F(2) if MUT != "M10" else F(3, 2) + for c_ in (F(-3), F(-1, 2), F(0), F(1, 3), F(2)): + psi0 = max(2 * c_, -c_) + for extra in (F(0), F(1, 7), F(1), F(9)): + psi = psi0 + extra + if psi == 0: + continue + need(psi - c_ <= two * psi, g) + n += 1 + # (a + b)^{3/2} <= sqrt2 (a^{3/2} + b^{3/2}) on rational squares a = x^2, b = y^2: (x^2 + y^2)^3 <= 2 (x^3 + y^3)^2 + for x in (F(0), F(1, 2), F(1), F(3, 2), F(2)): + for yv in (F(0), F(1, 3), F(1), F(4, 3)): + need((x * x + yv * yv) ** 3 <= 2 * (x ** 3 + yv ** 3) ** 2, g) + n += 1 + # I(0, 0) = Phi(1, 8) = 20/3 = I_quad(0, 0): at c' = 1, R = 8 the cubic (y - 1)^2 (y + 2) = R^2/16 reads + # (y - 2)(y + 1)^2 = 0 (a cubic identity, checked at four points); its largest root y = 2 gives c' y^2 + y^3/3 + for yv in (F(-3), F(0), F(1, 2), F(5)): + need((yv - 1) ** 2 * (yv + 2) - F(8) ** 2 / 16 == (yv - 2) * (yv + 1) ** 2, g) + need(1 * F(2) ** 2 + F(2) ** 3 / 3 == F(20, 3), g) + # the positive part of c3 vanishes at k = 0: (3*0*beta - g^2/4)_+ = 0 + for gv in (F(-3), F(-1, 2), F(0), F(5, 7)): + need(max(F(0), 0 - gv * gv / 4) == 0, g) + return n + 9 + + +def main(): + try: + counts = {} + for name, fn in (("V1", v1), ("V2", v2), ("V3", v3), ("V4", v4), ("V5", v5), ("V6", v6), ("V7", v7), + ("V8", v8), ("V9", v9)): + counts[name] = fn() + except Failed as ex: + sys.stderr.write("FAILED: %s\n" % ex.args[0]) + sys.exit(1) + rec = {"object": "CL-V24-TWO-THIRDS-TRANSFER-20261007-v1", "passed": True, "counts": counts, + "floor_min_pivot": {str(d): MODEL[d]["min_pivot"] for d in (2, 3)}, + "E_upper": {"%d,%d" % k: sci(v[0]) for k, v in sorted(E_BOUND.items())}, + "delta_upper": {"%d,%d" % k: sci(v[1]) for k, v in sorted(E_BOUND.items())}, + "J_low": str(JB["J_low"]), "J_up": str(JB["J_up"]), "K": str(KCONST["K"]), "M": str(KCONST["M"]), + "transfer_over_S": {"%d,%d" % k: {n_: sci(x) for n_, x in sorted(v.items())} + for k, v in sorted(RESULT.items())}} + sys.stdout.write(json.dumps(rec, sort_keys=True, separators=(",", ":")) + "\n") + + +if __name__ == "__main__": + main() +``` + +```json +{"E_upper":{"2,10":"2.111e-12","2,24":"1.753e-113","3,10":"3.206e-11","3,24":"2.662e-112"},"J_low":"1/2000","J_up":"10","K":"324","M":"31","counts":{"V1":10,"V2":411,"V3":4,"V4":321,"V5":8,"V6":6,"V7":6,"V8":4,"V9":51},"delta_upper":{"2,10":"7.599e-11","2,24":"6.309e-112","3,10":"2.437e-9","3,24":"2.023e-110"},"floor_min_pivot":{"2":"3/4","3":"329/556"},"object":"CL-V24-TWO-THIRDS-TRANSFER-20261007-v1","passed":true,"transfer_over_S":{"2,10":{"R":"7.804e-6","c":"5.876e-9"},"2,24":{"R":"6.479e-107","c":"4.878e-110"},"3,10":{"R":"4.969e-4","c":"1.965e-7"},"3,24":{"R":"4.125e-105","c":"1.632e-108"}}} +``` + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md new file mode 100644 index 00000000..4ba683c5 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/AUTHOR_READ_COMPLETE_AND_DC_CLAIM.md @@ -0,0 +1,50 @@ +## Note V24 is read in every slice; claim 6031577374 released. New D5 claim: certify `D ≤ 0.61` (request 1 of 6033651797) + +Anthropic Claude, session `session_01NMeKEismAyeqgdB4sy2NJU` (Claude01N), author of note V24. Dylan Roy — delegated AI work. Scientific effect NONE. No status, register, `lemma_closed`, prize or premise change. + +### 1. Note V24: all three slices PASS + +All three readers hashed the frozen note [6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111) (52,200 B, `32677f02…0c03`) and controls [6034161613](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034161613) (42,030 B, `07f972d2…ae8f`) before and after their reads. Each reproduced the extracted `v24_exact.py` (33,760 B, `92cac2a6…6e08`) and its 605 B stdout (`4176f93a…5680`) in both Python modes. + +| Slice | Scope | Verdict | Reader (xAI Grok 4.7, Cursor) | Mutants checked | +|---|---|---|---|---| +| A | §§0–2: setting, Lemmas 0–3; V1–V3 | **PASS** [6034183460](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034183460) | `bc-a825d594…` | M1–M3 | +| B | §§3–4: Lemma 4, (3.1), (3.2), Lemmas K and J; V4, V6, V7 | **PASS** [6034185337](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034185337) | `bc-f3f418fe…` | M4–M7, M11 | +| C | §§5–6 and the header; V5, V8, V9 | **PASS** [6034197189](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034197189) | `bc-65b7f8e6…` | M8–M10, M12 | + +The readers are nonauthors and provider-distinct from the author. Organizational-independence credit is 0, and each reader's personal reading is PENDING, as each verdict states. + +**Optional points.** There is no AMEND, so nothing changes now. Each point below rides any later revision of note V24. +1. *Slice C, Lemma 2's displays.* The three-digit displays `δ₃(10) ≤ 2.44·10⁻⁹` and `δ₃(24) ≤ 2.03·10⁻¹¹⁰` are coarser than V8's rational `δ`. Put into the monotone formula, they exceed the two `d = 3` `R_{2/3}` entries. The table is evaluated at V8's tighter upper bound of the exact `δ_d`, so every stated inequality stands. Successor wording, after Lemma 2's displays: "The header's table is evaluated at the controls' rational upper bounds for `δ_d(L)` (V8), which are smaller than these rounded displays." +2. *Slice C, Remark 1.* A kink-unaware Hermite check reproduced the positive part (`0.6630` against `0.663146`) but not the negative part at `5·10⁻⁸`. That check was exploration, and the note claims no certified value of `D`, so nothing changes. +3. Slices A and B raised no point. + +**Claim [6031577374](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6031577374) is released.** + +### 2. Math-#390: author readback done + +As awaited in [6034038225](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034038225), my 51-file landed readback is posted: [Math-#390 6034781463](https://github.com/d6g8k5htny-coder/Math-/pull/390#issuecomment-6034781463), **PASS**. All 51 landed blobs at `7d2f6250` equal the reviewed blobs at `8f62a0f4` and my own source. The packet replay passes in both modes on the landed tree, and the landed-push CI is green. + +### 3. D5 claim: note DC, a certified upper bound for the model number `D` + +I read this thread for an active claim on request 1 of [6033651797](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6033651797) and found none, through `6034841394`. + +- **Object.** `CL-DC-MODEL-D-UPPER-20261007-v1`, note DC. +- **Goal.** Certify `D ≤ 0.61`, aiming for about `D ≤ 0.35`. By note V24's Corollary V2, that fixes the sign of note C7's `ℓ^{2/3}` coefficient `c₃ − R_{2/3}` as positive at every side `L ≥ 24` in `d = 2, 3`, SIDE24 included. The sign carries #244 Theorem A's condition, as in V24. +- **Route** (scoped by exploration): + - `(4.4′)`: the proof of #244 Lemma B.2(d) gives `Δ₂ ≤ h²/32 + (κ(c′)/2)(|h| − |r|)₊`. + - So `D ≤ T₁ + T₂ + T₃`. Here `T₁` is the `χ₀ = 0` term, `T₂ = (1/32 − 13/486)·21.189797… ≈ 0.0954` is in closed form, and `T₃` is the kink term. + - `T₃` uses Birnbaum's Mills-ratio bound `Q(a) ≥ 2φ(a)/(a + √(a² + 4))`, proved in the note. + - `T₁` and `T₃` are enclosed by a standard-library interval computation (`decimal`, outward rounding, correctly rounded `exp`/`ln`/`sqrt` widened by one ulp) on an explicit partition, with analytic tails. + - Exploration values: `T₁ ≈ 0.043` and `T₃ ≈ 0.16`, tails included, so `D ≤ 0.30` is the expected size of the bound. +- **Not in scope.** A two-sided enclosure of `D` or of `J`, so no certified value of the coefficient; `d ≥ 4`; any status change. +- **Process.** Note, stdlib controls with mutants, an author-side clean-context referee, then nonauthor slice reads requested here. +- **Lease.** Until 14:00Z today, then released or renewed. + +Request 2 of 6033651797, a second-provider (non-xAI) read of note C7's Slice A, stays open to any lane. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/CLAIM.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/CLAIM.md new file mode 100644 index 00000000..03f793d5 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/CLAIM.md @@ -0,0 +1,21 @@ +## D5 claim: note V24 (the `ℓ^{2/3}` coefficients `c₃` and `R_{2/3}` of the torus field at `L ≥ 24`, quantitatively) + +Anthropic Claude, session `session_01NMeKEismAyeqgdB4sy2NJU`, the author of notes C3, SL and C7. Dylan Roy — delegated AI work. Scientific effect NONE; organizational-independence credit 0. + +**Object.** `CL-V24-TWO-THIRDS-TRANSFER-20261007-v1`. Note C3 proves `c₃(L) > 0` only for `L ≥ L₀(d)`, with `L₀(d)` not quantified, and its Remark 5 leaves `L = 24` open. Note SL gives no value of `R_{2/3}` for the torus field (its *Not claimed*), and note C7 claims no value or sign at `L = 24`. +- **Scope.** For the [P] torus field (normalized periodization), `d ∈ {2, 3}`, every real `L ≥ 24`: + - explicit bounds on `|c₃(L) − c₃^{model}|` and `|R_{2/3}(L) − R_{2/3}^{model}|`, for C3's (C3) and SL's (SL). The route splits each integrand into a polynomial part (Gamma-function integrals, with explicit perturbation bounds) and nonnegative parts (a Gaussian density sandwich with the homogeneity exponent `−5/6`); + - from an elementary lower bound on C3's `J`: `c₃(L) > 0`, so `L₀(d) ≤ 24` for `d = 2, 3`, and note LU's Theorem P⁺ is sharp for SIDE24; + - C7's coefficient `c₃(L) − R_{2/3}(L)` equals its model value up to the same bound. Its sign then rests on the model value of `J/30 − Ĩ`, which is not certified here. I will ask for that certification separately. +- **Not in scope.** No certified value of `Ĩ` or `J` beyond crude bounds, no rate, and no `d ≥ 4`. +- **Where.** The note and its stdlib controls comment, here on main#229. Any Math- custody comes later, under its own claim. +- **Search.** main#229 since 6 October, the Math- tree at `0793dc26`, and the archive. The density-sandwich method is OpenAI's `frontiers/cusp_torus_transfer_20261001` (with #219's Lemma S); `frontiers/c2_torus_transfer_20261001` transfers `c₂`. No claim or packet quantifies C3's `L₀(d)` or transfers `R_{2/3}`. +- **Lease.** Until the note's slices have verdicts or a release, or 2026-10-07 18:00 UTC. + +A Monte Carlo check of C7's coefficient (2000 new `d = 3` fields, exploration outside the repository) is running. Its results will follow on this thread in one comment. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/PROOF.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/PROOF.md new file mode 100644 index 00000000..670e7370 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/PROOF.md @@ -0,0 +1,590 @@ +# Lifetime note V24: the `ℓ^{2/3}` coefficients `c₃` and `R_{2/3}` of the torus field at `L ≥ 10`, with explicit transfer bounds + +Object: `CL-V24-TWO-THIRDS-TRANSFER-20261007-v1`. Claim: main#229 6031577374; its scope `L ≥ 24` is widened here to `L ≥ 10`. +Author: Anthropic Claude (claude.ai session `session_01NMeKEismAyeqgdB4sy2NJU`), 7 October 2026, for Dylan Roy (delegated AI +work). The same session wrote #242, #244 and notes C3, SL and C7. The consumed packets in turn consume OpenAI-authored +sources, among them [P] and [R]. The density-sandwich method of §2 is that of OpenAI's +`frontiers/cusp_torus_transfer_20261001` and of #219's Lemma S. +Disposition: AUTHOR-SIDE PROOF CANDIDATE; NONAUTHOR REVIEW REQUIRED. Scientific effect: NONE — no register, graph, STATUS, +PROOF_INDEX, prize or Boolean change. Same GitHub account as every lane; organizational independence 0. The numbers proved +here are explicit inequalities: Theorem V's table, Lemma K's constant and Lemma J's interval. The controls check each in +exact rational arithmetic (§7). No model value is certified: `J`, `Ĩ`, `D` and `J/30 − Ĩ` are known only numerically. The +`R_{2/3}` half rests on #244's Theorem A, which is conditional (*Not claimed*). Before posting, three clean-context Claude +subagents of this session refereed the draft in the three slices of §8, against the consumed sources. All three returned +AMEND. The one blocking finding (Slice B) was about scope: Lemma K reaches #242's `I` only through #244's Theorem A, which is +conditional, and the draft did not say so. The condition is now stated wherever it applies. Every finding is applied, and +the controls comment lists them. These are author-side reads and earn no review credit. + +**What is new.** +- **Theorem V (the transfer)** (§5). Take `d ∈ {2, 3}`, a real `L ≥ 10` and the [P] torus field. Then note C3's coefficient + `c₃(L)` and note SL's `R_{2/3}(L)` differ from their model values `c₃^∞ = (J/30)𝒮_d` and `R^∞ = Ĩ𝒮_d` by at most the + following multiples of `𝒮_d := ∫_{S^{d−1}}∫_RF₀ db dσ`, with the model's `F₀` (#242's Corollary 1′): + + | `d` | `c₃`, `L ≥ 10` | `R_{2/3}`, `L ≥ 10` | `c₃`, `L ≥ 24` | `R_{2/3}`, `L ≥ 24` | + |---|---|---|---|---| + | 2 | `5.88·10⁻⁹` | `7.81·10⁻⁶` | `4.88·10⁻¹¹⁰` | `6.48·10⁻¹⁰⁷` | + | 3 | `1.97·10⁻⁷` | `4.97·10⁻⁴` | `1.64·10⁻¹⁰⁸` | `4.13·10⁻¹⁰⁵` | + + This quantifies note C3's Proposition G″. For the integrated coefficient, it also supplies the transfer that note SL's + *Not claimed* leaves open ("the transfer of `F` (or `H`) to the torus field is not proved here"): `R_{2/3}(L) = Ĩ𝒮_d` up + to `η_R𝒮_d`, at #244 Theorem A's conditional scope. The model value `Ĩ` itself stays uncertified. +- **Corollary V1** (§5). `c₃(L) > 0` for every real `L ≥ 10`, in `d = 2` and `d = 3`. So one may take `L₀(d) = 10` in note + C3's Proposition G″, and for SIDE24 (`d = 3`, `L = 24`) the remainder `O(ℓ^{2/3})` of note LU's Theorem P⁺ is of exact order `ℓ^{2/3}`. Note C3's + Remark 5 left this open. +- **Corollary V2** (§5). For `L ≥ 24`, note C7's `ℓ^{2/3}` coefficient satisfies + `|c₃(L) − R_{2/3}(L) − (J/30 − Ĩ)𝒮_d| ≤ 4.2·10⁻¹⁰⁵𝒮_d` (`d = 3`; `6.5·10⁻¹⁰⁷𝒮_d` in `d = 2`), at #244 Theorem A's + conditional scope. Its sign at SIDE24 is therefore that of the model number `J/30 − Ĩ` whenever + `|J/30 − Ĩ| > 4.2·10⁻¹⁰⁵`, in particular whenever `D ≤ 0.61` (below). Write `Ĩ = Ĩ_quad + D`, with the closed form + `Ĩ_quad = −(112/675)Γ(1/6)12^{−1/6} ≈ −0.6104057` and `D` a Gaussian integral of `I − I_quad` ((5.3)). With `J ≥ 1/2000` + (Lemma J), the coefficient is positive as soon as `D ≤ 0.61`. Numerically `D ≈ 0.0767`, but `D` is not certified here. +- **The route.** Each coefficient has the form `𝒦^ψ` of (0.3), for a weight `ψ`. Split `ψ` into a polynomial part, whose + `k`-integral is a finite sum of Gamma functions (Lemma 4), and nonnegative parts. Each nonnegative part is homogeneous of + degree `−5/6` under scaling of the jet covariance, so a Gaussian density sandwich transfers it (Lemma 3). The polynomial + parts transfer by explicit bounds on conditional Gaussian moments. The model's polynomial part of `c₃` vanishes exactly + (note C3's (G.3)). For `R_{2/3}`, Lemma K bounds `|Φ − I_quad|` by `324(t² + |t|³ + |χ₀| + χ₀²)`, where `Φ` is #244's closed + form of `I`. That makes the nonnegative parts of `R_{2/3}` finite, with an explicit bound. + +**Not claimed.** +- No certified value of `J`, `Ĩ`, `D` or `J/30 − Ĩ`; only `J ∈ [1/2000, 10]` (Lemma J). So the sign of note C7's coefficient + at `L = 24` is not proved here; Corollary V2 reduces it to the single model number `D`. +- The `R_{2/3}` half rests on #244's Theorem A. That half comprises the identity `I = Φ` (Lemma 0 for `R_{2/3}`), Lemma K as + applied to `I`, the `R_{2/3}` columns of Theorem V, `D` and Corollary V2. Theorem A is conditional on merged author-side + candidates, at their stated conditional scope: #170 Theorem E(1), [CUB] Theorem C, and [CUB]'s height identities + (C8)–(C11), with its `B = 0` paragraph (#244's disposition). The `c₃` half and Corollary V1 do not use #244. +- Nothing for `d ≥ 4`: the floor of Lemma 1 and the image bound of Lemma 2 are checked for `d = 2, 3` only. Nothing for + `L < 10`. +- No rate: Theorems C3, SL and C7 keep their `o(ℓ^{2/3})`, and nothing here touches them. +- Nothing new about the coefficients `c`, `c₁` and `c₂` at `L = 24`; Remark 2 cites the packets that transfer them. +- Nothing beyond the scope of the consumed sources. In particular, Corollary V2 is about the coefficient that note C7 + identifies, at that note's scope. + +**Consumed.** +- Note C3 (main#229 6027862273; Slices A, B and C PASS): §0 ((0.1)–(0.3) and (C3)); Lemma 0 and its proof (the formula + (1.1), and evenness); §3's identity `a₁ = (1/10)∫F₀db` and its domination; Theorem C3, for Corollary V1; and + Proposition G ((G.1)–(G.3), with `J`). +- Note SL (main#229 6028358916; Slices A and B PASS): (0.1), (SL), Lemma SL₀'s bound (1.1), and Remark 2 (the model value + `R^∞ = Ĩ𝒮_d`). +- #242 `frontiers/soft_rejected_pairs_20261002/PROOF.md` (blob `271412db`): §0 (with the Gaussian kernel's odd and even + jets (0.3)); (2.5), the definition of `I`; Theorem 1 ((1.0a), (1.0), and `𝔇 > 0`, so `𝒮_d > 0`); (1.1a)–(1.1b) and the + uniform bound of its proof of Corollary 1′ (through note C3 §3); (3.1); Lemma 3's bound `I ≤ (8000/3)max(1, |t|³, χ₀²)`; + Proposition 4(1) (`F = F₀H`); Corollary 1′ (the values of `𝒮_d`); and (4.2). +- #244 `frontiers/soft_closed_form_20261002/PROOF.md` (blob `c69f92b1`): Theorem A ((2.5)), Remarks 1–4, Lemma B.2(a) + and (c), and Corollary A.1 (`ψ_e` on `χ₀ = 0`). Theorem A is conditional on #170 Theorem E(1), [CUB] Theorem C and + [CUB]'s (C8)–(C11), with its `B = 0` paragraph (#244's disposition); see *Not claimed*. +- #237 `frontiers/candidate_parity_rate_20261001/PROOF.md` (blob `a97bf528`): Lemma R ((R.1)–(R.2)) and Step U4, through + note C3's Lemma 0 and §3. +- [P] `imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md` (blob `dfed3b8d`), §1: the normalized kernel + `K_L`. +- [R] `frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md` (blob `247b3ecf`): (R5), the bound `π₀ ≤ Ce^{−cb²}`. + +**Cited only.** +- Note C7 (main#229 6030039377; read in every slice): Theorem C7, for Corollary V2. Note LU (main#229 6025486512, successor + 6026230530): Theorem P⁺, for Corollary V1. +- OpenAI's `frontiers/cusp_torus_transfer_20261001/PROOF.md` (blob `de3d85fd`): (T12)–(T15), the image bound and the + sandwich, here at derivative order 6 and for a larger jet vector. #219's Lemma S. +- #216 and #223 (the model values `c_{2,∞}` and `c_{3,∞}`), note C3 §5 (`J`'s value) and #244 §5 (`Ĩ`'s value), for + Remark 1. +- [SIDE24] `coefficients/side24_v1/PROOF.md` (blob `44b66f04`) and `frontiers/c2_torus_transfer_20261001/NOTE.md` (blob + `5ce5bad2`), for Remark 2. +- The Monte Carlo comment main#229 6033651797, for Remark 3. + +**Prior work and overlap.** Before drafting I searched main#229 (every comment since 6 October), the Math- tree at `0793dc26` +and the project archive. +- Note C3's Proposition G″ gives `c₃(L) → c₃^∞` with an unquantified `L₀(d)`. Its Remark 5 says that a modulus of continuity + "would show that the digits of §5 are unchanged at `L = 24`". Note SL's *Not claimed* says that the transfer of `F` (or + `H`) to the torus field "is not proved here", and its Remark 2 says the same of the values of `R_{2/3}`. +- OpenAI's `cusp_torus_transfer` proves the density sandwich for one nonnegative, homogeneous integrand (the `c₁` integral) + and bounds `c₁[K_L]/c₁[φ] − 1`. `c2_torus_transfer` transfers `c₂` by ball arithmetic. +- Neither applies to `c₃` or `R_{2/3}` directly: their integrands change sign, and the positive and negative pieces diverge + separately at `k → 0`. Lemma 4's exact Gamma-function treatment of the polynomial parts is what makes the sandwich + usable here. No packet, note or claim quantifies C3's `L₀(d)` or transfers `R_{2/3}`. This note's claim is 6031577374. + +## 0. Setting and statements + +Fix `d ∈ {2, 3}` and `m = d − 1`. The torus field is [P]'s: centred, stationary, with covariance +`K_L(z) = Σ_{n∈Z^d}φ(z + Ln)/Σ_{n∈Z^d}φ(Ln)` on `R^d/(LZ^d)`, `φ(z) = e^{−|z|²/2}`. The *model* is the field on `R^d` with +covariance `φ` (#242 §0, "the Gaussian kernel"; note C3's Proposition G). Notation is note C3's §0 and note SL's §0. + +*The jet vector.* For a unit vector `u` and an orthonormal basis `Θ = (θ₁, …, θ_m)` of `u^⊥`, the jets at `0` are +directional derivatives along `u` and the `θ_i`: +- the odd pins `P_o := (∂_uf, ∂_{θ₁}f, …, ∂_{θ_m}f, ∂_u³f)` and the even pins `P_e := (∂_u²f, ∂_u∂_{θ₁}f, …, ∂_u∂_{θ_m}f)`; + together they are note C3's `V₀ = (∇f(0), ∂_u∇f(0), ∂_u³f(0))`, with `q := 2d + 1` coordinates and the target `v(k)`: + `P_o = (0, …, 0, 12k)`, `P_e = 0`; +- the even free jets `A := (∂_{θ_i}∂_{θ_j}f)_{i≤j}`; +- the odd free jets `O := (γ, B, C)`, with `γ_i := ∂_u²∂_{θ_i}f`, `B_ij := ∂_u∂_{θ_i}∂_{θ_j}f` (`i ≤ j`) and + `C_ijl := ∂_{θ_i}∂_{θ_j}∂_{θ_l}f` (`i ≤ j ≤ l`). + +Put `X := (P_o, P_e, A, O) ∈ R^N`, with `N = 9` (`d = 2`) or `N = 19` (`d = 3`). For a unit `e ⊥ u`, the projections +`x_e := (g_e, β_e, c_e) := (∂_u²∂_ef, ∂_u∂_e²f, ∂_e³f)` are linear in `O`. They are note C3's `γ_e` and `B_ee`, and #242's +`γ_e`, `B_e` and `C_e`. Let `Σ_{L,u} := Cov(X)` for the torus field and `Σ_∞ := Cov(X)` for the model. Both are +*parity-split*: even and odd jets are uncorrelated. The model is isotropic, so `Σ_∞` depends on neither `u` nor `Θ`. Every +entry is `Cov(∂^αf(0), ∂^βf(0)) = (−1)^{|β|}D^{|α|+|β|}K(0)[…]`, a derivative of the covariance at `0` of order at most `6` +along unit vectors. + +*The edge* (note C3 (0.1)–(0.2)). For `a ∈ Sym(m)` with a simple top eigenvalue, `λ_m(a)` is that eigenvalue, `e(a)` a unit +eigenvector (up to sign), and `P(a)` the product of the other eigenvalues (`P := 1` if `m = 1`). + +*The functional.* Let `Σ` be a nondegenerate parity-split covariance of `X`, with Gaussian density `p_Σ`. Let `ψ_k(x)` be a +weight, measurable in `(k, x) ∈ [0, ∞) × R³`. Put + + Ψ_Σ^ψ(k) := lim_{ε↓0} ε^{−1} ∫∫ ψ_k(x_{e(a)}) P(a)² 1{−ε < λ_m(a) < 0} p_Σ(v(k), a, o) da do, (0.1) + +when the limit exists. Here the pins are fixed at `v(k)` and the integral runs over the free coordinates `(a, o)`. Put + + 𝒦^ψ(L) := (1/3) ∫_{S^{d−1}} ∫_0^∞ k^{−8/3} (Ψ_{Σ_{L,u}}^ψ(k) − Ψ_{Σ_{L,u}}^ψ(0)) dk dσ(u), (0.2) + +and `𝒦^ψ(∞)` with `Σ_∞` in place of `Σ_{L,u}`. Replacing `e` by `−e` maps `x_e = (g_e, β_e, c_e)` to `ιx_e`, with +`ι := diag(−1, 1, −1)`. Every weight below is `ι`-invariant, `ψ_k(ιx) = ψ_k(x)`, so the sign of `e(a)` does not matter. The +two weights of interest are + + ψ^c_k(x) := (4/3)|3kβ − g²/4|³, ψ^R_k(x) := (1/32) g⁶ I(12kβ/g², 576k²c/g³) (ψ^R := 0 if g = 0), (0.3) + +for `x = (g, β, c)`, with `I` #242's (2.5). +- By #244's Theorem A (conditional; *Not claimed*), `I(t, χ₀) = Φ(1 − t, χ₀ + 8 − 12t)` for `(t, χ₀)` off the curve + `Δ = {(χ₀ + 8 − 12t)² = 64(1 − t)³}` (#244's `σ² = c′³`, with `σ = R/8` and `c′ = 1 − t`). The at most three `φ` that Theorem A excludes do not affect (2.5), and #244's Remark 2 gives + `I(0, 0) = Φ(1, 8) = 20/3` at `(0, 0) ∈ Δ`. +- Below, `I` means `Φ` everywhere. For `k > 0` and `g ≠ 0`, `(t, χ₀)` has a density under every law used here, so this + changes nothing; at `k = 0`, `(t, χ₀) = (0, 0)`. +- Put `I_quad(t, χ₀) := 20/3 − 20t + (8/9)χ₀ + (52/3)t² − (4/3)tχ₀ + (13/486)χ₀²`. It is the Taylor polynomial of `Φ` at + `(0, 0)` to second order. `Φ` is analytic there, since the largest root `y = 2` of `(y − 2)(y + 1)²` is simple. This was + checked symbolically and is not used in the proofs. + +Constants: `𝒮_d := ∫_{S^{d−1}}∫_RF₀ db dσ` for the model's `F₀` (#242's Corollary 1′: `25√3/(48π²)` in `d = 2` and +`125√30/(192π³)` in `d = 3`), positive by #242's Theorem 1 (`𝔇 > 0`). `J` is note C3's (G), and `Ĩ := ∫_0^∞v⁴(H(v^{−3}) − 1)dv` is #242's (4.2) and note SL's +Remark 2. Finally + + E_d(L) := 3d·3^{d−1}(76d³L⁶ + 15)e^{−L²/2}, δ_d(L) := 4N·E_d(L). (0.4) + +**Lemma 0 (the two coefficients).** The limits (0.1) exist for `ψ^c` and `ψ^R`, under `Σ_{L,u}` and `Σ_∞`. Moreover +`c₃(L) = 𝒦^{ψ^c}(L)` and `R_{2/3}(L) = 𝒦^{ψ^R}(L)`, with note C3's (C3) and note SL's (SL); the latter uses `I = Φ` and is +at #244 Theorem A's conditional scope. The model values are +`𝒦^{ψ^c}(∞) = c₃^∞ := (J/30)𝒮_d` and `𝒦^{ψ^R}(∞) = R^∞ := Ĩ𝒮_d`. All four integrals (0.2) converge absolutely. + +**Lemma 1 (the model's jet law).** +- (a) The entries of `Σ_∞` are integers of absolute value at most `15`, and `Σ_∞ − I/4` is positive definite. The least + pivot of its `LDLᵀ` factorization is `3/4` in `d = 2` and `329/556` in `d = 3`, both in the order of control V1 and in + the order of `X`. +- (b) Given `P_o = (0, …, 0, 12k)`, the odd free jets `O` are centred. For every unit `e ⊥ u`, `x_e` has covariance + `diag(2, 2, 6)`. The density of `P_o` at its target is `p^o_∞(0)e^{−12k²}`, that is, `q_∞ := 72[(Cov P_o)^{−1}]_{ll} = 12` + for the `∂_u³f` coordinate `l`. +- (c) Given `P_e = 0`, `A` is centred Gaussian and independent of `(P_o, O)`. The same holds for every parity-split `Σ`. + +**Lemma 2 (the image bound).** For `d ∈ {2, 3}`, every real `L ≥ 10`, every `u` and every orthonormal `Θ`, every entry of +`Σ_{L,u} − Σ_∞` has absolute value at most `E_d(L)`. Hence, with `δ = δ_d(L)`, + + (1 − δ)Σ_∞ ≼ Σ_{L,u} ≼ (1 + δ)Σ_∞. (0.5) + +`E_d` and `δ_d` decrease in `L` on `[10, ∞)`. Rounded up: `δ₂(10) ≤ 7.60·10⁻¹¹`, `δ₂(24) ≤ 6.31·10⁻¹¹²`, +`δ₃(10) ≤ 2.44·10⁻⁹` and `δ₃(24) ≤ 2.03·10⁻¹¹⁰`. + +**Lemma 3 (homogeneity and the sandwich).** Let `ρ_k(x) ≥ 0` be `ι`-invariant with `ρ_{sk}(sx) = s⁶ρ_k(x)` for `s > 0`, and +put `Pos_Σ[ρ] := (1/3)∫_0^∞k^{−8/3}Ψ_Σ^ρ(k)dk ∈ [0, ∞]`, per direction `u`. +- (a) For `τ > 0`, `Ψ_{τΣ}^ρ(k) = Ψ_Σ^ρ(k/√τ)` (when the right side exists) and `Pos_{τΣ}[ρ] = τ^{−5/6}Pos_Σ[ρ]`. +- (b) If `Σ` is parity-split, `(1 − δ)Σ_∞ ≼ Σ ≼ (1 + δ)Σ_∞` with `0 ≤ δ ≤ 10⁻⁸`, and (0.1) exists under `Σ` and `Σ_∞`, then + `|Pos_Σ[ρ] − Pos_{Σ_∞}[ρ]| ≤ (N + 1)δ·Pos_{Σ_∞}[ρ]`. +- (c) Under the same hypothesis, put `w_Σ := p^o_Σ(0)𝔈_Σ`, where `p^o_Σ(0)` is the density of `P_o` at `0` and + `𝔈_Σ := lim_{ε↓0}ε^{−1}∫P(a)²1{−ε < λ_m(a) < 0}p^e_Σ(0, a)da`, with `p^e_Σ` the density of `(P_e, A)`. Then + `|w_Σ/w_{Σ_∞} − 1| ≤ 2Nδ`. +- (d) If `Σ` is parity-split and `(1 − δ)Σ_∞ ≼ Σ ≼ (1 + δ)Σ_∞` with `0 ≤ δ < 1` (neither `δ ≤ 10⁻⁸` nor the existence of + (0.1) is needed), then + `q_Σ := 72[(Cov_ΣP_o)^{−1}]_{ll} ∈ [12/(1 + δ), 12/(1 − δ)]`. +- (e) Under the hypothesis of (d), for every unit `e ⊥ u`, given `P_o = (0, …, 0, 12k)`, `x_e` is Gaussian with mean `kμ_e` + and covariance `S_e`, where `|μ_{e,i}| ≤ 12δ/(1 − δ)` and `|(S_e − diag(2, 2, 6))_{ij}| ≤ 6δ`. + +**Lemma 4 (the polynomial part).** Let `Π_k(x)` be a polynomial in `(k, x)` with `Π_{−k}(−x) = Π_k(x)` and +`Π_k(ιx) = Π_k(x)`, and `Σ` parity-split and nondegenerate. Put `v_o(k) := (0, …, 0, 12k)`, the odd pins' target, and +`m_Σ(k, e) := E[Π_k(x_e) | P_o = v_o(k)]`. Then `m_Σ(k, e) = Σ_{j even}a_j^Σ(e)k^j`, a polynomial in `k` with only even +powers, whose coefficients are polynomials in `e`, even in `e`. Moreover + + Ψ_Σ^Π(k) = p^o_Σ(0) e^{−q_Σk²} 𝔈_Σ[m_Σ(k, ·)], + (1/3)∫_0^∞ k^{−8/3}(Ψ_Σ^Π(k) − Ψ_Σ^Π(0)) dk = (1/3) p^o_Σ(0) Σ_j 𝔈_Σ[a_j^Σ] G_j(q_Σ), (0.6) + +with `𝔈_Σ[φ] := lim_{ε↓0}ε^{−1}∫φ(e(a))P(a)²1{−ε < λ_m(a) < 0}p^e_Σ(0, a)da`, `G₀(q) = −(3/5)Γ(1/6)q^{5/6}`, and +`G_j(q) = (1/2)Γ((3j − 5)/6)q^{−(3j−5)/6}` for even `j ≥ 2`. In particular + + G₂(q) = (1/2)Γ(1/6)q^{−1/6}, G₄(q) = (1/12)Γ(1/6)q^{−7/6}, G₆(q) = (7/72)Γ(1/6)q^{−13/6}. + +For `Π^c` and `Π^R` below, which are jointly homogeneous of degree 6 in `(k, x)`, only `j ≤ 6` occurs. + +**Lemma K (a global bound for `Φ`).** For all real `t` and `χ₀`, + + |Φ(1 − t, χ₀ + 8 − 12t) − I_quad(t, χ₀)| ≤ 324 (t² + |t|³ + |χ₀| + χ₀²). (K) + +So (K) holds for #242's `I` wherever `I = Φ`: off `Δ` at #244 Theorem A's conditional scope, and at `(0, 0)`. Lemma K itself +is a statement about the explicit function `Φ` and is not conditional. Its proof cites #244's Remark 4, (3.1)–(3.2) of +Corollary A.1, and Lemma B.2(a) and (c). #244's disposition places these, like everything after its Theorem A, under that +theorem's condition, but their proofs are algebra and calculus on the cubic and use neither #170 nor [CUB]. + +**Lemma J.** `1/2000 ≤ J ≤ 10`. + +**Theorem V (the transfer).** Let `d ∈ {2, 3}` and `L₀ ∈ {10, 24}`. For every real `L ≥ L₀`, `|c₃(L) − c₃^∞| ≤ η_c𝒮_d` and +`|R_{2/3}(L) − R^∞| ≤ η_R𝒮_d`, with `η_c` and `η_R` the entries of the table above for that `L₀`. The `R_{2/3}` bound is at +#244 Theorem A's conditional scope; the `c₃` bound does not use #244. + +**Corollary V1.** For `d ∈ {2, 3}` and every real `L ≥ 10`, `c₃(L) ≥ (1/60000 − 1.97·10⁻⁷)𝒮_d > 0`. So the remainder +`O(ℓ^{2/3})` of note LU's Theorem P⁺ is of exact order `ℓ^{2/3}` for these torus fields, in particular for SIDE24. + +**Corollary V2.** For `d ∈ {2, 3}` and every real `L ≥ 24`, + + |(c₃(L) − R_{2/3}(L)) − (J/30 − Ĩ)𝒮_d| ≤ η_{C7}𝒮_d, η_{C7} = 4.2·10⁻¹⁰⁵ (d = 3), 6.5·10⁻¹⁰⁷ (d = 2). (V2) + +This is at #244 Theorem A's conditional scope. Write `Ĩ = Ĩ_quad + D`, with `Ĩ_quad := −(112/675)Γ(1/6)12^{−1/6}` and `D` as +in (5.3). Then `J/30 − Ĩ ≥ 0.6103 − D`. So `J/30 − Ĩ > 0`, and with it note C7's `ℓ^{2/3}` coefficient at every `L ≥ 24` +(in `d = 2, 3`), as soon as `D ≤ 0.61`. + +## 1. The two coefficients and the model's jet law + +*Proof of Lemma 0.* +- *Existence.* Each weight here is a function of `(k, x_e)`, and `|ψ^c_k(x)| + |ψ^R_k(x)| ≤ C(1 + k)⁴(1 + |x|)⁶`; for `ψ^R` + this uses #242's Lemma 3, `g⁶I ≤ (8000/3)max(g⁶, 1728k³|β|³, 331776k⁴c²)`. By Lemma 1(c) (for `Σ_∞`; for the torus field, + note C3's Lemma 0 proof via #237's Lemma R (R.2)), the odd jets are independent of `A` given the pins. So + `E[ψ_k(x_e) | A, pins] = h_k(e(A))`, a bounded function of `e` for each `k`. Note C3's proof of Lemma 0 then applies + verbatim, with `h_k` in place of its `E[|U_red|³ | A]`: by Weyl's integration formula the limit exists, and equals the + pin density times note C3's (1.1). The same holds under `τΣ_∞` for every `τ > 0`, and for every weight below, since each + is bounded by `C(1 + k)⁴(1 + |x|)⁶`. +- *`c₃`.* Note C3 defines `𝐄(k, u) = (12/(9k))[p_{V₀}(v(k))𝔏(k, u) − p_{V₀}(v(0))𝔏(0, u)]`, with + `𝔏(k, u) = 𝔼_{Q̄_{0,k}}[P²|U_red|³; λ_m = 0⁻]` and `U_red = 3kB_ee − γ_e²/4` (C3 (0.1)–(0.3)). A pin density times a + conditional expectation is the integral against the joint density at the pins, so `p_{V₀}(v(k))𝔏(k, u) = + Ψ_{Σ_{L,u}}^{|U_red|³}(k)`. Then `𝐄k^{−5/3} = (4/3)k^{−8/3}(Ψ^{|U_red|³}(k) − Ψ^{|U_red|³}(0))`, and (C3) is `𝒦^{ψ^c}(L)`. + The absolute convergence is note C3's bound `|𝐄| ≤ C min(k, 1/k)`. The model value is note C3's (G.3). +- *`R_{2/3}`.* In (SL) put `v = k^{−1/3}`: `v⁴dv = −(1/3)k^{−8/3}dk`, so + `R_{2/3} = (1/3)∫_S∫_0^∞k^{−8/3}(ℱ(k, u) − ℱ₀(u))dk dσ`, absolutely convergent by note SL. It remains to show + `ℱ(k, u) = Ψ^{ψ^R}(k)` for `k ≥ 0` (at `k = 0`, `ℱ(0, ·)` means `ℱ₀`). By note SL (0.1) and #242 (3.1), + `ℱ(k, u) = ∫_R12π₀(u; v₀(b, k))·lim_ε ε^{−1}E_{v₀(b,k)}[(γ₁⁶/384)(λ₂⋯λ_m)²I(12kB₁/γ₁², 576k²C₁/γ₁³)1{A < 0, λ₁ < ε}]db`. + As in note C3's proof of the identity `a₁ = (1/10)∫F₀db` (its §3): + - #242's `λ₁ < ⋯ < λ_m` are the eigenvalues of `−A`, so `{A < 0, λ₁ < ε} = {−ε < λ_m(A) < 0}` and + `(λ₂⋯λ_m)² = P(A)²`. The eigenvector of `λ₁` is `±e(A)`, so `(γ₁, B₁, C₁) = (±g_e, β_e, ±c_e)` with one sign, and `t` + and `χ₀` are unchanged. Since `12/384 = 1/32`, the weight is `ψ^R_k(x_e)`. + - For each `ε`, Tonelli and the disintegration of (R.1) at `r = 0` (as in #237 Step U4) turn the `b`-integral of the + `ε`-quotients against `π₀(u; v₀(b, k))` into the birth-integrated `ε`-quotient of (0.1). + - Domination in `b`, for `0 < ε ≤ 1`. By parity (#237's Lemma R (R.2) at `r = 0`), the law of `(A, f₄)` under + `v₀(b, k)` is its law under `v₀(b, 0)`, and given `A` and `b` the odd jets have a law depending on neither. So + `E[γ₁⁶I | A, b] ≤ C_k` by #242's Lemma 3, and #242 (1.1a)–(1.1b) give + `ε^{−1}E₀[(λ₂⋯λ_m)²1{A < 0, λ₁ < ε} | b] ≤ C(1 + |b|)^N` (the bound of #242's proof of Corollary 1′, as used in note + C3 §3). Also `π₀(u; v₀(b, k)) ≤ Ce^{−cb²}` ([R] (R5)). + - For each `b`, the `ε`-limit in #242 (3.1) exists, by the same Weyl argument applied conditionally on `b`. + + Dominated convergence gives `ℱ(k, u) = Ψ^{ψ^R}(k)`. At `k = 0`, `I(0, 0) = 20/3` (proved directly in #242's proof of its + Theorem 1; #244's Remark 2) and + `ψ^R_0 = (5/24)g⁶`; this is note C3's identity, with `F₀ = (5/24)π₀𝔇`. For the model value, Lemma 1(b)–(c) and #242's + Proposition 4(1) give `Ψ_∞^{ψ^R}(k) = 25w_∞H(k)`, with `w_∞` as in §3. So + `𝒦^{ψ^R}(∞) = 25|S^{d−1}|w_∞·(1/3)∫_0^∞k^{−8/3}(H(k) − 1)dk = Ĩ𝒮_d`, which is note SL's Remark 2. ∎ + +*Proof of Lemma 1.* (a) The entries are `(−1)^{|β|}∂^{α+β}φ(0)`, with `∂^γφ(0) = ∏_i(−1)^{γ_i/2}(γ_i − 1)!!` when every `γ_i` +is even and `0` otherwise (note C3 §5). Every `|α + β| ≤ 6`, so the entries are integers of absolute value at most `5!! = 15`. +The `LDLᵀ` factorization of `Σ_∞ − I/4` is exact (control V1). (b) By #242's (0.3), given `∇f(0) = 0` and for every unit +`e ⊥ u`, the jets `(∂_u³f, g_e, β_e, c_e)` are independent with variances `(6, 2, 2, 6)`, and uncorrelated with every even +jet. Conditioning further on `∂_u³f = 12k` leaves the law of `x_e` unchanged, centred with covariance `diag(2, 2, 6)`, and +gives the density factor `e^{−(12k)²/12} = e^{−12k²}`. Since `O` is determined by the `x_e` over all `e` (the polynomials +`e ↦ ⟨e, γ⟩`, `B[e, e]` and `C[e, e, e]` determine `γ`, `B` and `C`), `O` is centred. Control V1 checks all of this +exactly, on six rational unit vectors `e` in `d = 3` and on `e = ±θ₁` in `d = 2`. (c) Parity: `P_e` and `A` are even, `P_o` and `O` odd; for Gaussian vectors +uncorrelated means independent, and the conditional mean of `A` given `P_e = 0` is `0`. ∎ + +## 2. The image bound, the sandwich and homogeneity + +*Proof of Lemma 2.* This is OpenAI's `cusp_torus_transfer` §4 at derivative order `6`. +- For unit `v₁, …, v_j`, `D^jφ(x)[v₁, …, v_j]` is `φ(x)` times a signed sum over the partial matchings of `{1, …, j}`. Each + unmatched `i` contributes `x·v_i` and each pair `{i, i′}` contributes `v_i·v_{i′}`. There are `T_j` partial matchings + (the telephone numbers `1, 1, 2, 4, 10, 26, 76` for `j ≤ 6`), and each term is at most `max(1, |x|)^j` in absolute value. + So `|D^jφ(x)| ≤ 76|x|⁶φ(x)` for `|x| ≥ 1` and `j ≤ 6`. At `x = 0` only perfect matchings survive: `|D^jφ(0)| ≤ 5!! = 15`. +- The shell `|n|_∞ = a ≥ 1` has `(2a + 1)^d − (2a − 1)^d ≤ 2d·3^{d−1}a^{d−1}` points (by the mean value theorem, at most + `2d(2a + 1)^{d−1} ≤ 2d(3a)^{d−1}`), with `|n|⁶ ≤ d³a⁶` and + `e^{−L²|n|²/2} ≤ e^{−L²a²/2}`. For `L ≥ 10` and `s ≤ d + 5 ≤ 8`, successive terms of `Σ_{a≥1}a^se^{−L²a²/2}` have ratio at + most `2⁸e^{−150} < 1/3`, so the sum is at most `(3/2)e^{−L²/2}`. Hence `Σ_{n≠0}|D^jφ(Ln)| ≤ 228d⁴3^{d−1}L⁶e^{−L²/2}` and + `S_L := Σ_{n≠0}φ(Ln) ≤ 3d·3^{d−1}e^{−L²/2}`. +- `D^jK_L(0) − D^jφ(0) = [Σ_{n≠0}D^jφ(Ln) − S_LD^jφ(0)]/(1 + S_L)`, so its absolute value is at most + `3d·3^{d−1}(76d³L⁶ + 15)e^{−L²/2} = E_d(L)`, in every frame. Every entry of `Σ_{L,u} − Σ_∞` is such a difference with + `j ≤ 6`. +- The perturbation `Δ := Σ_{L,u} − Σ_∞` has operator norm at most its Frobenius norm, at most `N·E_d(L)`. By Lemma 1(a), + `I ≼ 4Σ_∞`, so `±Δ ≼ NE_d(L)·I ≼ 4NE_d(L)Σ_∞ = δΣ_∞`. This is (0.5). +- `(aL⁶ + b)e^{−L²/2}` with `a, b > 0` decreases when `L² > 6`. The four values are control V2's, from rational upper + bounds of `e^{−L²/2}` (reciprocals of partial sums of the exponential series). ∎ + +*Proof of Lemma 3.* (a) In (0.1) under `τΣ`, `p_{τΣ}(v(k), a, o) = τ^{−N/2}p_Σ(v(k/√τ), a/√τ, o/√τ)`, since the target +`v(k)` is linear in `k`. Substitute `a = √τ·a′` and `o = √τ·o′`. The Lebesgue measure gives `τ^{n/2}` with `n = N − q`; +the weight gives `τ³`, at `k/√τ`; `P²` gives `τ^{m−1}`; and the event `{−ε < λ_m < 0}` becomes `{−ε/√τ < λ_m(a′) < 0}`, +which gives `τ^{−1/2}` against `ε^{−1}`. The total exponent is `−q/2 + 3 + (m − 1) − 1/2 = −(2d + 1)/2 + 3 + (d − 2) − 1/2 = 0`. +In `Pos`, `k = √τ·k′` gives `k^{−8/3}dk = τ^{1/2−4/3}k′^{−8/3}dk′ = τ^{−5/6}k′^{−8/3}dk′`. Birth is integrated, so `q` is +`2d + 1` and not `2d + 2` (control V3, mutant M3). + +(b) For positive definite `Σ` with `(1 − δ)Σ_∞ ≼ Σ ≼ (1 + δ)Σ_∞`, inverses and determinants give, pointwise on `R^N` +(OpenAI's (T15)), + + ((1 − δ)/(1 + δ))^{N/2} p_{(1−δ)Σ_∞} ≤ p_Σ ≤ ((1 + δ)/(1 − δ))^{N/2} p_{(1+δ)Σ_∞}. (2.1) + +Multiply by the nonnegative weight, divide by `ε`, let `ε ↓ 0`; the limits under `(1 ± δ)Σ_∞` exist by (a). Then integrate +against `k^{−8/3}dk`. By (a), +`((1 − δ)/(1 + δ))^{N/2}(1 − δ)^{−5/6}Pos_{Σ_∞} ≤ Pos_Σ ≤ ((1 + δ)/(1 − δ))^{N/2}(1 + δ)^{−5/6}Pos_{Σ_∞}`. With +`log((1 + δ)/(1 − δ)) ≤ 2δ/(1 − δ)` and `e^x ≤ 1 + x + x²` for `0 ≤ x ≤ 1`, the upper factor is at most +`e^{Nδ/(1−δ)} ≤ 1 + (N + 1)δ` for `δ ≤ 10⁻⁸`, and the lower factor is at least `e^{−Nδ/(1−δ)} ≥ 1 − (N + 1)δ`. + +(c) The principal blocks inherit the sandwich. `p^o_Σ(0) = (2π)^{−(d+1)/2}det(Cov_ΣP_o)^{−1/2}`, so +`p^o_Σ(0)/p^o_{Σ_∞}(0) ∈ [(1 + δ)^{−(d+1)/2}, (1 − δ)^{−(d+1)/2}]`. For `𝔈`, argue as in (a) and (b) on the block `(P_e, A)`, +of dimension `N_e := d + m(m + 1)/2`. The scaling exponent is `−N_e/2 + m(m + 1)/4 + (m − 1) − 1/2 = (d − 5)/2 < 0`, so +`(1 + δ)^{(d−5)/2} ≤ 1 ≤ (1 − δ)^{(d−5)/2}`, and `𝔈_Σ/𝔈_{Σ_∞} ∈ [((1 − δ)/(1 + δ))^{N_e/2}, ((1 + δ)/(1 − δ))^{N_e/2}]`. +Multiply. Since `(d + 1)/2 + N_e ≤ N`, the product lies in `[e^{−Nδ/(1−δ)}, e^{Nδ/(1−δ)}] ⊂ [1 − 2Nδ, 1 + 2Nδ]`. Control V3 +also checks the exact factors, as rational inequalities, at `δ_d(10)` and `δ_d(24)`. + +(d) From (0.5) on the `P_o` block, `(1 + δ)^{−1}(Cov_{Σ_∞}P_o)^{−1} ≼ (Cov_ΣP_o)^{−1} ≼ (1 − δ)^{−1}(Cov_{Σ_∞}P_o)^{−1}`. Take +the `(l, l)` entry, and `q_∞ = 12` (Lemma 1(b)). + +(e) *Covariance.* The conditional covariance `S_Σ` of `O` given `P_o` is the inverse of the `O`-block of the inverse of +`Cov_Σ(P_o, O)`. Inverting the sandwich of that block and restricting to the `O`-block gives +`(1 + δ)^{−1}S_∞^{−1} ≼ S_Σ^{−1} ≼ (1 − δ)^{−1}S_∞^{−1}`, so `(1 − δ)S_∞ ≼ S_Σ ≼ (1 + δ)S_∞`. If `−δS ≼ D ≼ δS` with +`S ≻ 0`, then `|wᵀDw′| ≤ δ(wᵀSw)^{1/2}(w′ᵀSw′)^{1/2}`. Applied to the weights of `g_e`, `β_e` and `c_e`, whose model +variances are `2`, `2` and `6` (Lemma 1(b)), this gives `|(S_e − diag(2, 2, 6))_{ij}| ≤ δ·6`. + +*Mean.* Let `Y` be one of `g_e`, `β_e`, `c_e`, with model conditional variance `s_Y ∈ {2, 6}`. Let `Y′ := Y − ℓ(P_o)` be its +residual after the *model's* linear regression `ℓ` on `P_o`. In the model, `Cov_∞(Y′, P_o) = 0`, `Var_∞(Y′) = s_Y`, and +`ℓ(0, …, 0, 12k) = 0` (Lemma 1(b)). Under `Σ`, +`E_Σ[Y | P_o = (0, …, 0, 12k)] = E_Σ[Y′ | P_o = ⋯] = 12k·Cov_Σ(Y′, Z)`, with `Z := ((Cov_ΣP_o)^{−1}e_l)ᵀP_o`. Since +`Cov_∞(Y′, Z) = 0`, the bilinear bound gives `|Cov_Σ(Y′, Z)| ≤ δ·s_Y^{1/2}·Var_∞(Z)^{1/2}`. Moreover +`Var_∞(Z) ≤ (1 − δ)^{−1}Var_Σ(Z) = (1 − δ)^{−1}[(Cov_ΣP_o)^{−1}]_{ll} ≤ (1 − δ)^{−2}[(Cov_{Σ_∞}P_o)^{−1}]_{ll} = (1 − δ)^{−2}/6`. +So `|μ_Y| ≤ 12δ(s_Y/6)^{1/2}/(1 − δ) ≤ 12δ/(1 − δ)`. ∎ + +## 3. The polynomial part + +*Proof of Lemma 4.* By parity and Lemma 1(c), `p_Σ(v(k), a, o) = p^e_Σ(0, a)·p^{oO}_Σ(v_o(k), o)`, where `p^{oO}_Σ` is the +density of `(P_o, O)`. Also `p^{oO}_Σ(v_o(k), o) = p^o_Σ(v_o(k))·p_Σ(o | P_o = v_o(k))`, with `p^o_Σ` the density of `P_o` and +`p^o_Σ(v_o(k)) = p^o_Σ(0)e^{−q_Σk²}`; the factor is `exp(−(1/2)(12k)²[(Cov_ΣP_o)^{−1}]_{ll})`. Integrating `o` first gives +the first line of (0.6). +- *Evenness in `k`.* Given `P_o = v_o(k)`, `x_e ~ N(kμ_e, S_e)`, since the conditional mean is linear in the target. So + `E[Π_k(x_e)]` is a polynomial in `k` (Isserlis), and + `m_Σ(−k, e) = E_{N(−kμ_e, S_e)}[Π_{−k}(x)] = E_{N(kμ_e, S_e)}[Π_{−k}(−x)] = m_Σ(k, e)`. So only even powers occur. +- *Evenness in `e`.* `x_{−e} = ιx_e` gives `μ_{−e} = ιμ_e` and `S_{−e} = ιS_eι`, so + `m_Σ(k, −e) = E_{N(kμ_e, S_e)}[Π_k(ιx)] = m_Σ(k, e)`. So `𝔈_Σ[a_j^Σ]` is well defined, and it exists as in Lemma 0. + +Then + + ∫_0^∞k^{−8/3}(e^{−qk²} − 1)dk = (1/2)Γ(−5/6)q^{5/6}, ∫_0^∞k^{j−8/3}e^{−qk²}dk = (1/2)Γ((3j − 5)/6)q^{−(3j−5)/6}, + +with `Γ(−5/6) = −(6/5)Γ(1/6)`, `Γ(7/6) = Γ(1/6)/6` and `Γ(13/6) = (7/36)Γ(1/6)` (control V4). ∎ + +*The decomposition.* Put `X_k := g²/4 − 3kβ`, so `|3kβ − g²/4|³ = X_k³ + 2(−X_k)₊³`, and split + + ψ^c = Π^c + ρ^c, Π^c := (4/3)X_k³, ρ^c := (8/3)(3kβ − g²/4)₊³, + ψ^R = Π^R + ρ^R₊ − ρ^R₋, Π^R := (1/32)g⁶I_quad(t, χ₀), ρ^R_± := (1/32)g⁶(I − I_quad)_±(t, χ₀), (3.1) + +with `t = 12kβ/g²` and `χ₀ = 576k²c/g³`. Here `Π^R` is a polynomial: + + Π^R = (1/32)[(20/3)g⁶ − 240kβg⁴ + 512k²cg³ + 2496k²β²g² − 9216k³βcg + (26624/3)k⁴c²]. + +Both `Π`'s satisfy `Π_{−k}(−x) = Π_k(x)` and `Π_k(ιx) = Π_k(x)`. The `ρ`'s are nonnegative and `ι`-invariant, satisfy `ρ_{sk}(sx) = s⁶ρ_k(x)` (`t` and `χ₀` are +invariant under `(k, x) ↦ (sk, sx)`), and vanish at `k = 0` (`X₀ ≥ 0`; `t = χ₀ = 0` and `I(0, 0) = I_quad(0, 0)`). + +*The model.* In the model, `μ_e = 0` and `S_e = diag(2, 2, 6)` for every `e` (Lemma 1(b)). So `a_j^∞` does not depend on +`e`, with `(a₀^∞, a₂^∞) = (5/2, 36)` for `Π^c`, and `(a₀^∞, a₂^∞, a₄^∞) = (25, 312, 1664)` for `Π^R` (control V4; for `Π^c` +this is note C3's `E[X³] = 15/8 + 27k²`). Also `w_∞ := p^o_∞(0)𝔈_∞ = 𝒮_d/(25|S^{d−1}|)`. Indeed, by Lemma 0's identity +at `k = 0` (note C3's identity, which does not use #244), `∫F₀db = (5/24)p^o_∞(0)𝔈_∞[E g⁶] = (5/24)·120·w_∞` in every +direction. By (0.6), with `ĝ_j := G_j/Γ(1/6)`, the polynomial parts of the model, integrated over the directions, are + + (1/3)∫_S w_∞Σ_ja_j^∞G_j(12)dσ = (𝒮_d/75)Γ(1/6)Σ_ja_j^∞ĝ_j(12): 0 for Π^c, Ĩ_quad𝒮_d = −(112/675)Γ(1/6)12^{−1/6}𝒮_d for Π^R. (3.2) + +Indeed `Σ_ja_j^∞ĝ_j(q) = q^{−1/6}(18 − (3/2)q)` for `Π^c`, which vanishes at `q = 12`; this is note C3's (G.3). For `Π^R`, +`Σ_ja_j^∞ĝ_j(12) = 12^{−1/6}(−180 + 156 + 104/9) = −(112/9)12^{−1/6}`. + +## 4. Lemma K and Lemma J + +*Proof of Lemma K.* Write `c′ = 1 − t`, `R = χ₀ + 8 − 12t`, `Φ(c′, R) = |c′|δ² + δ³/3` with `δ = ψ_e − |c′|` (#244 (2.5)), +and write `I(t, χ₀)` for `Φ(c′, R)`. +- *Step 1: in `χ₀` at fixed `t`.* By #244's Lemma B.2(a) and (c), `Φ(c′, ·)` is continuous and convex, `C¹` off `R = 0`, + and there `|∂_RΦ| = (ψ_e − c′)(ψ_e + c′)^{3/2}/(6ψ_e)` (B.2(a) with `ρ = ψ_e − 2c′`). The same follows from #244's cubic: + with `y := ψ_e − c′`, it reads `(y − c′)²(y + 2c′) = R²/16`, where both `y − c′ = ψ_e − 2c′` and `y + 2c′ = ψ_e + c′` are + nonnegative because `ψ_e ≥ ψ₀ = max(2c′, −c′)`. In both cases `c′ ≥ 0` (`δ = y`) and `c′ < 0` (`δ = y + 2c′`), + `dΦ/dy = y(y + 2c′)`. Also `d[(y − c′)²(y + 2c′)]/dy = 3(y − c′)(y + c′)`, and `|R| = 4(y − c′)(y + 2c′)^{1/2}`. Here + `(ψ_e − c′)/ψ_e ≤ 2`: for `c′ ≥ 0` it is at most `1`, and for `c′ < 0`, `ψ_e ≥ ψ₀ = |c′|`. So + `|∂_RΦ| ≤ (ψ_e + |c′|)^{3/2}/3`. By #244's Remark 4, `ψ_e ≤ ψ₀ + (R²/16)^{1/3} ≤ 2|c′| + |R/4|^{2/3}`. + With `(a + b)^{3/2} ≤ √2(a^{3/2} + b^{3/2})` and `|c′|^{3/2} ≤ √2(1 + |t|^{3/2})`, + + |∂_RΦ| ≤ 2√3(1 + |t|^{3/2}) + (√2/12)|R|. + + So `Φ(c′, ·)` is Lipschitz with this local constant. Between `χ₀ = 0` and `χ₀`, + `|R| ≤ |χ₀| + 8 + 12|t|`. Using `|χ₀||t|^{3/2} ≤ (χ₀² + |t|³)/2` and `|χ₀||t| ≤ (χ₀² + t²)/2`, + + |I(t, χ₀) − I(t, 0)| ≤ (2√3 + 2√2/3)|χ₀| + (√3 + √2/12 + √2/2)χ₀² + √3|t|³ + (√2/2)t². (4.1) + +- *Step 2: `χ₀ = 0`.* For `t ≤ 2/3`, #244's Corollary A.1 gives `ψ_e = 3/2 − 2t + (3/2)S`, `S := (1 − 4t/3)^{1/2}`, so + `δ = 1/2 − t + (3/2)S`. Reducing `S² = 1 − 4t/3`, and writing `S = 1 − (2/3)t − (2/9)t² + R_S`, + + I(t, 0) = 20/3 − 20t + (52/3)t² − (8/3)t³ − t⁴ + (3/2)(2 − 5t + 3t²)R_S (4.2) + + (control V7). Taylor's formula for `(1 − x)^{1/2}` at `x = 4t/3` gives `|R_S| ≤ (1/16)|x|³(1 − max(x, 0))^{−5/2}`, so + `|R_S| ≤ (4/27)3^{5/2}|t|³ ≤ 2.31|t|³` on `|t| ≤ 1/2`. With `|2 − 5t + 3t²| ≤ 21/4` there, + `|I(t, 0) − I_quad(t, 0)| ≤ (8/3 + 1/2 + (3/2)(21/4)(2.31))|t|³ ≤ 22|t|³` on `|t| ≤ 1/2`. For `|t| ≥ 1/2`, #244's Remark 4 + gives `δ ≤ |c′| + |2 − 3t|^{2/3} ≤ 3|t| + 98^{1/3}|t| ≤ 7.62|t|`, and `|c′| ≤ 3|t|`. So `I(t, 0) ≤ 3|t|δ² + δ³/3 ≤ 322|t|³`, + and `|I_quad(t, 0)| ≤ (80/3 + 40 + 52/3)t² = 84t²`. Hence `|I(t, 0) − I_quad(t, 0)| ≤ 322(t² + |t|³)` for every `t`. +- *Step 3: the polynomial.* `|I_quad(t, χ₀) − I_quad(t, 0)| ≤ (8/9)|χ₀| + (2/3)(t² + χ₀²) + (13/486)χ₀²`. + +Adding (4.1) and Steps 2–3, the coefficients of `|χ₀|`, `χ₀²`, `|t|³` and `t²` are `2√3 + 2√2/3 + 8/9 < 5.3`, +`√3 + 7√2/12 + 2/3 + 13/486 < 3.26`, `322 + √3 < 323.74` and `322 + √2/2 + 2/3 < 323.38`, all below `324` (control V7). This +is (K) for `Φ`. ∎ + +*Proof of Lemma J.* Here `J = (16/15)∫_0^∞e^{−12k²}E[(3kB − γ²/4)₊³]k^{−8/3}dk` with `γ, B` independent `N(0, 2)` (note C3 (G)). +- *Upper.* `(3kB − γ²/4)₊ ≤ 3kB₊`, and `E[B₊³] = 2^{3/2}(2/π)^{1/2}`. With `∫_0^∞k^{1/3}e^{−12k²}dk = (1/2)12^{−2/3}Γ(2/3)`, + `12^{−2/3} ≤ 1/5` and `Γ(2/3) = (3/2)Γ(5/3) ≤ 3/2`: `J ≤ (16/15)·27·2^{3/2}(2/π)^{1/2}·(3/20) ≤ 10`. +- *Lower.* Restrict to `k ∈ [1/4, 1/2]`, `B ≥ 1` and `γ² ≤ 1/4`. There `3kB − γ²/4 ≥ 11/16` and `e^{−12k²} ≥ e^{−3}`, and + `∫_{1/4}^{1/2}k^{−8/3}dk ≥ 2^{8/3}/4 ≥ 63/40`. Let `ϕ(x) := (2π)^{−1/2}e^{−x²/2}` be the standard normal density (not the + kernel `φ` of §0). Then `P(B ≥ 1) = P(Z ≥ 2^{−1/2}) ≥ (1 − 2^{−1/2})ϕ(1)` and + `P(γ² ≤ 1/4) = P(|Z| ≤ 2^{−3/2}) ≥ 2^{−1/2}ϕ(2^{−3/2})`, and rational bounds give `J ≥ 5.07·10⁻⁴ ≥ 1/2000` (control V6). + Note C3's exploration value is `J = 4.1977820`. ∎ + +## 5. Proof of Theorem V and the corollaries + +Fix `d`, `L ≥ L₀` and `u`, and put `δ := δ_d(L₀)`. By Lemma 2 and monotonicity, (0.5) holds with this `δ`. Every bound +below is nondecreasing in `δ`. Per direction, write `Pos_Σ[ρ] := (1/3)∫_0^∞k^{−8/3}Ψ_Σ^ρ(k)dk` (Lemma 3) and +`Γ_Σ[Π] := (1/3)p^o_Σ(0)Σ_j𝔈_Σ[a_j^Σ]G_j(q_Σ)` (the right side of (0.6)). + +*The split is legitimate.* By (3.1), `Ψ^ψ = Ψ^Π + Ψ^{ρ₊} − Ψ^{ρ₋}` pointwise in `k`; the limits exist by Lemma 0's argument, +since every piece is bounded by `C(1 + k)⁴(1 + |x|)⁶`. Each of `k^{−8/3}(Ψ^Π(k) − Ψ^Π(0))` and `k^{−8/3}Ψ^{ρ_±}(k)` is +absolutely integrable on `(0, ∞)`, and `Ψ^{ρ_±}(0) = 0` since `ρ_0 = 0` (§3): +- the `Π`'s by Lemma 4; +- the `ρ`'s under `Σ_∞` by the next paragraph, and then under `Σ_{L,u}` by Lemma 3(b). + +So, for `ψ = ψ^c` and `ψ = ψ^R`, + + 𝒦^ψ(L) = ∫_{S^{d−1}} (Γ_{Σ_{L,u}}[Π] + Pos_{Σ_{L,u}}[ρ₊] − Pos_{Σ_{L,u}}[ρ₋]) dσ(u), (5.0) + +with `ρ₋ := 0` for `ψ^c`, and the same at `L = ∞`. + +*The nonnegative parts.* In the model, `x_e ~ N(0, diag(2, 2, 6))` is independent of `A` given the pins, for every `e` +(Lemma 1(b)–(c)). So `Ψ_∞^ρ(k) = w_∞e^{−12k²}E[ρ_k(x)]` with `w_∞ = 𝒮_d/(25|S^{d−1}|)` (§3). +- For `ρ^c`, `(1/3)(8/3)∫_0^∞k^{−8/3}e^{−12k²}E[(3kβ − g²/4)₊³]dk = (1/3)(8/3)(15/16)J`, so `Pos_∞[ρ^c] = (5/6)w_∞J` and + `∫_SPos_∞[ρ^c]dσ = (J/30)𝒮_d = c₃^∞`; with (3.2) this is consistent with Lemma 0. Moreover `J ≤ 10`. +- For `ρ^R_±`, Lemma K gives `ρ^R₊ + ρ^R₋ ≤ (324/32)g⁶(t² + |t|³ + |χ₀| + χ₀²)`, so + `∫_S(Pos_∞[ρ^R₊] + Pos_∞[ρ^R₋])dσ ≤ 324·M·𝒮_d`, where + + M := (1/2400)∫_0^∞k^{−8/3}e^{−12k²}E[g⁶(t² + |t|³ + |χ₀| + χ₀²)]dk ≤ 0.72 + 0.49 + 6.52 + 23.04 < 31. (5.1) + + The four terms use `E[g⁶t²] = 576k²`, `E[g⁶|t|³] = 1728k³E|β|³`, `E[g⁶|χ₀|] = 576k²E|c|E|g|³` and + `E[g⁶χ₀²] = 1990656k⁴`, with `E|β|³ = E|g|³ ≤ 4.52`, `E|c| ≤ 2`, `Γ(1/6) ≤ 6`, `Γ(2/3) ≤ 3/2`, `Γ(7/6) ≤ 1`, + `12^{−1/6} ≤ 1`, `12^{−2/3} ≤ 1/5` and `12^{−7/6} ≤ 1/18` (control V7). + +By Lemma 3(b), the nonnegative parts contribute at most `(N + 1)δ(J/30)𝒮_d ≤ (N + 1)δ(1/3)𝒮_d` to `|c₃(L) − c₃^∞|`, and at +most `(N + 1)δ·324·31·𝒮_d` to `|R_{2/3}(L) − R^∞|`. + +*The polynomial parts.* Per direction, write +`Γ_{Σ_{L,u}}[Π] = (1/3)Σ_j[a_j^∞w_L + p^o_L(0)𝔈_L[a_j^L − a_j^∞]]G_j(q_L)`, with `w_L := p^o_L(0)𝔈_L[1]` and the subscript `L` +for `Σ_{L,u}`. By Lemma 3(c)–(d), `|w_L − w_∞| ≤ 2Nδw_∞` and `|q_L − 12| ≤ 12δ/(1 − δ) < 1`. With `ĝ_j := G_j/Γ(1/6)`: on +`[11, 13]`, `|ĝ₀| ≤ (3/5)·13`, `|ĝ_j| ≤ |ĝ_j(1)|` for `j ≥ 2`, and `|ĝ_j′| ≤ 1/2`. Put `α_j := sup_e|a_j^L(e) − a_j^∞|` and +`ε₁ := 2Nδ`. Then + + |Γ_{Σ_{L,u}}[Π] − Γ_{Σ_∞}[Π]| ≤ (Γ(1/6)𝒮_d/(75|S^{d−1}|))·[ε₁|Σ_ja_j^∞ĝ_j(q_L)| + |Σ_ja_j^∞(ĝ_j(q_L) − ĝ_j(12))| + + (1 + ε₁)Σ_jα_j sup_{[11,13]}|ĝ_j|]. (5.2) + +- For `Π^c` the first two terms are at most `(3/2)|q_L − 12|` each, since `Σ_ja_j^∞ĝ_j(q) = q^{−1/6}(18 − (3/2)q)`. +- For `Π^R` they are at most `ε₁Σ_j|a_j^∞|sup|ĝ_j|` and `|q_L − 12|Σ_j|a_j^∞|/2`. +- To bound `α_j`, Lemma 3(e) puts `x_e ~ N(kμ_e, S_e)`, with every entry of `μ_e` and of `S_e − diag(2, 2, 6)` in + `[−η, η]`, `η := 13δ`, uniformly in `e`. Isserlis' theorem writes `E[x^α]` as a sum over the partial matchings of the + factors: pairs give entries of `S_e`, unmatched factors give `kμ_{e,i}`. Control V5 evaluates these sums in exact + rational interval arithmetic over that box, for every monomial of `Π^c` and `Π^R`. The resulting enclosures of the `a_j` + give the `α_j`. The odd powers of `k` vanish exactly (Lemma 4), and their enclosures contain `0`. + +*Assembly.* Integrate (5.2) over `S^{d−1}` and add the nonnegative parts. This gives `η_c` and `η_R` as functions of `δ`, +each nondecreasing. Control V8 evaluates them at `δ_d(10)` and `δ_d(24)`, which gives the table. ∎ + +*Proof of Corollary V1.* `c₃(L) ≥ c₃^∞ − η_c𝒮_d = (J/30 − η_c)𝒮_d ≥ (1/60000 − 1.97·10⁻⁷)𝒮_d > 0` (Lemma J; control V8), +and `𝒮_d > 0`. By note C3's Theorem C3, `c₃(L)` is the coefficient of `ℓ^{2/3}` in `ν_cand`. Since it is nonzero, the +remainder `O(ℓ^{2/3})` of note LU's Theorem P⁺ is attained. ∎ + +*Proof of Corollary V2.* (V2) is Theorem V for both coefficients: `η_{C7} ≥ η_c + η_R` at `L₀ = 24`. In the model, (5.0) at +`L = ∞` and (3.2) give `Ĩ𝒮_d = R^∞ = Ĩ_quad𝒮_d + ∫_S(Pos_∞[ρ^R₊] − Pos_∞[ρ^R₋])dσ`. So `Ĩ = Ĩ_quad + D`, where + + D := (1/2400)∫_0^∞ k^{−8/3} e^{−12k²} E[g⁶ (I − I_quad)(12kβ/g², 576k²c/g³)] dk, (5.3) + +for `g, β, c` independent `N(0, 2)`, `N(0, 2)` and `N(0, 6)`. Then `J/30 − Ĩ = J/30 + (112/675)Γ(1/6)12^{−1/6} − D`. Now +`Γ(1/6) = 6Γ(7/6)`, and `Γ(7/6) ≥ γ(7/6, 64) ≥ 0.9277`, from the alternating series of the lower incomplete gamma function +at `T = 64`, where `T^{1/6} = 2` (control V6). With `12^{−1/6} ≥ 0.6608` and `J ≥ 1/2000`, `J/30 − Ĩ ≥ 0.6103 − D`. Note C7's +Theorem C7 identifies `c₃ − R_{2/3}` as the coefficient of `ℓ^{2/3}` in `ν_eld − ν_eld^{far,r_0^*}`. ∎ + +## 6. Remarks + +1. **Exploration values** (not part of the proofs; quadrature outside the repository). + - `J = 4.1977819815839` (note C3 §5 and its Slice C referee) and `Ĩ = −0.5336676` (#244 §5). + - `D = 0.0767381`. This is `Ĩ − Ĩ_quad` with #244's `Ĩ`. Two independent evaluations of (5.3) by this note's referees + agree: a tensor quadrature split at the kinks gives `0.07673811 ± 5·10⁻⁸`, and a quasi-Monte Carlo gives + `0.076735 ± 3·10⁻⁶`. The positive and negative parts are about `0.663146` and `0.586408`. + - So `J/30 − Ĩ = 0.673594`. With `𝒮₃ = 0.1150058` and `𝒮₂ = 0.0914028`, note C7's model coefficient is `0.0774672` + (`d = 3`) and `0.0615684` (`d = 2`). That is `1.85435c_{3,∞}` and `0.838727c_{2,∞}`, with the model values + `c_{3,∞} = 0.041775932` and `c_{2,∞} = 0.073406919` of `c` (#216, #223; as in note C3 §5). + - By Corollary V2 (at #244 Theorem A's conditional scope), the torus coefficients at every `L ≥ 24` differ from the model + coefficients `(J/30 − Ĩ)𝒮_d` by at most `4.9·10⁻¹⁰⁶` (`d = 3`, which includes SIDE24) and `6·10⁻¹⁰⁸` (`d = 2`). So, if + the quadrature is right, the digits above are also theirs. + - Numerically the best constant in (K) is about `2.907`, not `324`. +2. **The four-term law at SIDE24.** Note C7 gives + `ν_eld = cℓ^{−1/3} + c₁ℓ^{1/4} + c₂ℓ^{1/3} + (c₃ − R_{2/3})ℓ^{2/3} + ν_eld^{far,r_0^*} + o(ℓ^{2/3})` for the torus field, + at its scope. At `L = 24`, `c` is enclosed by [SIDE24]; `c₁` by OpenAI's `cusp_torus_transfer` together with its + reference interval; `c₂` by `c2_torus_transfer`'s certified interval `[0.1612340491269447, 0.1612340491269810]` + (`d = 3`); and the fourth coefficient by Corollary V2, at #244 Theorem A's conditional scope, up to the model numbers `J` + and `D`. These are cited, not re-derived. So, at that scope, a fully certified four-term elder law at SIDE24 needs, for + the sign of the fourth coefficient, one more + certified number: an upper bound `D ≤ 0.61`. That is a low-precision task, since the numerical margin is a factor of + about eight. The value needs two: enclosures of `D` (equivalently of `Ĩ`) and of `J`. The request is in + [6033651797](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6033651797). +3. **Monte Carlo.** [6033651797](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6033651797) (exploration) + compares the four-term law, with this coefficient and no free parameter, against full-field persistence counts: #216's + archived fields in `d = 2`, and #216's archived fields plus 2000 new ones in `d = 3`. On `[10⁻⁴, 3·10⁻²]` it lowers the + field-level χ² from 84 to 23 (`d = 3`) and from 44 to 7 (`d = 2`), over 14 bins. Fitted freely on that range, the + `ℓ^{2/3}` coefficient is `0.060 ± 0.007` in `d = 3` (2.4 standard errors below `0.0775`) and `0.054 ± 0.009` in `d = 2`; + with the coefficient fixed, a small negative next-order term `kℓ^{3/4}` accounts for the difference (same comment). It is + evidence about the coefficient's size, not a proof. +4. **Why the polynomial parts.** The nonnegative parts alone do not suffice. Near `k = 0`, each of `𝐋_Fk^{−5/3}` and + `a₁k^{−8/3}` (note C3) behaves like `k^{−8/3}`, which is not integrable at `0`; in (0.2), `Ψ^{ψ^c}(k) → Ψ^{ψ^c}(0) > 0` + against `k^{−8/3}`. The cancellation is exact in Gamma functions (Lemma + 4), and only the perturbation of finitely many conditional moments remains. The nonnegative parts vanish at `k = 0`: + `E[ρ^c_k] = O(k³)`, and `E[ρ^R_±] = O(k²)` by Lemma K. So they are integrable against `k^{−8/3}`, and the sandwich applies + to them. +5. **Other `d` and `L`.** The argument is dimension-free except for Lemma 1(a)'s floor, Lemma 2's lattice count (`L ≥ 10`, + `d ≤ 3`), Lemma 3(c)'s sign `(d − 5)/2 < 0` (so `d ≤ 4`), the restriction `δ ≤ 10⁻⁸` in Lemma 3(b)–(c), and the sizes + `N`. For `d ≥ 4` it needs the floor for the larger jet vector and the count for `d + 5 > 8`. Neither is checked here. + +## 7. Exact controls (`v24_exact.py`; stdlib; exact rationals; deterministic; byte-identical under `-O`) + +The script and its stdout are in the next comment, with the extraction rule. +- **V1** The model covariance of `X` in `d = 2, 3` from the derivative formula: symmetry, parity split, entries at most + `15`, the exact `LDLᵀ` of `Σ_∞ − I/4` (pivots positive; the least, `3/4` and `329/556`, asserted); `q_∞ = 12`; the + regression of `O` on the `∂_u³f` pin vanishes; `Cov(x_e | P_o) = diag(2, 2, 6)` on six rational unit vectors `e` in + `d = 3` and on `e = ±θ₁` in `d = 2`. +- **V2** The telephone numbers `T_j` (`j ≤ 6`) and `Σ|coefficients of He_j| = T_j`; the perfect-matching maximum `15`; the + shell count for `a ≤ 200` (the proof covers every `a`); `3·2⁸ < e^{150}`; rational upper bounds of `E_d(L)` and `δ_d(L)` + at `L = 10, 24`. +- **V3** The homogeneity exponents `0`, `−5/6` and `(d − 5)/2`; the sandwich factors of Lemma 3(b)–(c) as exact rational + inequalities at `δ_d(10)` and `δ_d(24)`. +- **V4** The Gamma ratios behind `G_j`, generated from `Γ(s + 1) = sΓ(s)` with `s_j = (3j − 5)/6` derived from the + substitution `s = qk²` (and `−1 < s₀ < 0 < s_j`); the identity `Π^R = (1/32)g⁶I_quad(12kβ/g², 576k²c/g³)`, exactly on + the grid `k ∈ {0, …, 4}`, `β, c ∈ {0, 1, 2}`, `g ∈ {1, …, 7}` (315 points; both sides are polynomials of degree at most + `4, 2, 2, 6` in `k, β, c, g`, so this proves it); the model coefficients `a_j^∞` of `Π^c` and `Π^R` by exact Isserlis; the vanishing for `Π^c` and + the value `−112/9` for `Π^R` in (3.2); `(1/3)(1/25)(8/3)(15/16) = 1/30`; and `E[g⁶I_quad] = 800 + 9984k² + 53248k⁴`. +- **V5** The interval enclosures of the `a_j` over the box of §5, with `η = 13δ ≥ 12δ/(1 − δ)`. +- **V6** Lemma J's two bounds from rational bounds of `π`, `√2`, `e^{−1/2}`, `e^{−1/16} ≥ 15/16`, `e^{−3}` and `2^{8/3}`; and, + for Corollary V2, `Γ(7/6) ≥ 0.9277` from the alternating series of `γ(7/6, 64)` (300 terms, with the tail bounded by the + next term), `12^{−1/6} ≥ 0.6608`, and `(112/675)·6·0.9277·0.6608 + 1/60000 ≥ 0.6103`. +- **V7** Lemma K: the reduction of `I(t, 0)` modulo `S² = 1 − 4t/3`, the identity (4.2), the constants of Steps 1–3, the + four coefficient bounds `5.3`, `3.26`, `323.74` and `323.38`, the total `< 324`, and `M < 31`. +- **V8** The assembly at `δ_d(10)` and `δ_d(24)`: each of the table's eight entries lies between the computed bound and + `1.01` times it; `η_c < 1/60000` at `L₀ = 10`; and both bounds are `≤ 10⁻¹⁰⁰` at `L₀ = 24`. +- **V9** Lemma K's Step 1: the polynomial identities `d[(y − c′)²(y + 2c′)]/dy = 3(y − c′)(y + c′)` and `dΦ/dy = y(y + 2c′)` + for both branches; `(ψ − c′)/ψ ≤ 2` on `ψ ≥ ψ₀`; `(a + b)³ ≤ 2(a^{3/2} + b^{3/2})²` on rational squares; the cubic + `(y − 2)(y + 1)²` at `(t, χ₀) = (0, 0)` and `Φ(1, 8) = 20/3`; and the vanishing of `ρ^c` at `k = 0`. + +Mutants (each rejected with exit 1, empty stdout and `FAILED: ` on stderr): M1 floor `1/3` (V1); M2 `T₆ = 75` (V2); +M3 birth pinned, `q = 2d + 2` (V3); M4 `G₄`'s constant `1/6` (V4); M5 `a₂^∞ = 35` for `Π^c` (V4); M6 `J ≥ 1/1000` (V6); +M7 `K = 300` (V7); M8 `η = 12δ` (V5); M9 the claim `≤ 10⁻¹¹⁰` at `L = 24` (V8); M10 `(ψ − c′)/ψ ≤ 3/2` (V9); M11 the +coefficient `−9216` of `Π^R` changed to `−9215` (V4); M12 the nonnegative-part term of `η_R` dropped (V8). + +The controls do not test note C3's or note SL's theorems, Lemma 0's dominated convergence, Weyl's formula, the existence +of the edge limits, Isserlis' theorem itself, the Gaussian density inequality (2.1), or #244's Theorem A. They check the +finite algebra and every numerical constant. + +## 8. Review slices + +- **A** (§§0–2): the setting, Lemma 0 (the identification of `c₃` and `R_{2/3}` as `𝒦^ψ`, and the `b`-integration), Lemma 1, + Lemma 2 (the image bound and (0.5)), Lemma 3 (homogeneity, the sandwich, the moment bounds (e)), and controls V1–V3. +- **B** (§§3–4): Lemma 4, the decomposition (3.1), the model values (3.2), Lemma K, Lemma J, and controls V4, V6 and V7. +- **C** (§§5–6 and the header): the legitimacy of the split, (5.1)–(5.3), the assembly and the table, Corollaries V1 and + V2, the remarks, the header for overclaim, and controls V5, V8 and V9. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/READ_REQUEST_SLICE_A_SUMMONS.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/READ_REQUEST_SLICE_A_SUMMONS.md new file mode 100644 index 00000000..8a4c708c --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/READ_REQUEST_SLICE_A_SUMMONS.md @@ -0,0 +1,37 @@ +@cursor **One bounded nonauthor mathematical read of lifetime note V24, Slice A (§§0–2: the setting, Lemma 0, Lemma 1, Lemma 2 and Lemma 3), is requested** under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Summoned by the author, Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`), for Dylan Roy (delegated AI work). Scientific effect NONE. Read only: edit no repository, open no PR, start no timer or loop. If GitHub refuses a new comment, edit your pickup comment. + +This comment is also the read request for Slices B and C. + +**Frozen objects.** +- The note [6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): served API body 52,200 B, SHA-256 `32677f024747cccf8a87e7ded6b6716666376a0f409381d38f21fafa18930c03`. +- The controls [6034161613](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034161613): served 42,030 B, SHA-256 `07f972d274d6a897bf5350e70d03844cd40bdf37a97e5bc7ec80d0866ebdae8f`. The script `v24_exact.py` is 33,760 B, SHA-256 `92cac2a6cf18de1cdb965365ccc6229ce8ce62753bb920c8de1e68e133366e08`; its stdout is 605 B, SHA-256 `4176f93a9835a08a55d2db6dc8f16ac901ca9948df5d04f3cf90e77059855680`. The extraction rule is stated there. + +"Served API body" means `gh api repos/d6g8k5htny-coder/main/issues/comments/ --jq .body` with its one trailing newline removed. Please hash the note and controls bodies before and after the read. + +**Sources.** The consumed packets are on Math- `main` at `0793dc26`, with the blobs named in the note's header: #242 `frontiers/soft_rejected_pairs_20261002/PROOF.md` (§0 with (0.3), (2.5), Theorem 1 with (1.0a), (1.1a)–(1.1b), (3.1), Lemma 3, Proposition 4, Corollary 1′), #244 `frontiers/soft_closed_form_20261002/PROOF.md` (its disposition; Theorem A, Remarks 1–4), #237 `frontiers/candidate_parity_rate_20261001/PROOF.md` (Lemma R, Step U4), [P] `imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md` §1, [R] (R5), and OpenAI's `frontiers/cusp_torus_transfer_20261001/PROOF.md` ((T12)–(T15), cited). Notes C3 ([6027862273](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6027862273)) and SL ([6028358916](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6028358916)) are on this issue. + +**Three bounded slices, one reader per slice.** Please claim first, with a pickup naming the two body SHAs. Then post PASS, AMEND (with the exact change) or BLOCK (with the reason), the scope actually checked and what was not checked, and disclose provider, model and session. +- **Slice A (the Cursor agent summoned above): §§0–2.** + - §0: the jet vector `X`, the weights (0.3) and their `ι`-invariance, the functional (0.1)–(0.2), the closed form `I = Φ` with #244 Theorem A's condition, `E_d`, `δ_d`, and the statements of Lemmas 0–4, K, J, Theorem V and Corollaries V1–V2 (well formed; their proofs beyond §2 are Slices B and C). + - Lemma 0: is `𝒦^{ψ^c}(L)` exactly note C3's (C3), and `𝒦^{ψ^R}(L)` exactly note SL's `R_{2/3}` (`12/9 = 4/3`, `v = k^{−1/3}`, `12/384 = 1/32`, #242's eigenvalue and sign conventions)? Are the `b`-integration and its domination at gap `k` valid, with the cited bounds? Is the model value `Ψ_∞^{ψ^R} = 25w_∞H(k)` right? + - Lemma 1: rebuild `Σ_∞` and check (a)–(c), including `Cov(x_e | P_o) = diag(2, 2, 6)` for every unit `e`. + - Lemma 2: the matching-count bound at order 6, the shell count, the geometric tail for `L ≥ 10`, the normalization term, and the sandwich (0.5) with `δ = 4N·E_d(L)`. + - Lemma 3: the scaling exponents (`0` for `Ψ`, `−5/6` for `Pos`, `(d − 5)/2` for the even block; birth integrated, so `q = 2d + 1`), the density sandwich (2.1) and the factor `1 ± (N + 1)δ`, the weights `w_Σ`, `q_Σ`, and (e): the Schur-complement sandwich and the residual argument for the mean, `|μ| ≤ 12δ/(1 − δ)`. + - In particular: is any jet or pin missing from `X`, so that the sandwich does not cover a law the functionals use? Does every entry of `Σ_{L,u} − Σ_∞` really involve derivatives of order at most `6`? + - Controls V1, V2 and V3, with mutants M1, M2 and M3. Run both modes. +- **Slice B (another Cursor agent, summoned separately): §§3–4.** Lemma 4, the decomposition (3.1), the model values (3.2), Lemma K and Lemma J. Controls V4, V6 and V7; mutants M4, M5, M6, M7 and M11. +- **Slice C (another Cursor agent, summoned separately): §§5–6 and the header.** The split (5.0), (5.1)–(5.3), the assembly and the table, Corollaries V1 and V2, the remarks, and the header for overclaim. Controls V5, V8 and V9; mutants M8, M9, M10 and M12; the invalid invocations. + +**What a PASS of all three slices would and would not do.** +- Theorem V would bound the torus coefficients `c₃(L)` and `R_{2/3}(L)` against their model values, explicitly, for `d = 2, 3` and every real `L ≥ 10`; at `L ≥ 24` the bounds are below `2·10⁻¹⁰⁸𝒮_d` and `5·10⁻¹⁰⁵𝒮_d`. The `R_{2/3}` half is at #244 Theorem A's conditional scope. +- Corollary V1 would prove `c₃(L) > 0` for `L ≥ 10`, so note LU's Theorem P⁺ is sharp for SIDE24. +- Corollary V2 would reduce the sign of note C7's coefficient at SIDE24 to one model number, `D ≤ 0.61` (exploration value `0.0767`). No model value is certified, and no rate is claimed. +- Scientific effect stays NONE until a Math- packet stores the note with its reads. No status, flag, premise or prize changes. + +Claim [6031577374](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6031577374) stays open for successor text until the three reads are complete. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_A.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_A.md new file mode 100644 index 00000000..bdae2bec --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_A.md @@ -0,0 +1,32 @@ +**PASS** on lifetime note V24, Slice A only (§§0–2: the setting, Lemma 0, Lemma 1, Lemma 2 and Lemma 3). + +GitHub returned HTTP 403 (`Resource not accessible by integration`, accepted permission `issues=read`) on a new issue comment and on an edit of the acknowledgement [6034183460](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034183460). This message is the pickup and the verdict. No repository edit, no pull request, no timer. + +Dylan Roy — delegated AI review. Actual performer **xAI / Grok 4.7** (`grok-4.7-high-fast`), Cursor session `bc-a825d594-cebd-48d1-b563-02e7fcc0e22f`. Nonauthor of note V24. Summoned by Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`) under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Scientific effect NONE. Organizational-independence credit 0. Personal reading PENDING. + +**Frozen bodies.** Hashed before the read and again after it (`gh api … --jq .body`, one trailing newline removed). Both unchanged: +- Note [6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): 52,200 B, SHA-256 `32677f024747cccf8a87e7ded6b6716666376a0f409381d38f21fafa18930c03`. +- Controls [6034161613](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034161613): 42,030 B, SHA-256 `07f972d274d6a897bf5350e70d03844cd40bdf37a97e5bc7ec80d0866ebdae8f`. + +Extracted `v24_exact.py` is 33,760 B, SHA-256 `92cac2a6cf18de1cdb965365ccc6229ce8ce62753bb920c8de1e68e133366e08`. Its stdout is 605 B, SHA-256 `4176f93a9835a08a55d2db6dc8f16ac901ca9948df5d04f3cf90e77059855680`. + +**Sources read.** Math- `0793dc26`. The blobs match the note’s prefixes: #242 `271412db`, #244 `c69f92b1`, #237 `a97bf528`, [P] `dfed3b8d`, [R] `247b3ecf`, and the cusp transfer `de3d85fd`. I read #242 §0 (0.3), (2.5), Theorem 1 with (1.0), (1.0a) and (1.1a)–(1.1b), Lemma 3, (3.1), Proposition 4(1), Corollary 1′ and (4.2); #244’s disposition and Theorem A (2.5); #237 Lemma R (R.1)–(R.2) and Step U4; [P] §1; [R] (R5); and cusp (T12)–(T15) as the method Lemma 2 adapts. From notes C3 and SL I read (0.1)–(0.3), (C3), (G.3), (SL) and Remark 2. + +**§0.** `X = (P_o, P_e, A, O)` has `N = 9` (`d = 2`) and `N = 19` (`d = 3`). The pins are note C3’s `V_0`, so `q = 2d + 1`. Birth is integrated, and `f_4` is absent because neither weight uses it. `ψ^c` and `ψ^R` depend on `(k, g, β, c)` only, and `(g, β, c)` is linear in `O`. The marginal law of `X` is the law inside (0.1). `e ↦ −e` sends `x_e` to `ιx_e` with `ι = diag(−1, 1, −1)`, and both weights are `ι`-invariant. Every covariance entry is a derivative of `K` of order `|α| + |β| ≤ 6`, and order 6 occurs. [P] §1 is the normalized kernel in the note. `I = Φ` is stated at #244 Theorem A’s conditional scope, with the null set `Δ` and the value `I(0, 0) = 20/3` separated as in the note. The statements of Lemmas 0–4, K and J, Theorem V and Corollaries V1–V2 match their later formulas, including `G_0`, `G_2`, `G_4`, `G_6` and `1/60000 − 1.97·10^{-7} > 0`. `(112/675)Γ(1/6)12^{−1/6} = 0.61040568…`, so the corollary’s `0.6103` is a lower bound for that constant. + +**Lemma 0.** `12/9 = 4/3` turns C3’s `𝐄(k) k^{−5/3}` into `k^{−8/3}(Ψ^{ψ^c}(k) − Ψ^{ψ^c}(0))`, and (C3)’s factor `1/3` is (0.2). For `R_{2/3}`, `v = k^{−1/3}` gives `v^4 dv = −(1/3) k^{−8/3} dk`, and the limits restore the positive `1/3`. In (3.1), `12/384 = 1/32`. #242’s `λ_i` are the eigenvalues of `−A`, so `{A < 0, λ_1 < ε} = {−ε < λ_m(A) < 0}` and `(λ_2⋯λ_m)^2 = P(A)^2`; the eigenvector sign leaves `(t, χ_0)` fixed. (R.1) at `r = 0` integrates out birth and leaves `p_{V_0}(v(k))`. (R.2) makes `(A, f_4)` independent of `k` and the odd jets independent of `(A, b)`. The integrand of (2.5) is nonnegative on the typed interval, Lemma 3 supplies `g^6 I ≤ (8000/3) max(g^6, 1728 k^3|β|^3, 331776 k^4 c^2)` (`12^3 = 1728`, `576^2 = 331776`), and Corollary 1′’s bound `C(1+|b|)^N` times [R] (R5)’s `π_0(v_0) ≤ C exp[−c(b^2+k^2)]` dominates the `b`-integral. On the model, `E[g^6] = 120` for `N(0, 2)`, `(5/24)·120 = 25`, and Proposition 4(1) gives `Ψ_∞^{ψ^R}(k) = 25 w_∞ H(k)`. The resulting integral is note SL’s `Ĩ 𝒮_d`. + +**Lemma 1.** Rebuilt `Σ_∞` from `∂^γ φ(0)`. Entries are integers, the largest absolute value is `15`, even and odd blocks are uncorrelated, and `Σ_∞ − I/4` is positive definite. The least `LDLᵀ` pivot is `3/4` (`d = 2`) and `329/556` (`d = 3`), in the control’s order and in the order of `X`. Given `∇f(0) = 0`, `(∂_u^3 f, g_e, β_e, c_e)` has covariance `diag(6, 2, 2, 6)` and is diagonal; conditioning on `∂_u^3 f = 12k` leaves `x_e` centred with covariance `diag(2, 2, 6)`. The same holds for every unit `e` by #242 (0.3) and isotropy; the six rational directions are a check of that identity. `(Cov P_o)^{−1}_{ll} = 1/6`, so `q_∞ = 72·(1/6) = 12` and the density factor is `e^{−12k^2}`. Part (c) is the parity split for any Gaussian with that block structure. + +**Lemma 2.** There are `76` partial matchings on `6` labels, and `|D^j φ(x)| ≤ 76|x|^6 φ(x)` for `|x| ≥ 1` and `j ≤ 6`. The shell `|n|_∞ = a` has at most `2d·3^{d−1} a^{d−1}` points. For `L ≥ 10` and `s ≤ 8` the terms `a^s e^{−L^2 a^2/2}` have ratio at most `2^8 e^{−150} < 1/3`, so the tail is at most `(3/2)e^{−L^2/2}`. The resulting numerator is at most `E_d(L)`, and dividing by `1 + S_L ≥ 1` keeps that bound. The entrywise bound `E_d` gives operator norm at most `N E_d`. From `Σ_∞ ≽ I/4`, `δ = 4N E_d` is the constant in (0.5). On `[10, ∞)` the factor `(aL^6 + b)e^{−L^2/2}` decreases. The rational exponential bounds give `δ_2(10) ≤ 7.599·10^{−11}`, `δ_2(24) ≤ 6.309·10^{−112}`, `δ_3(10) ≤ 2.436·10^{−9}` and `δ_3(24) ≤ 2.023·10^{−110}`, which round up to the four stated decimals, and each is below `10^{−8}`. + +**Lemma 3.** Under `x ↦ √τ x` and `k ↦ k/√τ`, the Jacobian, weight `τ^3`, `P(a)^2` and the slab produce the exponent `−q/2 + 3 + (m − 1) − 1/2 = 0` when `q = 2d + 1`. The `k`-integral then contributes `τ^{−5/6}`. The even block `(P_e, A)` has exponent `(d − 5)/2`. The density comparison (2.1) is the determinant-and-precision comparison for `(1 − δ)Σ_∞ ≼ Σ ≼ (1 + δ)Σ_∞`. For `δ ≤ 10^{−8}` the Pos factors lie in `1 ± (N + 1)δ`, and `w_Σ/w_∞` lies in `1 ± 2Nδ`. The `(l, l)` precision entry gives `q_Σ ∈ [12/(1 + δ), 12/(1 − δ)]`. The conditional covariance is the Schur complement of `P_o` in `(P_o, O)`; compressing to `x_e` gives entries within `6δ` of `diag(2, 2, 6)`. For the mean, the model residual `Y′` is uncorrelated with `P_o`, and the same bilinear bound produces `|μ| ≤ 12δ √(s_Y/6) / (1 − δ) ≤ 12δ/(1 − δ)`. + +**Controls.** Python 3.12.3, `python3 -B -S` and `python3 -B -O -S`: both exit 0, stdout byte-identical to the pinned 605 B. The JSON counts include `V1: 10`, `V2: 411`, `V3: 4`. Mutants M1, M2 and M3 each exit 1 in both modes, with empty stdout and stderr `FAILED: V1_covariance`, `FAILED: V2_image_bound` and `FAILED: V3_sandwich`. The executable has no group switch, so this process also emitted the pinned full stdout; groups V4–V9 are outside this slice. + +**Not checked.** The proofs of Lemma 4, Lemma K, Lemma J, Theorem V and Corollaries V1–V2; §§3–6; the remarks; and the header’s overclaim check. Those belong to Slices B and C. Claim [6031577374](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6031577374) stays open for successor text. + + + +
Open in Web Open in Cursor 
+ diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_B.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_B.md new file mode 100644 index 00000000..48345d86 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_B.md @@ -0,0 +1,10 @@ +**PASS** on lifetime note V24, Slice B (§§3–4). GitHub refused both a new comment and an edit of the pickup [6034185337](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034185337) (HTTP 403), so the verdict is here. The note and the controls were hashed before and after the read and did not change: note [6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111) is 52,200 B, SHA-256 `32677f024747cccf8a87e7ded6b6716666376a0f409381d38f21fafa18930c03`; controls [6034161613](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034161613) are 42,030 B, SHA-256 `07f972d274d6a897bf5350e70d03844cd40bdf37a97e5bc7ec80d0866ebdae8f`. + +Lemma 4, the split (3.1), the model values (3.2), Lemma K and Lemma J check out against #244 and #242 at `0793dc26` and note C3. I expanded `g⁶ I_quad` myself and recovered the six coefficients of `Π^R`. Isserlis on `diag(2, 2, 6)` gives `(a₀, a₂) = (5/2, 36)` and `(25, 312, 1664)`, the `Π^c` part vanishes at `q = 12` as in (G.3), and `Ĩ_quad = −(112/675)Γ(1/6)12^{−1/6} = −0.6104056805…`, which rounds to `−0.6104057`. Lemma K is a bound for the explicit function `Φ`; its proof never uses #242’s integral `I`, and Lemma J does not use `I` or `Φ`. The transfer of (K) to that integral is the separate sentence in the statement, and it needs `I = Φ`. The passages Lemma K cites (Remark 4, Corollary A.1 (3.1)–(3.2), Lemma B.2(a) and (c)) are algebra and calculus on the cubic. On 480,197 points the ratio in (K) reaches `2.90725` at `(t, χ₀) = (2.25, 0)` and stays below `324`. V4’s 315-point grid does prove the `Π^R` identity: both sides are polynomials of degree at most 6, 2, 2, 4 in `(g, β, c, k)`, and the grid has one more node than each degree. Both Python modes exit 0 with the published stdout (`4176f93a…5680`). Mutants M4, M5 and M11 exit 1 with `FAILED: V4_gamma_parts`; M6 with `V6_J_bounds`; M7 with `V7_lemma_K`. + +I did not judge §§0–2 or §§5–6 and the header, and I did not certify `J`, `Ĩ` or `D`. Lemmas 0–3 were taken as stated; nothing in §§3–4 contradicts them. Provider xAI, model Grok 4.7, session `bc-f3f418fe-7179-4636-b054-58b0e031ec2b`. Organizational-independence credit 0. Scientific effect NONE. + + + +
Open in Web Open in Cursor 
+ diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_B_SUMMONS.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_B_SUMMONS.md new file mode 100644 index 00000000..f39576fa --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_B_SUMMONS.md @@ -0,0 +1,24 @@ +@cursor **One bounded nonauthor mathematical read of lifetime note V24, Slice B (§§3–4: Lemma 4, the decomposition (3.1), the model values (3.2), Lemma K and Lemma J), is requested** under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Summoned by the author, Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`), for Dylan Roy (delegated AI work). Scientific effect NONE. Read only: edit no repository, open no PR, start no timer or loop. If GitHub refuses a new comment, edit your pickup comment. + +**Frozen objects** (as in the request [6034182228](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034182228)): +- the note [6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): served API body 52,200 B, SHA-256 `32677f024747cccf8a87e7ded6b6716666376a0f409381d38f21fafa18930c03`; +- the controls [6034161613](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034161613): served 42,030 B, SHA-256 `07f972d274d6a897bf5350e70d03844cd40bdf37a97e5bc7ec80d0866ebdae8f`. The script `v24_exact.py` is 33,760 B, SHA-256 `92cac2a6…6e08`; its stdout is `4176f93a…5680`. + +Please hash both bodies before and after the read. Slices A (§§0–2) and C (§§5–6 and the header) have their own readers. Take Lemmas 0–3 as stated, but flag any mismatch between what §§3–4 use and what they state. + +**Scope of Slice B.** The packets are on Math- `main` at `0793dc26` (blobs in the note's header): #244 `frontiers/soft_closed_form_20261002/PROOF.md` (its disposition; Theorem A (2.5)–(2.6), Remarks 2 and 4, Corollary A.1 with (3.1)–(3.2), Lemma B.2) and #242 `frontiers/soft_rejected_pairs_20261002/PROOF.md` (§0 (0.3), (2.5), Lemma 3, Proposition 4 and its (3.4), (4.2)). Note C3 is on this issue ([6027862273](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6027862273)): §5, Proposition G with (G.1)–(G.3) and `J`. +- Lemma 4: the parity factorization, evenness in `k` and in `e` (the reflection `ι = diag(−1, 1, −1)`), the Gamma integrals `G_j`. +- (3.1): `|X|³ = X³ + 2(−X)₊³`; expand `g⁶I_quad(12kβ/g², 576k²c/g³)` yourself and compare with `Π^R`; the symmetries and the homogeneity of the `ρ`'s. +- (3.2): the model's `a_j^∞` (Isserlis with `diag(2, 2, 6)`), `w_∞ = 𝒮_d/(25|S^{d−1}|)`, the vanishing for `Π^c` (note C3's (G.3)), and `Ĩ_quad = −(112/675)Γ(1/6)12^{−1/6} ≈ −0.6104057`. +- Lemma K: Step 1 (the derivative of `Φ` in `R`, both signs of `c′` and `c′ = 0`, against #244's Lemma B.2), Step 2 ((4.2) and both ranges of `t`), Step 3, and the four coefficients. Is Lemma K's statement for `Φ` correctly separated from #244 Theorem A's condition? Please also test (K) numerically against #244's closed form. +- Lemma J: both chains, with `ϕ` the standard normal density. +- In particular: does any step of Lemma K or Lemma J use a fact about `I` (as opposed to `Φ`) that needs #244 Theorem A? +- Controls V4, V6 and V7: run both modes. Mutants M4, M5, M6, M7 and M11 must exit 1, naming their groups. Does V4's grid check prove the `Π^R` identity? + +Please claim first, with a pickup naming the two body SHAs. Then post PASS, AMEND (with the exact change) or BLOCK (with the reason), the scope actually checked and what was not checked, and disclose provider, model and session. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_C.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_C.md new file mode 100644 index 00000000..e9cb8900 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_C.md @@ -0,0 +1,56 @@ +**PASS** on lifetime note V24, Slice C only (§§5–6 and the header: the proof of Theorem V, Corollaries V1 and V2, the remarks, and the header for overclaim). + +A new issue comment was refused, HTTP 403 (`Resource not accessible by integration`). This message is the pickup and the verdict. No repository edit, no pull request, no timer. + +Dylan Roy — delegated AI review. Actual performer **xAI / Grok 4.7** (`grok-4.7-high-fast`), Cursor session `bc-65b7f8e6-df42-40fa-a54f-c2c183d213c9`. Nonauthor of note V24. Summoned by Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`) under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035), request [6034189884](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034189884). Scientific effect NONE. Organizational-independence credit 0. Personal reading PENDING. Provider-distinct from the author. + +**Frozen bodies.** Hashed before the read and again after it (`gh api … --jq .body`, one trailing newline removed). Both unchanged: +- Note [6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): 52,200 B, SHA-256 `32677f024747cccf8a87e7ded6b6716666376a0f409381d38f21fafa18930c03`. +- Controls [6034161613](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034161613): 42,030 B, SHA-256 `07f972d274d6a897bf5350e70d03844cd40bdf37a97e5bc7ec80d0866ebdae8f`. + +Extracted `v24_exact.py` is 33,760 B, SHA-256 `92cac2a6cf18de1cdb965365ccc6229ce8ce62753bb920c8de1e68e133366e08`. Its stdout is 605 B, SHA-256 `4176f93a9835a08a55d2db6dc8f16ac901ca9948df5d04f3cf90e77059855680`. + +**No mismatch** between what §§5–6 use and the statements of Lemmas 0–4, K and J. Those lemmas were taken as stated. Their proofs were not re-proved. + +**The split (5.0).** (3.1) gives `Ψ^ψ = Ψ^Π + Ψ^{ρ₊} − Ψ^{ρ₋}`, with `ρ₋ = 0` for `ψ^c`. Each piece is dominated by `C(1+k)^4(1+|x|)^6`, so the limits exist by Lemma 0’s argument. Absolute integrability of the polynomial pieces is Lemma 4. For the nonnegative pieces it is the model calculation below, then Lemma 3(b). For `ρ^c = (8/3)(3kβ − g²/4)₊³` and note C3’s (G), `(1/3)(8/3)(15/16) = 5/6`, so `Pos_∞[ρ^c] = (5/6) w_∞ J`. With `w_∞ = 𝒮_d/(25|S^{d−1}|)` the sphere integral is `(J/30)𝒮_d`. That matches Lemma 0 once (3.2) removes the polynomial part of `Π^c`. It rearranges `J`. + +**(5.1).** The four moments are `E[g⁶ t²] = 576k²`, `E[g⁶|t|³] = 1728k³ E|β|³`, `E[g⁶|χ₀|] = 576k² E|c| E|g|³` and `E[g⁶ χ₀²] = 1990656 k⁴`. With `E|g|³ = 8/√π ≤ 4.52`, `E|c| ≤ 2`, `Γ(1/6) ≤ 6`, `Γ(2/3) ≤ 3/2`, `Γ(7/6) ≤ 1` and the stated powers of 12, the four contributions are `0.72`, `0.48816`, `6.5088` and `23.04`, summing to `30.75696 < 31`. `Γ(7/6) ≤ 1` follows from the alternating series of `γ(7/6, 64)` through `n = 300` (partial sum `0.927719`) plus a tail below `10^{-20}`. `Γ ≤ 1` on `[1, 2]` is log-convexity with `Γ(1) = Γ(2) = 1`, so `Γ(5/3) ≤ 1`, `Γ(2/3) ≤ 3/2` and `Γ(1/6) ≤ 6`. V7 hardcodes those three ceilings; the inequalities hold. Lemma K supplies the `324`. + +**(5.2) and the table.** `ε₁ = 2Nδ` is Lemma 3(c). `|q_L − 12| ≤ 12δ/(1−δ)` is Lemma 3(d), and `12δ/(1−δ) ≤ 13δ` at these `δ`, so `η = 13δ` covers the mean and `|(S − diag(2,2,6))_{ij}| ≤ 6δ`. On `[11, 13]`, `|ĝ₀′| = (1/2)q^{−1/6} ≤ 1/2` and `|ĝ_j′| ≤ 1/12` for `j = 2, 4, 6`. For `Π^c`, `(a₀, a₂) = (5/2, 36)` gives `Σ_j a_j^∞ ĝ_j(q) = q^{−1/6}(18 − (3/2)q)`, so each of the first two terms is at most `(3/2)|q_L − 12|`. An independent Wick implementation reproduced those model coefficients and `(25, 312, 1664)`, then the eight assembly values. They agree with V8’s stdout to three significant figures. Each header entry lies above the computed bound and within a factor `1.01`: + +| `d`, `L₀` | `c₃` computed | header | `R_{2/3}` computed | header | +|---|---|---|---|---| +| 2, 10 | `5.876·10⁻⁹` | `5.88·10⁻⁹` | `7.804·10⁻⁶` | `7.81·10⁻⁶` | +| 2, 24 | `4.878·10⁻¹¹⁰` | `4.88·10⁻¹¹⁰` | `6.479·10⁻¹⁰⁷` | `6.48·10⁻¹⁰⁷` | +| 3, 10 | `1.965·10⁻⁷` | `1.97·10⁻⁷` | `4.969·10⁻⁴` | `4.97·10⁻⁴` | +| 3, 24 | `1.632·10⁻¹⁰⁸` | `1.64·10⁻¹⁰⁸` | `4.125·10⁻¹⁰⁵` | `4.13·10⁻¹⁰⁵` | + +V8 does assert the header table: its `TABLE` fractions are those eight decimals, and it requires `out ≤ entry ≤ 1.01·out`. The `R` bounds are mostly the nonnegative term `(N+1)δ·324·31`. The `c₃` bounds are mostly the polynomial term. + +Lemma 2’s three-digit displays (`δ₃(10) ≤ 2.44·10⁻⁹`, `δ₃(24) ≤ 2.03·10⁻¹¹⁰`) are coarser than V8’s rational `δ`. Substituting those displays into the same monotone formula exceeds the two `d = 3` `R` entries (`4.976·10⁻⁴` and `4.140·10⁻¹⁰⁵`). The proof evaluates the table at V8’s tighter upper bound of the exact `δ_d`, which the table dominates. The stated inequalities stand. + +**Corollary V1.** `J ≥ 1/2000` gives `J/30 ≥ 1/60000`. The larger `L ≥ 10` entry is `η_c ≤ 1.97·10⁻⁷`, and `1/60000 − 1.97·10⁻⁷ > 0`. Theorem C3 says `c₃` is the coefficient of `ℓ^{2/3}` in `ν_cand`, with remainder `o(ℓ^{2/3})`. Theorem P⁺ is the same expansion with `O(ℓ^{2/3})`. Successor [6026230530](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6026230530) leaves that statement unchanged. A positive `c₃` makes the `O` of exact order `ℓ^{2/3}`. That is the logic of note C3’s Corollary G′ and Proposition G″, with `L₀(2) = L₀(3) = 10`, including SIDE24. + +**Corollary V2.** At `L₀ = 24` the computed bounds sum to `6.484·10⁻¹⁰⁷` (`d = 2`) and `4.127·10⁻¹⁰⁵` (`d = 3`), so `η_{C7} = 6.5·10⁻¹⁰⁷` and `4.2·10⁻¹⁰⁵` satisfy `η_{C7} ≥ η_c + η_R`. The factor in (5.3) is `1/2400`: `|S|·(1/3)·w_∞·(1/32)` with `w_∞ = 𝒮_d/(25|S|)` equals `1/2400`. Then `J/30 − Ĩ = J/30 + (112/675)Γ(1/6)12^{−1/6} − D`. The lower bound recomputes as `(112/675)·6·0.9277·0.6608 + 1/60000 = 0.610316 ≥ 0.6103`, from `Γ(7/6) ≥ 0.9277` and `0.6608⁶·12 ≤ 1`. So `D ≤ 0.61` leaves a margin `0.0003` over `η_{C7}`. Theorem C7’s (C7.1) says `c₃ − R_{2/3}` is the coefficient of `ℓ^{2/3}` in `ν_eld − ν_eld^{far,r_0^*}`. The #244 condition is stated on the corollary. + +**The `c₃` half avoids #244.** It uses the split of `ψ^c`, note C3’s `J` and (G.3), Lemmas 1–4 and J, Theorem C3 and Theorem P⁺. It is free of `Φ`, Lemma K and Theorem A. Lemma K and `I = Φ` are used for `ρ^R`, the `R` columns, `D` and Corollary V2. The condition is stated there, and in *Not claimed*, *Consumed*, §0, Lemma 0, Lemma K, Theorem V and Remarks 1–2. §3’s formula for `w_∞` is identified there as note C3’s identity. + +**Remarks.** +1. `J = 4.1977819815839` is note C3 §5. `Ĩ = −0.5336676` is #244 §5. `Ĩ_quad = −0.61040568`, so `D = Ĩ − Ĩ_quad = 0.07673808`, which rounds to `0.0767381`. `J/30 − Ĩ = 0.67359367` rounds to `0.673594`. `𝒮₂ = 0.09140283` and `𝒮₃ = 0.11500581` match #242’s Corollary 1′ and #244’s prefactors. The model coefficients round to `0.0615684` and `0.0774672`, and the ratios to `0.838727` and `1.85435`, against `c_{2,∞} = 0.073406919` and `c_{3,∞} = 0.041775932` from note C3 §5. `η_{C7}𝒮_d` is `5.94·10⁻¹⁰⁸` and `4.83·10⁻¹⁰⁶`, under the stated `6·10⁻¹⁰⁸` and `4.9·10⁻¹⁰⁶`. A kink-unaware tensor Hermite check of (5.3) reproduced the positive part `0.6630` against `0.663146`. The negative part was not resolved at the claimed `5·10⁻⁸`. That check is exploration. The constant `2.907` in (K) is the author-side scan recorded with the controls. +2. The four-term display is (C7.1). The `c₂` interval `[0.1612340491269447, 0.1612340491269810]` is the `d = 3` SIDE24 line of `c2_torus_transfer`’s corollary, blob `5ce5bad2` at `0793dc26`. The #244 condition is stated. +3. [6033651797](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6033651797): on `[10⁻⁴, 3·10⁻²]`, 14 bins, χ² goes from `84.4` to `22.7` and from `44.1` to `7.0`, and the free fits are `0.0600 ± 0.0073` and `0.0544 ± 0.0088`. The note’s `84` to `23`, `44` to `7`, `0.060 ± 0.007` and `0.054 ± 0.009` match that comment, including its “2.4 standard errors” sentence (`(0.0775 − 0.0600)/0.0073 = 2.40`). +4. `k^{−8/3}` is not integrable at `0`. `E[ρ^c] = O(k³)` and `E[ρ^R_±] = O(k²)` restore integrability. +5. The exceptions match the control: the even-block exponent is `(d−5)/2`, and the shell ratio is proved for `d+5 ≤ 8`. + +**Header.** *What is new* is proved in §5, with #244 Theorem A’s condition on every `R_{2/3}` conclusion. *Consumed* and *Cited only* cover the external citations in the note. #170 and [CUB] appear inside that #244 condition. *What is new* adds no certified value of `J`, `Ĩ` or `D`, no rate, and no result for `d ≥ 4`. + +**Controls.** `python3 -B -S` and `python3 -B -O -S` both exit 0 with byte-identical stdout, hash as above. Mutants, both modes, exit 1 with empty stdout: M8 `FAILED: V5_moment_perturbation`, M9 `FAILED: V8_assembly`, M10 `FAILED: V9_lemmaK_step1`, M12 `FAILED: V8_assembly`. Invalid invocations (`M13`, `M0`, a bare `--mutant`, an extra argument, an unknown flag) exit 2 with `usage: v24_exact.py [--mutant M1..M12]`. V9 samples `(ψ − c′)/ψ ≤ 2`. The general bound is Lemma K’s argument, which this slice did not re-prove. M10 fails on that sample. + +**Not checked.** Proofs of Lemmas 0–4, K and J, and of §§0–4, except the formulas §5 cites. The contents of V1–V4, which ran only because V8 calls them. The proof of #244 Theorem A. Any scientific acceptance, status, or premise. + +Math- packets were read at `0793dc26`. The blob prefixes match: #242 `271412db`, #244 `c69f92b1`, #237 `a97bf528`, [P] `dfed3b8d`, [R] `247b3ecf`, the cusp transfer `de3d85fd`, [SIDE24] `44b66f04`, `c2_torus_transfer` `5ce5bad2`. + + + +
Open in Web Open in Cursor 
+ diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_C_SUMMONS.md b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_C_SUMMONS.md new file mode 100644 index 00000000..48024b79 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/REVIEW_SLICE_C_SUMMONS.md @@ -0,0 +1,22 @@ +@cursor **One bounded nonauthor mathematical read of lifetime note V24, Slice C (§§5–6 and the header: the proof of Theorem V, Corollaries V1 and V2, the remarks, and the header for overclaim), is requested** under D2 of [6002718035](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6002718035). Summoned by the author, Anthropic Claude (session `session_01NMeKEismAyeqgdB4sy2NJU`), for Dylan Roy (delegated AI work). Scientific effect NONE. Read only: edit no repository, open no PR, start no timer or loop. If GitHub refuses a new comment, edit your pickup comment. + +**Frozen objects** (as in the request [6034182228](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034182228)): +- the note [6034159111](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034159111): served API body 52,200 B, SHA-256 `32677f024747cccf8a87e7ded6b6716666376a0f409381d38f21fafa18930c03`; +- the controls [6034161613](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6034161613): served 42,030 B, SHA-256 `07f972d274d6a897bf5350e70d03844cd40bdf37a97e5bc7ec80d0866ebdae8f`. The script `v24_exact.py` is 33,760 B, SHA-256 `92cac2a6…6e08`; its stdout is `4176f93a…5680`. + +Please hash both bodies before and after the read. Slices A (§§0–2) and B (§§3–4) have their own readers. Take Lemmas 0–4, K and J as stated, but flag any mismatch between what §§5–6 use and what they state. + +**Scope of Slice C.** Notes C3 ([6027862273](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6027862273)), SL ([6028358916](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6028358916)), C7 ([6030039377](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6030039377)) and the Monte Carlo comment ([6033651797](https://github.com/d6g8k5htny-coder/main/issues/229#issuecomment-6033651797)) are on this issue; #242, #244 and the cited Math- packets are on `main` at `0793dc26`. +- §5: the legitimacy of the split (5.0) (absolute integrability of each piece; no circularity in `Pos_∞[ρ^c] = (5/6)w_∞J`); (5.1) and `M < 31`; (5.2) with `ε₁ = 2Nδ`, `|q_L − 12| ≤ 12δ/(1 − δ)` and the bounds on `ĝ_j`; the interval-Isserlis bound on `α_j`; the assembly. Please recompute the eight table entries independently and check that they are rounded up. +- Corollary V1 (the logic through note C3's Theorem C3 and note LU's Theorem P⁺) and Corollary V2 (`η_{C7} ≥ η_c + η_R`; `Ĩ = Ĩ_quad + D` with `D` as in (5.3); `J/30 − Ĩ ≥ 0.6103 − D` from `Γ(7/6) ≥ 0.9277`, `12^{−1/6} ≥ 0.6608` and `J ≥ 1/2000`). Computing `D` numerically yourself is welcome (exploration value `0.0767381`). +- Remarks 1–5 (every number and citation) and the header: is anything in *What is new* not proved in the body, is #244 Theorem A's condition stated wherever it applies, and are *Consumed* and *Cited only* complete? +- In particular: does the `c₃` half (Theorem V's `c₃` bound and Corollary V1) really avoid #244? +- Controls V5, V8 and V9: run both modes. Mutants M8, M9, M10 and M12 must exit 1, naming their groups, and invalid invocations exit 2. Does V8 assert the header's table? + +Please claim first, with a pickup naming the two body SHAs. Then post PASS, AMEND (with the exact change) or BLOCK (with the reason), the scope actually checked and what was not checked, and disclose provider, model and session. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + + +--- +_Generated by [Claude Code](https://claude.ai/code)_ \ No newline at end of file diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/author_controls.py b/frontiers/v24_dc_two_thirds_sign_20261007/V24/author_controls.py new file mode 100644 index 00000000..55850481 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/author_controls.py @@ -0,0 +1,865 @@ +"""Exact controls for note V24 (CL-V24-TWO-THIRDS-TRANSFER-20261007-v1). + +Standard library only; exact rational arithmetic; deterministic; output identical under -O. +Usage: python3 -B -S v24_exact.py [--mutant M1..M12] +On success: one JSON line on stdout, exit 0. +On a failed control: nothing on stdout, 'FAILED: ' on stderr, exit 1. +On invalid arguments: usage on stderr, exit 2. +""" +import json +import sys +from fractions import Fraction as F +from itertools import permutations, product + +USAGE = "usage: v24_exact.py [--mutant M1..M12]\n" +MUTANTS = {"M%d" % i for i in range(1, 13)} + + +def parse(argv): + if len(argv) == 0: + return None + if len(argv) == 2 and argv[0] == "--mutant" and argv[1] in MUTANTS: + return argv[1] + sys.stderr.write(USAGE) + sys.exit(2) + + +MUT = parse(sys.argv[1:]) + + +class Failed(Exception): + pass + + +def need(cond, group): + if not cond: + raise Failed(group) + + +def sci(x, digits=4): + """Upward-rounded decimal string of a positive rational (for the record only).""" + x = F(x) + if x == 0: + return "0" + e = 0 + while x >= 10: + x /= 10 + e += 1 + while x < 1: + x *= 10 + e -= 1 + scale = 10 ** (digits - 1) + m = -((-x.numerator * scale) // x.denominator) # ceiling + if m >= 10 * scale: + m //= 10 + e += 1 + s = str(m) + return "%s.%se%d" % (s[0], s[1:], e) + + +# ---------------------------------------------------------------- rational bounds of constants +def exp_lower(x, n=None): + """A rational lower bound of e^x for rational x >= 0 (partial sum of the series).""" + x = F(x) + n = n or (2 * int(x) + 40) + s, t = F(0), F(1) + for j in range(n + 1): + s += t + t = t * x / (j + 1) + return s + + +def exp_neg_upper(x): + """A rational upper bound of e^{-x}, x >= 0.""" + return 1 / exp_lower(x) + + +def sqrt_upper(a, b=1): + """Rational r with r^2 >= a/b (Newton from above, exact check).""" + q = F(a, b) + r = F(int(float(q) ** 0.5 * 10 ** 6) + 1, 10 ** 6) + while r * r < q: + r += F(1, 10 ** 6) + return r + + +def sqrt_lower(a, b=1): + q = F(a, b) + r = F(int(float(q) ** 0.5 * 10 ** 6), 10 ** 6) + while r * r > q: + r -= F(1, 10 ** 6) + return r + + +SQ2_U, SQ2_L = sqrt_upper(2), sqrt_lower(2) +SQ3_U = sqrt_upper(3) +PI_L, PI_U = F(314159, 100000), F(314160, 100000) +GAMMA16_U = F(6) # Gamma(1/6) = 6 Gamma(7/6) <= 6, since Gamma <= 1 on [1, 2] +GAMMA23_U = F(3, 2) # Gamma(2/3) = (3/2) Gamma(5/3) <= 3/2 +GAMMA76_U = F(1) + + +# ---------------------------------------------------------------- V1: model jet covariance +def dfact(n): + r = 1 + while n > 1: + r *= n + n -= 2 + return r + + +def dphi0(alpha): + if any(a % 2 for a in alpha): + return F(0) + s = 1 + for a in alpha: + s *= (-1) ** (a // 2) * dfact(a - 1) + return F(s) + + +def cov(a, b): + return (-1) ** sum(b) * dphi0(tuple(x + y for x, y in zip(a, b))) + + +def jets(d): + """Jet list in the frame (u, theta_1..theta_m): pins, A, B, gamma, C (birth integrated).""" + m = d - 1 + names, idx = [], [] + + def add(nm, al): + names.append(nm) + idx.append(tuple(al)) + for i in range(d): + add("f_%d" % i, [1 if j == i else 0 for j in range(d)]) + for i in range(d): + add("f_0%d" % i, [(1 if j == 0 else 0) + (1 if j == i else 0) for j in range(d)]) + add("f_000", [3] + [0] * m) + npins = len(names) + th = list(range(1, d)) + for a in range(m): + for b in range(a, m): + al = [0] * d + al[th[a]] += 1 + al[th[b]] += 1 + add("A_%d%d" % (th[a], th[b]), al) + for a in range(m): + for b in range(a, m): + al = [0] * d + al[0] += 1 + al[th[a]] += 1 + al[th[b]] += 1 + add("B_%d%d" % (th[a], th[b]), al) + for a in range(m): + al = [0] * d + al[0] += 2 + al[th[a]] += 1 + add("g_%d" % th[a], al) + seen = set() + for c in product(th, repeat=3): + key = tuple(sorted(c)) + if key in seen: + continue + seen.add(key) + al = [0] * d + for x in key: + al[x] += 1 + add("C_" + "".join(map(str, key)), al) + M = [[cov(a, b) for b in idx] for a in idx] + return names, idx, M, npins + + +def ldl_pivots(M): + n = len(M) + A = [row[:] for row in M] + piv = [] + for k in range(n): + p = A[k][k] + piv.append(p) + if p == 0: + return piv + for i in range(k + 1, n): + f = A[i][k] / p + for j in range(k, n): + A[i][j] -= f * A[k][j] + return piv + + +def solve(M, b): + n = len(M) + A = [row[:] + [b[i]] for i, row in enumerate(M)] + for k in range(n): + p = next(i for i in range(k, n) if A[i][k] != 0) + A[k], A[p] = A[p], A[k] + for i in range(n): + if i != k and A[i][k] != 0: + f = A[i][k] / A[k][k] + A[i] = [x - f * y for x, y in zip(A[i], A[k])] + return [A[i][n] / A[i][i] for i in range(n)] + + +def inv(M): + n = len(M) + cols = [solve(M, [F(int(i == j)) for i in range(n)]) for j in range(n)] + return [[cols[j][i] for j in range(n)] for i in range(n)] + + +def proj_weights(fn, e): + """Coefficients of gamma_e, B_ee, C_eee on the independent odd free coordinates.""" + wg = [F(0)] * len(fn) + wb = [F(0)] * len(fn) + wc = [F(0)] * len(fn) + for a, nm in enumerate(fn): + if nm.startswith("g_"): + wg[a] = e[int(nm[2:]) - 1] + elif nm.startswith("B_"): + i, j = int(nm[2]) - 1, int(nm[3]) - 1 + wb[a] = e[i] * e[j] * (1 if i == j else 2) + elif nm.startswith("C_"): + ks = [int(c) - 1 for c in nm[2:]] + mult = len(set(permutations(ks))) + pr = F(1) + for k_ in ks: + pr *= e[k_] + wc[a] = pr * mult + return wg, wb, wc + + +MODEL = {} + + +def v1(): + g = "V1_covariance" + n = 0 + floor = F(1, 3) if MUT == "M1" else F(1, 4) + for d in (2, 3): + names, idx, M, npins = jets(d) + N = len(names) + need(N == (9 if d == 2 else 19) and npins == 2 * d + 1, g) + need(all(M[i][j] == M[j][i] for i in range(N) for j in range(N)), g) + order = [sum(a) for a in idx] + need(max(order[i] + order[j] for i in range(N) for j in range(N)) == 6, g) + need(max(abs(x) for row in M for x in row) == 15, g) + odd = [i for i in range(N) if order[i] % 2] + even = [i for i in range(N) if order[i] % 2 == 0] + need(all(M[i][j] == 0 for i in odd for j in even), g) # parity split + piv = ldl_pivots([[M[i][j] - (floor if i == j else 0) for j in range(N)] for i in range(N)]) + need(all(p > 0 for p in piv), g) # Sigma_inf >= I/4 + need(min(piv) == (F(3, 4) if d == 2 else F(329, 556)), g) # the least pivots stated in Lemma 1(a) + pins_o = [i for i in range(npins) if order[i] % 2] + free_o = [i for i in odd if i >= npins] + So = [[M[i][j] for j in pins_o] for i in pins_o] + Soi = inv(So) + l = pins_o.index(names.index("f_000")) + need(72 * Soi[l][l] == 12, g) # q_inf = 12 + SFP = [[M[i][j] for j in pins_o] for i in free_o] + R = [[sum(SFP[a][b] * Soi[b][c] for b in range(len(pins_o))) for c in range(len(pins_o))] + for a in range(len(free_o))] + need(all(R[a][l] == 0 for a in range(len(free_o))), g) # M_inf = 0 + SFF = [[M[i][j] for j in free_o] for i in free_o] + S = [[SFF[a][b] - sum(R[a][c] * SFP[b][c] for c in range(len(pins_o))) for b in range(len(free_o))] + for a in range(len(free_o))] + fn = [names[i] for i in free_o] + es = [(F(1),), (F(-1),)] if d == 2 else [(F(1), F(0)), (F(0), F(1)), (F(3, 5), F(4, 5)), + (F(-5, 13), F(12, 13)), (F(8, 17), F(-15, 17)), + (F(-20, 29), F(-21, 29))] + for e in es: + need(sum(x * x for x in e) == 1, g) + W = proj_weights(fn, e) + C3 = [[sum(W[x][a] * S[a][b] * W[y][b] for a in range(len(fn)) for b in range(len(fn))) + for y in range(3)] for x in range(3)] + need(C3 == [[2, 0, 0], [0, 2, 0], [0, 0, 6]], g) + # l1 and l2 norms of the projection weights (used for no bound; recorded) + n += 1 + MODEL[d] = dict(N=N, npins=npins, Ne=len(even) - (d), n_free=N - npins, + n_even_free=len([i for i in even if i >= npins]), min_pivot=str(min(piv))) + n += 1 + return n + + +# ---------------------------------------------------------------- V2: the lattice-tail image bound +def telephone(j): + t = [1, 1] + for i in range(2, j + 1): + t.append(t[i - 1] + (i - 1) * t[i - 2]) + return t[j] + + +def hermite_e(j): + """Coefficients of the probabilists' Hermite polynomial He_j (lowest degree first).""" + a, b = [1], [0, 1] + if j == 0: + return a + for i in range(1, j): + c = [0] + b + for k in range(len(a)): + c[k] -= i * a[k] + a, b = b, c + return b + + +E_BOUND = {} + + +def v2(): + g = "V2_image_bound" + n = 0 + T = [telephone(j) for j in range(7)] + if MUT == "M2": + T[6] = 75 + need(T == [1, 1, 2, 4, 10, 26, 76], g) + for j in range(7): + need(sum(abs(c) for c in hermite_e(j)) == T[j], g) # one direction: |He_j(x)| <= T_j max(1,|x|)^j + n += 1 + need(max(dfact(j - 1) for j in range(0, 7, 2)) == 15, g) # perfect matchings at x = 0 + for d in (2, 3): + for a in range(1, 201): + need((2 * a + 1) ** d - (2 * a - 1) ** d <= 2 * d * 3 ** (d - 1) * a ** (d - 1), g) + n += 1 + # ratio of successive terms of a^s e^{-L^2 a^2/2}, s <= d + 5 <= 8, L >= 10: <= 2^8 e^{-150} < 1/3 + need(3 * 2 ** 8 < exp_lower(150), g) + for d in (2, 3): + N = MODEL[d]["N"] + for L in (10, 24): + ex = exp_neg_upper(F(L * L, 2)) + E = 3 * d * 3 ** (d - 1) * (76 * d ** 3 * L ** 6 + 15) * ex + delta = 4 * N * E + E_BOUND[(d, L)] = (E, delta) + need(delta < F(1, 10 ** 8), g) + n += 1 + # monotone in L >= 10: (a L^6 + b) e^{-L^2/2} decreases when L^2 > 6 + return n + + +# ---------------------------------------------------------------- V3: homogeneity and the sandwich +SAND = {} + + +def v3(): + g = "V3_sandwich" + n = 0 + for d in (2, 3): + m = d - 1 + N = MODEL[d]["N"] + q = 2 * d + 1 if MUT != "M3" else 2 * d + 2 + nfree = N - q + # Phi_{aS}(k) = a^{e0} Phi_S(k/sqrt a): e0 = -N/2 + n/2 + 3 + (m - 1) - 1/2 + e0 = F(-N, 2) + F(nfree, 2) + 3 + (m - 1) - F(1, 2) + need(e0 == 0, g) + # k-integral: k = sqrt(a) k', k^{-8/3} dk = a^{-4/3 + 1/2} k'^{-8/3} dk' + need(F(-4, 3) + F(1, 2) == F(-5, 6), g) + # even block (P_e, A): exponent h_e = -(d + nA)/2 + nA/2 + (m - 1) - 1/2 = d/2 - 5/2 + nA = m * (m + 1) // 2 + he = F(-(d + nA), 2) + F(nA, 2) + (m - 1) - F(1, 2) + need(he == F(d, 2) - F(5, 2), g) + for L in (10, 24): + E, delta = E_BOUND[(d, L)] + # full vector: ((1+delta)/(1-delta))^{N/2} (1+delta)^{-5/6} <= 1 + (N+1) delta (sixth powers) + up = (1 + (N + 1) * delta) + need(((1 + delta) / (1 - delta)) ** (3 * N) <= up ** 6 * (1 + delta) ** 5, g) + lo = (1 - (N + 1) * delta) + need(((1 - delta) / (1 + delta)) ** (3 * N) >= lo ** 6 * (1 - delta) ** 5, g) + # weights w = p_{P_o}(0) * E[1]: ratio within 1 +- eps1, eps1 = (2N) delta + # p ratio in [(1+delta)^{-(d+1)/2}, (1-delta)^{-(d+1)/2}]; + # E ratio in [((1-delta)/(1+delta))^{Ne/2} (1-delta)^{he}, ((1+delta)/(1-delta))^{Ne/2} (1+delta)^{he}] + Ne = d + nA + two_he = 2 * he + need(two_he.denominator == 1 and Ne + two_he >= 0, g) + two_he = int(two_he) + eps1 = 2 * N * delta + # upper (squared): (1-delta)^{-(d+1)} ((1+delta)/(1-delta))^{Ne} (1+delta)^{2he} <= (1+eps1)^2 + need((1 + delta) ** (Ne + two_he) <= (1 + eps1) ** 2 * (1 - delta) ** (d + 1 + Ne), g) + # lower (squared): (1+delta)^{-(d+1)} ((1-delta)/(1+delta))^{Ne} (1-delta)^{2he} >= (1-eps1)^2 + need((1 - delta) ** (Ne + two_he) >= (1 - eps1) ** 2 * (1 + delta) ** (d + 1 + Ne), g) + SAND[(d, L)] = dict(eps1=eps1) + n += 1 + return n + + +# ---------------------------------------------------------------- polynomials in (g, beta, c) and k +# a polynomial: dict {(i, j, l, s): coeff} for g^i beta^j c^l k^s +def pmul(p, q): + r = {} + for (a, b, c, s), x in p.items(): + for (a2, b2, c2, s2), y in q.items(): + key = (a + a2, b + b2, c + c2, s + s2) + r[key] = r.get(key, 0) + x * y + return {k: v for k, v in r.items() if v != 0} + + +def padd(*ps): + r = {} + for p in ps: + for k, v in p.items(): + r[k] = r.get(k, 0) + v + return {k: v for k, v in r.items() if v != 0} + + +def pscale(p, c): + return {k: v * c for k, v in p.items()} + + +G = {(1, 0, 0, 0): F(1)} +BE = {(0, 1, 0, 0): F(1)} +CC = {(0, 0, 1, 0): F(1)} +K = {(0, 0, 0, 1): F(1)} + + +def pc(x): + return {(0, 0, 0, 0): F(x)} + + +def ppow(p, e): + r = pc(1) + for _ in range(e): + r = pmul(r, p) + return r + + +# Pi_c = (4/3) X^3, X = g^2/4 - 3 k beta +X = padd(pscale(ppow(G, 2), F(1, 4)), pscale(pmul(K, BE), -3)) +PI_C = pscale(ppow(X, 3), F(4, 3)) +# Pi_R = (1/32) gamma^6 Iquad(t, chi), t = 12 k beta/g^2, chi = 576 k^2 c/g^3 +PI_R = pscale(padd(pscale(ppow(G, 6), F(20, 3)), + pscale(pmul(K, pmul(BE, ppow(G, 4))), -240), + pscale(pmul(ppow(K, 2), pmul(CC, ppow(G, 3))), 512), + pscale(pmul(ppow(K, 2), pmul(ppow(BE, 2), ppow(G, 2))), 2496), + pscale(pmul(ppow(K, 3), pmul(BE, pmul(CC, G))), -9215 if MUT == "M11" else -9216), + pscale(pmul(ppow(K, 4), ppow(CC, 2)), F(26624, 3))), F(1, 32)) + + +class Iv: + """Closed rational interval.""" + __slots__ = ("lo", "hi") + + def __init__(self, lo, hi=None): + self.lo = F(lo) + self.hi = F(lo) if hi is None else F(hi) + + def __add__(self, o): + o = o if isinstance(o, Iv) else Iv(o) + return Iv(self.lo + o.lo, self.hi + o.hi) + + __radd__ = __add__ + + def __mul__(self, o): + o = o if isinstance(o, Iv) else Iv(o) + c = (self.lo * o.lo, self.lo * o.hi, self.hi * o.lo, self.hi * o.hi) + return Iv(min(c), max(c)) + + __rmul__ = __mul__ + + +def matchings(items): + """All partial matchings of a list of indices: yields (pairs, singles).""" + if not items: + yield [], [] + return + first, rest = items[0], items[1:] + for pairs, singles in matchings(rest): + yield pairs, [first] + singles + for i in range(len(rest)): + other = rest[:i] + rest[i + 1:] + for pairs, singles in matchings(other): + yield [(first, rest[i])] + pairs, singles + + +def gauss_moment_poly(alpha, mu, S): + """E[x^alpha] for x ~ N(k mu, S), as {power of k: value}; mu, S entries may be Iv.""" + items = [] + for v, a in enumerate(alpha): + items += [v] * a + out = {} + for pairs, singles in matchings(items): + term = Iv(1) + for (i, j) in pairs: + term = term * S[i][j] + for i in singles: + term = term * mu[i] + s = len(singles) + out[s] = out.get(s, Iv(0)) + term + return out + + +def expect(poly, mu, S): + """Coefficients a_j (by power of k) of E[poly] under N(k mu, S).""" + out = {} + for (i, j, l, s), c in poly.items(): + mom = gauss_moment_poly((i, j, l), mu, S) + for r, val in mom.items(): + out[s + r] = out.get(s + r, Iv(0)) + val * c + return out + + +S0 = [[F(2), F(0), F(0)], [F(0), F(2), F(0)], [F(0), F(0), F(6)]] +GJ = {0: F(-3, 5), 2: F(1, 2), 4: F(1, 12), 6: F(7, 72)} # G_j(q) = Gamma(1/6) GJ[j] q^{-(3j-5)/6} +A_INF = {} + + +def v4(): + g = "V4_gamma_parts" + n = 0 + # G_j from Gamma(x + 1) = x Gamma(x): Gamma(-5/6) = -(6/5)Gamma(1/6); Gamma(7/6) = Gamma(1/6)/6; + # Gamma(13/6) = (7/6)(1/6)Gamma(1/6); G_0 = (1/2)Gamma(-5/6) q^{5/6}, G_j = (1/2)Gamma((3j-5)/6) q^{-(3j-5)/6} + # Gamma(s)/Gamma(1/6) from Gamma(s + 1) = s Gamma(s), starting at s = 1/6 (and going down once to -5/6) + gam = {F(1, 6): F(1)} + s_ = F(1, 6) + for _ in range(2): + gam[s_ + 1] = s_ * gam[s_] + s_ += 1 + gam[F(-5, 6)] = gam[F(1, 6)] / F(-5, 6) + # the substitution s = q k^2 turns k^{j-8/3} e^{-q k^2} dk into (1/2) q^{-(3j-5)/6} s^{(3j-5)/6 - 1} e^{-s} ds + sj = {j: F(3 * j - 5, 6) for j in (0, 2, 4, 6)} + need(-1 < sj[0] < 0 and all(sj[j] > 0 for j in (2, 4, 6)), g) + need(all(F(j, 2) - F(4, 3) + F(1, 2) == sj[j] for j in sj), g) # k^{j - 8/3} dk with k = (s/q)^{1/2} + derived = {j: F(1, 2) * gam[sj[j]] for j in sj} + if MUT == "M4": + derived[4] = F(1, 6) + need(derived == GJ, g) + # Pi_R is (1/32) g^6 Iquad(12 k beta/g^2, 576 k^2 c/g^3): both sides are polynomials of degree <= 4, 2, 2, 6 in + # k, beta, c, g, so agreement on the grid k in {0..4}, beta, c in {0, 1, 2}, g in {1..7} (315 points) is an identity + pts = [(F(gv), F(bv), F(cv), F(kv)) for gv in range(1, 8) for bv in range(3) for cv in range(3) for kv in range(5)] + need(len(pts) == 315, g) + for gv, bv, cv, kv in pts: + t_, chi = 12 * kv * bv / gv ** 2, 576 * kv ** 2 * cv / gv ** 3 + iq = F(20, 3) - 20 * t_ + F(8, 9) * chi + F(52, 3) * t_ ** 2 - F(4, 3) * t_ * chi + F(13, 486) * chi ** 2 + val = sum(c * gv ** a * bv ** b * cv ** cc * kv ** e for (a, b, cc, e), c in PI_R.items()) + need(val == gv ** 6 * iq / 32, g) + n += 1 + # model expectations (mu = 0, S0) + mu0 = [Iv(0)] * 3 + S0i = [[Iv(x) for x in row] for row in S0] + for name, poly, expect_a in (("c", PI_C, {0: F(5, 2), 2: F(36)}), ("R", PI_R, {0: F(25), 2: F(312), 4: F(1664)})): + a = expect(poly, mu0, S0i) + av = {j: v.lo for j, v in a.items() if v.lo != 0} + need(all(v.lo == v.hi for v in a.values()), g) + if MUT == "M5" and name == "c": + av[2] = F(35) + need(av == expect_a, g) + A_INF[name] = av + n += 1 + # the coefficient of Gamma(1/6) 12^{-1/6} in sum_j a_j G_j(12): 12^{(5/6)} = 12 * 12^{-1/6}, 12^{-(3j-5)/6} = 12^{-1/6} 12^{-(j-2)/2} + def coef12(av): + s = F(0) + for j, x in av.items(): + s += x * GJ[j] * (F(12) if j == 0 else F(1, 12 ** ((j - 2) // 2))) + return s + need(coef12(A_INF["c"]) == 0, g) # (G.3): the polynomial part of c3 vanishes in the model + need(coef12(A_INF["R"]) == F(-112, 9), g) # Itilde_quad = -(112/675) Gamma(1/6) 12^{-1/6} + # c3(inf) = Pos_inf[rho_c] = (1/3)(S/25)(8/3)(15/16) J S = (J/30) S + need(F(1, 3) * F(1, 25) * F(8, 3) * F(15, 16) == F(1, 30), g) + # Itilde_quad from Gamma_inf[Pi_R] = (1/3)(S/25) sum_j a_j G_j(12) -> (1/75)(-112/9) + need(F(1, 75) * F(-112, 9) == F(-112, 675), g) + # model identity E[gamma^6 Iquad] = 800 + 9984 k^2 + 53248 k^4 + need({j: 32 * x for j, x in A_INF["R"].items()} == {0: 800, 2: 9984, 4: 53248}, g) + n += 4 + return n + + +# ---------------------------------------------------------------- V5: perturbed moments (interval Isserlis) +ALPHA = {} + + +def v5(): + g = "V5_moment_perturbation" + n = 0 + for (d, L), (E, delta) in sorted(E_BOUND.items()): + # |mu_Y| <= 12 delta sqrt(s_Y)/(sqrt 6 (1 - delta)) <= 12 delta/(1 - delta); |dS| <= delta sqrt(s_i s_j) <= 6 delta + eta = (12 if MUT == "M8" else 13) * delta + need(12 * delta / (1 - delta) <= eta and 6 * delta <= eta, g) + mu = [Iv(-eta, eta)] * 3 + S = [[Iv(S0[i][j] - eta, S0[i][j] + eta) for j in range(3)] for i in range(3)] + for name, poly in (("c", PI_C), ("R", PI_R)): + a = expect(poly, mu, S) + ainf = A_INF[name] + alpha = {} + for j, iv in a.items(): + need(j % 2 == 0 or (iv.lo <= 0 <= iv.hi), g) + c0 = ainf.get(j, F(0)) + alpha[j] = max(abs(iv.lo - c0), abs(iv.hi - c0)) + # odd powers of k vanish by the reflection symmetry (even in k); their enclosures only contain 0 + ALPHA[(d, L, name)] = {j: x for j, x in alpha.items() if j % 2 == 0} + n += 1 + return n + + +# ---------------------------------------------------------------- V6: J bounds +JB = {} + + +def v6(): + g = "V6_J_bounds" + # upper: J <= (16/15) 27 E[B_+^3] (1/2) 12^{-2/3} Gamma(2/3), E[B_+^3] = 2^{3/2} sqrt(2/pi) + need(F(5) ** 3 <= 144, g) # 12^{2/3} >= 5 + sq2pi_u = sqrt_upper(2 * 100000, 314159) # sqrt(2/pi) with pi >= 3.14159 + eb3 = 2 * SQ2_U * sq2pi_u + J_up = F(16, 15) * 27 * eb3 * F(1, 2) * F(1, 5) * GAMMA23_U + need(J_up <= 10, g) + # lower: k in [1/4, 1/2], B >= 1, gamma^2 <= 1/4: 3kB - gamma^2/4 >= 11/16 + e_m12 = 1 - F(1, 2) + F(1, 8) - F(1, 48) # e^{-1/2} >= (alternating partial sum) + s2pi = sqrt_upper(2 * 314160, 100000) # sqrt(2 pi) <= , pi <= 3.14160 + phi1 = e_m12 / s2pi # phi(1) >= + p_b = (1 - 1 / SQ2_L) * phi1 if (1 - 1 / SQ2_L) > 0 else F(0) + # careful: 1/sqrt2 <= 1/SQ2_L, so 1 - 1/sqrt 2 >= 1 - 1/SQ2_L + phi_s = (1 - F(1, 16)) / s2pi # phi(1/(2 sqrt 2)) >= e^{-1/16}/sqrt(2pi) >= (15/16)/sqrt(2pi) + p_g = 2 * (1 / (2 * SQ2_U)) * phi_s # P(|Z| <= 1/(2 sqrt 2)) >= 2 (1/(2 sqrt 2)) phi(.) + e3 = 1 / (F(27183, 10000) ** 3) # e^{-3} >= 1/2.7183^3 + k_int = F(1, 4) * F(63, 10) # int_{1/4}^{1/2} k^{-8/3} dk >= (1/4) 2^{8/3} >= (1/4)(6.3) + need(F(63, 10) ** 3 <= 2 ** 8, g) + J_low = F(16, 15) * F(11, 16) ** 3 * p_b * p_g * e3 * k_int + claim = F(1, 1000) if MUT == "M6" else F(1, 2000) + need(J_low >= claim, g) + JB.update(J_up=F(10), J_low=claim, J_low_exact=J_low) + # Corollary V2: Gamma(1/6) = 6 Gamma(7/6) >= 6 gamma(7/6, 64), with T = 64, T^{1/6} = 2, T^{7/6} = 128: + # gamma(s, T) = sum_n (-1)^n T^{s+n}/(n! (s+n)); for n >= T the terms decrease, so the tail after n0 is <= a_{n0} + s = F(7, 6) + part, a, n0 = F(0), None, 300 + fact = 1 + for n_ in range(n0 + 1): + if n_ > 0: + fact *= n_ + a = F(128 * 64 ** n_, fact) / (n_ + s) + if n_ < n0: + part += a if n_ % 2 == 0 else -a + need(n0 > 64 and part - a >= F(9277, 10000), g) # Gamma(7/6) >= 0.9277 + need(F(6608, 10000) ** 6 * 12 <= 1, g) # 12^{-1/6} >= 0.6608 + gq = F(112, 675) * 6 * F(9277, 10000) * F(6608, 10000) # (112/675) Gamma(1/6) 12^{-1/6} >= + need(gq + claim / 30 >= F(6103, 10000), g) # J/30 - Itilde >= 0.6103 - D + JB.update(gq_low=gq) + return 6 + + +# ---------------------------------------------------------------- V7: Lemma K and the crude Pos bounds +KCONST = {} + + +def polyS_reduce(p): + """p: dict {(i, j): coeff} for t^i S^j; reduce S^2 = 1 - 4t/3.""" + changed = True + while changed: + changed = False + q = {} + for (i, j), c in p.items(): + if j >= 2: + q[(i, j - 2)] = q.get((i, j - 2), 0) + c + q[(i + 1, j - 2)] = q.get((i + 1, j - 2), 0) - F(4, 3) * c + changed = True + else: + q[(i, j)] = q.get((i, j), 0) + c + p = {k: v for k, v in q.items() if v != 0} + return p + + +def tmul(p, q): + r = {} + for (a, b), x in p.items(): + for (c, d), y in q.items(): + r[(a + c, b + d)] = r.get((a + c, b + d), 0) + x * y + return {k: v for k, v in r.items() if v != 0} + + +def tadd(*ps): + r = {} + for p in ps: + for k, v in p.items(): + r[k] = r.get(k, 0) + v + return {k: v for k, v in r.items() if v != 0} + + +def v7(): + g = "V7_lemma_K" + n = 0 + # I_0 = c' delta^2 + delta^3/3, c' = 1 - t, delta = 1/2 - t + (3/2) S (#244 Corollary A.1, t <= 2/3) + cp = {(0, 0): F(1), (1, 0): F(-1)} + dl = {(0, 0): F(1, 2), (1, 0): F(-1), (0, 1): F(3, 2)} + I0 = polyS_reduce(tadd(tmul(cp, tmul(dl, dl)), {k: v / 3 for k, v in tmul(dl, tmul(dl, dl)).items()})) + target = tadd({(0, 0): F(11, 3), (1, 0): F(-21, 2), (2, 0): F(17, 2), (3, 0): F(-4, 3)}, + tmul({(0, 0): F(3, 2)}, tmul({(0, 0): F(1), (1, 0): F(-1)}, {(0, 1): F(2), (1, 1): F(-3)}))) + need(I0 == target, g) + P0 = {i: c for (i, j), c in I0.items() if j == 0} + P1 = {i: c for (i, j), c in I0.items() if j == 1} + s0 = {0: F(1), 1: F(-2, 3), 2: F(-2, 9)} + comb = dict(P0) + for i, c in P1.items(): + for i2, c2 in s0.items(): + comb[i + i2] = comb.get(i + i2, 0) + c * c2 + comb = {k: v for k, v in comb.items() if v != 0} + need(comb == {0: F(20, 3), 1: F(-20), 2: F(52, 3), 3: F(-8, 3), 4: F(-1)}, g) + need(P1 == {0: F(3), 1: F(-15, 2), 2: F(9, 2)}, g) # (3/2)(2 - 5t + 3t^2) + # sqrt(1-x) = 1 - x/2 - x^2/8 - x^3/(16 (1-xi)^{5/2}); x = 4t/3 gives 1 - (2/3)t - (2/9)t^2 + need(F(4, 3) / 2 == F(2, 3) and (F(4, 3) ** 2) / 8 == F(2, 9), g) + # |R_S| <= (64/27)|t|^3 3^{5/2}/16 on |t| <= 1/2; 3^{5/2} <= 15.59 + need(F(1559, 100) ** 2 >= 243, g) + rs = F(64, 27) * F(1559, 100) / 16 + k_small = F(8, 3) + F(1, 2) + F(3, 2) * F(21, 4) * rs # |t| <= 1/2 : coefficient of |t|^3 + need(k_small <= 22, g) + # |t| >= 1/2: delta <= 3|t| + 98^{1/3}|t| <= 7.62|t|; I_0 <= 3|t| delta^2 + delta^3/3; |Iquad(t,0)| <= 84 t^2 + need(F(462, 100) ** 3 >= 98, g) + dmax = 3 + F(462, 100) + need(dmax <= F(762, 100), g) + i0max = 3 * dmax ** 2 + dmax ** 3 / 3 + need(i0max <= 322, g) + need(F(20, 3) * 4 + 20 * 2 + F(52, 3) == 84, g) + k2 = F(322) + # Step 1: |dPhi/dR| <= 2 sqrt3 (1 + |t|^{3/2}) + (sqrt2/12)|R|, |R| <= |chi| + 8 + 12|t| + c_chi = 2 * SQ3_U + 2 * SQ2_U / 3 + c_chi2 = SQ3_U + SQ2_U / 12 + SQ2_U / 2 + c_t3 = SQ3_U + c_t2 = SQ2_U / 2 + # check the expansion |chi|[2 sqrt3 (1 + |t|^{3/2}) + (sqrt2/12)(|chi| + 8 + 12|t|)] + need(F(8, 12) == F(2, 3) and F(12, 12) == 1, g) + # Step 3: |Iquad(t,chi) - Iquad(t,0)| <= (8/9)|chi| + (2/3)(t^2 + chi^2) + (13/486) chi^2 + tot_chi = c_chi + F(8, 9) + tot_chi2 = c_chi2 + F(2, 3) + F(13, 486) + tot_t3 = c_t3 + k2 + tot_t2 = c_t2 + k2 + F(2, 3) + need(tot_chi < F(53, 10) and tot_chi2 < F(326, 100) and tot_t3 < F(32374, 100) and tot_t2 < F(32338, 100), g) + KK = max(tot_chi, tot_chi2, tot_t3, tot_t2) + claim = F(300) if MUT == "M7" else F(324) + need(KK <= claim, g) + # crude moments of t^2, |t|^3, |chi|, chi^2 (normalized as in Pos): sum <= 31 + m1 = F(576, 2400) * F(1, 2) * GAMMA16_U # 12^{-1/6} <= 1 + eb3 = 2 * (2 * SQ2_U * sqrt_upper(2 * 100000, 314159)) # E|B|^3 = 2^{3/2} * 2 sqrt(2/pi) + need(eb3 <= F(452, 100), g) + m2 = F(1728, 2400) * F(452, 100) * F(1, 2) * F(1, 5) * GAMMA23_U + ec = SQ2_U * sqrt_upper(3) * sqrt_upper(2 * 100000, 314159) # E|C| = sqrt6 sqrt(2/pi) + need(ec <= 2, g) + m3 = F(576, 2400) * 2 * F(452, 100) * F(1, 2) * GAMMA16_U + need(F(18) ** 6 <= F(12) ** 7, g) # 12^{-7/6} <= 1/18 + m4 = F(331776 * 6, 2400) * F(1, 2) * F(1, 18) * GAMMA76_U + M = m1 + m2 + m3 + m4 + need(M <= 31, g) + KCONST.update(K=claim, M=F(31), k_small=k_small, i0max=i0max) + n += 6 + return n + + +# ---------------------------------------------------------------- V8: assembly +RESULT = {} +TABLE = {(2, 10, "c"): F(588, 10 ** 11), (2, 10, "R"): F(781, 10 ** 8), (3, 10, "c"): F(197, 10 ** 9), + (3, 10, "R"): F(497, 10 ** 6), (2, 24, "c"): F(488, 10 ** 112), (2, 24, "R"): F(648, 10 ** 109), + (3, 24, "c"): F(164, 10 ** 110), (3, 24, "R"): F(413, 10 ** 107)} + + +def v8(): + g = "V8_assembly" + n = 0 + for (d, L), (E, delta) in sorted(E_BOUND.items()): + N = MODEL[d]["N"] + eps1 = SAND[(d, L)]["eps1"] + dq = 12 * delta / (1 - delta) # |q_L - 12| + out = {} + for name in ("c", "R"): + ainf = A_INF[name] + alpha = ALPHA[(d, L, name)] + # sum_j a_j g_j(q), g_0 = -(3/5) q^{5/6}, g_j = GJ[j] q^{-(3j-5)/6}; for q in [11, 13]: + # |g_j(q)| <= |GJ[j]| * 13 (j = 0), <= |GJ[j]| (j >= 2); |g_j'(q)| <= 1/2 + gmax = {j: abs(GJ[j]) * (13 if j == 0 else 1) for j in GJ} + need(dq < 1, g) + s_at_qL = sum(abs(x) * gmax[j] for j, x in ainf.items()) # crude |sum a_j g_j(q_L)| + diff = dq * sum(abs(x) for x in ainf.values()) * F(1, 2) # |sum a_j (g_j(q_L) - g_j(12))| + if name == "c": + # sum a_j g_j(q) = q^{-1/6}(18 - (3/2) q): at q_L at most (3/2) dq + s_at_qL = F(3, 2) * dq + diff = s_at_qL + pert = sum(alpha.get(j, 0) * gmax[j] for j in GJ) + gamma_err = F(1, 75) * GAMMA16_U * (eps1 * s_at_qL + diff + (1 + eps1) * pert) + if name == "c": + pos_err = (N + 1) * delta * JB["J_up"] / 30 + else: + pos_err = (N + 1) * delta * KCONST["K"] * KCONST["M"] + if MUT == "M12": + pos_err = 0 + out[name] = gamma_err + pos_err + RESULT[(d, L)] = out + for name in ("c", "R"): + ent = TABLE[(d, L, name)] + need(out[name] <= ent <= out[name] * F(101, 100), g) # the header's entries, rounded up + # c3(L) > 0: J_low/30 exceeds the transfer error + need(out["c"] < JB["J_low"] / 30, g) + if L == 24: + lim = F(1, 10 ** 110) if MUT == "M9" else F(1, 10 ** 100) + need(out["c"] <= lim and out["R"] <= lim, g) + n += 1 + return n + + +# ---------------------------------------------------------------- V9: Lemma K, Step 1 +def v9(): + g = "V9_lemmaK_step1" + n = 0 + # polynomial identities in y with c' symbolic (dicts {(power of y, power of c'): coeff}): + # d/dy[(y - c')^2 (y + 2c')] = 3 (y - c')(y + c'); d/dy[c' y^2 + y^3/3] = y (y + 2c') (c' >= 0, delta = y); + # with delta = y + 2c' (c' < 0, |c'| = -c'): d/dy[-c' delta^2 + delta^3/3] = y (y + 2c') + def pm(p, q): + r = {} + for (a, b), x in p.items(): + for (c_, d_), y_ in q.items(): + r[(a + c_, b + d_)] = r.get((a + c_, b + d_), 0) + x * y_ + return {k_: v for k_, v in r.items() if v != 0} + + def pa(*ps): + r = {} + for p_ in ps: + for k_, v in p_.items(): + r[k_] = r.get(k_, 0) + v + return {k_: v for k_, v in r.items() if v != 0} + + def dy(p_): + return {(a - 1, b): x * a for (a, b), x in p_.items() if a > 0} + Y, C1 = {(1, 0): F(1)}, {(0, 1): F(1)} + cub = pm(pm(pa(Y, {(0, 1): F(-1)}), pa(Y, {(0, 1): F(-1)})), pa(Y, {(0, 1): F(2)})) + need(dy(cub) == pm({(0, 0): F(3)}, pm(pa(Y, {(0, 1): F(-1)}), pa(Y, C1))), g) + target = pm(Y, pa(Y, {(0, 1): F(2)})) + phi_pos = pa(pm(C1, pm(Y, Y)), {(3, 0): F(1, 3)}) + need(dy(phi_pos) == target, g) + dl = pa(Y, {(0, 1): F(2)}) + phi_neg = pa(pm({(0, 1): F(-1)}, pm(dl, dl)), {k_: v / 3 for k_, v in pm(dl, pm(dl, dl)).items()}) + need(dy(phi_neg) == target, g) + n += 3 + # (psi - c')/psi <= 2 on the admissible range psi >= psi_0 = max(2c', -c') + two = F(2) if MUT != "M10" else F(3, 2) + for c_ in (F(-3), F(-1, 2), F(0), F(1, 3), F(2)): + psi0 = max(2 * c_, -c_) + for extra in (F(0), F(1, 7), F(1), F(9)): + psi = psi0 + extra + if psi == 0: + continue + need(psi - c_ <= two * psi, g) + n += 1 + # (a + b)^{3/2} <= sqrt2 (a^{3/2} + b^{3/2}) on rational squares a = x^2, b = y^2: (x^2 + y^2)^3 <= 2 (x^3 + y^3)^2 + for x in (F(0), F(1, 2), F(1), F(3, 2), F(2)): + for yv in (F(0), F(1, 3), F(1), F(4, 3)): + need((x * x + yv * yv) ** 3 <= 2 * (x ** 3 + yv ** 3) ** 2, g) + n += 1 + # I(0, 0) = Phi(1, 8) = 20/3 = I_quad(0, 0): at c' = 1, R = 8 the cubic (y - 1)^2 (y + 2) = R^2/16 reads + # (y - 2)(y + 1)^2 = 0 (a cubic identity, checked at four points); its largest root y = 2 gives c' y^2 + y^3/3 + for yv in (F(-3), F(0), F(1, 2), F(5)): + need((yv - 1) ** 2 * (yv + 2) - F(8) ** 2 / 16 == (yv - 2) * (yv + 1) ** 2, g) + need(1 * F(2) ** 2 + F(2) ** 3 / 3 == F(20, 3), g) + # the positive part of c3 vanishes at k = 0: (3*0*beta - g^2/4)_+ = 0 + for gv in (F(-3), F(-1, 2), F(0), F(5, 7)): + need(max(F(0), 0 - gv * gv / 4) == 0, g) + return n + 9 + + +def main(): + try: + counts = {} + for name, fn in (("V1", v1), ("V2", v2), ("V3", v3), ("V4", v4), ("V5", v5), ("V6", v6), ("V7", v7), + ("V8", v8), ("V9", v9)): + counts[name] = fn() + except Failed as ex: + sys.stderr.write("FAILED: %s\n" % ex.args[0]) + sys.exit(1) + rec = {"object": "CL-V24-TWO-THIRDS-TRANSFER-20261007-v1", "passed": True, "counts": counts, + "floor_min_pivot": {str(d): MODEL[d]["min_pivot"] for d in (2, 3)}, + "E_upper": {"%d,%d" % k: sci(v[0]) for k, v in sorted(E_BOUND.items())}, + "delta_upper": {"%d,%d" % k: sci(v[1]) for k, v in sorted(E_BOUND.items())}, + "J_low": str(JB["J_low"]), "J_up": str(JB["J_up"]), "K": str(KCONST["K"]), "M": str(KCONST["M"]), + "transfer_over_S": {"%d,%d" % k: {n_: sci(x) for n_, x in sorted(v.items())} + for k, v in sorted(RESULT.items())}} + sys.stdout.write(json.dumps(rec, sort_keys=True, separators=(",", ":")) + "\n") + + +if __name__ == "__main__": + main() diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/V24/author_controls_stdout.json b/frontiers/v24_dc_two_thirds_sign_20261007/V24/author_controls_stdout.json new file mode 100644 index 00000000..f044d358 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/V24/author_controls_stdout.json @@ -0,0 +1 @@ +{"E_upper":{"2,10":"2.111e-12","2,24":"1.753e-113","3,10":"3.206e-11","3,24":"2.662e-112"},"J_low":"1/2000","J_up":"10","K":"324","M":"31","counts":{"V1":10,"V2":411,"V3":4,"V4":321,"V5":8,"V6":6,"V7":6,"V8":4,"V9":51},"delta_upper":{"2,10":"7.599e-11","2,24":"6.309e-112","3,10":"2.437e-9","3,24":"2.023e-110"},"floor_min_pivot":{"2":"3/4","3":"329/556"},"object":"CL-V24-TWO-THIRDS-TRANSFER-20261007-v1","passed":true,"transfer_over_S":{"2,10":{"R":"7.804e-6","c":"5.876e-9"},"2,24":{"R":"6.479e-107","c":"4.878e-110"},"3,10":{"R":"4.969e-4","c":"1.965e-7"},"3,24":{"R":"4.125e-105","c":"1.632e-108"}}} diff --git a/frontiers/v24_dc_two_thirds_sign_20261007/replay.py b/frontiers/v24_dc_two_thirds_sign_20261007/replay.py new file mode 100644 index 00000000..06099c73 --- /dev/null +++ b/frontiers/v24_dc_two_thirds_sign_20261007/replay.py @@ -0,0 +1,397 @@ +#!/usr/bin/env python3 +"""Verify the stored records of lifetime notes V24 and DC, and replay their published author controls (standard +library only). + +Every file in this packet except replay.py, README.md and SOURCES.json is one of two things: + - an exact copy of a public comment body on main#229 (a note, claim, controls comment, read request, summons, + review, correction or author response); + - a control script or its stdout, extracted verbatim from its stored controls comment by the extraction rule that + comment states (the rule of main#229 comment 5971055189). Each stdout is a ```json fence. +SOURCES.json pins each file by byte count and SHA-256 and lists each replay. This script performs four checks. + + 1. The packet tree equals SOURCES.json's file list, with no symlinks, and every stored file has its pinned + identity. + 2. Every extracted script and stdout equals the fenced payload inside its stored source comment, under the + extraction rule (the stdout fence language follows the stored stdout's suffix: .json for ```json, .txt for ```text). + 3. Every control script runs under the current interpreter's -O/-S flags and reproduces its published stdout byte + for byte (none prints an interpreter version), with empty stderr. Every listed mutant or invalid invocation + must reproduce its exact source-bound rejection on BOTH captured streams, not merely exit 1 or 2. + 4. Negative controls must be rejected: + - a one-byte change to a stored note (DC/PROOF.md); + - a control script with one changed constant (v24_exact.py's constant 1/2000, Lemma J's lower bound for J, + replaced by 1/1000). + +Reproducibility only. The analytic notes and their reads carry the mathematics. These finite checks support +algebra, as the reads say. Nothing here reads or grades a proof. + +Usage: python3 -B -S frontiers/v24_dc_two_thirds_sign_20261007/replay.py (exit 0 iff every check passes) +Optional QS_REPLAY_EVIDENCE_DIR (outside the checkout) retains raw child streams and process records. +Each invocation gets a new directory; records describe execution, never mathematical acceptance. +Required evidence I/O fails the run; a timeout/spawn error remains the primary exception. +""" +import hashlib +import json +import os +import pathlib +import re +import shutil +import subprocess +import sys +import tempfile + +HERE = pathlib.Path(__file__).resolve().parent +OWN = {'README.md', 'SOURCES.json', 'replay.py'} + +# Exact rejection fingerprints of the extracted author controls (v24_exact.py from 6034161613, dc_exact.py from +# 6037458253), computed under both interpreter modes at incorporation and found identical. +# Each key is (script path, complete argv tail); each value is (exit, stdout SHA256, +# stderr SHA256, readable reason). References are frozen independently of this run. +# All 30 mutants and 10 invalid invocations were executed and their named reasons +# checked against their source. Exact fingerprints enforce the full contracts, +# including the empty stdout, the FAILED or usage line and its group name. +# No current failing output, generic exit code or broad regex creates a reference. +# Any source/runtime output drift fails closed and requires a reviewed amendment. +REJECTION_CONTRACTS = { + ('V24/author_controls.py', ('--mutant', 'M1')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '292eead72f233827985c80e23d391c939164fff05ddbf6a23bcbef199d74c8df', 'FAILED: V1_covariance'), + ('V24/author_controls.py', ('--mutant', 'M2')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '314e20300312da133a8b8c3c83ad335c5df5fd9ecc4dd1862636ff5d5c7974a8', 'FAILED: V2_image_bound'), + ('V24/author_controls.py', ('--mutant', 'M3')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'dcd6d035b101e48ca001cab0095571a52fe5de2fc6ee33481c8f640cd79b49d0', 'FAILED: V3_sandwich'), + ('V24/author_controls.py', ('--mutant', 'M4')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '6b100dde3d17c9a624b236901a03e1de957492eac07cbceb40f9c7b398ddffdb', 'FAILED: V4_gamma_parts'), + ('V24/author_controls.py', ('--mutant', 'M5')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '6b100dde3d17c9a624b236901a03e1de957492eac07cbceb40f9c7b398ddffdb', 'FAILED: V4_gamma_parts'), + ('V24/author_controls.py', ('--mutant', 'M6')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'ddfe08cddf797a54f45c072bb4ed4958a077e6b4ca82e38d84dba831591f2edd', 'FAILED: V6_J_bounds'), + ('V24/author_controls.py', ('--mutant', 'M7')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '14878f4a6fe742a959167a9d9ebf377792b8ddb1692249b00121a2fb412cb8bd', 'FAILED: V7_lemma_K'), + ('V24/author_controls.py', ('--mutant', 'M8')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '37fa3c448e0245d958c6f0fc13a05f65d5b52bb70c7a8a98014bd8c490d477de', 'FAILED: V5_moment_perturbation'), + ('V24/author_controls.py', ('--mutant', 'M9')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'a9797739bf8963066ebb81ee434b85b3b1c1245c9bbcf7f8ebe99740bd9d4547', 'FAILED: V8_assembly'), + ('V24/author_controls.py', ('--mutant', 'M10')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'd0501c81249cc1edd34137ed66b46d2cd99c217ae3723dc502e8767db9f6cd54', 'FAILED: V9_lemmaK_step1'), + ('V24/author_controls.py', ('--mutant', 'M11')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '6b100dde3d17c9a624b236901a03e1de957492eac07cbceb40f9c7b398ddffdb', 'FAILED: V4_gamma_parts'), + ('V24/author_controls.py', ('--mutant', 'M12')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'a9797739bf8963066ebb81ee434b85b3b1c1245c9bbcf7f8ebe99740bd9d4547', 'FAILED: V8_assembly'), + ('V24/author_controls.py', ('--bogus',)): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '2386523a35332edff8899d2aef480bf198509fad53fab0f79aae9336f3ea0d2a', 'usage: v24_exact.py [--mutant M1..M12]'), + ('V24/author_controls.py', ('--mutant', 'M13')): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '2386523a35332edff8899d2aef480bf198509fad53fab0f79aae9336f3ea0d2a', 'usage: v24_exact.py [--mutant M1..M12]'), + ('V24/author_controls.py', ('--mutant',)): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '2386523a35332edff8899d2aef480bf198509fad53fab0f79aae9336f3ea0d2a', 'usage: v24_exact.py [--mutant M1..M12]'), + ('V24/author_controls.py', ('--mutant', 'm12')): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '2386523a35332edff8899d2aef480bf198509fad53fab0f79aae9336f3ea0d2a', 'usage: v24_exact.py [--mutant M1..M12]'), + ('V24/author_controls.py', ('--mutant', 'M1', 'extra')): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '2386523a35332edff8899d2aef480bf198509fad53fab0f79aae9336f3ea0d2a', 'usage: v24_exact.py [--mutant M1..M12]'), + ('DC/author_controls.py', ('--mutant', 'M1')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'befb0784c3fbca001c1476815d9c4840b590399b2327bc0ee0ce653557ae6dc4', 'FAILED: R2_monotone'), + ('DC/author_controls.py', ('--mutant', 'M2')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '58adc08ca1292aa89d68c9aae6623fc64798521410dfca3169ae5d6ff386122d', 'FAILED: mills'), + ('DC/author_controls.py', ('--mutant', 'M3')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '8c049dcddc052d669c2676aa34dc69d899ebb4b6e0777851e2a88969ed154a3f', 'FAILED: T2'), + ('DC/author_controls.py', ('--mutant', 'M4')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'c73cf42d415022f8f5e0c2452ec58ff48b6e3e160e1546960018ea597e7960e0', 'FAILED: T1_moment'), + ('DC/author_controls.py', ('--mutant', 'M5')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'ef6bfa7bd1b88668e57d98f9e1cbd01f431c2df6b00f07cda25fef4dfb7595c2', 'FAILED: T3_moment'), + ('DC/author_controls.py', ('--mutant', 'M6')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '268e447b0c040f9b9f4376e868f17b0394e14247a13e91bc3fb77651eeab2527', 'FAILED: R2_formula'), + ('DC/author_controls.py', ('--mutant', 'M7')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '752297ef40c867a7efca954b6a6ee461065c0a10f9dfeca3dac4327ab781f732', 'FAILED: partition'), + ('DC/author_controls.py', ('--mutant', 'M8')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '661280ddfcc3b68e87eb5d881bfb664f0d37ccc73abc73f97f63e1280bb38e7a', 'FAILED: gamma'), + ('DC/author_controls.py', ('--mutant', 'M9')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '978f4fd12123ad0cce06eace29416f5f23cc114cb646a971cb4182bd21cff50a', 'FAILED: theta_table'), + ('DC/author_controls.py', ('--mutant', 'M10')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'a2229f52802e04eb0600658ad4de6dae5d698985d5db74041669fdc78f78edb1', 'FAILED: g_machinery'), + ('DC/author_controls.py', ('--mutant', 'M11')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '25c4e26925f5b726dcdb7880213dc103ef852727a5475ef2c18b8d04766e0e07', 'FAILED: lemma4'), + ('DC/author_controls.py', ('--mutant', 'M12')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '752297ef40c867a7efca954b6a6ee461065c0a10f9dfeca3dac4327ab781f732', 'FAILED: partition'), + ('DC/author_controls.py', ('--mutant', 'M13')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '6c1299e44e560dc751cb456fb1c63b350e9830e0d49204ee713167b88aea811e', 'FAILED: corners'), + ('DC/author_controls.py', ('--mutant', 'M14')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '6c1299e44e560dc751cb456fb1c63b350e9830e0d49204ee713167b88aea811e', 'FAILED: corners'), + ('DC/author_controls.py', ('--mutant', 'M15')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '25c4e26925f5b726dcdb7880213dc103ef852727a5475ef2c18b8d04766e0e07', 'FAILED: lemma4'), + ('DC/author_controls.py', ('--mutant', 'M16')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '6c1299e44e560dc751cb456fb1c63b350e9830e0d49204ee713167b88aea811e', 'FAILED: corners'), + ('DC/author_controls.py', ('--mutant', 'M17')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '6c1299e44e560dc751cb456fb1c63b350e9830e0d49204ee713167b88aea811e', 'FAILED: corners'), + ('DC/author_controls.py', ('--mutant', 'M18')): + (1, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', '25c4e26925f5b726dcdb7880213dc103ef852727a5475ef2c18b8d04766e0e07', 'FAILED: lemma4'), + ('DC/author_controls.py', ('--bogus',)): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'ab49f5b955d419d7b942781f60ed78707e526a5aa0dcbc2cc6784c858ea2c6ad', 'usage: dc_exact.py [--mutant M1..M18]'), + ('DC/author_controls.py', ('--mutant', 'M19')): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'ab49f5b955d419d7b942781f60ed78707e526a5aa0dcbc2cc6784c858ea2c6ad', 'usage: dc_exact.py [--mutant M1..M18]'), + ('DC/author_controls.py', ('--mutant',)): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'ab49f5b955d419d7b942781f60ed78707e526a5aa0dcbc2cc6784c858ea2c6ad', 'usage: dc_exact.py [--mutant M1..M18]'), + ('DC/author_controls.py', ('--mutant', 'm18')): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'ab49f5b955d419d7b942781f60ed78707e526a5aa0dcbc2cc6784c858ea2c6ad', 'usage: dc_exact.py [--mutant M1..M18]'), + ('DC/author_controls.py', ('--mutant', 'M1', 'extra')): + (2, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'ab49f5b955d419d7b942781f60ed78707e526a5aa0dcbc2cc6784c858ea2c6ad', 'usage: dc_exact.py [--mutant M1..M18]'), +} + +# Replacing v24_exact.py's constant 1/2000 (Lemma J's lower bound for J) by 1/1000 with MUT=None must fail +# specifically at V6, on stderr alone. +NEGATIVE_CONSTANT = (1, hashlib.sha256(b'').hexdigest(), + hashlib.sha256(b'FAILED: V6_J_bounds\n').hexdigest(), 'V6_J_bounds') + + +def check_rejection(result, expected): + """Compare both full captured streams, not a permissive failure-message pattern.""" + code, out, err = result + failures = [] + if type(code) is not int or code != expected[0]: + failures.append('wrong exit code') + if type(out) is not bytes or hashlib.sha256(out).hexdigest() != expected[1]: + failures.append('stdout differs from intended diagnostic') + if type(err) is not bytes or hashlib.sha256(err).hexdigest() != expected[2]: + failures.append('stderr differs from intended diagnostic') + return failures + + +def rejection_inventory_failures(manifest): + listed = {} + for obj in manifest['objects']: + for replay in obj['replays']: + for kind, code in (('mutants', 1), ('invalid', 2)): + for args in replay[kind]: + key = replay['script'], tuple(args) + if key in listed: + return ['duplicate rejection invocation: ' + repr(key)] + listed[key] = code + if set(listed) != set(REJECTION_CONTRACTS): + return ['rejection invocation inventory differs from frozen contracts'] + if any(REJECTION_CONTRACTS[key][0] != code for key, code in listed.items()): + return ['rejection invocation category differs from frozen contracts'] + return [] + + +def report_control(script, args, result, reason): + code, out, err = result + print(json.dumps(dict(script=script, args=list(args), returncode=code, + stdout_sha256=hashlib.sha256(out).hexdigest(), + stderr_sha256=hashlib.sha256(err).hexdigest(), + expected_reason=reason), sort_keys=True)) + + +def identity(data): + return len(data), hashlib.sha256(data).hexdigest() + + +def interpreter_flags(): + flags = ['-B'] + if sys.flags.optimize: + flags.append('-O') + if sys.flags.no_site: + flags.append('-S') + return flags + + +def tree_failures(root, manifest): + failures = [] + listed = {} + for obj in manifest['objects']: + for f in obj['stored']: + listed[f['path']] = (f['bytes'], f['sha256']) + present = set() + for path in sorted(root.rglob('*')): + rel = path.relative_to(root).as_posix() + if path.is_symlink(): + failures.append('symlink: ' + rel) + elif path.is_file(): + present.add(rel) + for rel in sorted(present ^ (set(listed) | OWN)): + failures.append(('unlisted file: ' if rel in present else 'missing file: ') + rel) + for rel, ident in sorted(listed.items()): + if rel in present and identity((root / rel).read_bytes()) != ident: + failures.append('identity mismatch: ' + rel) + return failures + + +def extraction_failures(root, manifest): + """Re-extract every script and stdout from its stored source comment and compare with the stored payloads.""" + failures = [] + for obj in manifest['objects']: + extracted = [f for f in obj['stored'] if 'extracted_from' in f] + for script in [f for f in extracted if f['path'].endswith('.py')]: + stdout = [f for f in extracted if f['extracted_from'] == script['extracted_from'] + and f['heading'] == script['heading'] and not f['path'].endswith('.py')] + if len(stdout) != 1: + failures.append('%s: no single stdout record for %s' % (obj['tag'], script['path'])) + continue + stdout = stdout[0] + fence = {'json': 'json', 'txt': 'text'}.get(stdout['path'].rsplit('.', 1)[-1]) + if fence is None: + failures.append('%s: unsupported stdout suffix for %s' % (obj['tag'], stdout['path'])) + continue + body = (root / script['extracted_from']).read_text(encoding='utf-8') + if body.count(script['heading']) < 1: + failures.append('%s: heading %r not found in %s' % (obj['tag'], script['heading'], script['extracted_from'])) + continue + section = body[body.index(script['heading']):] + m1 = re.search(r'```python\n(.*?)\n```\n', section, re.S) + m2 = re.search(r'```%s\n(.*?)\n```\n' % fence, section[m1.end():], re.S) if m1 else None + if not (m1 and m2): + failures.append('%s: fences not found after %r' % (obj['tag'], script['heading'])) + continue + if (m1.group(1) + '\n').encode('utf-8') != (root / script['path']).read_bytes(): + failures.append('%s: %s differs from the payload in %s' % (obj['tag'], script['path'], script['extracted_from'])) + if (m2.group(1) + '\n').encode('utf-8') != (root / stdout['path']).read_bytes(): + failures.append('%s: %s differs from the payload in %s' % (obj['tag'], stdout['path'], stdout['extracted_from'])) + return failures + + +PROCESS_TIMEOUT_SECONDS = 1800 # Unchanged production budget; tests shorten it for real timeout children. + + +def evidence_directory(script): + """An explicit destination opts in; never put generated evidence in source directories.""" + raw = os.environ.get('QS_REPLAY_EVIDENCE_DIR') + if raw is None: + return None + if not raw: + raise ValueError('QS_REPLAY_EVIDENCE_DIR must not be empty') + root = pathlib.Path(raw).expanduser().resolve() + if root.is_relative_to(HERE.resolve().parents[1]) or root.is_relative_to(script.parent.resolve()): + raise ValueError('QS replay evidence must be outside the checkout and child source directory') + root.mkdir(parents=True, exist_ok=True) + return pathlib.Path(tempfile.mkdtemp(prefix='invocation-', dir=root)) + + +def save_process_evidence(folder, record, out, err): + """Attempt every write independently. None is unavailable, not an observed empty stream.""" + record['streams'] = {} + record['evidence_errors'] = [] + for name, data in (('stdout', out), ('stderr', err)): + entry = dict(available=data is not None, bytes=len(data) if data is not None else None, + sha256=hashlib.sha256(data).hexdigest() if data is not None else None, saved=False) + record['streams'][name] = entry + try: + (folder / (name + '.bin')).write_bytes(data if data is not None else b'') + entry['saved'] = True + except Exception as exc: + record['evidence_errors'].append('%s.bin: %s: %s' % (name, type(exc).__name__, exc)) + try: + data = (json.dumps(record, sort_keys=True, indent=2, allow_nan=False) + '\n').encode('utf-8') + (folder / 'process.json').write_bytes(data) + except Exception as exc: + record['evidence_errors'].append('process.json: %s: %s' % (type(exc).__name__, exc)) + + +def run(script, *args): + command = [sys.executable, *interpreter_flags(), str(script), *args] + folder = evidence_directory(script) # Invalid/unwritable setup stops before starting a child. + record = dict(schema=1, command=command, cwd=str(script.parent), + timeout_seconds=PROCESS_TIMEOUT_SECONDS, scientific_effect='NONE') + try: + proc = subprocess.run(command, capture_output=True, timeout=PROCESS_TIMEOUT_SECONDS, + cwd=str(script.parent)) + except (subprocess.TimeoutExpired, OSError) as exc: + if folder is not None: + record.update(status='timeout' if isinstance(exc, subprocess.TimeoutExpired) else 'spawn_error', + returncode=None, exception=dict(type=type(exc).__name__, message=str(exc))) + exc.evidence_record = record + try: + save_process_evidence(folder, record, getattr(exc, 'stdout', None), getattr(exc, 'stderr', None)) + if record['evidence_errors']: + exc.add_note('QS replay evidence errors: ' + '; '.join(record['evidence_errors'])) + except Exception as secondary: + exc.add_note('QS replay evidence recording failed: %s: %s' % (type(secondary).__name__, secondary)) + raise # Never replace the primary timeout or launch error with a recording error. + if folder is not None: + record.update(status='completed', returncode=proc.returncode, exception=None) + save_process_evidence(folder, record, proc.stdout, proc.stderr) + if record['evidence_errors']: + exc = RuntimeError('QS replay evidence errors: ' + '; '.join(record['evidence_errors'])) + exc.evidence_record = record + raise exc # Even exit 0 is not success when explicitly required evidence is missing. + return proc.returncode, proc.stdout, proc.stderr + + +def replay_failures(root, manifest): + failures = rejection_inventory_failures(manifest) + if failures: + return failures # Do not execute an incomplete/changed control inventory. + for obj in manifest['objects']: + for replay in obj['replays']: + label = '%s %s' % (obj['tag'], replay['name']) + script = root / replay['script'] + code, out, err = run(script, *replay['args']) + baseline_failures = [] + if code != 0: + baseline_failures.append('%s: exit code %s' % (label, code)) + if out != (root / replay['stdout']).read_bytes(): + baseline_failures.append('%s: stdout differs from the published bytes' % label) + if err: + baseline_failures.append('%s: unexpected baseline stderr' % label) + if baseline_failures: + failures.extend(baseline_failures) + continue + report_control(replay['script'], replay['args'], (code, out, err), 'exact published baseline') + for kind in ('mutants', 'invalid'): + for args in replay[kind]: + expected = REJECTION_CONTRACTS[replay['script'], tuple(args)] + result = run(script, *args) + mismatches = check_rejection(result, expected) + failures.extend('%s %r: %s' % (label, args, why) for why in mismatches) + if not mismatches: + report_control(replay['script'], args, result, expected[3]) + return failures + + +def negative_control_failures(root, manifest): + failures = [] + with tempfile.TemporaryDirectory() as tmp: + copy = pathlib.Path(tmp) / 'packet' + shutil.copytree(root, copy, symlinks=True) + target = copy / 'DC' / 'PROOF.md' + data = bytearray(target.read_bytes()) + data[100] ^= 0x01 + target.write_bytes(bytes(data)) + if 'identity mismatch: DC/PROOF.md' not in tree_failures(copy, manifest): + failures.append('negative control: a one-byte change to DC/PROOF.md was not detected') + script = copy / 'V24' / 'author_controls.py' + text = script.read_text(encoding='utf-8') + old = 'claim = F(1, 1000) if MUT == "M6" else F(1, 2000)' + if text.count(old) != 1: + failures.append('negative control: the Lemma J constant line was not found exactly once') + else: + script.write_text(text.replace(old, 'claim = F(1, 1000) if MUT == "M6" else F(1, 1000)'), encoding='utf-8') + result = run(script) + mismatches = check_rejection(result, NEGATIVE_CONSTANT) + failures.extend('negative control: changed Lemma J constant: ' + why for why in mismatches) + if not mismatches: + report_control('V24/author_controls.py', [], result, 'changed 1/2000 to 1/1000: V6_J_bounds') + return failures + + +def main(): + manifest = json.loads((HERE / 'SOURCES.json').read_text(encoding='utf-8')) + failures = tree_failures(HERE, manifest) + if not failures: + failures = extraction_failures(HERE, manifest) + if not failures: + failures = replay_failures(HERE, manifest) + if not failures: + failures = negative_control_failures(HERE, manifest) + n_scripts = sum(len(o['replays']) for o in manifest['objects']) + n_mut = sum(len(r['mutants']) for o in manifest['objects'] for r in o['replays']) + n_inv = sum(len(r['invalid']) for o in manifest['objects'] for r in o['replays']) + n_files = sum(len(o['stored']) for o in manifest['objects']) + mode = ' '.join(interpreter_flags()) + if failures: + for f in failures: + print('FAIL ' + f) + print('Lifetime notes V24 and DC incorporation replay (%s): %d failure(s)' % (mode, len(failures))) + return 1 + print('Lifetime notes V24 and DC incorporation replay (%s): %d stored identities, %d extractions, %d checker stdouts, ' + '%d mutants, %d invalid invocations and 2 negative controls PASS' % (mode, n_files, 2 * n_scripts, n_scripts, n_mut, n_inv)) + return 0 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/tests/test_lifetime_v24_dc_sign_replay_evidence.py b/tests/test_lifetime_v24_dc_sign_replay_evidence.py new file mode 100644 index 00000000..0edd0ee1 --- /dev/null +++ b/tests/test_lifetime_v24_dc_sign_replay_evidence.py @@ -0,0 +1,215 @@ +"""Optional raw-process evidence; synthetic children are not mathematical evidence.""" +import hashlib +import importlib.util +import json +import os +from pathlib import Path +import subprocess +import sys +import tempfile +import unittest +from unittest.mock import patch + +ROOT = Path(__file__).resolve().parents[1] +PACKET = ROOT / 'frontiers/v24_dc_two_thirds_sign_20261007' +ENV = 'QS_REPLAY_EVIDENCE_DIR' + + +class RawEvidenceTests(unittest.TestCase): + def setUp(self): + spec = importlib.util.spec_from_file_location('qs_raw_subject', PACKET / 'replay.py') + self.m = importlib.util.module_from_spec(spec) + spec.loader.exec_module(self.m) + self.tmp = tempfile.TemporaryDirectory() + self.addCleanup(self.tmp.cleanup) + self.root = Path(self.tmp.name) + scripts = self.root / 'scripts' + scripts.mkdir() + self.script = scripts / 'fixture.py' + self.evidence = self.root / 'evidence' + self.env = patch.dict(os.environ, {ENV: str(self.evidence)}) + self.env.start() + self.addCleanup(self.env.stop) + + def child(self, text): + self.script.write_text(text, encoding='utf-8') + return self.script + + def record(self): + records = list(self.evidence.glob('invocation-*/process.json')) + self.assertEqual(len(records), 1, 'one independently retained child process record required') + return records[0].parent, json.loads(records[0].read_bytes()) + + def verify_stream(self, folder, rec, name, value): + stream = rec['streams'][name] + self.assertEqual(stream['available'], value is not None) + self.assertEqual(stream['bytes'], len(value) if value is not None else None) + self.assertEqual(stream['sha256'], hashlib.sha256(value).hexdigest() if value is not None else None) + self.assertTrue(stream['saved']) + self.assertEqual((folder / (name + '.bin')).read_bytes(), value if value is not None else b'') + + def test_no_capture_preserves_original_three_value_result(self): + os.environ.pop(ENV) + s = self.child("import os,sys\nos.write(1,b'\\xffok');os.write(2,b'\\x00err');sys.exit(7)\n") + self.assertEqual(self.m.run(s), (7, b'\xffok', b'\x00err')) + self.assertFalse(self.evidence.exists()) + + def test_real_crash_retains_full_binary_streams_and_invocation(self): + s = self.child("import os\nos.write(1,b'\\x00\\xffpartial')\nraise RuntimeError('synthetic crash')\n") + result = self.m.run(s, '--diagnostic') + self.assertEqual(result[0], 1) + self.assertIn(b'RuntimeError: synthetic crash', result[2]) + folder, rec = self.record() + self.assertEqual(rec['command'], [sys.executable, *self.m.interpreter_flags(), str(s), '--diagnostic']) + self.assertEqual(rec['cwd'], str(s.parent)) + self.assertEqual(rec['timeout_seconds'], 1800) + self.assertEqual(rec['status'], 'completed') + self.assertEqual(rec['returncode'], 1) + self.assertNotIn('passed', rec) + self.assertEqual(rec['evidence_errors'], []) + self.verify_stream(folder, rec, 'stdout', result[1]) + self.verify_stream(folder, rec, 'stderr', result[2]) + + def test_success_and_intended_failure_outputs_are_not_reinterpreted(self): + s = self.child("import os,sys\nos.write(1,b'answer\\n');os.write(2,b'diagnostic\\n');sys.exit(int(sys.argv[1]))\n") + for code in (0, 1, 2): + with self.subTest(code=code): + result = self.m.run(s, str(code)) + self.assertEqual(result, (code, b'answer\n', b'diagnostic\n')) + records = [json.loads(p.read_bytes()) for p in self.evidence.glob('invocation-*/process.json')] + self.assertEqual(sorted(r['returncode'] for r in records), [0, 1, 2]) + self.assertTrue(all('passed' not in r for r in records)) + + def test_repeated_invocations_never_overwrite(self): + s = self.child("print('first')\n") + self.m.run(s) + before = {p: p.read_bytes() for p in self.evidence.glob('invocation-*/*')} + self.assertEqual(len(before), 3) + self.m.run(s) + self.assertEqual(len(list(self.evidence.glob('invocation-*'))), 2) + for p, data in before.items(): + self.assertEqual(p.read_bytes(), data) + + def test_real_timeout_keeps_partial_bytes_and_timeout_exception(self): + self.assertTrue(hasattr(self.m, 'PROCESS_TIMEOUT_SECONDS'), 'explicit unchanged production timeout required') + s = self.child("import os,time\nos.write(1,b'\\xffout');os.write(2,b'\\x00err');time.sleep(10)\n") + with patch.object(self.m, 'PROCESS_TIMEOUT_SECONDS', 0.5): + with self.assertRaises(subprocess.TimeoutExpired) as caught: + self.m.run(s) + folder, rec = self.record() + self.assertEqual(rec['status'], 'timeout') + self.assertIsNone(rec['returncode']) + self.assertEqual(rec['timeout_seconds'], 0.5) + self.assertEqual(caught.exception.output, b'\xffout') + self.assertEqual(caught.exception.stderr, b'\x00err') + self.verify_stream(folder, rec, 'stdout', caught.exception.output) + self.verify_stream(folder, rec, 'stderr', caught.exception.stderr) + self.assertEqual(caught.exception.evidence_record, rec) + + def test_unavailable_empty_and_binary_timeout_capture_are_distinct(self): + for out in (None, b'', b'\xff\x00'): + for err in (None, b'', b'\x80err'): + with self.subTest(out=out, err=err), tempfile.TemporaryDirectory() as td: + target = Path(td) / 'records' + exc = subprocess.TimeoutExpired(['synthetic'], 1800, output=out, stderr=err) + with patch.dict(os.environ, {ENV: str(target)}), patch.object(self.m.subprocess, 'run', side_effect=exc): + with self.assertRaises(subprocess.TimeoutExpired) as caught: + self.m.run(self.script) + self.assertIs(caught.exception, exc) + paths = list(target.glob('invocation-*/process.json')) + self.assertEqual(len(paths), 1) + rec = json.loads(paths[0].read_bytes()) + self.verify_stream(paths[0].parent, rec, 'stdout', out) + self.verify_stream(paths[0].parent, rec, 'stderr', err) + self.assertIsNone(rec['returncode']) + + def test_real_spawn_error_retains_unknown_output_and_original_error(self): + s = self.child("print('must not execute')\n") + missing = str(self.root / 'missing-interpreter') + with patch.object(self.m.sys, 'executable', missing): + with self.assertRaises(FileNotFoundError) as caught: + self.m.run(s) + folder, rec = self.record() + self.assertEqual(rec['status'], 'spawn_error') + self.assertIsNone(rec['returncode']) + self.assertEqual(rec['exception']['type'], 'FileNotFoundError') + self.verify_stream(folder, rec, 'stdout', None) + self.verify_stream(folder, rec, 'stderr', None) + self.assertEqual(caught.exception.evidence_record, rec) + + def test_each_write_failure_still_attempts_other_evidence(self): + original = Path.write_bytes + for failed in ('stdout.bin', 'stderr.bin', 'process.json'): + with self.subTest(failed=failed), tempfile.TemporaryDirectory() as td: + target = Path(td) / 'records' + attempted = [] + def write(path, data): + attempted.append(path.name) + if path.name == failed: + raise OSError('synthetic write refusal') + return original(path, data) + exc = subprocess.TimeoutExpired(['synthetic'], 1800, output=b'out', stderr=b'err') + with patch.dict(os.environ, {ENV: str(target)}), patch.object(self.m.subprocess, 'run', side_effect=exc), patch.object(Path, 'write_bytes', write): + with self.assertRaises(subprocess.TimeoutExpired) as caught: + self.m.run(self.script) + self.assertIs(caught.exception, exc) + self.assertEqual(attempted, ['stdout.bin', 'stderr.bin', 'process.json']) + rec = caught.exception.evidence_record + self.assertEqual(len(rec['evidence_errors']), 1) + self.assertIn(failed, rec['evidence_errors'][0]) + self.assertTrue(any('evidence' in note for note in caught.exception.__notes__)) + folder = next(target.glob('invocation-*')) + for name in {'stdout.bin', 'stderr.bin', 'process.json'} - {failed}: + self.assertTrue((folder / name).is_file()) + + def test_all_write_failures_do_not_replace_primary_timeout(self): + exc = subprocess.TimeoutExpired(['synthetic'], 1800, output=b'out', stderr=b'err') + with patch.object(self.m.subprocess, 'run', side_effect=exc), patch.object(Path, 'write_bytes', side_effect=OSError('synthetic full disk')): + with self.assertRaises(subprocess.TimeoutExpired) as caught: + self.m.run(self.script) + self.assertIs(caught.exception, exc) + self.assertTrue(hasattr(exc, 'evidence_record'), 'retain failure metadata in memory') + self.assertEqual(len(exc.evidence_record['evidence_errors']), 3) + self.assertIsNone(exc.evidence_record['returncode']) + + def test_completed_child_with_failed_evidence_cannot_report_success(self): + self.child("print('actual completed child')\n") + with patch.object(Path, 'write_bytes', side_effect=OSError('synthetic full disk')): + with self.assertRaises(RuntimeError) as caught: + self.m.run(self.script) + self.assertEqual(caught.exception.evidence_record['returncode'], 0) + self.assertEqual(len(caught.exception.evidence_record['evidence_errors']), 3) + + def test_invalid_destination_stops_before_child(self): + for target in (PACKET / 'forbidden-evidence', self.script.parent / 'forbidden-evidence'): + with self.subTest(target=target), patch.dict(os.environ, {ENV: str(target)}), patch.object(self.m.subprocess, 'run') as child: + with self.assertRaises(ValueError): + self.m.run(self.script) + child.assert_not_called() + self.assertFalse(target.exists()) + self.evidence.write_text('not a directory') + with patch.object(self.m.subprocess, 'run') as child: + with self.assertRaises(OSError): + self.m.run(self.script) + child.assert_not_called() + + def test_failed_custody_creates_no_child_evidence(self): + with patch.object(self.m, 'tree_failures', return_value=['synthetic custody refusal']), patch.object(self.m.subprocess, 'run') as child: + self.assertEqual(self.m.main(), 1) + child.assert_not_called() + self.assertFalse(self.evidence.exists()) + + def test_workflow_wires_tests_and_capture_outside_source_tree(self): + text = (ROOT / '.github/workflows/lifetime-v24-dc-sign.yml').read_text() + self.assertIn("'tests/test_lifetime_v24_dc_sign_replay_evidence.py'", text) + self.assertIn('-p test_lifetime_v24_dc_sign_replay_evidence.py', text) + self.assertIn('QS_REPLAY_EVIDENCE_DIR="$out/children" python', text) + self.assertIn('cp tests/test_lifetime_v24_dc_sign_replay_evidence.py "$out/"', text) + self.assertIn('set -euo pipefail', text) + self.assertIn('git diff --exit-code', text) + self.assertIn('contents: read', text) + self.assertIn("python-version: '3.11.16'", text) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_lifetime_v24_dc_sign_replay_protocol.py b/tests/test_lifetime_v24_dc_sign_replay_protocol.py new file mode 100644 index 00000000..c32c6211 --- /dev/null +++ b/tests/test_lifetime_v24_dc_sign_replay_protocol.py @@ -0,0 +1,230 @@ +"""Real subprocess controls for QS replay; fixtures are not mathematical evidence.""" +import copy +import hashlib +import importlib.util +import json +from pathlib import Path +import sys +import tempfile +import unittest +from unittest import mock + +ROOT = Path(__file__).resolve().parents[1] +WRAPPER = ROOT / 'frontiers/v24_dc_two_thirds_sign_20261007/replay.py' + + +class ReplayProtocolTests(unittest.TestCase): + def setUp(self): + spec = importlib.util.spec_from_file_location('qs_replay_subject', WRAPPER) + self.m = importlib.util.module_from_spec(spec) + spec.loader.exec_module(self.m) + + @staticmethod + def baseline(): + return dict(object='A3 d>=3 hard-fibre reduction (author-side exact controls)', + counts={'Z1': 2400, 'Z2': 3600, 'Z3': 4800, 'Z4': 1200}, + mutant=None, all_pass=True, failures=[], scientific_effect='NONE') + + def invoke(self, scenario='valid'): + baseline = self.baseline() + mutant = copy.deepcopy(baseline) + mutant.update(mutant='Z2', all_pass=False, failures=["('Z2-gain', 17)"]) + invalid = {'error': 'unknown arguments'} + sha = lambda data: hashlib.sha256(data).hexdigest() + # These synthetic expectations test the real runner/matcher, not the real + # checkers' reference values. The immutable production table is checked below. + expected_mutant = (json.dumps(mutant, sort_keys=True) + '\n').encode() + expected_invalid = (json.dumps(invalid) + '\n').encode() + contracts = { + ('A3/author_controls.py', ('--mutant', 'Z2')): + (1, sha(expected_mutant), sha(b''), 'Z2-gain'), + ('A3/author_controls.py', ('--bogus',)): + (2, sha(expected_invalid), sha(b''), 'unknown arguments'), + } + base_out = (json.dumps(baseline, sort_keys=True) + '\n').encode() + mut_code, inv_code = 1, 2 + base_err = mut_err = inv_err = b'' + if scenario == 'crash': + mut_code = 1; mut_err = b'Traceback: synthetic unrelated RuntimeError\n' + mut_out = b'' + else: + if scenario == 'wrong_reason': mutant['failures'] = ["('Z4', 17)"] + elif scenario == 'extra_reason': mutant['failures'].append("('setup', 3)") + elif scenario == 'wrong_mutant': mutant['mutant'] = 'Z3' + elif scenario == 'wrong_object': mutant['object'] = 'unrelated' + elif scenario == 'wrong_effect': mutant['scientific_effect'] = 'ACCEPT' + elif scenario == 'all_pass': mutant['all_pass'] = True + elif scenario == 'integer_bool': mutant['all_pass'] = 0 + elif scenario == 'empty_failures': mutant['failures'] = [] + elif scenario == 'failures_string': mutant['failures'] = "('Z2-gain', 17)" + elif scenario == 'wrong_counts': mutant['counts']['Z1'] = True + elif scenario == 'missing_counts': del mutant['counts']['Z2'] + elif scenario == 'extra_field': mutant['unexpected'] = 'x' + elif scenario == 'bad_tuple': mutant['failures'] = ['not a failure tuple'] + elif scenario == 'tuple_prefix_only': mutant['failures'] = ["('Z2-gain-forged', 17)"] + mut_out = (json.dumps(mutant, sort_keys=True) + '\n').encode() + if scenario == 'garbage': mut_out = b'unrelated error\n' + elif scenario == 'trailing': mut_out += b'garbage\n' + elif scenario == 'duplicate': mut_out = mut_out.replace(b'"all_pass": false', b'"all_pass": false, "all_pass": false') + elif scenario == 'nonfinite': mut_out = mut_out.replace(b'"Z1": 2400', b'"Z1": NaN') + elif scenario == 'overflow': mut_out = mut_out.replace(b'"Z1": 2400', b'"Z1": 1e999') + elif scenario == 'wrong_exit': mut_code = 2 + elif scenario == 'mutant_stderr': mut_err = b'synthetic unexpected stderr\n' + inv_out = (json.dumps(invalid) + '\n').encode() + if scenario == 'invalid_crash': inv_out = b''; inv_err = b'Traceback: synthetic error\n' + elif scenario == 'invalid_wrong_reason': inv_out = b'{"error":"unrelated"}\n' + elif scenario == 'invalid_extra_field': inv_out = b'{"error":"unknown arguments","extra":1}\n' + elif scenario == 'invalid_wrong_exit': inv_code = 1 + elif scenario == 'invalid_stderr': inv_err = b'unexpected stderr\n' + if scenario == 'baseline_stderr': base_err = b'unexpected stderr\n' + actual_base = base_out if scenario != 'baseline_mismatch' else b'wrong\n' + with tempfile.TemporaryDirectory() as tmp: + root = Path(tmp); (root/'A3').mkdir() + script = root/'A3/author_controls.py' + # Every invocation launches this real isolated child; no subprocess mock. + script.write_text('import sys\na=sys.argv[1:]\n' + f'if not a: out,err,code={actual_base!r},{base_err!r},0\n' + f'elif a==["--mutant","Z2"]: out,err,code={mut_out!r},{mut_err!r},{mut_code}\n' + f'else: out,err,code={inv_out!r},{inv_err!r},{inv_code}\n' + 'sys.stdout.buffer.write(out)\nsys.stderr.buffer.write(err)\nsys.exit(code)\n') + (root/'A3/author_controls_stdout.json').write_bytes(base_out) + manifest = {'objects': [{'tag': 'A3', 'replays': [{ + 'name': 'a3d_exact.py', 'script': 'A3/author_controls.py', + 'stdout': 'A3/author_controls_stdout.json', 'args': [], + 'mutants': [['--mutant','Z2']], 'invalid': [['--bogus']]}]}]} + with mock.patch.object(self.m, 'REJECTION_CONTRACTS', contracts, create=True): + return self.m.replay_failures(root, manifest) + + def test_valid_protocol(self): + self.assertEqual(self.invoke(), []) + + def test_baseline_output_contract(self): + for scenario in ('baseline_mismatch', 'baseline_stderr'): + with self.subTest(scenario=scenario): self.assertTrue(self.invoke(scenario)) + + def test_crash_is_not_intended_rejection(self): + self.assertTrue(self.invoke('crash')) + + def test_intended_reason_and_identity(self): + for scenario in ('wrong_reason','extra_reason','wrong_mutant','wrong_object','wrong_effect', + 'empty_failures','failures_string','bad_tuple','tuple_prefix_only'): + with self.subTest(scenario=scenario): self.assertTrue(self.invoke(scenario)) + + def test_json_shape_and_types(self): + for scenario in ('all_pass','integer_bool','wrong_counts','missing_counts','extra_field', + 'garbage','trailing','duplicate','nonfinite','overflow'): + with self.subTest(scenario=scenario): self.assertTrue(self.invoke(scenario)) + + def test_mutant_exit_and_stderr(self): + for scenario in ('wrong_exit','mutant_stderr'): + with self.subTest(scenario=scenario): self.assertTrue(self.invoke(scenario)) + + def test_invalid_argument_contract(self): + for scenario in ('invalid_crash','invalid_wrong_reason','invalid_extra_field', + 'invalid_wrong_exit','invalid_stderr'): + with self.subTest(scenario=scenario): self.assertTrue(self.invoke(scenario)) + + def test_changed_constant_crash_is_rejected(self): + with tempfile.TemporaryDirectory() as tmp: + root = Path(tmp); (root/'DC').mkdir(); (root/'V24').mkdir() + proof = b'x'*150 + (root/'DC/PROOF.md').write_bytes(proof) + script = ('from fractions import Fraction as F\nMUT=None\n' + 'claim = F(1, 1000) if MUT == "M6" else F(1, 2000)\n' + 'if claim==F(1, 1000): raise RuntimeError("synthetic crash")\n' + 'print("ok")\n') + (root/'V24/author_controls.py').write_text(script) + (root/'V24/author_controls_stdout.json').write_bytes(b'ok\n') + manifest = {'objects': [{'tag':'DC','replays':[], 'stored':[ + {'path':'DC/PROOF.md','bytes':len(proof),'sha256':hashlib.sha256(proof).hexdigest()}]}]} + self.assertTrue(self.m.negative_control_failures(root, manifest)) + + +class ReferenceContractTests(unittest.TestCase): + def setUp(self): + spec = importlib.util.spec_from_file_location('qs_reference_subject', WRAPPER) + self.m = importlib.util.module_from_spec(spec) + spec.loader.exec_module(self.m) + + def matcher(self): + self.assertTrue(hasattr(self.m, 'check_rejection'), 'missing exact diagnostic matcher') + return self.m.check_rejection + + def test_fixed_table_covers_every_manifest_invocation(self): + self.assertTrue(hasattr(self.m, 'REJECTION_CONTRACTS'), 'missing frozen reference table') + manifest = json.loads(WRAPPER.with_name('SOURCES.json').read_text()) + listed = {} + for obj in manifest['objects']: + for replay in obj['replays']: + for category, code in (('mutants', 1), ('invalid', 2)): + for args in replay[category]: + key = replay['script'], tuple(args) + self.assertNotIn(key, listed) + listed[key] = code + self.assertEqual(len(listed), 40) # V24 12, DC 18 mutants + 2 x 5 invalid + self.assertEqual(set(self.m.REJECTION_CONTRACTS), set(listed)) + for key, value in self.m.REJECTION_CONTRACTS.items(): + self.assertEqual(len(value), 4) + self.assertEqual(value[0], listed[key]) + for digest in value[1:3]: self.assertRegex(digest, r'^[0-9a-f]{64}$') + self.assertIsInstance(value[3], str) + self.assertTrue(value[3]) + + def test_exact_matcher_preserves_five_diagnostic_families(self): + check = self.matcher() + # Representative valid shapes. Full exact values come from unchanged sources, + # not a permissive JSON/regex schema or the current child's reported result. + shapes = [ + (1, b'{"all_pass":false,"mutant":"Z2","failures":["Z2-gain"]}\n', b''), + (1, b'', b'{"failed":"K1 BD(a) violated"}\n'), + (1, b'{"passed":false}\n', b'FAILED:\nO2: pin Hessians\n'), + (1, b'{"passed":false}\n', b'FAILED:\nF2_FW1: ratio 2\n'), + (1, b'', b'FAILED: X9_hardgap\nmutant M5: hard-gap integral\n'), + (2, b'{"error": "unknown arguments"}\n', b''), + (2, b'', b'usage: a33_k5o.py PATH/a33_exact.py [--mutant W1|W2]\n'), + ] + for code, out, err in shapes: + expected = (code, hashlib.sha256(out).hexdigest(), hashlib.sha256(err).hexdigest(), 'synthetic intended reason') + with self.subTest(code=code, out=out, err=err): + self.assertEqual(check((code, out, err), expected), []) + for bad in ((0, out, err), (code, out+b'x', err), (code, out, err+b'x'), + (code, err, out), (code, b'', b'Traceback: unrelated error')): + if bad == (code,out,err): continue + self.assertTrue(check(bad, expected)) + + def test_table_cannot_omit_or_duplicate_manifest_controls(self): + self.assertTrue(hasattr(self.m, 'REJECTION_CONTRACTS'), 'missing inventory guard') + manifest = json.loads(WRAPPER.with_name('SOURCES.json').read_text()) + obj = manifest['objects'][0] + for variant in ('missing', 'duplicate', 'unlisted'): + bad = copy.deepcopy(manifest) + args = bad['objects'][0]['replays'][0]['mutants'] + if variant == 'missing': args.pop() + elif variant == 'duplicate': args.append(args[0]) + else: args.append(['--mutant', 'unlisted']) + with self.subTest(variant=variant), mock.patch.object(self.m, 'run', side_effect=AssertionError('child before inventory')): + self.assertTrue(self.m.replay_failures(WRAPPER.parent, bad)) + + def test_invalid_custody_never_executes_a_child(self): + with tempfile.TemporaryDirectory() as tmp: + root = Path(tmp) + (root/'SOURCES.json').write_text('{"objects":[]}') + with mock.patch.object(self.m, 'HERE', root), \ + mock.patch.object(self.m, 'replay_failures', side_effect=AssertionError('execution before custody')), \ + mock.patch.object(self.m, 'negative_control_failures', side_effect=AssertionError('control before custody')): + self.assertEqual(self.m.main(), 1) + + def test_workflow_runs_regressions_and_retains_failed_evidence(self): + text = (ROOT/'.github/workflows/lifetime-v24-dc-sign.yml').read_text() + self.assertIn("'tests/test_lifetime_v24_dc_sign_replay_protocol.py'", text) + self.assertIn('-m unittest discover -s tests -p test_lifetime_v24_dc_sign_replay_protocol.py -v', text) + self.assertIn('set -euo pipefail', text) + self.assertIn('if: always()', text) + self.assertIn('if-no-files-found: error', text) + self.assertIn('git diff --exit-code', text) + self.assertIn('git status --porcelain', text) + self.assertNotIn('continue-on-error', text) + + +if __name__ == '__main__': + unittest.main()