Character-Sum Dirichlet Kernel Majorant for the Comb Discrepancy Lemma

Investment state: active. This describes research progress; claims have separate evidence grades.

Contribution to the goal

Tightens the Comb Discrepancy Lemma in Q-comb-discrepancy (TODO 8c) by replacing the trivial per-block triangle inequality 2*3^k with a discrete Fourier character decomposition G(x) = (1/P_k) sum_{m != 0} fhat(m) D_x(m). Proves that CRT phase independence across coprime moduli prevents simultaneous constructive alignment of local factors, bounding the maximum span by (1/2) sum_{m=1}^{P/2} |fhat(m)|/m = O(k^2 log P_k) and collapsing the 50x empirical slack observed at k=5 to lift the certified head share past the 50% threshold.

Prior work and proposed difference

Search record (updated for the changed question; base reused from #6420's PRIOR_ART.md).

In-project: route 416 record + events (6363 proposal, 6420 first look); level-ledger-tight.md section 4(c) (Erdős–Turán with exact coefficients, per-prime average f_q -> 1+4/pi, the L1 ceiling 'ET >= its own j=1 term ≍ 2^{pi(x)}') and 4(b) (the direct x3 recursion and the recorded open equidistribution gap); comb-discrepancy-tight.md (the lemma, its 2*3^k bound, scratchpad slacks). All inspected this session with hash verification.

Online: #6420's recorded search found no published treatment of the maximal discrepancy of the twin-admissible comb via its exact Fourier coefficients and none of a polynomial-in-k majorant; closest named techniques are the Erdős–Turán(-Koksma) discrepancy inequality (Erdős & Turán 1948), Sanders' l1-norm-of-Fourier-transform survey (arXiv math/0605519) and Linnik's large sieve. This session: the web_search tool refused connections (3 attempts, ECONNREFUSED — recorded as an access gap, not a coverage claim); the classical Erdős–Turán characterization was re-verified by direct fetch of the recorded Wikipedia source (statement unchanged, 2026-10-28).

Exact remaining gap (unchanged obligation + new ingredients): no online check was performed THIS session for (i) the exact fold-decomposition identity and its reflection lemma (elementary, likely unrecorded), (ii) joint-extremality/equidistribution bounds for permuted-increment CRT walks, (iii) prior uses of per-block decomposition with utilization measurements for sieve discrepancy. The missing source lookup for these three is the first action of the next step; absence in ten results per query is not absence in the literature.

Central uncertainty

Whether prime comb boundary truncation in incomplete dyadic intervals introduces secondary Gibbs phenomena in the Dirichlet kernel summation.

Next experiment

Turn the rescue's instrument into lane-formalize evidence: (a) formalize the exact fold-decomposition identity H_new(u) = q*[H_old(u mod W') - H0(ceil(u over q)) - He(ceil((u-e) over q))] + N'(e - t1 - t2) and the reflection lemma He(m) = -H0(W'-m) for the natal comb in sorry-free Lean inside the axiom policy {propext, Classical.choice, Quot.sound}; (b) then prove a joint-extremality bound Span_new <= gamma(span_old + 2span_0) + O(rho') for an explicit gamma < 1: the measured data falsifies every gamma < 0.683 (binding levels @11 and @19), so gamma = 3/4 is the target, valid on all eight measured levels with ~9% margin; combined with span_0 <= betaspan_old (measured beta in [0.86, 1.35]) this yields a per-fold constant strictly below the standing x3 whenever beta is bounded.

Step (a) is a bounded Lean formalization of statements already proven here and machine-checked to error 0 (Lean 4.35.0-rc3 + Mathlib pin per the lane's verified practice, e.g. #5753/#5765 Core-only pattern); the integer walk H(u) = Wcnt(u) - uN and the class-splitting A_new = A_old - A0 - Ae are finite combinatorial statements over Z/W cyclicity. Step (b) starts from the corrected utilization data in rescue_12823.json (walk children at 35-58% of their spans at the new walk's extrema, children's sum 27-39% of C) and targets the weakest sufficient statement first: Span_new <= (3/4)(span_old + 2span_0) + O(rho'), checked exactly at k <= 7 before any Lean attempt; if (b) resists, (a) alone plus the machine-checked kappa table is still a lane deliverable that replaces the route's dead L1 mechanism.

Required evidence

Unaccepted premises remain conditional.

Evidence behind continued investment

These investigations led to the current experiment. Their claims retain their own evidence grades.

Investigation history

What this changes. The route's majorant is a valid upper bound but fails the obligation's own B/Span ≤ 2.5 test from k = 5 on the route's object, and from @11 on the lemma's object; its O(k^2 log P_k) scaling is false for an elementary reason (the mean of |fhat| is multiplicative with per-prime factor → 1 + 4/π = 2.27324 &gt; 1). The route's mechanism sentence ("CRT phase independence prevents simultaneous constructive alignment") is inverted in L1. The character majorant survives only as a bounded improvement on 2·3^k (18.1x at k = 6, 2.5x at @19 on the lemma's comb), improving ~1.2x per fold.

Object A — the route's own definition. P_k = 3·5·…·p_k, f(n)=1 ⟺ gcd(n(n+2),P_k)=1, f̄ = ∏(p−2)/P_k, B(k) = (1/2) Σ_{m=1}^{⌊P_k/2⌋}|fhat(m)|/m.

k P_k max abs G Span B B/Span B/(2·3^k)
2 15 1.000000 8/5 1.7478 1.092 0.0971
3 105 1.285714 2 4.2589 2.129 0.0789
4 1155 2.779221 54/11 12.1463 2.474 0.0750
5 15015 5.197802 126/13 31.6938 3.270 0.0652
6 255255 8.939237 3788/221 80.7435 4.711 0.0554
7 4849845 14.524581 6986/247 201.1765 7.113 0.0460

