Current task: —

← Session 3 — Project kickoff: RH blueprint, staged workflow + archive design

#109 assistant 2026-08-17 21:17:42.895 UTC · 518→9946 tok open ⤢
thinking (19834 chars)
E-005 design (from D-011 §4): Goal: decide whether an oversampled (q>1), reduced-bandwidth (λ<1) sinc-Gram matrix, using 3 moments, can certify more than 2/3 for simple-on-line zeros in the sine-process model. Construction in dimensionless (spacing-1) units: - Points γ_j: sine process (GUE bulk, unfolded spacing 1) in window [0, W]. - λ-bandwidth kernel: the test function has prime-side support [−λL, λL]... in dimensionless units: at λ=1, kernel S(x) = sin(πx)/(πx) (from E-004: L_w(γ−α)/2 = π(γ̃−k) when h = mean spacing). General λ: kernel S_λ(x) = sin(πλx)/(πλx)? Let me derive. Paper units: window support L' = λℓ (absolute), grid h = 2π/L' (critical). Zero mean spacing s̄ = 2π/ℓ. Dimensionless: γ̃ = γ/s̄, grid α̃_k = kh/s̄ = k·(2π/L')/(2π/ℓ) = k/λ. So in spacing units the CRITICAL grid for bandwidth λ has spacing 1/λ (denser than zeros for λ<1 — interesting!). Kernel: ϕ̂(ξ) = L'·sinc(L'ξ/2), argument L'(γ−α_k)/2 = L'·s̄(γ̃−α̃_k)/2 = λℓ·(2π/ℓ)·(γ̃−k/λ)/2 = πλ(γ̃ − k/λ) = π(λγ̃ − k). So v entries ∝ sinc(π(λγ̃_j − k)) — evaluated on integer k grid! Alternatively and more cleanly: define everything on the INTEGER grid with rescaled points: β_j = λγ̃_j (points with mean spacing λ), integer grid k, kernel sinc(π(β_j − k)). G̃ = Σ_j S(β_j−k)S(β_j−k') (with appropriate normalization a). d = W·λ grid points covering... the window of N = W points: d = λN grid points at critical density ✔ matches d = λN. Oversampling q: grid spacing 1/q: k/q. Kernel sinc(π(β_j − k/q)). d = qλN. Normalization: a = ‖ϕ‖²/L' = 1 (flat window). G̃ = (1/L'²)Σ v vᵀ with v = L'sinc(...) → G̃ = Σ_j sinc(π(β_j−k/q))sinc(π(β_j−k'/q)). Trace: tr G̃ = Σ_j Σ_k sinc²(π(β_j−k/q)) = Σ_j q (identity Σ_k sinc²(π(x−k/q)) = q). So tr G̃ = qN. Per-paper convention tr should be ~N... The paper normalizes aL² where the frame sum identity gives ‖v‖² = aL² exactly at critical density. With oversampling q: ‖v_ρ‖² = q·aL'². To keep tr G̃ = N, normalize by q: G̃(q) := (1/q)Σ_j SSᵀ. Then tr = N ✔ and entries G̃(q) = (1/q)Σ_j S S. At q=1 reduces to E-004 construction with λ=1... wait E-004 had G = VᵀV without 1/q — at q=1 they're the same ✔. So general (λ, q): G̃(λ,q) = (1/q) Σ_j sinc(π(β_j − α_k)) sinc(π(β_j − α_k')), β_j = λ·(unfolded spacing-1 points), grid α_k = k/q covering the window, k = 0..qλW. Moments: m_r(λ,q) := (1/N) tr G̃(λ,q)^r... paper: tr G̃ᵏ = d·m_k(1). Two normalizations possible: per-d or per-N. For the certificate what matters is the CMS bound n₊(G̃)/d ≥ 1 − Λ... and then N^s_0 ≥ ... via the chain. Let me think about what certificate the 3-moment CMS gives. CMS/one-sided Chebyshev–Markov–Stieltjes (paper §7.2(d)): knowing moments μ_r := d⁻¹tr G̃ᵏ for k ≤ 2m, the sharp lower bound for n₊(G̃)/d is 1 − Λ_m(0), where Λ_m is the Christoffel function at 0 of the moment sequence (μ_0=1, μ_1, ..., μ_{2m}). With 3 moments (k=1,2,3): the odd-order one-sided bound — Markov's: for moments μ₀..μ_{2m+1}, bound via Λ at a node... The simplest rigorous statement: n₊(G̃) = #{λᵢ > 0}... For a lower bound on the mass above 0: 1_{x>0} ≥ ... polynomial minorant of degree ≤ 3: max over deg-3 polys p ≤ 1_{(0,∞)} of ∫p dμ. That's an LP on moments — solvable exactly given μ₀..μ₃. p(x) = c₀ + c₁x + c₂x² + c₃x³ with p(x) ≤ 0 for x ≤ 0 and p(x) ≤ 1 for x > 0, maximize c₀ + c₁μ₁ + c₂μ₂ + c₃μ₃. The optimum: p touches 1_{x>0} at specific points. Classic result: the optimal minorant for the step at 0 with 3 moments: p(x) = 1 − (1−x/a)²(1+x/b)-ish form with contact points a > 0 (touching 1) and −b... p(0)=0, p touches 1 at x=a, touches 0 at x=−b (double)... This is solvable numerically via a tiny SDP/LP — but scipy only... could use cvxpy (not installed). Alternatively discretize: candidate optimal p has form p(x) = (x/b)²·... Standard: minorant of 1_{(0,∞)}: optimal p(x) = x(x+c)²/(a(a+c)²)·... let me just solve the dual: the bound = min over representing measures... Simplest: numerical SDP via small discretized LP with scipy.optimize.linprog (scipy installed ✔). Represent: maximize c·μ subject to p(x) ≤ 1_{x>0} on a fine grid of x ∈ [−δ, λmax] — approximate. Good enough for a decider experiment (tag [NUMERICAL-EVIDENCE]). But hold on — what does n₊(G̃)/d give for simple zeros? In the paper's 2-moment chain, the output is rank P₁ ≥ (2−R)N via Lemma 3.2 — which is exactly the CMS m=1 bound (§7.2(d) says Lemma 3.2 IS the CMS m=1 case). With 3 moments: n₊(G̃)/d ≥ 1−Λ̃ where Λ̃ is the 3-moment (odd) Christoffel-type value. Then how does n₊(G̃) convert to simple zeros? In the paper's chain for the 2-moment case: N^s_0 ≥ rank P₁ ≥ 4tr G̃ − 2N − ‖G̃‖². The CMS generalization: the certificate ≤ N^s_0/N comes from... the ceiling theorem says any 2-moment bandwidth-1 certificate ≤ 0.682 — the CMS bound with 2 moments applied to n₊ then converted. For the experiment, the honest approach: compute what the paper's framework would give: certificate value = (d/N)·(1 − Λ(0))·(conversion factor). Hmm, the conversion from n₊(G̃) to N^s_0: n₊(G̃) ≤ N*_0 + p... no — actually n₊(G̃) relates to on-line zeros: Q has n₊(Q) ≤ p, so n₊(G̃) ≤ n₊(P) + p ≤ N*_0 + p... that's an upper bound, not lower. The chain direction: N^s_0 ≥ rank P₁ ≥ [bound from moments]. The CMS gives a lower bound on n₊(G̃)... and n₊(G̃) ≤ n₊(P) + n₊(Q) ≤ N*_0 + p... gives nothing (wrong direction). The paper's Lemma 3.2 with P₁ gives rank P₁ directly ≥ 2tr P₁ + 4tr Q′ − 4b − ‖G̃‖². The CMS interpretation (§7.2(d)): "if the normalised moments d⁻¹tr G̃ᵏ, k ≤ 2m, are known, the sharp lower bound for n₊(G̃)/d is 1−Λ_m(0)". And §7.2(f): HL*(4) would give N^s_0/N ≥ 13/18. So there IS a conversion n₊(G̃) → N^s_0 in the paper's framework. Λ₂(0) = 5/36 → 1−5/36 = 31/36; but 13/18 = 26/36. So N^s_0/N ≥ 13/18 ≠ 31/36: the conversion loses 5/36: 31/36 − 5/36·... hmm 31/36·(d/N)... d/N = 1 asymptotically at λ=1. 13/18 vs 31/36: 26/36 vs 31/36 — the conversion from n₊ to N^s_0 loses 5/36. Because n₊(G̃) counts on-line multiple zeros and off-line pairs too; converting to simple requires charging: N^s_0 ≥ n₊(G̃) − (s₂ + p)·... and s₂+p bounded by... From the chain: N ≥ s₁ + 2(s₂+p) ⟹ s₂+p ≤ (N−s₁)/2... This is getting complicated; the exact conversion for the 4-moment certificate is in the paper's conditional analysis (not fully spelled in §7.2(f)). For E-005's purpose (method-level decider), the cleanest metric directly comparable across (λ,q): the 2-moment certificate C₂(λ,q) and the 3-moment certificate C₃(λ,q), both computed via the SAME conversion the paper uses. For 2 moments the paper's chain gives C₂ = (d/N)·(2 − R)-equivalent... hmm at λ=1, q=1: 2−R = 2/3 and 1−Λ₁(0) with moments 1, 1, 4/3: M = [[1,1],[1,4/3]]: Λ₁(0) = 1/(M⁻¹)₀₀: M⁻¹₀₀ = (4/3)/(4/3−1) = 4 → Λ₁(0) = 1/4 → 1−1/4 = 3/4 ≠ 2/3. So n₊/d ≥ 3/4 vs simple-certificate 2/3: conversion factor (2/3)/(3/4) = 8/9. And with 4 moments: 1−Λ₂ = 31/36, ×(conversion to get 13/18): (13/18)/(31/36) = (26/36)/(31/36) = 26/31 ≈ 0.839. Different conversion factors — the conversions aren't a fixed factor; the honest CMS-to-simple conversion involves the multiplicity charging. Simpler, defensible approach for E-005: compute the DIRECT analogue of the paper's certificate using 3 moments via the "polynomial minorant of x↦x·1_{x>0}"-type bounds? The paper's Lemma 3.2 is: rank ≥ 2tr P + 4tr Q − 4b − ‖P+Q‖². As a CMS statement on the spectrum of G̃: the certificate 2−R comes from minimizing... Honestly, replicating the exact paper conversion for k=3 requires knowing the paper's (unstated) 3-moment chain. What §7.2(f) DOES say: with m_k(1) = 1,4/3,2,13/4 and Λ₂(0)=5/36: N^s_0/N ≥ 13/18. Can I reverse-engineer 13/18 from 1,4/3,2,13/4? Try: certificate = (4trG̃·?...). Suppose certificate = α·m₁ + β·m₂ + γ·m₃ + δ·m₄ with constraint tight at eigenvalue pattern {1}_P {2}_Q and now also using higher moments... For the sine process all moments are those of the limiting distribution; the certificate can't exceed the actual simple fraction (=1 in the model). The 13/18 might come from the cubic weight ω(m) in §7.3... that gave 0.85082 for distinct. Hmm 13/18: maybe from the quadratic-polynomial minorant argument: find max c such that m(x) := multiplicity weight... Let me try: certificate for simple zeros from moments via the following: simple zeros correspond to eigenvalue 1 contributions; general certificate form: s₁ ≥ Σᵢ w(λᵢ) for any w with w(λ) ≤ [indicator that λ came from simple zero]... In the abstract extremal framework: configurations of points with marks (multiplicity structure), certificate = min over configs matching moments of simple fraction. That's exactly the LP the ceiling theorem uses (LawN256 with 2 moments). With 3-4 moments, the analogous LP would give the sharp certificate. For the sine-process moments 1,4/3,2,13/4, the LP optimum (over configurations matching these moments) = 13/18 per the paper. So 13/18 = the LP value — not derivable from Christoffel alone by me quickly. For E-005, the honest and computable proxy: solve the small LP/SDP numerically! I.e., replicate the ceiling-style LP but with 3 moment constraints: maximize (non-simple fraction) over marked configurations on a grid matching m₁,m₂,m₃(λ,q) → certificate = 1 − that. This is exactly the LawN256 methodology (they used an exact-rational LP over 256-periodic marked configs!). We can do a rough floating-point LP with scipy.linprog: configurations = marks {1,2} at grid positions j/J; moment constraints: Σ_c w_c |Σ_i m e^{2πi jx/...}|²... the form-factor constraints are quadratic in marks but linear in the LAW weights w_c over a fixed dictionary of configurations. The LawN256 approach: dictionary of configurations c, weights w_c ≥ 0, Σw = 1, moment constraints linear in w: Σ_c w_c S_c(j) = target_j. Maximize Σ_c w_c·(nonsimple fraction of c) subject to matching moments. Dictionary: random 256-periodic configs... this is a real LP; with a few thousand dictionary configs and J=64 grid, linprog handles it. That's getting heavy for one sub-stage. Simplification: we don't need the full LP. The decisive question Q2 is simpler: does the 3-moment (odd Christoffel/Markov) bound on n₊, times conversion, exceed 2/3 at λ=2/3, q=2? Use the SAME conversion ratio the paper exhibits at λ=1,q=1: paper's 2-moment: (1−Λ₁) = 3/4 → actual certificate 2/3 (factor 8/9); 4-moment: 31/36 → 13/18 (factor 26/31). Hmm no fixed rule. Alternative honest approach: compute the LP bound directly with the ceiling-LP method at coarse grid (J=48 or 64), comparing 2-moment vs 3-moment constraint sets at (λ=2/3, q=1) and (λ=2/3, q=2). If LP₃ ≤ 2/3 everywhere: G-002. If > 2/3: theorem path. This directly mirrors LawN256 (the paper's own ceiling methodology!) — defensible and decisive. But time/complexity: building the LP is a moderate script (~150 lines) using scipy.optimize.linprog with a dictionary of ~2000 random marked configurations on J=64 grid, form factors computed by FFT. Moments: the constraints on the law = match the "near-CUE" rows? In LawN256 the adversary matches the CUE form factor S(j) = j/256 to 1e-40 and maximizes non-simple fraction. For our question the constraints should be: match the SINE-PROCESS moments m₁,m₂,m₃ of the G̃ spectrum... Hmm — the LP is over zero CONFIGURATIONS; the certificate data = the two/three trace moments of test functions against the configuration. The certificate's value at the sine process vs the adversarial config... Actually — cleaner equivalent formulation (this is what the ceiling theorem does): a k-moment certificate is determined by its values; the adversary maximizes non-simple fraction subject to matching the sine process's first k form-factor/moment data. With 2 moments → LawN256 → 0.6818 non-simple... wait p₀ = 0.6818 was the SIMPLE fraction of the adversarial law (certificate ≤ 0.6818). So the LP: max simple-fraction-evasion. With 3 moments (support still ≤ 1): does the adversary's evasion drop below 1/3 (i.e. certificate > 2/3)? THAT is the decidable question — and it doesn't even need the (λ,q) sinc-Gram language: it's "3 moments of bandwidth 1". But our escape hatch requires λ=2/3 for unconditionality — the 3rd moment at bandwidth 1 is NOT available. At bandwidth 2/3, the moments are w.r.t. the λ-kernel — different moment targets. OK let me simplify to the executable decider, accepting [NUMERICAL-EVIDENCE] status: E-005 (revised, executable): the CMS-proxy comparison. 1. For each (λ, q): build the sinc-Gram G̃(λ,q) on sine-process samples (as derived: β_j = λγ̃_j, grid k/q, normalize 1/q), extract empirical spectral moments μ_r(λ,q) = (1/d)tr G̃^r, r=1..4 (4th for reference). 2. Compute the one-sided bounds: - 2-moment CMS: 1 − Λ₁(0) from (μ₀,μ₁,μ₂). - 3-moment Markov: solve the degree-3 polynomial minorant LP for 1_{x>0} given (μ₀..μ₃) — via discretized linprog. - 4-moment CMS: 1 − Λ₂(0) for reference. 3. Convert n₊-fraction to certificate estimate using the paper's own calibration at (λ=1,q=1): our model there should reproduce 2-moment → ~2/3-ish (via factor 8/9) and 4-moment → ~13/18-ish (26/31)... Hmm, the conversion factor issue again. Let me think about whether n₊-to-simple conversion has a clean form. In the paper's chain: N^s_0 ≥ 4tr G̃ − 2N − ‖G̃‖². In units of N with d ≈ N, tr = N, ‖G̃‖² = (4/3)N: = 4 − 2 − 4/3 = 2/3 ✔. This IS a linear functional of the first two moments: C₂ = 4μ₁ − 2 − μ₂ (with μ per-N). The CMS form 1−Λ₁ is the sharp version of the same data. The paper's certificate uses the specific (non-sharp) linear combination; the ceiling LP shows even sharp ≤ 0.682. For 3 moments, the sharp simple-certificate would come from a polynomial minorant of the multiplicity weight function... The §7.3 conditional cubic certificate: ω(m) = ½m + (1/18)(2m²−m³) + (4/9)1_{m=1} — that's for N_d. For N^s_0 with 4 moments: 13/18... Let me try to reverse-engineer 13/18 quickly: candidate: certificate = aμ₁ + bμ₂ + cμ₃ + dμ₄ with the polynomial p(x) = a x + b x² + c x³ + d x⁴ being a minorant of the weight w(λ) where... the eigenvalue of a simple on-line zero is 1 (charge 1 each) — the rank counts eigenvalues ≥... I could spend long here. DECISION: keep E-005 as the method-level decider using the LP-free CMS proxy and the paper's calibration points as the conversion reference, and be explicit that a positive result would then require deriving the exact 3-moment chain. The key output: does adding μ₃ move the one-sided bound materially at (2/3, 2) vs (1,1)? If the 3-moment minorant bound at λ=2/3,q=2 exceeds ~0.7 (leaving room for conversion loss) → worth pursuing; if it lands ≤ 2/3 → dead. Compute for reference what the model gives at (λ=1,q=1): μ = (1, 4/3, 2, 13/4)-ish per E-004 (per-point normalization matched per-d asymptotically). 2-moment minorant value: maximize ∫p dμ over p ≤ 1_{x>0}, deg 2: known answer 1−Λ₁(0) = 3/4. 3-moment: ? 4-moment: 31/36 = 0.861. For the actual certificate comparison, define the heuristic conversion: certificate ≈ (n₊-bound) − (1 − μ₁)-ish... I'll present BOTH the raw n₊-bounds AND the calibrated conversion (linear interpolation of the paper's two calibration points 3/4→2/3 and 31/36→13/18: factor ≈ 0.85 avg). Crude but decision-sufficient: if 3-moment bound at (2/3,2) doesn't clearly exceed ~0.72, no path. Implementation: - Sine process samples as E-004 (GUE bulk, W=600). - Configs: (λ,q) ∈ {(1,1), (2/3,1), (2/3,2), (1/2,2), (0.8,1), (0.8,2), (2/3,1.5)?} keep q ∈ {1,2}, λ ∈ {0.5, 2/3, 0.8, 1.0}. - G̃(λ,q) = (1/q) VᵀV, V[j, k] = sinc(π(λγ̃_j − k/q)), grid k = 0..⌈qλW⌉. d = qλW. Sanity λ=1,q=1: V = sinc(π(γ̃−k)) = E-004 ✔ (with 1/q = 1 ✔). - Moments μ_r = tr G̃^r / d, r = 1..4, averaged over 40 samples. - Bounds: CMS₂ = 1−Λ₁(0) (exact formula from μ₁,μ₂); CMS₄ = 1−Λ₂(0) (from μ₁..μ₄); Markov₃ via linprog: variables c₀..c₃; maximize c₀μ₀+...+c₃μ₃ s.t. p(x) ≤ 0 on grid x ∈ [−0.05, 0] and p(x) ≤ 1 on x ∈ (0, λmax] — need spectrum support: eigenvalues ∈ [0, ~4?]. At λ=1,q=1 the support ~[0,2]. Constrain on [0, 6] grid. linprog from scipy.optimize: minimize −c·μ s.t. p(x_i) ≤ 1_{x_i>0} over grid — linear constraints ✔. - Output CSV: λ, q, μ₁..μ₄, CMS₂, Markov₃, CMS₄, plus calibrated certificate estimates. Edge effect: oversampled grid k/q beyond window — points near edges... same as before, ~1/√W. Also sanity: at (2/3, 2): d = (4/3)W > N — the d-cap 4/3 > 1 no cap ✔. At (2/3,1): d = (2/3)W. One more check on normalization (1/q): tr G̃ = (1/q)Σ_j Σ_k sinc²(π(λγ̃_j − k/q)) = (1/q)Σ_j q = N ✔ (using Σ_k sinc²(π(x − k/q)) = q identity — scaled: Σ_k sin²(π(x−k/q))/(π(x−k/q))² = q·... let me verify: Σ_k sinc²(π(x−k/q)): let y = qx: Σ_k sinc²(π(y−k)/q)·... hmm: sinc(π(x−k/q)) = sin(π(x−k/q))/(π(x−k/q)). Set f(t) = sin(πt)/(πt): Σ_k f(x − k/q)² = Σ_k f(qx−k)²/q²·q²... f(x−k/q) = sin(πx−πk/q)/(π(x−k/q)) = q·sin(πx−πk/q)/(π(qx−k)) = q·(−1)^... sin(πx − πk/q) isn't simply related to sin(πqx − πk) = (−1)^k sin(πqx)... sin(πqx − πk) = sin(πqx)cos(πk) = (−1)^k sin(πqx). And sin(πx − πk/q) = sin(πx)cos(πk/q) − cos(πx)sin(πk/q) — not a clean phase unless q=1. So the identity Σ_k f(x−k/q)² = q is NOT exact for q>1! Only approximate (Poisson: Σ_k f(x−k/q)² = q Σ_m f̂²-ish... f² has FT supported [−1,1]... f(t)² = sinc²(πt): its FT is the triangle Λ(u) supported [−1,1]·(1−|u|)... Poisson: Σ_k g(x−k/q) = q Σ_m ĝ(qm)e^{2πiqmx}: m≠0 terms need ĝ(±q) = 0 — ĝ = FT of sinc²(πt) = triangle(1−|u|)₁_{|u|≤1} → ĝ(q) = 0 for q ≥ 1 ✔ EXACT! Great: Σ_k sinc²(π(x−k/q)) = q·ĝ(0) = q exactly for integer q ≥ 1 ✔✔. This is again the no-aliasing (triangle vanishes beyond 1) — consistent with D-011's hatch. So tr G̃ = N exactly (per construction). Let me now also decide the certificate conversion more carefully, because the decider needs a defensible number. Actually — cleanest: report the one-sided n₊ bounds (CMS₂, Markov₃, CMS₄) AND, crucially, the analogous "paper-chain proxy": the paper's actual 2-moment certificate C₂ = 4μ₁ − 2μ₀·(d/N)... — hmm at λ<1: baseline 2−R_λ(ψ₀) = 2 − 1/λ − λ/3 (Remark 6.1). Compare Markov₃-based estimate vs that baseline at the same λ. And the cap: certificate ≤ d/N = qλ. Actually for the FINAL certificate number, use the paper's conversion observed at λ=1: their 2-moment sharp n₊ bound is 3/4 but certificate is 2/3; ratio 8/9 — because n₊(G̃) ≤ ... the chain converts via the multiplicity charges. Apply the same ratio: cert₃ ≈ (8/9)·Markov₃·(d/N)?? At (λ=1,q=1) this should ≈ ... Markov₃ at those moments: unknown, presumably ~0.79 → ·8/9 → 0.70?? That would ALREADY exceed 2/3 at λ=1 — but the 3rd moment isn't available at λ=1 — fine, it's the reference point showing what HL*(3)-ish would give. I'll report raw bounds + the 8/9-calibrated estimates, clearly labeled heuristic, and the decision rule: Markov₃·(8/9) > 0.72 at some (λ ≤ 2/3, q) → pursue; else G-002. Hmm — the 8/9 calibration is shaky (different moment orders have different conversions: 26/31 for 4-moment). To be safer, decision rule on RAW Markov₃ vs RAW CMS₂ at the same (λ,q): if Markov₃ ≤ CMS₂ + 0.01 → third moment adds nothing → G-002. If materially bigger AND qλ > 2/3 AND calibrated cert > 2/3 → pursue. That's honest. Let me write E-005 now. Runtime: each sample: W=600 points; for each (λ,q): V is 600 × d (d up to 1200), G = VᵀV (d×d ≤ 1200²), eigvalsh ~1-2s, ×6 configs ×40 samples ≈ 5-8 min. Trim: W=500, 30 samples, eigvalsh only needed for... moments tr G̃^r can be computed WITHOUT eigendecomposition: tr G̃² = ΣG̃² (Frobenius), tr G̃³ = Σ G̃·(G̃∘...) — tr G̃³ = sum over i,j,l G̃_ij G̃_jl G̃_li = total sum of G̃∘(G̃@G̃)... = ⟨G̃, G̃²⟩_F. Computing G̃² = d³ flops (1200³ = 1.7e9 ~ 1-2s), G̃³ = another d³ for tr... tr G̃³ = Σᵢⱼ (G̃²)ᵢⱼ G̃_jᵢ = sum((G̃²)∘G̃). So per config: build G̃ (N·d² = 500·1.4e6 = 7e8) + G̃@G̃ (d³ = 1.7e9) + tr G̃⁴ needs G̃²@G̃² trace = ‖G̃²‖²_F — no extra cube. So ~3e9 flops/config ≈ 1-3s. ×6×30 = 3-9 min. OK. Markov₃ linprog: tiny. λ grid: {0.5, 2/3, 0.8, 1.0}, q ∈ {1, 2}. Write the script.
Building **E-005** — the decider experiment. Key construction detail I verified first: the oversampled Poisson identity Σ_k sinc²(π(x−k/q)) = q is *exact* for integer q ≥ 1 (the triangle Fourier transform of sinc² vanishes beyond 1 — same no-aliasing mechanism as D-011's hatch), so the oversampled Gram matrix is exact, and tr G̃ = N with 1/q normalization.
tool: Write ok
input
{
  "file_path": "D:\\Python\\Quantum\\research\\numerics\\scripts\\E-005-oversampled-third-moment.py",
  "content": "\"\"\"E-005 \u2014 Task 1.3 decider: can a third moment at reduced bandwidth beat\n2/3? (Oversampling escape hatch, D-011.)\n\nModel: sine process (GUE bulk, unfolded spacing 1), window of W points.\nThe (lambda, q) sinc-Gram matrix (dimensionless, D-011 \u00a74):\n  beta_j = lambda * gamma_j          (bandwidth lambda <-> prime support)\n  grid alpha_k = k/q, k = 0..q*lambda*W   (q-oversampled, EXACT no-aliasing:\n  sum_k sinc^2(pi(x - k/q)) = q for integer q >= 1 \u2014 triangle FT vanishes)\n  V[j,k] = sinc(pi (beta_j - alpha_k))  (np.sinc(x) = sin(pi x)/(pi x))\n  G = (1/q) V^T V                     (=> tr G = N exactly)\n  d = q*lambda*W rows; dimension cap on any certificate: d/N = q*lambda.\n\nMoments per-d: mu_r = tr G^r / d (r = 1..4; trace powers without\neigendecomposition: tr G^2 = |G|_F^2, tr G^3 = sum(G * (G@G)),\ntr G^4 = |G@G|_F^2).\n\nOne-sided bounds for n_+(G)/d (the certificate-relevant quantity):\n  CMS2  = 1 - Lambda_1(0)  from (mu0..mu2)   [m=1 Christoffel]\n  MARK3 = optimal degree-3 polynomial minorant of 1_{x>0} given\n          (mu0..mu3) \u2014 discretized LP (scipy.linprog)\n  CMS4  = 1 - Lambda_2(0)  from (mu0..mu4)   [reference; needs k=4]\nBaselines: paper 2-moment chain at bandwidth lambda (flat window):\n  C2(1) = 2/3; general R_lambda(psi0) = 1/lambda + lambda/3 (Remark 6.1);\n  cap = q*lambda.\nCalibrated conversion (heuristic): paper's sharp n_+ 2-moment bound 3/4\nmaps to certificate 2/3 -> factor 8/9; report MARK3*(8/9) as the\nheuristic certificate estimate, clearly tagged.\n\nDecision rule (recorded in JSON):\n  pursue  iff exists (lambda <= 2/3, q) with MARK3 > CMS2 + 0.01 AND\n          q*lambda > 2/3 AND heuristic cert > 2/3;\n  else G-002 (third-moment route closed with exact obstruction).\n\nOutputs: research/numerics/data/E-005-oversampled-third-moment.csv (+json)\n\"\"\"\nimport json\nimport sys\nimport time\nfrom datetime import datetime, timezone\nfrom pathlib import Path\n\nimport numpy as np\nfrom scipy.optimize import linprog\n\nREPO = Path(__file__).resolve().parents[3]\nDATA = REPO / \"research\" / \"numerics\" / \"data\"\nCSV = DATA / \"E-005-oversampled-third-moment.csv\"\nJSON = DATA / \"E-005-oversampled-third-moment.json\"\n\nRNG_SEED = 20260817\nN_GUE = 400\nW = 500\nN_SAMPLES = 30\nLAMBDAS = (0.5, 2.0 / 3.0, 0.8, 1.0)\nQS = (1, 2)\nXGRID = np.linspace(0.0, 6.0, 601)  # minorant enforcement grid\n\n\ndef gue_bulk_points(rng) -> np.ndarray:\n    A = rng.standard_normal((N_GUE, N_GUE)) + 1j * rng.standard_normal((N_GUE, N_GUE))\n    H = (A + A.conj().T) / 2.0\n    ev = np.linalg.eigvalsh(H) / np.sqrt(N_GUE)\n    lo, hi = int(0.2 * N_GUE), int(0.8 * N_GUE)\n    bulk = ev[lo:hi]\n    bulk = bulk / np.mean(np.diff(bulk))\n    mid = len(bulk) // 2\n    return bulk[mid - W // 2: mid + W // 2]\n\n\ndef christoffel_1(mus):\n    \"\"\"Lambda_1(0) = 1/(M^-1)_00, M = [[1, mu1],[mu1, mu2]].\"\"\"\n    M = np.array([[1.0, mus[1]], [mus[1], mus[2]]])\n    return 1.0 / np.linalg.inv(M)[0, 0]\n\n\ndef christoffel_2(mus):\n    M = np.array([[mus[i + j] for j in range(3)] for i in range(3)])\n    return 1.0 / np.linalg.inv(M)[0, 0]\n\n\ndef markov3(mus):\n    \"\"\"Maximize sum c_r mu_r over deg-3 polys p <= 1_{x>0} on XGRID.\"\"\"\n    # linprog minimizes; negate objective\n    c = -np.array([mus[0], mus[1], mus[2], mus[3]])\n    # constraints: for x <= 0: p(x) <= 0 ; for x > 0: p(x) <= 1\n    Arows, bvec = [], []\n    for x in XGRID:\n        powers = np.array([1.0, x, x**2, x**3])\n        if x <= 0:\n            Arows.append(powers)\n            bvec.append(0.0)\n        else:\n            Arows.append(powers)\n            bvec.append(1.0)\n    res = linprog(c, A_ub=np.array(Arows), b_ub=np.array(bvec),\n                  bounds=[(None, None)] * 4, method=\"highs\")\n    if not res.success:\n        return float(\"nan\")\n    return float(-res.fun)\n\n\ndef main() -> int:\n    if CSV.exists() and \"--force\" not in sys.argv:\n        print(f\"cached: {CSV} exists (use --force to recompute)\")\n        return 0\n    rng = np.random.default_rng(RNG_SEED)\n    t0 = time.time()\n\n    acc = {(lam, q): {r: [] for r in (1, 2, 3, 4)}\n           for lam in LAMBDAS for q in QS}\n    for s in range(N_SAMPLES):\n        pts = gue_bulk_points(rng)\n        pts = pts - pts[0]\n        npts = len(pts)\n        for lam in LAMBDAS:\n            beta = lam * pts\n            for q in QS:\n                d = int(round(q * lam * pts[-1]))\n                alpha = np.arange(d + 1) / q\n                V = np.sinc(beta[:, None] - alpha[None, :])\n                G = (V.T @ V) / q\n                G2 = G @ G\n                mus_here = {\n                    1: np.trace(G) / d,\n                    2: np.sum(G * G) / d,\n                    3: np.sum(G * G2) / d,\n                    4: np.sum(G2 * G2) / d,\n                }\n                for r in (1, 2, 3, 4):\n                    acc[(lam, q)][r].append(mus_here[r])\n        if (s + 1) % 10 == 0:\n            print(f\"  {s+1}/{N_SAMPLES} samples ({time.time()-t0:.0f}s)\",\n                  flush=True)\n\n    rows = []\n    decisions = []\n    for lam in LAMBDAS:\n        for q in QS:\n            mus = [1.0] + [float(np.mean(acc[(lam, q)][r]))\n                           for r in (1, 2, 3, 4)]\n            cms2 = 1.0 - christoffel_1(mus)\n            cms4 = 1.0 - christoffel_2(mus)\n            mk3 = markov3(mus)\n            cap = q * lam\n            base2 = 2.0 - (1.0 / lam + lam / 3.0)  # 2-moment baseline\n            heur = mk3 * (8.0 / 9.0)\n            rows.append({\n                \"lambda\": f\"{lam:.4f}\", \"q\": q, \"d_over_N\": f\"{cap:.4f}\",\n                \"mu1\": f\"{mus[1]:.4f}\", \"mu2\": f\"{mus[2]:.4f}\",\n                \"mu3\": f\"{mus[3]:.4f}\", \"mu4\": f\"{mus[4]:.4f}\",\n                \"CMS2\": f\"{cms2:.4f}\", \"MARKOV3\": f\"{mk3:.4f}\",\n                \"CMS4\": f\"{cms4:.4f}\",\n                \"baseline_2moment\": f\"{base2:.4f}\",\n                \"cap_q*lambda\": f\"{cap:.4f}\",\n                \"heuristic_cert_MARK3*8/9\": f\"{heur:.4f}\",\n            })\n            print(f\"lam={lam:.3f} q={q}: mu=({mus[1]:.3f},{mus[2]:.3f},\"\n                  f\"{mus[3]:.3f},{mus[4]:.3f})  CMS2={cms2:.4f}  \"\n                  f\"MARK3={mk3:.4f}  CMS4={cms4:.4f}  cap={cap:.3f}  \"\n                  f\"heur={heur:.4f}\", flush=True)\n            if lam <= 2.0 / 3.0 + 1e-9:\n                decisions.append(\n                    (mk3 > cms2 + 0.01) and (cap > 2.0 / 3.0)\n                    and (heur > 2.0 / 3.0))\n\n    pursue = any(decisions)\n    print(f\"\\nDECISION: {'PURSUE \u2014 a config beats 2/3' if pursue else 'CLOSE \u2014 no config beats 2/3 (G-002)'}\")\n\n    DATA.mkdir(parents=True, exist_ok=True)\n    with CSV.open(\"w\", encoding=\"utf-8\", newline=\"\") as f:\n        f.write(\",\".join(rows[0].keys()) + \"\\n\")\n        for r in rows:\n            f.write(\",\".join(str(v) for v in r.values()) + \"\\n\")\n    meta = {\n        \"experiment\": \"E-005\",\n        \"task\": \"1.3 decider (D-011 oversampling hatch)\",\n        \"description\": \"3-moment one-sided bounds for (lambda,q) sinc-Gram \"\n                       \"matrices over the sine process; decides whether an \"\n                       \"unconditional third moment (lambda <= 2/3) can beat 2/3\",\n        \"script\": \"research/numerics/scripts/E-005-oversampled-third-moment.py\",\n        \"parameters\": {\"N_GUE\": N_GUE, \"W\": W, \"lambdas\": list(LAMBDAS),\n                       \"qs\": list(QS), \"n_samples\": N_SAMPLES,\n                       \"seed\": RNG_SEED},\n        \"decision\": \"pursue\" if pursue else \"close\",\n        \"caveat\": \"sine-process model cannot see the D-H/Epstein \"\n                  \"obstruction; heuristic 8/9 conversion calibrated on \"\n                  \"paper's lambda=1 two-moment values\",\n        \"elapsed_seconds\": round(time.time() - t0, 1),\n        \"timestamp_utc\": datetime.now(timezone.utc).isoformat(),\n        \"row_count\": len(rows),\n    }\n    JSON.write_text(json.dumps(meta, indent=2), encoding=\"utf-8\")\n    print(f\"wrote {CSV.name}, {JSON.name}\")\n    return 0\n\n\nif __name__ == \"__main__\":\n    raise SystemExit(main())\n"
}
result 2026-08-17 21:17:43Z → 2026-08-18 01:26:18Z
File created successfully at: D:\Python\Quantum\research\numerics\scripts\E-005-oversampled-third-moment.py
raw content_json (database row)
[{"type":"thinking","thinking":"E-005 design (from D-011 §4):\n\nGoal: decide whether an oversampled (q>1), reduced-bandwidth (λ<1) sinc-Gram matrix, using 3 moments, can certify more than 2/3 for simple-on-line zeros in the sine-process model.\n\nConstruction in dimensionless (spacing-1) units:\n- Points γ_j: sine process (GUE bulk, unfolded spacing 1) in window [0, W].\n- λ-bandwidth kernel: the test function has prime-side support [−λL, λL]... in dimensionless units: at λ=1, kernel S(x) = sin(πx)/(πx) (from E-004: L_w(γ−α)/2 = π(γ̃−k) when h = mean spacing). General λ: kernel S_λ(x) = sin(πλx)/(πλx)? Let me derive.\n\nPaper units: window support L' = λℓ (absolute), grid h = 2π/L' (critical). Zero mean spacing s̄ = 2π/ℓ. Dimensionless: γ̃ = γ/s̄, grid α̃_k = kh/s̄ = k·(2π/L')/(2π/ℓ) = k/λ. So in spacing units the CRITICAL grid for bandwidth λ has spacing 1/λ (denser than zeros for λ<1 — interesting!). Kernel: ϕ̂(ξ) = L'·sinc(L'ξ/2), argument L'(γ−α_k)/2 = L'·s̄(γ̃−α̃_k)/2 = λℓ·(2π/ℓ)·(γ̃−k/λ)/2 = πλ(γ̃ − k/λ) = π(λγ̃ − k). So v entries ∝ sinc(π(λγ̃_j − k)) — evaluated on integer k grid!\n\nAlternatively and more cleanly: define everything on the INTEGER grid with rescaled points: β_j = λγ̃_j (points with mean spacing λ), integer grid k, kernel sinc(π(β_j − k)). G̃ = Σ_j S(β_j−k)S(β_j−k') (with appropriate normalization a). d = W·λ grid points covering... the window of N = W points: d = λN grid points at critical density ✔ matches d = λN.\n\nOversampling q: grid spacing 1/q: k/q. Kernel sinc(π(β_j − k/q)). d = qλN.\n\nNormalization: a = ‖ϕ‖²/L' = 1 (flat window). G̃ = (1/L'²)Σ v vᵀ with v = L'sinc(...) → G̃ = Σ_j sinc(π(β_j−k/q))sinc(π(β_j−k'/q)). Trace: tr G̃ = Σ_j Σ_k sinc²(π(β_j−k/q)) = Σ_j q (identity Σ_k sinc²(π(x−k/q)) = q). So tr G̃ = qN. Per-paper convention tr should be ~N... The paper normalizes aL² where the frame sum identity gives ‖v‖² = aL² exactly at critical density. With oversampling q: ‖v_ρ‖² = q·aL'². To keep tr G̃ = N, normalize by q: G̃(q) := (1/q)Σ_j SSᵀ. Then tr = N ✔ and entries G̃(q) = (1/q)Σ_j S S. At q=1 reduces to E-004 construction with λ=1... wait E-004 had G = VᵀV without 1/q — at q=1 they're the same ✔.\n\nSo general (λ, q): G̃(λ,q) = (1/q) Σ_j sinc(π(β_j − α_k)) sinc(π(β_j − α_k')), β_j = λ·(unfolded spacing-1 points), grid α_k = k/q covering the window, k = 0..qλW.\n\nMoments: m_r(λ,q) := (1/N) tr G̃(λ,q)^r... paper: tr G̃ᵏ = d·m_k(1). Two normalizations possible: per-d or per-N. For the certificate what matters is the CMS bound n₊(G̃)/d ≥ 1 − Λ... and then N^s_0 ≥ ... via the chain. Let me think about what certificate the 3-moment CMS gives.\n\nCMS/one-sided Chebyshev–Markov–Stieltjes (paper §7.2(d)): knowing moments μ_r := d⁻¹tr G̃ᵏ for k ≤ 2m, the sharp lower bound for n₊(G̃)/d is 1 − Λ_m(0), where Λ_m is the Christoffel function at 0 of the moment sequence (μ_0=1, μ_1, ..., μ_{2m}).\n\nWith 3 moments (k=1,2,3): the odd-order one-sided bound — Markov's: for moments μ₀..μ_{2m+1}, bound via Λ at a node... The simplest rigorous statement: n₊(G̃) = #{λᵢ > 0}... For a lower bound on the mass above 0: 1_{x>0} ≥ ... polynomial minorant of degree ≤ 3: max over deg-3 polys p ≤ 1_{(0,∞)} of ∫p dμ. That's an LP on moments — solvable exactly given μ₀..μ₃. p(x) = c₀ + c₁x + c₂x² + c₃x³ with p(x) ≤ 0 for x ≤ 0 and p(x) ≤ 1 for x > 0, maximize c₀ + c₁μ₁ + c₂μ₂ + c₃μ₃. The optimum: p touches 1_{x>0} at specific points. Classic result: the optimal minorant for the step at 0 with 3 moments: p(x) = 1 − (1−x/a)²(1+x/b)-ish form with contact points a > 0 (touching 1) and −b... p(0)=0, p touches 1 at x=a, touches 0 at x=−b (double)... This is solvable numerically via a tiny SDP/LP — but scipy only... could use cvxpy (not installed). Alternatively discretize: candidate optimal p has form p(x) = (x/b)²·... Standard: minorant of 1_{(0,∞)}: optimal p(x) = x(x+c)²/(a(a+c)²)·... let me just solve the dual: the bound = min over representing measures... Simplest: numerical SDP via small discretized LP with scipy.optimize.linprog (scipy installed ✔). Represent: maximize c·μ subject to p(x) ≤ 1_{x>0} on a fine grid of x ∈ [−δ, λmax] — approximate. Good enough for a decider experiment (tag [NUMERICAL-EVIDENCE]).\n\nBut hold on — what does n₊(G̃)/d give for simple zeros? In the paper's 2-moment chain, the output is rank P₁ ≥ (2−R)N via Lemma 3.2 — which is exactly the CMS m=1 bound (§7.2(d) says Lemma 3.2 IS the CMS m=1 case). With 3 moments: n₊(G̃)/d ≥ 1−Λ̃ where Λ̃ is the 3-moment (odd) Christoffel-type value. Then how does n₊(G̃) convert to simple zeros? In the paper's chain for the 2-moment case: N^s_0 ≥ rank P₁ ≥ 4tr G̃ − 2N − ‖G̃‖². The CMS generalization: the certificate ≤ N^s_0/N comes from... the ceiling theorem says any 2-moment bandwidth-1 certificate ≤ 0.682 — the CMS bound with 2 moments applied to n₊ then converted. For the experiment, the honest approach: compute what the paper's framework would give: certificate value = (d/N)·(1 − Λ(0))·(conversion factor). Hmm, the conversion from n₊(G̃) to N^s_0: n₊(G̃) ≤ N*_0 + p... no — actually n₊(G̃) relates to on-line zeros: Q has n₊(Q) ≤ p, so n₊(G̃) ≤ n₊(P) + p ≤ N*_0 + p... that's an upper bound, not lower. The chain direction: N^s_0 ≥ rank P₁ ≥ [bound from moments]. The CMS gives a lower bound on n₊(G̃)... and n₊(G̃) ≤ n₊(P) + n₊(Q) ≤ N*_0 + p... gives nothing (wrong direction). The paper's Lemma 3.2 with P₁ gives rank P₁ directly ≥ 2tr P₁ + 4tr Q′ − 4b − ‖G̃‖². The CMS interpretation (§7.2(d)): \"if the normalised moments d⁻¹tr G̃ᵏ, k ≤ 2m, are known, the sharp lower bound for n₊(G̃)/d is 1−Λ_m(0)\". And §7.2(f): HL*(4) would give N^s_0/N ≥ 13/18. So there IS a conversion n₊(G̃) → N^s_0 in the paper's framework. Λ₂(0) = 5/36 → 1−5/36 = 31/36; but 13/18 = 26/36. So N^s_0/N ≥ 13/18 ≠ 31/36: the conversion loses 5/36: 31/36 − 5/36·... hmm 31/36·(d/N)... d/N = 1 asymptotically at λ=1. 13/18 vs 31/36: 26/36 vs 31/36 — the conversion from n₊ to N^s_0 loses 5/36. Because n₊(G̃) counts on-line multiple zeros and off-line pairs too; converting to simple requires charging: N^s_0 ≥ n₊(G̃) − (s₂ + p)·... and s₂+p bounded by... From the chain: N ≥ s₁ + 2(s₂+p) ⟹ s₂+p ≤ (N−s₁)/2... This is getting complicated; the exact conversion for the 4-moment certificate is in the paper's conditional analysis (not fully spelled in §7.2(f)).\n\nFor E-005's purpose (method-level decider), the cleanest metric directly comparable across (λ,q): the 2-moment certificate C₂(λ,q) and the 3-moment certificate C₃(λ,q), both computed via the SAME conversion the paper uses. For 2 moments the paper's chain gives C₂ = (d/N)·(2 − R)-equivalent... hmm at λ=1, q=1: 2−R = 2/3 and 1−Λ₁(0) with moments 1, 1, 4/3: M = [[1,1],[1,4/3]]: Λ₁(0) = 1/(M⁻¹)₀₀: M⁻¹₀₀ = (4/3)/(4/3−1) = 4 → Λ₁(0) = 1/4 → 1−1/4 = 3/4 ≠ 2/3. So n₊/d ≥ 3/4 vs simple-certificate 2/3: conversion factor (2/3)/(3/4) = 8/9. And with 4 moments: 1−Λ₂ = 31/36, ×(conversion to get 13/18): (13/18)/(31/36) = (26/36)/(31/36) = 26/31 ≈ 0.839. Different conversion factors — the conversions aren't a fixed factor; the honest CMS-to-simple conversion involves the multiplicity charging.\n\nSimpler, defensible approach for E-005: compute the DIRECT analogue of the paper's certificate using 3 moments via the \"polynomial minorant of x↦x·1_{x>0}\"-type bounds? The paper's Lemma 3.2 is: rank ≥ 2tr P + 4tr Q − 4b − ‖P+Q‖². As a CMS statement on the spectrum of G̃: the certificate 2−R comes from minimizing... Honestly, replicating the exact paper conversion for k=3 requires knowing the paper's (unstated) 3-moment chain. What §7.2(f) DOES say: with m_k(1) = 1,4/3,2,13/4 and Λ₂(0)=5/36: N^s_0/N ≥ 13/18. Can I reverse-engineer 13/18 from 1,4/3,2,13/4? Try: certificate = (4trG̃·?...). Suppose certificate = α·m₁ + β·m₂ + γ·m₃ + δ·m₄ with constraint tight at eigenvalue pattern {1}_P {2}_Q and now also using higher moments... For the sine process all moments are those of the limiting distribution; the certificate can't exceed the actual simple fraction (=1 in the model). The 13/18 might come from the cubic weight ω(m) in §7.3... that gave 0.85082 for distinct. Hmm 13/18: maybe from the quadratic-polynomial minorant argument: find max c such that m(x) := multiplicity weight... \n\nLet me try: certificate for simple zeros from moments via the following: simple zeros correspond to eigenvalue 1 contributions; general certificate form: s₁ ≥ Σᵢ w(λᵢ) for any w with w(λ) ≤ [indicator that λ came from simple zero]... In the abstract extremal framework: configurations of points with marks (multiplicity structure), certificate = min over configs matching moments of simple fraction. That's exactly the LP the ceiling theorem uses (LawN256 with 2 moments). With 3-4 moments, the analogous LP would give the sharp certificate. For the sine-process moments 1,4/3,2,13/4, the LP optimum (over configurations matching these moments) = 13/18 per the paper. So 13/18 = the LP value — not derivable from Christoffel alone by me quickly. \n\nFor E-005, the honest and computable proxy: solve the small LP/SDP numerically! I.e., replicate the ceiling-style LP but with 3 moment constraints: maximize (non-simple fraction) over marked configurations on a grid matching m₁,m₂,m₃(λ,q) → certificate = 1 − that. This is exactly the LawN256 methodology (they used an exact-rational LP over 256-periodic marked configs!). We can do a rough floating-point LP with scipy.linprog: configurations = marks {1,2} at grid positions j/J; moment constraints: Σ_c w_c |Σ_i m e^{2πi jx/...}|²... the form-factor constraints are quadratic in marks but linear in the LAW weights w_c over a fixed dictionary of configurations. The LawN256 approach: dictionary of configurations c, weights w_c ≥ 0, Σw = 1, moment constraints linear in w: Σ_c w_c S_c(j) = target_j. Maximize Σ_c w_c·(nonsimple fraction of c) subject to matching moments. Dictionary: random 256-periodic configs... this is a real LP; with a few thousand dictionary configs and J=64 grid, linprog handles it.\n\nThat's getting heavy for one sub-stage. Simplification: we don't need the full LP. The decisive question Q2 is simpler: does the 3-moment (odd Christoffel/Markov) bound on n₊, times conversion, exceed 2/3 at λ=2/3, q=2? Use the SAME conversion ratio the paper exhibits at λ=1,q=1: paper's 2-moment: (1−Λ₁) = 3/4 → actual certificate 2/3 (factor 8/9); 4-moment: 31/36 → 13/18 (factor 26/31). Hmm no fixed rule. \n\nAlternative honest approach: compute the LP bound directly with the ceiling-LP method at coarse grid (J=48 or 64), comparing 2-moment vs 3-moment constraint sets at (λ=2/3, q=1) and (λ=2/3, q=2). If LP₃ ≤ 2/3 everywhere: G-002. If > 2/3: theorem path. This directly mirrors LawN256 (the paper's own ceiling methodology!) — defensible and decisive.\n\nBut time/complexity: building the LP is a moderate script (~150 lines) using scipy.optimize.linprog with a dictionary of ~2000 random marked configurations on J=64 grid, form factors computed by FFT. Moments: the constraints on the law = match the \"near-CUE\" rows? In LawN256 the adversary matches the CUE form factor S(j) = j/256 to 1e-40 and maximizes non-simple fraction. For our question the constraints should be: match the SINE-PROCESS moments m₁,m₂,m₃ of the G̃ spectrum... Hmm — the LP is over zero CONFIGURATIONS; the certificate data = the two/three trace moments of test functions against the configuration. The certificate's value at the sine process vs the adversarial config...\n\nActually — cleaner equivalent formulation (this is what the ceiling theorem does): a k-moment certificate is determined by its values; the adversary maximizes non-simple fraction subject to matching the sine process's first k form-factor/moment data. With 2 moments → LawN256 → 0.6818 non-simple... wait p₀ = 0.6818 was the SIMPLE fraction of the adversarial law (certificate ≤ 0.6818). So the LP: max simple-fraction-evasion. With 3 moments (support still ≤ 1): does the adversary's evasion drop below 1/3 (i.e. certificate > 2/3)? THAT is the decidable question — and it doesn't even need the (λ,q) sinc-Gram language: it's \"3 moments of bandwidth 1\". But our escape hatch requires λ=2/3 for unconditionality — the 3rd moment at bandwidth 1 is NOT available. At bandwidth 2/3, the moments are w.r.t. the λ-kernel — different moment targets.\n\nOK let me simplify to the executable decider, accepting [NUMERICAL-EVIDENCE] status:\n\nE-005 (revised, executable): the CMS-proxy comparison.\n1. For each (λ, q): build the sinc-Gram G̃(λ,q) on sine-process samples (as derived: β_j = λγ̃_j, grid k/q, normalize 1/q), extract empirical spectral moments μ_r(λ,q) = (1/d)tr G̃^r, r=1..4 (4th for reference).\n2. Compute the one-sided bounds: \n   - 2-moment CMS: 1 − Λ₁(0) from (μ₀,μ₁,μ₂).\n   - 3-moment Markov: solve the degree-3 polynomial minorant LP for 1_{x>0} given (μ₀..μ₃) — via discretized linprog.\n   - 4-moment CMS: 1 − Λ₂(0) for reference.\n3. Convert n₊-fraction to certificate estimate using the paper's own calibration at (λ=1,q=1): our model there should reproduce 2-moment → ~2/3-ish (via factor 8/9) and 4-moment → ~13/18-ish (26/31)... \n\nHmm, the conversion factor issue again. Let me think about whether n₊-to-simple conversion has a clean form. In the paper's chain: N^s_0 ≥ 4tr G̃ − 2N − ‖G̃‖². In units of N with d ≈ N, tr = N, ‖G̃‖² = (4/3)N: = 4 − 2 − 4/3 = 2/3 ✔. This IS a linear functional of the first two moments: C₂ = 4μ₁ − 2 − μ₂ (with μ per-N). The CMS form 1−Λ₁ is the sharp version of the same data. The paper's certificate uses the specific (non-sharp) linear combination; the ceiling LP shows even sharp ≤ 0.682.\n\nFor 3 moments, the sharp simple-certificate would come from a polynomial minorant of the multiplicity weight function... The §7.3 conditional cubic certificate: ω(m) = ½m + (1/18)(2m²−m³) + (4/9)1_{m=1} — that's for N_d. For N^s_0 with 4 moments: 13/18... Let me try to reverse-engineer 13/18 quickly: candidate: certificate = aμ₁ + bμ₂ + cμ₃ + dμ₄ with the polynomial p(x) = a x + b x² + c x³ + d x⁴ being a minorant of the weight w(λ) where... the eigenvalue of a simple on-line zero is 1 (charge 1 each) — the rank counts eigenvalues ≥... I could spend long here. \n\nDECISION: keep E-005 as the method-level decider using the LP-free CMS proxy and the paper's calibration points as the conversion reference, and be explicit that a positive result would then require deriving the exact 3-moment chain. The key output: does adding μ₃ move the one-sided bound materially at (2/3, 2) vs (1,1)? If the 3-moment minorant bound at λ=2/3,q=2 exceeds ~0.7 (leaving room for conversion loss) → worth pursuing; if it lands ≤ 2/3 → dead.\n\nCompute for reference what the model gives at (λ=1,q=1): μ = (1, 4/3, 2, 13/4)-ish per E-004 (per-point normalization matched per-d asymptotically). 2-moment minorant value: maximize ∫p dμ over p ≤ 1_{x>0}, deg 2: known answer 1−Λ₁(0) = 3/4. 3-moment: ? 4-moment: 31/36 = 0.861.\n\nFor the actual certificate comparison, define the heuristic conversion: certificate ≈ (n₊-bound) − (1 − μ₁)-ish... I'll present BOTH the raw n₊-bounds AND the calibrated conversion (linear interpolation of the paper's two calibration points 3/4→2/3 and 31/36→13/18: factor ≈ 0.85 avg). Crude but decision-sufficient: if 3-moment bound at (2/3,2) doesn't clearly exceed ~0.72, no path.\n\nImplementation:\n- Sine process samples as E-004 (GUE bulk, W=600).\n- Configs: (λ,q) ∈ {(1,1), (2/3,1), (2/3,2), (1/2,2), (0.8,1), (0.8,2), (2/3,1.5)?} keep q ∈ {1,2}, λ ∈ {0.5, 2/3, 0.8, 1.0}.\n- G̃(λ,q) = (1/q) VᵀV, V[j, k] = sinc(π(λγ̃_j − k/q)), grid k = 0..⌈qλW⌉. d = qλW.\n  Sanity λ=1,q=1: V = sinc(π(γ̃−k)) = E-004 ✔ (with 1/q = 1 ✔).\n- Moments μ_r = tr G̃^r / d, r = 1..4, averaged over 40 samples.\n- Bounds: CMS₂ = 1−Λ₁(0) (exact formula from μ₁,μ₂); CMS₄ = 1−Λ₂(0) (from μ₁..μ₄); Markov₃ via linprog: variables c₀..c₃; maximize c₀μ₀+...+c₃μ₃ s.t. p(x) ≤ 0 on grid x ∈ [−0.05, 0] and p(x) ≤ 1 on x ∈ (0, λmax] — need spectrum support: eigenvalues ∈ [0, ~4?]. At λ=1,q=1 the support ~[0,2]. Constrain on [0, 6] grid.\n  linprog from scipy.optimize: minimize −c·μ s.t. p(x_i) ≤ 1_{x_i>0} over grid — linear constraints ✔.\n- Output CSV: λ, q, μ₁..μ₄, CMS₂, Markov₃, CMS₄, plus calibrated certificate estimates.\n\nEdge effect: oversampled grid k/q beyond window — points near edges... same as before, ~1/√W.\n\nAlso sanity: at (2/3, 2): d = (4/3)W > N — the d-cap 4/3 > 1 no cap ✔. At (2/3,1): d = (2/3)W.\n\nOne more check on normalization (1/q): tr G̃ = (1/q)Σ_j Σ_k sinc²(π(λγ̃_j − k/q)) = (1/q)Σ_j q = N ✔ (using Σ_k sinc²(π(x − k/q)) = q identity — scaled: Σ_k sin²(π(x−k/q))/(π(x−k/q))² = q·... let me verify: Σ_k sinc²(π(x−k/q)): let y = qx: Σ_k sinc²(π(y−k)/q)·... hmm: sinc(π(x−k/q)) = sin(π(x−k/q))/(π(x−k/q)). Set f(t) = sin(πt)/(πt): Σ_k f(x − k/q)² = Σ_k f(qx−k)²/q²·q²... f(x−k/q) = sin(πx−πk/q)/(π(x−k/q)) = q·sin(πx−πk/q)/(π(qx−k)) = q·(−1)^... sin(πx − πk/q) isn't simply related to sin(πqx − πk) = (−1)^k sin(πqx)... sin(πqx − πk) = sin(πqx)cos(πk) = (−1)^k sin(πqx). And sin(πx − πk/q) = sin(πx)cos(πk/q) − cos(πx)sin(πk/q) — not a clean phase unless q=1. So the identity Σ_k f(x−k/q)² = q is NOT exact for q>1! Only approximate (Poisson: Σ_k f(x−k/q)² = q Σ_m f̂²-ish... f² has FT supported [−1,1]... f(t)² = sinc²(πt): its FT is the triangle Λ(u) supported [−1,1]·(1−|u|)... Poisson: Σ_k g(x−k/q) = q Σ_m ĝ(qm)e^{2πiqmx}: m≠0 terms need ĝ(±q) = 0 — ĝ = FT of sinc²(πt) = triangle(1−|u|)₁_{|u|≤1} → ĝ(q) = 0 for q ≥ 1 ✔ EXACT! Great: Σ_k sinc²(π(x−k/q)) = q·ĝ(0) = q exactly for integer q ≥ 1 ✔✔. This is again the no-aliasing (triangle vanishes beyond 1) — consistent with D-011's hatch. \n\nSo tr G̃ = N exactly (per construction). \n\nLet me now also decide the certificate conversion more carefully, because the decider needs a defensible number. Actually — cleanest: report the one-sided n₊ bounds (CMS₂, Markov₃, CMS₄) AND, crucially, the analogous \"paper-chain proxy\": the paper's actual 2-moment certificate C₂ = 4μ₁ − 2μ₀·(d/N)... — hmm at λ<1: baseline 2−R_λ(ψ₀) = 2 − 1/λ − λ/3 (Remark 6.1). Compare Markov₃-based estimate vs that baseline at the same λ. And the cap: certificate ≤ d/N = qλ.\n\nActually for the FINAL certificate number, use the paper's conversion observed at λ=1: their 2-moment sharp n₊ bound is 3/4 but certificate is 2/3; ratio 8/9 — because n₊(G̃) ≤ ... the chain converts via the multiplicity charges. Apply the same ratio: cert₃ ≈ (8/9)·Markov₃·(d/N)?? At (λ=1,q=1) this should ≈ ... Markov₃ at those moments: unknown, presumably ~0.79 → ·8/9 → 0.70?? That would ALREADY exceed 2/3 at λ=1 — but the 3rd moment isn't available at λ=1 — fine, it's the reference point showing what HL*(3)-ish would give.\n\nI'll report raw bounds + the 8/9-calibrated estimates, clearly labeled heuristic, and the decision rule: Markov₃·(8/9) > 0.72 at some (λ ≤ 2/3, q) → pursue; else G-002.\n\nHmm — the 8/9 calibration is shaky (different moment orders have different conversions: 26/31 for 4-moment). To be safer, decision rule on RAW Markov₃ vs RAW CMS₂ at the same (λ,q): if Markov₃ ≤ CMS₂ + 0.01 → third moment adds nothing → G-002. If materially bigger AND qλ > 2/3 AND calibrated cert > 2/3 → pursue. That's honest.\n\nLet me write E-005 now. Runtime: each sample: W=600 points; for each (λ,q): V is 600 × d (d up to 1200), G = VᵀV (d×d ≤ 1200²), eigvalsh ~1-2s, ×6 configs ×40 samples ≈ 5-8 min. Trim: W=500, 30 samples, eigvalsh only needed for... moments tr G̃^r can be computed WITHOUT eigendecomposition: tr G̃² = ΣG̃² (Frobenius), tr G̃³ = Σ G̃·(G̃∘...) — tr G̃³ = sum over i,j,l G̃_ij G̃_jl G̃_li = total sum of G̃∘(G̃@G̃)... = ⟨G̃, G̃²⟩_F. Computing G̃² = d³ flops (1200³ = 1.7e9 ~ 1-2s), G̃³ = another d³ for tr... tr G̃³ = Σᵢⱼ (G̃²)ᵢⱼ G̃_jᵢ = sum((G̃²)∘G̃). So per config: build G̃ (N·d² = 500·1.4e6 = 7e8) + G̃@G̃ (d³ = 1.7e9) + tr G̃⁴ needs G̃²@G̃² trace = ‖G̃²‖²_F — no extra cube. So ~3e9 flops/config ≈ 1-3s. ×6×30 = 3-9 min. OK. Markov₃ linprog: tiny.\n\nλ grid: {0.5, 2/3, 0.8, 1.0}, q ∈ {1, 2}. \n\nWrite the script.","signature":""},{"type":"text","text":"Building **E-005** — the decider experiment. Key construction detail I verified first: the oversampled Poisson identity Σ_k sinc²(π(x−k/q)) = q is *exact* for integer q ≥ 1 (the triangle Fourier transform of sinc² vanishes beyond 1 — same no-aliasing mechanism as D-011's hatch), so the oversampled Gram matrix is exact, and tr G̃ = N with 1/q normalization."},{"type":"tool_use","id":"Write_213","name":"Write","input":{"file_path":"D:\\Python\\Quantum\\research\\numerics\\scripts\\E-005-oversampled-third-moment.py","content":"\"\"\"E-005 — Task 1.3 decider: can a third moment at reduced bandwidth beat\n2/3? (Oversampling escape hatch, D-011.)\n\nModel: sine process (GUE bulk, unfolded spacing 1), window of W points.\nThe (lambda, q) sinc-Gram matrix (dimensionless, D-011 §4):\n  beta_j = lambda * gamma_j          (bandwidth lambda <-> prime support)\n  grid alpha_k = k/q, k = 0..q*lambda*W   (q-oversampled, EXACT no-aliasing:\n  sum_k sinc^2(pi(x - k/q)) = q for integer q >= 1 — triangle FT vanishes)\n  V[j,k] = sinc(pi (beta_j - alpha_k))  (np.sinc(x) = sin(pi x)/(pi x))\n  G = (1/q) V^T V                     (=> tr G = N exactly)\n  d = q*lambda*W rows; dimension cap on any certificate: d/N = q*lambda.\n\nMoments per-d: mu_r = tr G^r / d (r = 1..4; trace powers without\neigendecomposition: tr G^2 = |G|_F^2, tr G^3 = sum(G * (G@G)),\ntr G^4 = |G@G|_F^2).\n\nOne-sided bounds for n_+(G)/d (the certificate-relevant quantity):\n  CMS2  = 1 - Lambda_1(0)  from (mu0..mu2)   [m=1 Christoffel]\n  MARK3 = optimal degree-3 polynomial minorant of 1_{x>0} given\n          (mu0..mu3) — discretized LP (scipy.linprog)\n  CMS4  = 1 - Lambda_2(0)  from (mu0..mu4)   [reference; needs k=4]\nBaselines: paper 2-moment chain at bandwidth lambda (flat window):\n  C2(1) = 2/3; general R_lambda(psi0) = 1/lambda + lambda/3 (Remark 6.1);\n  cap = q*lambda.\nCalibrated conversion (heuristic): paper's sharp n_+ 2-moment bound 3/4\nmaps to certificate 2/3 -> factor 8/9; report MARK3*(8/9) as the\nheuristic certificate estimate, clearly tagged.\n\nDecision rule (recorded in JSON):\n  pursue  iff exists (lambda <= 2/3, q) with MARK3 > CMS2 + 0.01 AND\n          q*lambda > 2/3 AND heuristic cert > 2/3;\n  else G-002 (third-moment route closed with exact obstruction).\n\nOutputs: research/numerics/data/E-005-oversampled-third-moment.csv (+json)\n\"\"\"\nimport json\nimport sys\nimport time\nfrom datetime import datetime, timezone\nfrom pathlib import Path\n\nimport numpy as np\nfrom scipy.optimize import linprog\n\nREPO = Path(__file__).resolve().parents[3]\nDATA = REPO / \"research\" / \"numerics\" / \"data\"\nCSV = DATA / \"E-005-oversampled-third-moment.csv\"\nJSON = DATA / \"E-005-oversampled-third-moment.json\"\n\nRNG_SEED = 20260817\nN_GUE = 400\nW = 500\nN_SAMPLES = 30\nLAMBDAS = (0.5, 2.0 / 3.0, 0.8, 1.0)\nQS = (1, 2)\nXGRID = np.linspace(0.0, 6.0, 601)  # minorant enforcement grid\n\n\ndef gue_bulk_points(rng) -> np.ndarray:\n    A = rng.standard_normal((N_GUE, N_GUE)) + 1j * rng.standard_normal((N_GUE, N_GUE))\n    H = (A + A.conj().T) / 2.0\n    ev = np.linalg.eigvalsh(H) / np.sqrt(N_GUE)\n    lo, hi = int(0.2 * N_GUE), int(0.8 * N_GUE)\n    bulk = ev[lo:hi]\n    bulk = bulk / np.mean(np.diff(bulk))\n    mid = len(bulk) // 2\n    return bulk[mid - W // 2: mid + W // 2]\n\n\ndef christoffel_1(mus):\n    \"\"\"Lambda_1(0) = 1/(M^-1)_00, M = [[1, mu1],[mu1, mu2]].\"\"\"\n    M = np.array([[1.0, mus[1]], [mus[1], mus[2]]])\n    return 1.0 / np.linalg.inv(M)[0, 0]\n\n\ndef christoffel_2(mus):\n    M = np.array([[mus[i + j] for j in range(3)] for i in range(3)])\n    return 1.0 / np.linalg.inv(M)[0, 0]\n\n\ndef markov3(mus):\n    \"\"\"Maximize sum c_r mu_r over deg-3 polys p <= 1_{x>0} on XGRID.\"\"\"\n    # linprog minimizes; negate objective\n    c = -np.array([mus[0], mus[1], mus[2], mus[3]])\n    # constraints: for x <= 0: p(x) <= 0 ; for x > 0: p(x) <= 1\n    Arows, bvec = [], []\n    for x in XGRID:\n        powers = np.array([1.0, x, x**2, x**3])\n        if x <= 0:\n            Arows.append(powers)\n            bvec.append(0.0)\n        else:\n            Arows.append(powers)\n            bvec.append(1.0)\n    res = linprog(c, A_ub=np.array(Arows), b_ub=np.array(bvec),\n                  bounds=[(None, None)] * 4, method=\"highs\")\n    if not res.success:\n        return float(\"nan\")\n    return float(-res.fun)\n\n\ndef main() -> int:\n    if CSV.exists() and \"--force\" not in sys.argv:\n        print(f\"cached: {CSV} exists (use --force to recompute)\")\n        return 0\n    rng = np.random.default_rng(RNG_SEED)\n    t0 = time.time()\n\n    acc = {(lam, q): {r: [] for r in (1, 2, 3, 4)}\n           for lam in LAMBDAS for q in QS}\n    for s in range(N_SAMPLES):\n        pts = gue_bulk_points(rng)\n        pts = pts - pts[0]\n        npts = len(pts)\n        for lam in LAMBDAS:\n            beta = lam * pts\n            for q in QS:\n                d = int(round(q * lam * pts[-1]))\n                alpha = np.arange(d + 1) / q\n                V = np.sinc(beta[:, None] - alpha[None, :])\n                G = (V.T @ V) / q\n                G2 = G @ G\n                mus_here = {\n                    1: np.trace(G) / d,\n                    2: np.sum(G * G) / d,\n                    3: np.sum(G * G2) / d,\n                    4: np.sum(G2 * G2) / d,\n                }\n                for r in (1, 2, 3, 4):\n                    acc[(lam, q)][r].append(mus_here[r])\n        if (s + 1) % 10 == 0:\n            print(f\"  {s+1}/{N_SAMPLES} samples ({time.time()-t0:.0f}s)\",\n                  flush=True)\n\n    rows = []\n    decisions = []\n    for lam in LAMBDAS:\n        for q in QS:\n            mus = [1.0] + [float(np.mean(acc[(lam, q)][r]))\n                           for r in (1, 2, 3, 4)]\n            cms2 = 1.0 - christoffel_1(mus)\n            cms4 = 1.0 - christoffel_2(mus)\n            mk3 = markov3(mus)\n            cap = q * lam\n            base2 = 2.0 - (1.0 / lam + lam / 3.0)  # 2-moment baseline\n            heur = mk3 * (8.0 / 9.0)\n            rows.append({\n                \"lambda\": f\"{lam:.4f}\", \"q\": q, \"d_over_N\": f\"{cap:.4f}\",\n                \"mu1\": f\"{mus[1]:.4f}\", \"mu2\": f\"{mus[2]:.4f}\",\n                \"mu3\": f\"{mus[3]:.4f}\", \"mu4\": f\"{mus[4]:.4f}\",\n                \"CMS2\": f\"{cms2:.4f}\", \"MARKOV3\": f\"{mk3:.4f}\",\n                \"CMS4\": f\"{cms4:.4f}\",\n                \"baseline_2moment\": f\"{base2:.4f}\",\n                \"cap_q*lambda\": f\"{cap:.4f}\",\n                \"heuristic_cert_MARK3*8/9\": f\"{heur:.4f}\",\n            })\n            print(f\"lam={lam:.3f} q={q}: mu=({mus[1]:.3f},{mus[2]:.3f},\"\n                  f\"{mus[3]:.3f},{mus[4]:.3f})  CMS2={cms2:.4f}  \"\n                  f\"MARK3={mk3:.4f}  CMS4={cms4:.4f}  cap={cap:.3f}  \"\n                  f\"heur={heur:.4f}\", flush=True)\n            if lam <= 2.0 / 3.0 + 1e-9:\n                decisions.append(\n                    (mk3 > cms2 + 0.01) and (cap > 2.0 / 3.0)\n                    and (heur > 2.0 / 3.0))\n\n    pursue = any(decisions)\n    print(f\"\\nDECISION: {'PURSUE — a config beats 2/3' if pursue else 'CLOSE — no config beats 2/3 (G-002)'}\")\n\n    DATA.mkdir(parents=True, exist_ok=True)\n    with CSV.open(\"w\", encoding=\"utf-8\", newline=\"\") as f:\n        f.write(\",\".join(rows[0].keys()) + \"\\n\")\n        for r in rows:\n            f.write(\",\".join(str(v) for v in r.values()) + \"\\n\")\n    meta = {\n        \"experiment\": \"E-005\",\n        \"task\": \"1.3 decider (D-011 oversampling hatch)\",\n        \"description\": \"3-moment one-sided bounds for (lambda,q) sinc-Gram \"\n                       \"matrices over the sine process; decides whether an \"\n                       \"unconditional third moment (lambda <= 2/3) can beat 2/3\",\n        \"script\": \"research/numerics/scripts/E-005-oversampled-third-moment.py\",\n        \"parameters\": {\"N_GUE\": N_GUE, \"W\": W, \"lambdas\": list(LAMBDAS),\n                       \"qs\": list(QS), \"n_samples\": N_SAMPLES,\n                       \"seed\": RNG_SEED},\n        \"decision\": \"pursue\" if pursue else \"close\",\n        \"caveat\": \"sine-process model cannot see the D-H/Epstein \"\n                  \"obstruction; heuristic 8/9 conversion calibrated on \"\n                  \"paper's lambda=1 two-moment values\",\n        \"elapsed_seconds\": round(time.time() - t0, 1),\n        \"timestamp_utc\": datetime.now(timezone.utc).isoformat(),\n        \"row_count\": len(rows),\n    }\n    JSON.write_text(json.dumps(meta, indent=2), encoding=\"utf-8\")\n    print(f\"wrote {CSV.name}, {JSON.name}\")\n    return 0\n\n\nif __name__ == \"__main__\":\n    raise SystemExit(main())\n"},"extra_content":null}]