# Review 2: "Trimming two lists of possible prime positions tightens the bounds on five- and six-prime spans"

**Recommendation: minor revisions.** I reran the computations from scratch, and every number in both tables reproduces, including under my own independent enumeration. The finite claim is correct. What remains is framing: the paper should say plainly what new bounds on H₄ and H₅ it implies, what earlier bounds they beat, and which unchecked inputs they rest on.

## What the paper claims

Kapila's pair-penalty criterion accepts a set of K shifts at span D if its number of long pairs (pairs more than D apart) is below an allowance F(K). The trial dimension k stays fixed. The paper minimizes D over every subset of four pools: the published five-prime set (from the November release), Giraudin's six-prime set, and extensions of each. It uses two quotient lower bounds: Kapila's printed q and a sharper q from the November release. Each minimum is certified two ways. An endpoint-exchange lemma reduces arbitrary subsets to windows of consecutive entries, and an exhaustive scan shows that every window fails at D − 2. With the sharper q, the minima are 82,188,372 for five primes and 4,816,799,794 for six (4,816,799,806 within Giraudin's set alone).

## What I checked

The earlier review could not run code. I could. All scratch work was in `$TMPDIR`, using the study's cached downloads; I changed no study files.

1. **Allowances rebuilt from scratch.** `radial.py` (interval arithmetic, 160 bits) regenerated all four allowance arrays. Every budget and marginal cost matches the stored arrays exactly: 2,246 / 3,254 eligible sizes for five primes and 92,246 / 109,718 for six. `budget_audit.py`, the separate 8-node quadrature with a bounded interpolation error, also reproduced `budget_audit.json` exactly. So the two evaluations of J agree on every integer allowance, and using the full-precision source constants moves any allowance by at most one pair.

2. **J is the integral the paper states.** I wrote my own 2-D Gauss–Legendre quadrature of the integral over the triangle (Kapila 8.4), in (t, z) coordinates on graded panels. I compared it with the dilogarithm closed form in `radial.py` at K₀, at the smallest eligible K and at k. The ratios J(K)/J(K₀) agree to about 4×10⁻¹⁶ (absolute values to 10⁻¹³). Only the ratio enters the allowance, so the coded J matches the paper's formula.

3. **The size transport matches Kapila v2.** I read §10 of the cached PDF. Eq. (10.2) gives β⁻ = (μ⁻/r)(1 − ∏_{j<r}(k−d−j)/(k−j)) = (μ⁻/r)(1 − C(K,r)/C(k,r)), so rescaling β₀ by that factor is right. In Proposition 10.2 the only K-dependent factor in the pair term is J_K(Kη), because ζ and M⁺ are source quantities. The prime term is λ(K/k)q with q fixed at the source. The paper's C(K) = C₀·J(K)/J(K₀) follows. Calibration supports this. At K₀ the pipeline reproduces the release's 82,190,538 (sharper q) and 82,205,490 (printed q), and Giraudin's 4,817,211,684 (printed q). That leaves the K-dependence as the only new analytic ingredient, and it checks out.

4. **Full pipeline replay.** I ran all 16 search configurations, `exhaust.py`, `degrees.py` and `paper_tables.py`. Every output is byte-identical to the committed results: the frontier JSONs, `exhaustion.json`, the feasible-size CSVs, `degrees.json` and both table files.

5. **Independent window enumeration.** I wrote my own C++ scan (`my_exhaust.cpp`). It works on the whole pool, not just its two ends. For each start L it uses B(L,R) = Σ_{t∈[L,R]} max(0, c[t] − L), where c[t] counts the pool entries more than D below entry t. It checks every window of every eligible size. Results:

   | Pool, quotient | D attained: best slack, passing windows, sizes | D − 2: best slack |
   |---|---|---|
   | 5-prime extended, sharper | +33, 132, K 5,088,171–5,088,183 | −569 |
   | 5-prime published, sharper | +33, 132, same sizes | −569 |
   | 5-prime extended, printed | +528, 6,806 | −133 |
   | 6-prime extended, sharper | +1,668, 40,760, K 232,430,792–232,430,907 | −3,736 |
   | 6-prime published, sharper | +2,599, 12,938 | −3,972 |
   | 6-prime extended, printed | +11,881, 198,894 | −1,767 |
   | 6-prime published, printed | +8,264, 28,339 | −1,890 |

   Window counts also match: 74,316,479 and 41,658,662,843. Every value equals `exhaustion.json`. The only thing my scan shares with the authors' code is the allowance array, which item 1 verifies.

6. **Table 2 witnesses and admissibility.** I recounted the long pairs of the four Table 2 windows directly with a sorted search. All match: 4,273,248; 4,064,292; 3,328,755,015; 3,315,666,464. `check.cpp`, recompiled, confirms a missing residue class in each extended pool for every prime through k: 354,325 primes for five primes; for six, 12,107,833 explicit primes above 10⁷, with class 0 missing below that. It also reconfirms the witness counts.

