# Audit: the local alternation test, and the certificate at the top of the ladder *2026-09-13. Change proposal for `research/a3-09-histogram-operator.md`, second revision from this session. It carries both this session's sections, so applying it loses nothing if return #251's revision is accepted first. Rung: **verified** for the gates and the two reproductions, **measured** for the exact/loose verdict table, **conjectured** for nothing on this page.* ## What changes One section, appended before the footer, +50 lines. Nothing else in the file is touched. ## Two claims **1. The local test (verified at six folds).** The certificate `M = max G_{L+1}(i)` over qualifying-interior windows is exact at a fold exactly when its argmax window is realizable, and realizability is one comparison available in the same pass that computes `M`: the interior partial-sum residues mod q must lie in a 2-set `{a-2, a}` — no two consecutive *nonzero* interior steps of the same sign. Drifting interiors (`[12,14,16]`, steps +2, +2) reach three distinct residues; `[20,20,18]` (steps 0, -2) and `[29,27,27]` (steps -2, 0) do not. fold M record argmax windows realizable verdict 11 -> 13 66 66 6 6 exact 13 -> 17 108 108 8 8 exact 17 -> 19 150 150 8 8 exact 19 -> 23 204 204 4 4 exact 23 -> 29 270 270 2 0 loose (the two phantoms) 29 -> 31 348 348 4 4 exact 31 -> 37 528 528 2 2 exact **2. The fold 31 -> 37 costs 241 s and O(CAP) memory (verified).** `T_31` has 6,226,553,025 gaps, past what can be stored; the fold emits them in sorted order and the certificate consumes the stream, with one replay of the first 129 gaps resolving the wrap. Gates passed on the way: `T_29` `D = 214,708,725` / max gap 258, and `T_31` `D = 6,226,553,025` / max gap 348. The certificate at the fold is 528, two windows `168+222+72+66` and its reverse, both realizable. **Cross-reference, and this is the part a reviewer should check hardest.** `G2(T_37) = 528` is already on the record — `research/oeis-G2-submission.md` line 46 lists the ladder through `... 204, 258, 348, 528`, and line 174 records that term from a mod-30 lattice walk over 7.42e12 positions in about 54 minutes. So the value is **not** new here; it is an independent route to it, about 13x cheaper, and the new part is that the certificate reaches the top of the record's ladder and stays exact there. ## What this does not do It does not move the exponent, does not touch `beta2 = 4.26645`, does not reopen the closed chain row (the closure is about a kept window index; nothing here is kept), and says nothing about the Zone Postulate. The 23 -> 29 fold stays loose and is unchanged by this revision. ## What I got wrong on the way Two implementation errors, both caught by the gates rather than by inspection, and both worth recording because they are the ordinary failure modes of a streaming scan. First, the pass was certifying on the *generated* word instead of the old one, which is why the first validate run gave 204 where the record has 108. Second, an off-by-one in the ring index — the newest gap sits at `pos-1` after a post-increment, not at `pos` — which mixed stale values from 512 gaps earlier into every window and inflated `M` at the deeper folds (408 at fold 31 against 348). Each was found by comparing against the record's certificate column, which is why that gate is in the producer and not in my head. ## Reproduction node --max-old-space-size=7000 streamfold.mjs validate # 10 s, six gates, all PASS node --max-old-space-size=7000 streamfold.mjs big # 241 s, the fold 31 -> 37 Producer `streamfold.mjs` and both stdout files are attached. The validate run prints the exact/loose verdict per fold; the big run prints the two gates for `T_31` before the certificate.