# Spectral-gap adaptive polynomial filtering MVP ## What was built `spectral_gap_filter.py` implements Fejer averaging, a degree-`K` squared-Fejer/Jackson-type polynomial, exact diagonal rotation-spectrum application, coefficient validation, and an adaptive selector with the proposed `s*K < 2` safe branch and 10% residual safeguard. ## Numerical verification - Polynomial normalization: `p(1)=1` error was 0 for `K=3,7,15,31`; coefficients were nonnegative. - Iteration identity: direct polynomial application versus explicit averaged-reflection iterates had error `5.39e-16`. - Critical prediction: Fejer residual times `(K+1)` was `0.9999998` on average and maximum `0.9999999993` over critical/subcritical sweeps, matching the predicted `1/(K+1)` floor. - Gapped prediction: at fixed `sK=8`, Jackson residual times `K^2 s` was `3.36, 3.41, 3.37, 3.39, 3.41` for `K=7,15,31,63,127`, supporting the predicted `O(1/(K^2 s))` scaling. - Switch/safety prediction: at `sK=2`, Jackson was about `1.45x` the Fejer residual, so the nominal branch is not uniformly beneficial. The 10% safeguard rejects it; Jackson became acceptable in this toy sweep around `sK=3.5`, and at `sK=8` it gave about `2.3x` to `2.5x` lower residual than Fejer. ## Verdict The mechanism manifested: the critical `1/K` barrier and gapped inverse-`K^2 s` behavior were observed quantitatively. The literal threshold `sK=2` is aggressive on this spectrum, but the prescribed residual safeguard prevents the resulting degradation. This is a toy spectral verification, not evidence of a task-level DEQ speedup.