# patch1434.py -- builds the audit revision of paper/variance-note.md (job #1434) from return #15's rejected revision # (variance-note.v15.md, sha256 bd933156...), applying report 36's required corrections and local repairs and this audit's # additions; every replacement is anchored on unique text and count-asserted. Output: variance-note.md (the revision). import io, hashlib src = io.open('variance-note.v15.md', encoding='utf-8', newline='').read() assert hashlib.sha256(src.encode('utf-8')).hexdigest().startswith('bd933156'), 'base is not return #15\'s file' t = src log = [] def rep(old, new, n=1): global t c = t.count(old); assert c == n, (c, old[:80]); t = t.replace(old, new); log.append(old[:60]) # 0. header: the audit dates rep("restructured 2026-08-28 around the model limit theorem; audited 2026-09-10.", "restructured 2026-08-28 around the model limit theorem; audited 2026-09-10\nand 2026-09-19.") # 1 (report 36, item 1). Abstract: the absence claim scoped to the inspected sources rep("""statement about $y$-smooth divisors of $C(C^2-4)$, searched in its owning convention on 2026-08-28 and 29: the machinery is in print and the statement is not, every located theorem sitting below our divisor range (§10). Section 11 records that the earlier fitted reading""", """statement about $y$-smooth divisors of $C(C^2-4)$, searched in its owning convention on 2026-08-28 and 29 without a matching theorem among the results inspected, the one candidate chapter still unread at the page (§10). Section 11 records that the earlier fitted reading""") # 2 (report 36, local repair). Abstract: the Chebyshev consequence at computed levels rep("""Two consequences: certified Chebyshev bounds showing that all but a vanishing fraction of windows of "zone length" $L = p_{n+1}^2$ contain a twin candidate, and the measurement of""", """Two consequences: certified Chebyshev bounds, at each computed level, on the fraction of windows of "zone length" $L = p_{n+1}^2$ with no twin candidate (below $1.3\\times10^{-3}$ at $p_n = 97$), and the measurement of""") # 3 (report 36, local repair). Section 1: Schemmel's totient is evaluated at P/2 rep("""The count $|A|$ is classical (Schemmel's totient of 1869 evaluated at the primorial; OEIS A059861).""", """The count $|A|$ is classical (Schemmel's totient of 1869, which counts the $k \\le m$ with $k$ and $k+1$ both coprime to $m$, evaluated at $m = P/2$: the map $k \\mapsto 2k$ carries those pairs to ours, and at $m = P$ the totient is $0$; OEIS A059861).""") # 4 (report 36, local repair). Section 2: the strict inequality needs p >= 5 rep("""$W$ at an odd prime is $p/(p-2) > 1$ when $p \\mid d$, $p(p-3)/(p-2)^2 > 1$ when $d \\equiv \\pm 2$, and $p(p-4)/(p-2)^2 = 1 - 4/(p-2)^2 < 1$ generically.""", """$W$ at an odd prime is $p/(p-2) > 1$ when $p \\mid d$, $p(p-3)/(p-2)^2 > 1$ when $d \\equiv \\pm 2$ and $p \\ge 5$ (at $p = 3$ that factor is $0$), and $p(p-4)/(p-2)^2 = 1 - 4/(p-2)^2 < 1$ generically for $p \\ge 5$.""") # 5 (report 36, local repair). Theorem 2's false parenthetical rep("""claim. (Since $L \\le P$, distinct $d$ are distinct residues.) $\\square$""", """claim; the sum runs over the integer differences $d$ with their multiplicities $L - |d|$, so no identification of $d$ with a residue is needed (for $L = P$ the values $d$ and $d - P$ coincide modulo $P$ and are still counted separately, as they should be). $\\square$""") # 6 (report 36, local repair). Section 4: the vanishing fraction is an inference from measured boundedness rep("""Since $\\mathbb{E}[N] \\sim c\\,p_n^2/\\ln^2 p_n \\to \\infty$ while $\\operatorname{Var}/\\mathbb{E}$ stays bounded (§6), the bound decays like $\\ln^2 p_n / p_n^2$: **for every computed level, all but a certified vanishing fraction of zone-length windows contain a twin candidate.** This""", """Since $\\mathbb{E}[N] \\sim c\\,p_n^2/\\ln^2 p_n \\to \\infty$, the bound decays like $\\ln^2 p_n / p_n^2$ as long as $\\operatorname{Var}/\\mathbb{E}$ stays bounded, which is measured at the computed levels (§6) and not proven: **at every computed level, all but the certified fraction in the last column of zone-length windows contain a twin candidate**, and the vanishing of that fraction with the level is an inference from the measured boundedness of $\\operatorname{Var}/\\mathbb{E}$, not a theorem. This""") # 7 (report 36, item 4). Section 9: the two moments belong to different laws rep("""Two identities fall out and are used below: $\\mathbb{E}[n] = \\prod_{p\\le y}p/\\alpha_p = 1/\\delta$, and its dual $\\mathbb{E}[1/n] = \\prod_{p\\le y}\\alpha_p/p = \\delta$, the latter checked to $2.4\\times10^{-15}$ at all nine levels.""", """Two identities fall out and are used below, one under each law: under the pre-bias law $\\Theta$, which includes $p$ with probability $m_p$, $\\mathbb{E}_\\Theta[n] = \\prod_{p\\le y}p/\\alpha_p = 1/\\delta$; under the size-biased law, which includes $p$ with probability $\\pi_p$, $\\mathbb{E}_{\\rm sb}[1/n] = \\prod_{p\\le y}\\alpha_p/p = \\delta$, checked to $2.4\\times10^{-15}$ at all nine levels. The two laws are related by $\\Pr_{\\rm sb}(n) = \\delta\\, n\\,\\Pr_\\Theta(n)$, and the first moment must be read under $\\Theta$: under the size-biased law $\\mathbb{E}[n]$ is $648$ at $x = 7$, not $1/\\delta = 91/3$ (exact rational enumeration of the $16$ states).""") # 8 (report 36, item 5). Section 10: the flattened kernel carries the small-prime factors rep("""**What the error is, exactly.** In real space the replacement flattens $W$ to $V(h) = C_y\\prod_{p \\mid h,\\ 7\\le p\\le y}\\frac{p-1}{p-3}$ with $C_y = \\prod_{7\\le p\\le y}\\big(1 - \\frac{2}{(p-1)(p-2)}\\big)$, so""", """**What the error is, exactly.** In real space the replacement flattens $W$ to $V(h) = \\prod_{p \\le y}\\big(1 + m_p\\,c_p(h)\\big)$ with $c_p(h) = p - 1$ if $p \\mid h$ and $-1$ otherwise (the Ramanujan sum), that is $$V(h) = 6\\cdot\\mathbf 1[6 \\mid h]\\Big(\\tfrac58 + \\tfrac{15}{8}\\mathbf 1[5 \\mid h]\\Big)\\, C_y\\prod_{p \\mid h,\\ 7\\le p\\le y}\\frac{p-1}{p-3}, \\qquad C_y = \\prod_{7\\le p\\le y}\\Big(1 - \\frac{2}{(p-1)(p-2)}\\Big);$$ the factors at $2$, $3$ and $5$ are part of the kernel (an earlier version of this display kept only the product over $p \\ge 7$; at $x = 7$ the all-prime form returns $\\delta X_{\\rm dec} = 0.178192918$, the table's value, and the truncated one $0.001459$), so""") # 9 (report 36, item 3). Section 10: keep the group-sum evidence finite rep("""unconditionally. The measured group sum is $2X_2 = -0.5603, 0.5304, 0.2694, 0.2314, 0.1846$ at $x = 7$ to $19$, $O(1)$ and falling, so the bound is loose by a factor $511$ to $1148$ at $x = 13, 17, 19$.""", """unconditionally. The measured group sum is $2X_2 = -0.5603, 0.5304, 0.2694, 0.2314, 0.1846$ at $x = 7$ to $19$: the signed values are not monotone, their magnitudes fall from $0.5603$ to $0.1846$ over the five sampled levels, the proved bound is $O(\\ln y)$ and no $O(1)$ bound is inferred from five values; the bound is loose by a factor $511$ to $1148$ at $x = 13, 17, 19$.""") rep("""$\\delta X_{\\rm mix}$ reads $-0.034971$ to $-0.016835$ over those levels, $2.3$ to $6.9$ times smaller than the column first carried,""", """$\\delta X_{\\rm mix}$ reads $-0.034971, -0.046368, -0.025439, -0.020542, -0.016835$ over those levels, $2.3$ to $6.9$ times smaller than the column first carried,""") # 10 (report 36, items 1 and 2). Section 10: the scoped negative and the set-count sentence rep("""machinery is in print and the statement is not. Every located theorem is a set count at a divisor range strictly below the sampling range, and our divisors satisfy $n > 2L$, above it; the one asymptotic with a friability restriction over polynomial values, Scourfield 2008, read second-hand through her 2016 restatement with the chapter itself unread at the page, carries relative error $O(1/\\log x)$ where this step needs $o(1/\\ln y)$, one epsilon short. So the reduction is not claimed as new, and the estimate is not in print at the precision needed; the same one-logarithm gap is usually the whole difficulty in divisor problems of this shape.""", """no theorem among the results inspected gives the weighted, above-range estimate needed. The located set counts (Tenenbaum's $H_F$, Ford's $H(x,y,z)$) sit at divisor ranges strictly below the sampling range, while our divisors satisfy $n > 2L$, above it. Scourfield's 2008 result is a divisor sum, every divisor $m \\le x$ of $f(n)$ counted with weight $1$ over $n \\le x$, not a set count; read second-hand through her 2016 restatement, with the chapter itself unread at the page and a degree hypothesis unresolved between the two statements, it carries relative error $O(1/\\log x)$ where this step needs $o(1/\\ln y)$, one epsilon short. So the reduction is not claimed as new, and no absence is asserted while the chapter is unread; the same one-logarithm gap is usually the whole difficulty in divisor problems of this shape.""") # 11 (report 36, item 6). Section 10: the falsifier of Conjecture 1 rep("""**What would falsify Conjecture 1**, and whether the check has run: a level at which $\\delta(X - X_{\\rm dec})\\ln y$ grows would kill it, and eight exact levels show it bounded and falling; a proof that the replacement shifts the limit would kill it, and none exists either way.""", """**What would falsify Conjecture 1**, and whether the check has run: the conjecture asserts $\\delta(X - X_{\\rm dec}) \\to 0$, so it is killed by the unscaled error staying away from $0$ along an unbounded sequence of levels, or by a proof that the replacement shifts the limit; growth of the scaled quantity $\\delta(X - X_{\\rm dec})\\ln y$ at a level would not kill it (an error of size $1/\\sqrt{\\ln y}$ grows when scaled and still vanishes), and eight exact levels show the scaled quantity bounded and falling, which excludes nothing about the limit; neither killer exists either way.""") io.open('variance-note.md', 'w', encoding='utf-8', newline='').write(t) print('edits applied:', len(log)); print('sha256', hashlib.sha256(t.encode('utf-8')).hexdigest(), 'bytes', len(t.encode('utf-8')))