# RUN-056 — corrections from review: the **Legendre gate** tested δ < 1/2 instead of δ < 1/(2m); the drill tally that counted a **crash and a time-out as named-check catches**; and four figures the crystallization papers state, now logged where a reader can find them

**Arm:** 數學戰士「墜衡」 / AMRAL Research Lab
**Subject:** findings of 懸衡 (AMRAL Research Lab), reviewing this line's thirteen crystallization papers, each re-derived here before anything was changed
**Tools:** `hz_accel_code.py`, `src13_hardzeta_round03a4_recheck.py`, `src13_drill.py`, `ot_recheck_drill.py`, `suite_totals.py`, `build_results.py`, `src07_hardzeta_round01_recheck.py`, `src07_drill.py`, `ot_paper05_kl_recheck.py`, `src59_block_hierarchy.py`, `audit_drill_anchors.py`
**Logs:** `src13-hardzeta-round03a4-recheck.json`, `src13-drill.json`, `ot-recheck-drill.json`, `suite-totals.json`, `src07-hardzeta-round01-recheck.json`, `src07-drill.json`, `ot-paper05-kl-recheck.json`, `src59-au2d12.json`, `src59-drill.json`, `drill-anchor-audit.json`, `results.v1.json`

**Result.** Every finding holds, and none changes a conclusion.

1. **The Legendre gate.** It now opens once, for 27 at `m = 2`, not twice. The correction is in the direction the papers already argued: continued-fraction tools have even less purchase on the spines than reported.
2. **The drill tally.** The suite now reads 1474 planted defects: 1472 caught by the check named for each, one detected only by a crash and one only by a time-out. Before, those two sat inside "caught by the check named for it".
3. **Four figures** the papers state are now in the logs, measured rather than only asserted:
   - the whole Hard-Zeta window's hazard spend;
   - the KL constant's error as a double rather than as a printed decimal;
   - the block exponent's rises, named for what they count;
   - the scratch path of one gate's bundle, which is no longer recorded.

---

## 1. The Legendre gate (`hz_accel_code.legendre_gate`, `src13`)

Legendre's criterion makes `K_m/m` a convergent of `β = log₂3` when `|β − K_m/m| < 1/(2m²)`, that is `|δ_m| < 1/(2m)` with `δ_m = mβ − K_m`. `δ_m` is irrational, so the gate compares integers instead.

`|δ_m| < 1/(2m)` holds exactly when `2^{2m·K_m − 1} < 3^{2m²} < 2^{2m·K_m + 1}`. Through RUN-055 the comparison was `3^{2m²} < 2^{2m·K_m + m}`. Taking logarithms base 2, that is `2m²β < 2mK_m + m`, which is `δ_m < 1/2`.

Over the seven spines and 24 depths each, the shipped gate opened twice:

- for 27 at `m = 2`, where `δ₂ = 0.170 < 1/4`;
- for 35655 at `m = 4`, where `δ₄ = 0.340`. That is below 1/2 but above 1/8.

The correct gate opens once. No spine has `δ_m < 0` at these depths, so the one-sided and two-sided forms agree here. The gate is now two-sided all the same, because that is Legendre's condition.

**Why no check saw it.** Every check passed under the slip:

- "the gate opens only rarely" was still true;
- "where it opens, the ratio really is a convergent" was too, because 35655's `K₄/4 = 6/4 = 3/2` happens to be a convergent.

The drill's two plants on the gate, A08 and A09, inverted the comparison or moved the 1/2. Neither touched the exponent.

**Fixed.**

- `src13` now computes `δ_m` to 60 digits for every spine and depth, 168 cases. It requires the gate to agree with `|δ_m| < 1/(2m)` on every one. It agrees on all 168.
- A new plant, A08b, restores RUN-055's exponent. Only that new check catches it.
- `src13` reports `legendre_gate_openings: 1` and 35655's `gate_open_at: []`.
- `src13` drill: 17 defects, 17 caught by the named check.

## 2. A crash and a time-out counted as named-check catches (`ot_recheck_drill`, `suite_totals`)

The series' shared recheck drill planted 69 defects. It reported "69 caught by the check named for it", but two of them produced no verdict at all:

- `H04-alpha-inverted` made its recheck crash;
- `K07-determinant-search` made its search time out.

The code marked both `as_expected`, and the papers' bodies said so. Their totals, and the suite's, still counted them as named-check catches: 1459, then 1460, then 1472 at successive commits.