7. **The text's arithmetic is right.** The differences 2,166; 112,274; 112,262; 12; 31,464 are correct. The six-prime optimum within Giraudin's set keeps the first shift and drops the last 34,108 (i = 0, j = 34,108). The endpoint degrees match `degrees.json`: 81,724 / 81,723 against a threshold of 81,727. Both pools are narrower than 2D and single-parity, so the exchange lemma and the D − 2 step apply. I also checked the lemma's proof. Moving the endpoint nearer the skipped entry moves it at most D, creates no new long pairs, and strictly shrinks the gaps, so the process ends at a window.

8. **The sharper quotient.** The sharper q values are the lower ends of the "Q lower endpoint" balls in the release's `qcert` logs (15.238803151527547 and 19.048129314875749), minus the support loss bounds from Kapila's certificate files. The paper's rounded values are at or below these. The study did not recompute the quotients. Its scout notes say so plainly: "We did not recompute the source quotients." The paper does not say this.

**Bottom line:** the finite optimization is correct. Under the stated allowances, no subset of any of the four pools passes at a smaller span.

## What should change

**1. State the implied bounds, what they beat, and what they rest on, early and in one place. This is the most important fix.** The title says the paper "tightens the bounds", but the text never writes the bounds. One short paragraph near the start should say:

- Under Kapila's criterion with the sharper released quotients, these windows give H₄ ≤ 82,188,372 and H₅ ≤ 4,816,799,794.
- The best previously reported spans are 82,190,538 (November release) and 4,817,211,684 (Giraudin, printed q). The paper currently gives the second but never says that 82,190,538 is the release's own published span.
- With only Kapila's printed quotient, the conditional bounds are H₄ ≤ 82,205,490 (no gain) and H₅ ≤ 4,817,180,220.
- All of these rest on three inputs. The first is Kapila's preprint, which has not been peer reviewed. The second is the third-party quotient enclosures, which this study took from the release's logs without rechecking. The third is the residue classes chosen here for the extensions.

The closing Methods paragraph gestures at this ("relies on Kapila's analytic criterion and the cited bounds on its inputs"), but a reader meets it last, and it never names the quotient source as unchecked. This is the one place where a reader could over-read the paper. The earlier review raised the same point, and the edit addressed it only in part.

**2. Credit the six-prime improvement correctly in the opening.** Against Giraudin's 4,817,211,684, swapping in the sharper q alone gains 299,604. Trimming then gains 112,274, and extending the pool another 12. Table 1 and the paragraph after it show this, but the title, the first two paragraphs and `so_what` put trimming first. One sentence in the opening paragraph would fix this. With the printed q alone, trimming gains 31,464 for six primes and nothing for five, and that sentence could say so too.

**3. Tighten the scope of "extensions".** The extensions add 200,000 integers on each side for five primes and 4,000,000 for six. The paper says "extending the pool gives no further gain", and `so_what` says "looking beyond the original ends bought nothing more". Both are true only for these widths. Neither five-prime winning window reaches into the extension, so a wider extension is unlikely to help, but that was not tested. Say "a modest extension (200,000 and 4,000,000 integers on each side)" where the claim first appears.

**4. `record.json` details.**
- The finding "attainable at exactly 13 and 116 distinct retained sizes" holds for the extended pools. Within Giraudin's set the six-prime count is 147. Name the pool.
- In `so_what`, "tightened the bounds almost as far as possible" can be read as a statement about primes. Write "almost as far as these lists allow."
- Add that the gains are tiny, about 2 to 3 parts in 100,000 of the span, so a lay reader does not picture a large advance.
- `importance` level 2 fits the evidence. The method gives an exact stopping rule for one sieve and two constructions; it does not change what anyone believes about prime gaps.

## Smaller points

- The intro says "Kapila's certificates ... give calculations at selected list sizes." Kapila's attachment already varies the deleted dimension on a coarse grid (the study's scout notes say so). Saying so makes clear that the new step is the exact optimum over sizes and endpoints together, not the idea of varying size.
- The marginal-cost stopping rule in "Finding and checking the minimum" is only a search heuristic. The exhaustive scan does not depend on it. One sentence saying so would spare readers checking the monotonicity argument for no reason.

## Overall

The question is clear and the answer is exact and correct within its stated setting. I reproduced every reported number from the study's code. I also reproduced the minima and the D − 2 exclusions with an enumeration I wrote independently, and checked J against the stated integral by separate quadrature. The required changes are wording only: name the implied bounds and their dependencies, give the quotient its share of the six-prime gain, and scope the extension claim. No new computation is needed.