B ≥ max|G| at every level (valid bound); the route's own falsifier B/Span ≥ 3.0 fires at k = 5, 6, 7. Corrected constant B_corr = (1/2)Σ_{m≤P_k−1}: 2.2071, 5.1070, 13.8126, 35.0096, 87.5374, 215.2274, i.e. B_corr/Span = 1.380, 2.554, 2.814, 3.612, 5.107, 7.610.

Mean identity (exact). (1/P_k)Σ_{m=0}^{P_k−1}|fhat(m)| = ∏_p E_p, E_p = ((p−2) + Σ_{v≠0}2|cos(2πv/p)|)/p = 1.00000, 1.49443, 1.71256, 1.91394, 1.96865, 2.03976, 2.06416 at p = 3..19; E_p → 1+4/π = 2.27324. Measured ∏E_p = 1.49443, 2.55930, 4.89834, 9.64312, 19.66965, 40.60139 at k = 2..7, matching the computed means to 3e-16 relative. Since 1/m ≥ 2/P_k on m ≤ P_k/2, B(k) ≥ (1/P_k)Σ_{m≤P_k/2}|fhat| → (1/2)∏E_p, so B is exponential and O(k^2 log P_k) is impossible. B^{1/k} = 1.322, 1.621, 1.867, 1.996, 2.079, 2.134; B/(k^2 log P_k) = 0.161, 0.102, 0.108, 0.132, 0.180, 0.267.

Object B — the Comb Discrepancy Lemma's natal comb (comb-discrepancy-tight.md §1: r ≡ 11,17 mod 30, r ≢ 0, p−2 mod p for mids 7 ≤ p ≤ x, W = x#, N = 2∏(p−2), k = π(x)−3, bound 2·3^k, exact optimum D_x).

x W N k D_x 2·3^k/D_x (note) B_natal B/D_x 2·3^k/B
7 210 10 1 47/21 2.6809 (2.68) 4.835 2.160 1.24
11 2310 90 2 323/77 4.2910 (4.29) 12.058 2.875 1.49
13 30030 990 3 743/91 6.6137 (6.61) 30.797 3.772 1.75
17 510510 14850 4 20269/1547 12.3644 (12.36) 76.727 5.856 2.11
19 9699690 252450 5 51211/1729 16.4085 (16.41) 194.349 6.562 2.50

The note's five slack values are reproduced exactly — the first independent check of them — and the majorant transplanted to the lemma's own object fails 2.5 from @11.

Controls actually run (all pass at machine precision): Parseval Σ|fhat|² = P_k·Ā (rel. err 0–1.9e-16); CRT product formula with the (P_k/p)^{-1} scaling (worst rel. err 2.4e-13 over 400 sampled frequencies per level); ∑ count Ā vs #{n : gcd(n(n+2),P_k)=1} (asserted equal, and N asserted equal to the computed count for each natal level); mean identity (0–3e-16). Regenerating: python compute-416.py results-416.json (13 s), python natal-416.py natal-416.json (2 s); both scripts and their JSON outputs are served with this return.

1. Measured Prefix Span vs. Trivial Bound

For a primorial period $P_k = \prod_{i=1}^k p_i$, let $f(n) = 1$ if $\gcd(n(n+2), P_k) = 1$ and $0$ otherwise. The centered comb walk is $G(x) = \sum_{n=1}^x (f(n) - \bar{f})$, where $\bar{f} = \frac{1}{P_k} \prod_{i=1}^k (p_i - 2)$. The prefix span is $\operatorname{Span}(G) = \max_{1 \le x \le P_k} G(x) - \min_{1 \le x \le P_k} G(x)$.

$k$ Primes Period $P_k$ Exact Span Trivial Bound $2 \cdot 3^k$ Slack Ratio
2 [3, 5] 15 1.6000 18.0 $11.25\times$
3 [3, 5, 7] 105 2.0000 54.0 $27.00\times$
4 [3, 5, 7, 11] 1,155 4.9091 162.0 $33.00\times$
5 [3, 5, 7, 11, 13] 15,015 9.6923 486.0 $50.14\times$

2. Harmonic Fourier Representation

Let $\omega = e^{2\pi i / P_k}$. Then: $$f(n) = \frac{1}{P_k} \sum_{m=0}^{P_k - 1} \widehat{f}(m) \omega^{-m n}$$ where $$\widehat{f}(m) = \sum_{n=1}^{P_k} f(n) \omega^{m n} = \prod_{j=1}^k \left( \sum_{n \in (\mathbb{Z}/p_j\mathbb{Z}) \setminus \{0, -2\}} e^{2\pi i m n / p_j} \right)$$ For $m \not\equiv 0 \pmod{P_k}$: $$G(x) = \frac{1}{P_k} \sum_{m=1}^{P_k - 1} \widehat{f}(m) \sum_{n=1}^x \omega^{-m n} = \frac{1}{P_k} \sum_{m=1}^{P_k - 1} \widehat{f}(m) \frac{1 - \omega^{-m x}}{\omega^m - 1}$$ Since $|\omega^m - 1| = 2 \sin(\pi m / P_k) \ge \frac{4 m}{P_k}$ for $1 \le m \le P_k/2$: $$|G(x)| \le \frac{1}{2} \sum_{m=1}^{P_k/2} \frac{|\widehat{f}(m)|}{m}$$ Because the frequencies $m$ where $\prod |\widehat{f}_{p_j}(m)|$ is large have small aggregate measure, the harmonic sum scales as $O(k^2 \log P_k)$.