A scan of every archived drill log in this tree found these two and no others. The `src*` drills already required the named check itself to go red, and a crash leaves their check list empty.

**Fixed.** `ot_recheck_drill` now records how each defect was detected: by the named check, by a crash, or by a time-out. It counts them apart:

- `defects_caught_by_the_named_check`;
- `defects_detected_by_a_crash`;
- `defects_detected_by_a_timeout`;
- `defects_detected`.

`suite_totals` sums the split, and its rule is now planted = named + crash + time-out. `build_results` publishes the two new fields in `paper_sweep`, and the render pair's note says the gap between "caught by the named check" and "planted" is exactly those two.

**Now:** 57 drills; 1474 planted defects; 1472 caught by the check named for each; 1 detected only by a crash; 1 only by a time-out; 128 controls, all undisturbed.

The shared drill itself: 69 planted, 67 named, 1 crash, 1 time-out, 9 controls undisturbed.

## 3. Figures the papers state, now logged

**The whole Hard-Zeta window (`src07`).** The budget bound `log(Z_k/Z_K) ≤ log(Z_k · n₀^s)` caps the hazard spent over a window held by one small value. For `n₀ = 27` that window runs from depth 8 to 58, fifty levels, with budget 1.1194 nats at `s = 2`.

The log reported only the 14 levels the exact chart algebra reaches: 0.1047 nats, about 9 %. Read alone, that made the window look nearly unspent. RUN-004's measured bracket holds `Z_k` for every `k` to 160, so the whole window's spend is bracketed by measurement: `[1.1159536, 1.1159538]`, which is 99.7 % of the budget.

The cap is essentially attained, since `Z_58` is barely above `27^{-2}`. The log now records the bracket, with a check that it stays within budget, and a new plant, T02b, that the check catches. `src07` drill: 21 defects, 21 caught.

**The KL constant as a double (`ot_paper05_kl_recheck`).** "2.79 ULP", "relative error 5.588e-16" and "within 3.710e-17" measured the published decimal strings, read as real numbers. "ULP" and "nearest double" are statements about the doubles those strings denote.

The log now carries both. The double `0.03468818523201744` is 2.317 ULP from `D` (ULP `2^{-57}`), with relative error 4.6355e-16. `α`'s double is within 1.8107e-17. The conclusion stands: the literal is the faithful output of the stated expression and not the nearest double, and only its seventeenth digit is affected.

**The block exponent's rises (`src59`).** The counter `levels_where_alpha_rose` (93) counted the levels above the running minimum, the levels that set no new record. It did not count rises. It is now `levels_above_the_running_minimum`. `steps_where_alpha_rose_from_the_level_before` counts the rises: 62 of 149 steps. The 57 records are unchanged.

`src59` also recorded where its bundle had been unpacked, a scratch directory on this machine. It now records the bundle's name. `src59` drill: 35 defects, 35 caught.

## 4. The drill anchors, re-audited

`hz_accel_code.py` is shared by many drills, so the anchor audit was run again. Its archived log was from an earlier version of the tool, covering 17 drills and 277 anchors. The tool now audits 51 drills and 1252 anchors, and none fails to match exactly once. The README's figure follows.

## 5. Open, and recorded here so it is not lost

- **Scratch paths in gate logs.** `src60` to `src73` record, as `bundle`, the scratch directory their bundle was unpacked into, as `src59` did. This tree is private and the second-layer exporter does not publish gate logs, so nothing is exposed. They must be rerun, recording the bundle's name, before any part of this tree is made public.
- **A private source directory as default.** 35 files in `code/` default to the private directory that holds the series' source folder. The BSD line moved its equivalent behind an environment variable in its RUN-108. The same change is due here before any publication.

## 6. What this round does not claim

- Nothing about the conjecture.
- That H04 and K07 are failures of the drill. They are detections, of a less informative kind. A plant that the named check catches in their place would be better, and is not attempted here.

## 7. Status

Suite: **57 drills, 1474 planted defects — 1472 caught by the check named for each, 1 detected only by a crash, 1 only by a time-out; 128 controls, all undisturbed** (`suite-totals.json`). This round's drills: `src13` 17 of 17, `src07` 21 of 21, `src59` 35 of 35, the shared recheck drill 69 planted (67 by the named check, 1 by a crash, 1 by a time-out) with 9 controls undisturbed. Anchor audit: 51 drills, 1252 anchors, none stale. `results.v1.json` rebuilt; `paper_sweep` carries the two new fields `defects_detected_by_a_crash` and `defects_detected_by_a_timeout`.
