import F04Riemann.CodimensionAndCutoff import F04Riemann.FiniteChainBounds import F04Riemann.WorkedExamples /-! # Overlapping-Cutoff Decomposition and Sharp Breakdown Boundary (F04 §8 / Gap 2) This module formalizes the exact structural boundaries of the separated-window comparison method from F04 Section 8: 1. **Exact Overlapping Smooth-Cutoff Decomposition (`Q_form_cutoff_reconstruction`, `normSq_sum_eq_diag_add_overlap`, `normSq_cutoff_overlap_defect`, `B_form_overlapping_singular_obstruction`, `explicit_overlapping_cutoff_defect`)**: For any smooth cutoff partition `∑ i, χ_i = 1` on a neighborhood of `tsupport ψ` (with no disjointness hypothesis), the locally balanced pieces `φ_i = diffOp (mulCutoff χ_i ψ)` satisfy the exact decomposition of `Q_form (diffOp ψ)` and the exact `L^2` overlap defect identity. Whenever `corr a b 0 ≠ 0`, the individual pieces `w(t) C_{a,b}(0)` and `w(t) (C_{a,b}(t) + C_{a,b}(-t))/2` are both non-integrable on `(0, ∞)`, and the normalization term `A · C_{a,b}(0)` is nonzero, preventing reduction to the separated inter-window integral of `exact_interwindow_interaction`. An explicit non-constant smooth partition of unity on `ℝ` witnesses strictly positive overlap defect on locally balanced cutoff pieces. 2. **Sharp Separation Breakdown as Gap `d → 0⁺` (`tendsto_R_bound_atZero`, `chainContrib_le_of_pos`, `chainContrib_le_pi_sq`, `compMatrixChain_fails_small_gap_uniform`, `compMatrixChain_fails_small_gap`, `compMatrix_fails_small_gap`)**: As `d → 0⁺`, `residualWeight d ≥ 1 / (2 d)` and `R_bound L₁ L₂ d → +∞`. Meanwhile, the finite-chain diagonal enhancement is bounded uniformly in `N`: `chainContrib N L ≤ exp (L / 2) * π^2 / 9` for all `N : ℕ` and `L > 0` (hence `chainContrib N L ≤ π^2` for `0 < L ≤ log 2`). Consequently, for any fixed positive window widths `L₁, L₂ > 0`, there exists a single gap threshold `δ > 0` independent of `N` below which `quadForm (compMatrixChain N a b) ![1, 1] < 0` for every `N : ℕ`. 3. **Sharp Single-Window Width Threshold at `L > log 2` and Diagonal Sign Failure (`prime_enters_diagonal_above_log_two`, `single_window_diagonal_fails_large_L`, `m_func_neg_of_large_L`, `m_chain_log_two_neg`)**: Whenever `b - a > log 2`, prime `p = 2` enters `primePowerRange 0 (b - a)` with strictly positive weight `log 2 / √2`, and an explicit smooth locally balanced test function `φ` supported in `[a, b]` satisfies `∑' n, arithTermQ φ n = arithTermQ φ 2 > 0`, contributing `-2 * arithTermQ φ 2 < 0` to `Q_form φ`. Moreover, `m_func L < 0` for every `L ≥ 1 / 5`, and even the finite-chain bound satisfies `m_chain N (log 2) < 0` for every `N : ℕ`. -/ namespace F04Riemann open Real Complex MeasureTheory Set Filter Topology Finset /-! ### 0. Reusable Analytic and Test-Function Helpers -/ /-- A continuous, integrable, nonnegative real function strictly positive at a point has strictly positive integral over `ℝ`. -/ lemma integral_pos_of_nonneg_of_pos_at {f : ℝ → ℝ} (hf_cont : Continuous f) (hf_int : Integrable f volume) (hf_nn : ∀ x, 0 ≤ f x) {x₀ : ℝ} (hx₀ : 0 < f x₀) : 0 < ∫ x, f x := by obtain ⟨δ, hδ, hball⟩ := Metric.continuousAt_iff.mp hf_cont.continuousAt (f x₀ / 2) (by linarith) have hlow : ∀ x ∈ Icc (x₀ - δ / 2) (x₀ + δ / 2), f x₀ / 2 ≤ f x := by intro x hx have hdist : dist x x₀ < δ := by rw [Real.dist_eq, abs_lt] constructor <;> linarith [hx.1, hx.2] have hval := hball hdist rw [Real.dist_eq, abs_lt] at hval linarith [hval.1] have hsub : ∫ x in Icc (x₀ - δ / 2) (x₀ + δ / 2), (f x₀ / 2) ≤ ∫ x in Icc (x₀ - δ / 2) (x₀ + δ / 2), f x := MeasureTheory.setIntegral_mono_on (integrableOn_const (by simp)) hf_int.integrableOn measurableSet_Icc hlow have hle : ∫ x in Icc (x₀ - δ / 2) (x₀ + δ / 2), f x ≤ ∫ x, f x := MeasureTheory.setIntegral_le_integral hf_int (Filter.Eventually.of_forall hf_nn) have hconst : ∫ x in Icc (x₀ - δ / 2) (x₀ + δ / 2), (f x₀ / 2) = δ * (f x₀ / 2) := by rw [MeasureTheory.setIntegral_const, smul_eq_mul, Measure.real, Real.volume_Icc] have hdiff : x₀ + δ / 2 - (x₀ - δ / 2) = δ := by ring rw [hdiff, ENNReal.toReal_ofReal (le_of_lt hδ)] have hprod : 0 < δ * (f x₀ / 2) := by positivity linarith /-- Support containment `SupportedIn φ a b` implies `tsupport φ ⊆ Icc a b`. -/ lemma SupportedIn.tsupport_subset {φ : TestFn} {a b : ℝ} (h : SupportedIn φ a b) : tsupport φ ⊆ Icc a b := by refine closure_minimal (fun u hu => ?_) isClosed_Icc rw [Function.mem_support] at hu by_contra hnot exact hu (h u hnot) /-- The differential operator `diffOp` preserves support in any closed interval `[a, b]`. -/ lemma SupportedIn.diffOp {ψ : TestFn} {a b : ℝ} (h : SupportedIn ψ a b) : SupportedIn (diffOp ψ) a b := by intro u hu have hopen : IsOpen ((Icc a b)ᶜ) := isClosed_Icc.isOpen_compl have hev_ψ : ψ.toFun =ᶠ[𝓝 u] (fun _ => (0 : ℂ)) := by filter_upwards [hopen.mem_nhds hu] with t ht exact h t ht have hev_dψ : deriv ψ.toFun =ᶠ[𝓝 u] (fun _ => (0 : ℂ)) := by filter_upwards [hopen.mem_nhds hu] with t ht have hev_t : ψ.toFun =ᶠ[𝓝 t] (fun _ => (0 : ℂ)) := by filter_upwards [hopen.mem_nhds ht] with s hs exact h s hs rw [hev_t.deriv_eq, deriv_const] have hd2 : deriv (deriv ψ) u = 0 := by rw [hev_dψ.deriv_eq, deriv_const] have h0 : ψ u = 0 := h u hu simp [F04Riemann.diffOp, hd2, h0] /-- `diffOp (bumpTestFn a b) ≠ 0` whenever `a < b`. -/ lemma diffOp_bumpTestFn_ne_zero {a b : ℝ} (hab : a < b) : diffOp (bumpTestFn a b) ≠ 0 := by intro hzero set ψ := bumpTestFn a b set g := bumpReal a b have hg_smooth : ContDiff ℝ (⊤ : ℕ∞) g := contDiff_bumpReal a b have hg_d1 : ContDiff ℝ (⊤ : ℕ∞) (deriv g) := (contDiff_infty_iff_deriv.mp hg_smooth).2 have hg_d2 : ContDiff ℝ (⊤ : ℕ∞) (deriv (deriv g)) := (contDiff_infty_iff_deriv.mp hg_d1).2 have hode : ∀ u, deriv (deriv g) u - (1 / 4 : ℝ) * g u = 0 := by intro u have h0u := congrArg (fun f : TestFn => (f u).re) hzero have hd1_eq : ∀ t, deriv ψ.toFun t = ((deriv g t : ℝ) : ℂ) := by intro t have hd : HasDerivAt (fun s => (g s : ℂ)) ((deriv g t : ℝ) : ℂ) t := (hg_smooth.differentiable (by simp) t).hasDerivAt.ofReal_comp exact hd.deriv have hd2_eq : deriv (deriv ψ.toFun) u = ((deriv (deriv g) u : ℝ) : ℂ) := by have hfun : deriv ψ.toFun = fun t => ((deriv g t : ℝ) : ℂ) := funext hd1_eq rw [hfun] have hd : HasDerivAt (fun s => ((deriv g s : ℝ) : ℂ)) ((deriv (deriv g) u : ℝ) : ℂ) u := (hg_d1.differentiable (by simp) u).hasDerivAt.ofReal_comp exact hd.deriv change (deriv (deriv ψ.toFun) u - ((1 / 4 : ℝ) : ℂ) * ψ.toFun u).re = 0 at h0u rw [hd2_eq] at h0u change (((deriv (deriv g) u : ℝ) : ℂ) - ((1 / 4 : ℝ) : ℂ) * ((g u : ℝ) : ℂ)).re = 0 at h0u rw [← Complex.ofReal_mul, ← Complex.ofReal_sub, Complex.ofReal_re] at h0u exact h0u set A := a - 1 set B := b + 1 have hAB : A ≤ B := by linarith have hg_out : ∀ u, u ∉ Ioo a b → g u = 0 := fun u hu => bumpReal_eq_zero_of_notMem_Ioo hu have hgA : g A = 0 := hg_out A (fun h => by linarith [h.1]) have hgB : g B = 0 := hg_out B (fun h => by linarith [h.2]) have hibp := intervalIntegral_mul_deriv_eq_deriv_mul_of_hasDerivAt (a := A) (b := B) (u := g) (v := deriv g) (u' := deriv g) (v' := deriv (deriv g)) (fun t _ => (hg_smooth.differentiable (by simp) t).hasDerivAt) (fun t _ => (hg_d1.differentiable (by simp) t).hasDerivAt) (hg_d1.continuous.intervalIntegrable A B) (hg_d2.continuous.intervalIntegrable A B) rw [hgA, hgB, zero_mul, zero_mul, sub_self, zero_sub] at hibp have heq_int : ∫ t in A..B, g t * deriv (deriv g) t = (1 / 4 : ℝ) * ∫ t in A..B, g t ^ 2 := by rw [← intervalIntegral.integral_const_mul] refine intervalIntegral.integral_congr (fun t _ => ?_) have ht := hode t have : deriv (deriv g) t = (1 / 4 : ℝ) * g t := by linarith rw [this]; ring have hnn1 : 0 ≤ ∫ t in A..B, deriv g t * deriv g t := intervalIntegral.integral_nonneg hAB (fun t _ => mul_self_nonneg _) have hpos_sq : 0 < ∫ t in A..B, g t ^ 2 := by rw [← integral_eq_intervalIntegral_of_vanishes_outside_Icc hAB (fun t ht => by have hnot : t ∉ Ioo a b := fun h => ht ⟨by linarith [h.1], by linarith [h.2]⟩ simp [g, bumpReal_eq_zero_of_notMem_Ioo hnot])] have heq_sq : (fun t => g t ^ 2) = fun t => bumpReal a b t * bumpReal a b t := by ext t; ring rw [heq_sq] exact integral_bumpReal_mul_pos hab (contDiff_bumpReal a b).continuous (fun t ht => bumpReal_pos_of_mem_Ioo ht) linarith /-- Elementary quadratic cosine bound `1 - cos x ≤ x^2 / 2` for all `x ≥ 0`. -/ lemma one_sub_cos_le_sq_div_two {x : ℝ} (hx : 0 ≤ x) : 1 - Real.cos x ≤ x ^ 2 / 2 := by have hsin : ∀ t ≥ 0, Real.sin t ≤ t := by intro t ht exact sub_le_of_deriv_le ht (fun s _ => Real.hasDerivAt_sin s) (fun s _ => hasDerivAt_id' s) Real.continuous_cos continuous_const (fun s _ => Real.cos_le_one s) (by simp) exact sub_le_of_deriv_le hx (f := fun s => 1 - Real.cos s) (g := fun s => s ^ 2 / 2) (f' := Real.sin) (g' := id) (fun s _ => by simpa using (Real.hasDerivAt_cos s).const_sub 1) (fun s _ => by have hd := (hasDerivAt_pow 2 s).div_const 2 have hv : (2 : ℕ) * s ^ (2 - 1) / 2 = s := by push_cast; ring rwa [hv] at hd) Real.continuous_sin continuous_id (fun s hs => hsin s hs.1) (by simp) /-- `arctan` is strictly increasing on `ℝ`. -/ lemma arctan_lt_arctan_of_lt {x y : ℝ} (hxy : x < y) : arctan x < arctan y := by have hftc : ∫ t in x..y, (1 : ℝ) / (1 + t ^ 2) = arctan y - arctan x := intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hasDerivAt_arctan t) ((continuous_const.div (continuous_const.add (continuous_pow 2)) (fun t => ne_of_gt (one_add_sq_pos t))).intervalIntegrable x y) set M := max |x| |y| have hlow : ∀ t ∈ Icc x y, (1 : ℝ) / (1 + M ^ 2) ≤ 1 / (1 + t ^ 2) := by intro t ht have htabs : |t| ≤ M := by rw [abs_le] constructor · have : -|x| ≤ x := neg_abs_le x have : |x| ≤ M := le_max_left _ _ linarith [ht.1] · have : y ≤ |y| := le_abs_self y have : |y| ≤ M := le_max_right _ _ linarith [ht.2] have hsq : t ^ 2 ≤ M ^ 2 := by have h1 : |t| ^ 2 ≤ M ^ 2 := pow_le_pow_left₀ (abs_nonneg t) htabs 2 rwa [sq_abs] at h1 exact one_div_le_one_div_of_le (one_add_sq_pos t) (by linarith) have hle : ∫ _t in x..y, (1 : ℝ) / (1 + M ^ 2) ≤ ∫ t in x..y, (1 : ℝ) / (1 + t ^ 2) := intervalIntegral.integral_mono_on (le_of_lt hxy) (continuous_const.intervalIntegrable x y) ((continuous_const.div (continuous_const.add (continuous_pow 2)) (fun t => ne_of_gt (one_add_sq_pos t))).intervalIntegrable x y) hlow rw [intervalIntegral.integral_const, smul_eq_mul, hftc] at hle have hpos : 0 < (y - x) * (1 / (1 + M ^ 2)) := mul_pos (by linarith) (div_pos zero_lt_one (one_add_sq_pos M)) linarith /-- Self-contained proof of `3 < Real.pi` via the 6th-degree Taylor lower bound on `cos`. -/ lemma pi_gt_three : (3 : ℝ) < Real.pi := by have hcos_ge : ∀ x ≥ 0, 1 - x ^ 2 / 2 + x ^ 4 / 24 - x ^ 6 / 720 ≤ Real.cos x := by have h1 : ∀ t ≥ 0, Real.sin t ≤ t := by intro t ht exact sub_le_of_deriv_le ht (fun s _ => Real.hasDerivAt_sin s) (fun s _ => hasDerivAt_id' s) Real.continuous_cos continuous_const (fun s _ => Real.cos_le_one s) (by simp) have h2 : ∀ t ≥ 0, 1 - t ^ 2 / 2 ≤ Real.cos t := by intro t ht linarith [one_sub_cos_le_sq_div_two ht] have h3 : ∀ t ≥ 0, t - t ^ 3 / 6 ≤ Real.sin t := by intro t ht exact sub_le_of_deriv_le ht (f := fun s => s - s ^ 3 / 6) (g := Real.sin) (f' := fun s => 1 - s ^ 2 / 2) (g' := Real.cos) (fun s _ => by have hd := (hasDerivAt_id' s).sub ((hasDerivAt_pow 3 s).div_const 6) have hv : 1 - (3 : ℕ) * s ^ (3 - 1) / 6 = 1 - s ^ 2 / 2 := by push_cast; ring rwa [hv] at hd) (fun s _ => Real.hasDerivAt_sin s) (continuous_const.sub ((continuous_pow 2).div_const 2)) Real.continuous_cos (fun s hs => h2 s hs.1) (by simp) have h4 : ∀ t ≥ 0, Real.cos t ≤ 1 - t ^ 2 / 2 + t ^ 4 / 24 := by intro t ht have h := sub_le_of_deriv_le ht (f := fun s => s ^ 2 / 2 - s ^ 4 / 24) (g := fun s => 1 - Real.cos s) (f' := fun s => s - s ^ 3 / 6) (g' := Real.sin) (fun s _ => by have hd := ((hasDerivAt_pow 2 s).div_const 2).sub ((hasDerivAt_pow 4 s).div_const 24) have hv : (2 : ℕ) * s ^ (2 - 1) / 2 - (4 : ℕ) * s ^ (4 - 1) / 24 = s - s ^ 3 / 6 := by push_cast; ring rwa [hv] at hd) (fun s _ => by simpa using (Real.hasDerivAt_cos s).const_sub 1) (continuous_id.sub ((continuous_pow 3).div_const 6)) Real.continuous_sin (fun s hs => h3 s hs.1) (by simp) linarith have h5 : ∀ t ≥ 0, Real.sin t ≤ t - t ^ 3 / 6 + t ^ 5 / 120 := by intro t ht exact sub_le_of_deriv_le ht (f := Real.sin) (g := fun s => s - s ^ 3 / 6 + s ^ 5 / 120) (f' := Real.cos) (g' := fun s => 1 - s ^ 2 / 2 + s ^ 4 / 24) (fun s _ => Real.hasDerivAt_sin s) (fun s _ => by have hd := ((hasDerivAt_id' s).sub ((hasDerivAt_pow 3 s).div_const 6)).add ((hasDerivAt_pow 5 s).div_const 120) have hv : 1 - (3 : ℕ) * s ^ (3 - 1) / 6 + (5 : ℕ) * s ^ (5 - 1) / 120 = 1 - s ^ 2 / 2 + s ^ 4 / 24 := by push_cast; ring rwa [hv] at hd) Real.continuous_cos ((continuous_const.sub ((continuous_pow 2).div_const 2)).add ((continuous_pow 4).div_const 24)) (fun s hs => h4 s hs.1) (by simp) intro t ht have h := sub_le_of_deriv_le ht (f := fun s => 1 - Real.cos s) (g := fun s => s ^ 2 / 2 - s ^ 4 / 24 + s ^ 6 / 720) (f' := Real.sin) (g' := fun s => s - s ^ 3 / 6 + s ^ 5 / 120) (fun s _ => by simpa using (Real.hasDerivAt_cos s).const_sub 1) (fun s _ => by have hd := (((hasDerivAt_pow 2 s).div_const 2).sub ((hasDerivAt_pow 4 s).div_const 24)).add ((hasDerivAt_pow 6 s).div_const 720) have hv : (2 : ℕ) * s ^ (2 - 1) / 2 - (4 : ℕ) * s ^ (4 - 1) / 24 + (6 : ℕ) * s ^ (6 - 1) / 720 = s - s ^ 3 / 6 + s ^ 5 / 120 := by push_cast; ring rwa [hv] at hd) Real.continuous_sin ((continuous_id.sub ((continuous_pow 3).div_const 6)).add ((continuous_pow 5).div_const 120)) (fun s hs => h5 s hs.1) (by simp) linarith by_contra hle push Not at hle have ht_nn : 0 ≤ Real.pi / 2 := by linarith [Real.pi_pos] have ht_le : Real.pi / 2 ≤ 3 / 2 := by linarith have hsq_le : (Real.pi / 2) ^ 2 ≤ 9 / 4 := by nlinarith have hsq_nn : 0 ≤ (Real.pi / 2) ^ 2 := sq_nonneg _ have hcos := hcos_ge (Real.pi / 2) ht_nn rw [Real.cos_pi_div_two] at hcos have hpoly : 1 - (Real.pi / 2) ^ 2 / 2 + (Real.pi / 2) ^ 4 / 24 - (Real.pi / 2) ^ 6 / 720 = (1 - (9 / 4 : ℝ) / 2 + (9 / 4) ^ 2 / 24 - (9 / 4) ^ 3 / 720) + (9 / 4 - (Real.pi / 2) ^ 2) * (1 / 2 - ((Real.pi / 2) ^ 2 + 9 / 4) / 24 + ((Real.pi / 2) ^ 4 + 9 / 4 * (Real.pi / 2) ^ 2 + 81 / 16) / 720) := by ring have hc_pos : (0 : ℝ) < 1 - (9 / 4 : ℝ) / 2 + (9 / 4) ^ 2 / 24 - (9 / 4) ^ 3 / 720 := by norm_num have hfac_pos : (0 : ℝ) ≤ 1 / 2 - ((Real.pi / 2) ^ 2 + 9 / 4) / 24 + ((Real.pi / 2) ^ 4 + 9 / 4 * (Real.pi / 2) ^ 2 + 81 / 16) / 720 := by have h4_nn : 0 ≤ (Real.pi / 2) ^ 4 := by positivity linarith have hprod_nn : 0 ≤ (9 / 4 - (Real.pi / 2) ^ 2) * (1 / 2 - ((Real.pi / 2) ^ 2 + 9 / 4) / 24 + ((Real.pi / 2) ^ 4 + 9 / 4 * (Real.pi / 2) ^ 2 + 81 / 16) / 720) := mul_nonneg (by linarith) hfac_pos linarith /-- The Weil constant `A = log(8π) + γ_E + π/2` is strictly positive. -/ lemma weilConstA_pos : 0 < weilConstA := by unfold weilConstA have hlog : 0 < Real.log (8 * Real.pi) := Real.log_pos (by linarith [pi_gt_three]) linarith [eulerGamma_nonneg, Real.pi_pos] /-! ### 1. Exact Overlapping Smooth-Cutoff Decomposition and `L^2` Overlap Defect -/ lemma corr_zero_left (b : TestFn) (t : ℝ) : corr 0 b t = 0 := by simp [corr] lemma corr_zero_right (a : TestFn) (t : ℝ) : corr a 0 t = 0 := by simp [corr] lemma corr_sum_left {ι : Type*} (s : Finset ι) (f : ι → TestFn) (b : TestFn) (t : ℝ) : corr (∑ i ∈ s, f i) b t = ∑ i ∈ s, corr (f i) b t := by classical induction s using Finset.induction_on with | empty => simp [corr_zero_left] | insert x s hx ih => rw [Finset.sum_insert hx, corr_add_left, ih, Finset.sum_insert hx] lemma corr_sum_right {ι : Type*} (a : TestFn) (s : Finset ι) (g : ι → TestFn) (t : ℝ) : corr a (∑ i ∈ s, g i) t = ∑ i ∈ s, corr a (g i) t := by classical induction s using Finset.induction_on with | empty => simp [corr_zero_right] | insert x s hx ih => rw [Finset.sum_insert hx, corr_add_right, ih, Finset.sum_insert hx] /-- Unweighted finite-sum expansion of `Q_form (∑ i, φ i)` for an arbitrary (possibly overlapping) finite family `φ : Fin r → TestFn`. -/ theorem Q_form_sum {r : ℕ} (φ : Fin r → TestFn) : Q_form (∑ i : Fin r, φ i) = (∑ i : Fin r, Q_form (φ i)) + 2 * ∑ i : Fin r, ∑ j ∈ Finset.univ.filter (fun j => i < j), (B_form (φ j) (φ i)).re := by have h := Q_form_sum_expansion φ (fun _ => (1 : ℂ)) have hsum : (∑ i : Fin r, (1 : ℂ) • φ i) = ∑ i : Fin r, φ i := Finset.sum_congr rfl (fun i _ => one_smul ℂ (φ i)) rw [hsum] at h simpa using h /-- **Exact Overlapping Smooth-Cutoff Decomposition of `Q_form` (F04 §7–8)**: For any `ψ : TestFn` and smooth cutoffs `χ_i` summing to `1` on an open neighborhood `U` of `tsupport ψ` (with NO disjointness hypothesis), the locally balanced cutoff pieces `φ_i = diffOp (mulCutoff (χ i) (hχ i) ψ)` satisfy: 1. Each `φ_i` is individually balanced (`IsBalanced`), 2. Each `φ_i` obeys the exact product rule `χ_i (T ψ) + 2 χ_i' ψ' + χ_i'' ψ`, and 3. `Q_form (diffOp ψ)` decomposes exactly as the diagonal sum plus twice the real part of all pairwise interactions `B_form (φ_j) (φ_i)` (`i < j`). -/ theorem Q_form_cutoff_reconstruction {r : ℕ} (χ : Fin r → ℝ → ℂ) (hχ : ∀ i, ContDiff ℝ (⊤ : ℕ∞) (χ i)) (ψ : TestFn) {U : Set ℝ} (hU_open : IsOpen U) (hU_sub : tsupport ψ ⊆ U) (hsum_one : ∀ u ∈ U, ∑ i : Fin r, χ i u = 1) : (∀ i, IsBalanced (diffOp (mulCutoff (χ i) (hχ i) ψ))) ∧ (∀ i u, diffOp (mulCutoff (χ i) (hχ i) ψ) u = χ i u * diffOp ψ u + 2 * deriv (χ i) u * deriv ψ u + deriv (deriv (χ i)) u * ψ u) ∧ Q_form (diffOp ψ) = (∑ i : Fin r, Q_form (diffOp (mulCutoff (χ i) (hχ i) ψ))) + 2 * ∑ i : Fin r, ∑ j ∈ Finset.univ.filter (fun j => i < j), (B_form (diffOp (mulCutoff (χ j) (hχ j) ψ)) (diffOp (mulCutoff (χ i) (hχ i) ψ))).re := by obtain ⟨hbal, hrecon⟩ := cutoff_reconstruction_sum χ hχ ψ hU_open hU_sub hsum_one refine ⟨hbal, fun i u => cutoff_product_rule (χ i) (hχ i) ψ u, ?_⟩ rw [← hrecon] exact Q_form_sum (fun i => diffOp (mulCutoff (χ i) (hχ i) ψ)) /-- Interval-support specialization of `Q_form_cutoff_reconstruction`: if `SupportedIn ψ a b` and `∑ i, χ i = 1` on an open neighborhood `U ⊇ [a, b]`, then `Q_form (diffOp ψ)` obeys the exact overlapping-cutoff expansion. -/ theorem Q_form_cutoff_reconstruction_of_supportedIn {r : ℕ} (χ : Fin r → ℝ → ℂ) (hχ : ∀ i, ContDiff ℝ (⊤ : ℕ∞) (χ i)) {ψ : TestFn} {a b : ℝ} (hsupp : SupportedIn ψ a b) {U : Set ℝ} (hU_open : IsOpen U) (hIcc : Icc a b ⊆ U) (hsum_one : ∀ u ∈ U, ∑ i : Fin r, χ i u = 1) : Q_form (diffOp ψ) = (∑ i : Fin r, Q_form (diffOp (mulCutoff (χ i) (hχ i) ψ))) + 2 * ∑ i : Fin r, ∑ j ∈ Finset.univ.filter (fun j => i < j), (B_form (diffOp (mulCutoff (χ j) (hχ j) ψ)) (diffOp (mulCutoff (χ i) (hχ i) ψ))).re := (Q_form_cutoff_reconstruction χ hχ ψ hU_open (hsupp.tsupport_subset.trans hIcc) hsum_one).2.2 /-- **Exact Weighted `L^2` Overlap Defect Identity**: For ANY finite family `φ : Fin r → TestFn` (overlapping or disjoint) and coefficients `c : Fin r → ℂ`, `‖∑_i c_i φ_i‖_2^2 = ∑_i |c_i|^2 ‖φ_i‖_2^2 + 2 ∑_{i < j} Re(c_j conj(c_i) C_{φ_j, φ_i}(0))`. -/ theorem normSq_smul_sum_eq_diag_add_overlap {r : ℕ} (φ : Fin r → TestFn) (c : Fin r → ℂ) : normSq (∑ i : Fin r, c i • φ i) = (∑ i : Fin r, ‖c i‖ ^ 2 * normSq (φ i)) + 2 * ∑ i : Fin r, ∑ j ∈ Finset.univ.filter (fun j => i < j), (c j * starRingEnd ℂ (c i) * corr (φ j) (φ i) 0).re := by have hnorm_re : ∀ f : TestFn, normSq f = (corr f f 0).re := by intro f change normSq f = (autoCorr f 0).re rw [autoCorr_zero, Complex.ofReal_re] rw [hnorm_re, corr_sum_left] simp_rw [corr_sum_right, corr_smul_left, corr_smul_right] rw [Complex.re_sum] simp_rw [Complex.re_sum] have hsplit : ∀ a : Fin r, ∑ b : Fin r, (c a * (starRingEnd ℂ (c b) * corr (φ a) (φ b) 0)).re = ‖c a‖ ^ 2 * normSq (φ a) + (∑ b ∈ Finset.univ.filter (fun b => a < b), (c a * (starRingEnd ℂ (c b) * corr (φ a) (φ b) 0)).re) + (∑ b ∈ Finset.univ.filter (fun b => b < a), (c a * (starRingEnd ℂ (c b) * corr (φ a) (φ b) 0)).re) := by intro a have hunion : (Finset.univ : Finset (Fin r)) = ({a} ∪ Finset.univ.filter (fun b => a < b)) ∪ Finset.univ.filter (fun b => b < a) := by ext b simp only [Finset.mem_univ, Finset.mem_union, Finset.mem_singleton, Finset.mem_filter, true_and, true_iff] rcases lt_trichotomy a b with hlt | rfl | hgt · exact Or.inl (Or.inr hlt) · exact Or.inl (Or.inl rfl) · exact Or.inr hgt have hd1 : Disjoint ({a} : Finset (Fin r)) (Finset.univ.filter (fun b => a < b)) := by rw [Finset.disjoint_singleton_left]; simp have hd2 : Disjoint ({a} ∪ Finset.univ.filter (fun b => a < b)) (Finset.univ.filter (fun b => b < a)) := by rw [Finset.disjoint_left] intro b hb1 hb2 simp only [Finset.mem_union, Finset.mem_singleton, Finset.mem_filter, Finset.mem_univ, true_and] at hb1 hb2 rcases hb1 with rfl | hgt · exact lt_irrefl _ hb2 · exact lt_asymm hgt hb2 conv_lhs => rw [hunion] rw [Finset.sum_union hd2, Finset.sum_union hd1, Finset.sum_singleton] have hdiag : (c a * (starRingEnd ℂ (c a) * corr (φ a) (φ a) 0)).re = ‖c a‖ ^ 2 * normSq (φ a) := by have hc0 : corr (φ a) (φ a) 0 = (normSq (φ a) : ℂ) := autoCorr_zero (φ a) rw [← mul_assoc, Complex.mul_conj, Complex.normSq_eq_norm_sq, hc0, ← Complex.ofReal_mul, Complex.ofReal_re] rw [hdiag] simp_rw [hsplit, Finset.sum_add_distrib] have hoff1 : ∑ a : Fin r, ∑ b ∈ Finset.univ.filter (fun b => a < b), (c a * (starRingEnd ℂ (c b) * corr (φ a) (φ b) 0)).re = ∑ i : Fin r, ∑ j ∈ Finset.univ.filter (fun j => i < j), (c j * starRingEnd ℂ (c i) * corr (φ j) (φ i) 0).re := by refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_)) have hsym : starRingEnd ℂ (corr (φ i) (φ j) 0) = corr (φ j) (φ i) 0 := by have := corr_symm (φ j) (φ i) 0 simpa using this.symm have hconj : starRingEnd ℂ (c i * (starRingEnd ℂ (c j) * corr (φ i) (φ j) 0)) = c j * starRingEnd ℂ (c i) * corr (φ j) (φ i) 0 := by simp only [map_mul, RingHomCompTriple.comp_apply, RingHom.id_apply, hsym] ring rw [← hconj, Complex.conj_re] have hoff2 : ∑ a : Fin r, ∑ b ∈ Finset.univ.filter (fun b => b < a), (c a * (starRingEnd ℂ (c b) * corr (φ a) (φ b) 0)).re = ∑ i : Fin r, ∑ j ∈ Finset.univ.filter (fun j => i < j), (c j * starRingEnd ℂ (c i) * corr (φ j) (φ i) 0).re := by simp_rw [Finset.sum_filter] rw [Finset.sum_comm] refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_)) split_ifs <;> simp [mul_assoc] rw [hoff1, hoff2] ring /-- **Exact `L^2` Overlap Defect Identity**: For ANY finite family `φ : Fin r → TestFn` (overlapping or disjoint), `normSq (∑ i, φ i) = (∑ i, normSq (φ i)) + 2 * ∑_{i < j} (corr (φ j) (φ i) 0).re`. For disjoint windows every cross-term `corr (φ j) (φ i) 0` vanishes, recovering `normSq_sum_disjoint`; for overlapping smooth cutoffs this defect is generally nonzero. -/ theorem normSq_sum_eq_diag_add_overlap {r : ℕ} (φ : Fin r → TestFn) : normSq (∑ i : Fin r, φ i) = (∑ i : Fin r, normSq (φ i)) + 2 * ∑ i : Fin r, ∑ j ∈ Finset.univ.filter (fun j => i < j), (corr (φ j) (φ i) 0).re := by have h := normSq_smul_sum_eq_diag_add_overlap φ (fun _ => (1 : ℂ)) have hsum : (∑ i : Fin r, (1 : ℂ) • φ i) = ∑ i : Fin r, φ i := Finset.sum_congr rfl (fun i _ => one_smul ℂ (φ i)) rw [hsum] at h simpa using h /-- **Exact `L^2` Overlap Defect for Smooth-Cutoff Reconstruction**: In the cutoff decomposition `diffOp ψ = ∑ i, φ_i` with `φ_i = diffOp (mulCutoff χ_i ψ)`, the defect between `‖diffOp ψ‖_2^2` and `∑_i ‖φ_i‖_2^2` is exactly `2 * ∑_{i < j} Re C_{φ_j, φ_i}(0)`. -/ theorem normSq_cutoff_overlap_defect {r : ℕ} (χ : Fin r → ℝ → ℂ) (hχ : ∀ i, ContDiff ℝ (⊤ : ℕ∞) (χ i)) (ψ : TestFn) {U : Set ℝ} (hU_open : IsOpen U) (hU_sub : tsupport ψ ⊆ U) (hsum_one : ∀ u ∈ U, ∑ i : Fin r, χ i u = 1) : normSq (diffOp ψ) - ∑ i : Fin r, normSq (diffOp (mulCutoff (χ i) (hχ i) ψ)) = 2 * ∑ i : Fin r, ∑ j ∈ Finset.univ.filter (fun j => i < j), (corr (diffOp (mulCutoff (χ j) (hχ j) ψ)) (diffOp (mulCutoff (χ i) (hχ i) ψ)) 0).re := by have hrecon := (cutoff_reconstruction_sum χ hχ ψ hU_open hU_sub hsum_one).2 have h := normSq_sum_eq_diag_add_overlap (fun i => diffOp (mulCutoff (χ i) (hχ i) ψ)) rw [hrecon] at h linarith /-- The Weil weight `w(t) = e^{t/2} / sinh t` is NOT integrable on `(0, δ]` for any `δ > 0`, because `∫_ε^δ w(t) dt = B(ε) - B(δ) ≥ log(4/ε) - B(δ) → +∞` as `ε → 0⁺`. -/ theorem not_integrableOn_weilWeight_Ioc {δ : ℝ} (hδ : 0 < δ) : ¬ IntegrableOn weilWeight (Ioc (0 : ℝ) δ) volume := by intro hint set I := ∫ t in Ioc (0 : ℝ) δ, weilWeight t set ε := min (δ / 2) (4 * Real.exp (-(max (I + B_func δ) 0 + 1))) have hε_pos : 0 < ε := lt_min (by positivity) (by positivity) have hε_le_δ : ε ≤ δ := le_trans (min_le_left _ _) (by linarith) have hε_exp : ε ≤ 4 * Real.exp (-(max (I + B_func δ) 0 + 1)) := min_le_right _ _ have hsub : Ioc ε δ ⊆ Ioc (0 : ℝ) δ := fun t ht => ⟨lt_trans hε_pos ht.1, ht.2⟩ have hnn : 0 ≤ᵐ[volume.restrict (Ioc (0 : ℝ) δ)] weilWeight := (ae_restrict_iff' measurableSet_Ioc).mpr (Filter.Eventually.of_forall fun t ht => le_of_lt (weilWeight_pos ht.1)) have hmono : ∫ t in Ioc ε δ, weilWeight t ≤ I := MeasureTheory.setIntegral_mono_set hint hnn hsub.eventuallyLE rw [setIntegral_Ioc_weilWeight hε_pos hε_le_δ] at hmono have hB_ge : Real.log (4 / ε) ≤ B_func ε := log_four_div_le_B_func hε_pos have hdiv : Real.exp (max (I + B_func δ) 0 + 1) ≤ 4 / ε := by rw [le_div_iff₀ hε_pos] have hexp_pos : 0 < Real.exp (max (I + B_func δ) 0 + 1) := Real.exp_pos _ have hinv : Real.exp (-(max (I + B_func δ) 0 + 1)) = (Real.exp (max (I + B_func δ) 0 + 1))⁻¹ := Real.exp_neg _ rw [hinv] at hε_exp have hmul := mul_le_mul_of_nonneg_left hε_exp (le_of_lt hexp_pos) have hcancel : Real.exp (max (I + B_func δ) 0 + 1) * (4 * (Real.exp (max (I + B_func δ) 0 + 1))⁻¹) = 4 := by field_simp [ne_of_gt hexp_pos] linarith have hlog : max (I + B_func δ) 0 + 1 ≤ Real.log (4 / ε) := by have := Real.log_le_log (Real.exp_pos _) hdiv rwa [Real.log_exp] at this have hmax : I + B_func δ ≤ max (I + B_func δ) 0 := le_max_left _ _ linarith /-- Whenever `corr a b 0 ≠ 0`, the constant term `t ↦ w(t) C_{a,b}(0)` is NOT integrable on `(0, ∞)`. -/ theorem not_integrableOn_weilWeight_mul_corr_zero {a b : TestFn} (h0 : corr a b 0 ≠ 0) : ¬ IntegrableOn (fun t => (weilWeight t : ℂ) * corr a b 0) (Ioi (0 : ℝ)) volume := by intro hint have hint_Ioc : IntegrableOn (fun t => (weilWeight t : ℂ) * corr a b 0) (Ioc (0 : ℝ) 1) volume := hint.mono_set (fun _ ht => ht.1) have hnorm : IntegrableOn (fun t => ‖(weilWeight t : ℂ) * corr a b 0‖) (Ioc (0 : ℝ) 1) volume := hint_Ioc.norm have hc_pos : 0 < ‖corr a b 0‖ := norm_pos_iff.mpr h0 have hscaled : IntegrableOn (fun t => (‖corr a b 0‖)⁻¹ * ‖(weilWeight t : ℂ) * corr a b 0‖) (Ioc (0 : ℝ) 1) volume := hnorm.const_mul _ have hw_int : IntegrableOn weilWeight (Ioc (0 : ℝ) 1) volume := by refine IntegrableOn.congr_fun hscaled (fun t ht => ?_) measurableSet_Ioc rw [norm_mul, Complex.norm_real, Real.norm_of_nonneg (le_of_lt (weilWeight_pos ht.1))] field_simp [ne_of_gt hc_pos] exact not_integrableOn_weilWeight_Ioc zero_lt_one hw_int /-- Whenever `corr a b 0 ≠ 0`, the shifted correlation term `t ↦ w(t) (C_{a,b}(t) + C_{a,b}(-t)) / 2` is NOT integrable on `(0, ∞)`. -/ theorem not_integrableOn_weilWeight_mul_symm_corr {a b : TestFn} (h0 : corr a b 0 ≠ 0) : ¬ IntegrableOn (fun t => (weilWeight t : ℂ) * ((corr a b t + corr a b (-t)) / 2)) (Ioi (0 : ℝ)) volume := by intro hint have hcomb := integrableOn_weil_integrand a b have hadd := hcomb.add hint have hadd' : IntegrableOn (fun t => (weilWeight t : ℂ) * corr a b 0) (Ioi (0 : ℝ)) volume := hadd.congr_fun (fun t _ => by simp only [Pi.add_apply]; ring) measurableSet_Ioi exact not_integrableOn_weilWeight_mul_corr_zero h0 hadd' /-- **Singular `t → 0⁺` Obstruction for Overlapping Pairs (F04 §8 / Gap 2)**: Whenever two test functions `a, b` have nonzero overlap inner product `corr a b 0 ≠ 0`: 1. `B_form a b` keeps its exact regularized integral over `Ioi 0` (which IS integrable), 2. Neither `w(t) C_{a,b}(0)` nor `w(t) (C_{a,b}(t) + C_{a,b}(-t)) / 2` is separately integrable on `Ioi 0`, so the separated-window reduction `exact_interwindow_interaction` cannot even be formed, and 3. The normalization term `(weilConstA : ℂ) * corr a b 0` is strictly nonzero. -/ theorem B_form_overlapping_singular_obstruction {a b : TestFn} (h0 : corr a b 0 ≠ 0) : IntegrableOn (fun t => (weilWeight t : ℂ) * (corr a b 0 - (corr a b t + corr a b (-t)) / 2)) (Ioi (0 : ℝ)) volume ∧ ¬ IntegrableOn (fun t => (weilWeight t : ℂ) * corr a b 0) (Ioi (0 : ℝ)) volume ∧ ¬ IntegrableOn (fun t => (weilWeight t : ℂ) * ((corr a b t + corr a b (-t)) / 2)) (Ioi (0 : ℝ)) volume ∧ (weilConstA : ℂ) * corr a b 0 ≠ 0 ∧ B_form a b = (∫ t in Ioi (0 : ℝ), (weilWeight t : ℂ) * (corr a b 0 - (corr a b t + corr a b (-t)) / 2)) - (weilConstA : ℂ) * corr a b 0 - ∑' n : ℕ, arithTermB a b n := by refine ⟨integrableOn_weil_integrand a b, not_integrableOn_weilWeight_mul_corr_zero h0, not_integrableOn_weilWeight_mul_symm_corr h0, ?_, rfl⟩ exact mul_ne_zero (by exact_mod_cast (ne_of_gt weilConstA_pos)) h0 /-! #### Explicit Smooth Overlapping Examples (Bumps and Smooth Partition of Unity) -/ /-- Explicit smooth overlapping bumps `ψ₁ = bumpTestFn 0 2` and `ψ₂ = bumpTestFn 1 3` demonstrating strictly positive `L^2` overlap defect and nonvanishing `corr ψ₂ ψ₁ 0`. -/ theorem explicit_overlapping_bumps_defect : let ψ₁ := bumpTestFn 0 2 let ψ₂ := bumpTestFn 1 3 SupportedIn ψ₁ 0 2 ∧ SupportedIn ψ₂ 1 3 ∧ 0 < (corr ψ₂ ψ₁ 0).re ∧ corr ψ₂ ψ₁ 0 ≠ 0 ∧ normSq ψ₁ + normSq ψ₂ < normSq (ψ₁ + ψ₂) := by dsimp only set ψ₁ := bumpTestFn 0 2 set ψ₂ := bumpTestFn 1 3 have hsupp₁ : SupportedIn ψ₁ 0 2 := fun u hu => by have hnot : u ∉ Ioo (0 : ℝ) 2 := fun h => hu ⟨le_of_lt h.1, le_of_lt h.2⟩ simp [ψ₁, bumpTestFn, bumpReal_eq_zero_of_notMem_Ioo hnot] have hsupp₂ : SupportedIn ψ₂ 1 3 := fun u hu => by have hnot : u ∉ Ioo (1 : ℝ) 3 := fun h => hu ⟨le_of_lt h.1, le_of_lt h.2⟩ simp [ψ₂, bumpTestFn, bumpReal_eq_zero_of_notMem_Ioo hnot] have hre_eq : (corr ψ₂ ψ₁ 0).re = ∫ v, bumpReal 1 3 v * bumpReal 0 2 v := by unfold corr change Complex.reCLM (∫ v, ψ₂ (v + 0) * starRingEnd ℂ (ψ₁ v)) = _ rw [← Complex.reCLM.integral_comp_comm (integrable_corr_integrand ψ₂ ψ₁ 0)] congr 1; ext v change ((bumpReal 1 3 (v + 0) : ℂ) * starRingEnd ℂ (bumpReal 0 2 v : ℂ)).re = _ rw [add_zero, Complex.conj_ofReal, ← Complex.ofReal_mul, Complex.ofReal_re] have hre_pos : 0 < (corr ψ₂ ψ₁ 0).re := by rw [hre_eq] refine integral_pos_of_nonneg_of_pos_at ((contDiff_bumpReal 1 3).continuous.mul (contDiff_bumpReal 0 2).continuous) (integrable_of_continuous_of_vanishes_outside_Icc 1 2 ((contDiff_bumpReal 1 3).continuous.mul (contDiff_bumpReal 0 2).continuous) (fun v hv => by by_cases hv1 : v < 1 · rw [bumpReal_eq_zero_of_notMem_Ioo (fun h => by linarith [h.1]), zero_mul] · push Not at hv1 have hv2 : 2 < v := by by_contra hle; push Not at hle; exact hv ⟨hv1, hle⟩ have hb0 : bumpReal 0 2 v = 0 := bumpReal_eq_zero_of_notMem_Ioo (fun h => by linarith [h.2]) rw [hb0, mul_zero])) (fun v => mul_nonneg (bumpReal_nonneg 1 3 v) (bumpReal_nonneg 0 2 v)) (x₀ := 3 / 2) (mul_pos (bumpReal_pos_of_mem_Ioo ⟨by norm_num, by norm_num⟩) (bumpReal_pos_of_mem_Ioo ⟨by norm_num, by norm_num⟩)) have hne : corr ψ₂ ψ₁ 0 ≠ 0 := by intro h0; rw [h0, Complex.zero_re] at hre_pos; linarith have hdef : normSq ψ₁ + normSq ψ₂ < normSq (ψ₁ + ψ₂) := by have hsum := normSq_sum_eq_diag_add_overlap ![ψ₁, ψ₂] have hfin_sum : (∑ i : Fin 2, (![ψ₁, ψ₂] : Fin 2 → TestFn) i) = ψ₁ + ψ₂ := by rw [Fin.sum_univ_two]; rfl have hdiag : (∑ i : Fin 2, normSq ((![ψ₁, ψ₂] : Fin 2 → TestFn) i)) = normSq ψ₁ + normSq ψ₂ := by rw [Fin.sum_univ_two]; rfl have hoff : (∑ i : Fin 2, ∑ j ∈ Finset.univ.filter (fun j : Fin 2 => i < j), (corr ((![ψ₁, ψ₂] : Fin 2 → TestFn) j) ((![ψ₁, ψ₂] : Fin 2 → TestFn) i) 0).re) = (corr ψ₂ ψ₁ 0).re := by rw [Fin.sum_univ_two] have hf0 : Finset.univ.filter (fun j : Fin 2 => (0 : Fin 2) < j) = {1} := by decide have hf1 : Finset.univ.filter (fun j : Fin 2 => (1 : Fin 2) < j) = ∅ := by decide rw [hf0, hf1, Finset.sum_singleton, Finset.sum_empty, add_zero] rfl rw [hfin_sum, hdiag, hoff] at hsum linarith exact ⟨hsupp₁, hsupp₂, hre_pos, hne, hdef⟩ /-- Smooth `C^∞` transition ramp from `0` on `(-∞, a]` to `1` on `[b, ∞)` (for `a < b`). -/ noncomputable def smoothRamp (a b u : ℝ) : ℝ := smoothStep (u - a) / (smoothStep (u - a) + smoothStep (b - u)) lemma smoothRamp_denom_pos {a b : ℝ} (hab : a < b) (u : ℝ) : 0 < smoothStep (u - a) + smoothStep (b - u) := by by_cases h : a < u · have h1 : 0 < smoothStep (u - a) := smoothStep_pos_of_pos (by linarith) have h2 : 0 ≤ smoothStep (b - u) := by by_cases hbu : b - u ≤ 0 · rw [smoothStep_eq_zero_of_le hbu] · exact le_of_lt (smoothStep_pos_of_pos (lt_of_not_ge hbu)) linarith · push Not at h have h1 : smoothStep (u - a) = 0 := smoothStep_eq_zero_of_le (by linarith) have h2 : 0 < smoothStep (b - u) := smoothStep_pos_of_pos (by linarith) linarith lemma contDiff_smoothRamp {a b : ℝ} (hab : a < b) : ContDiff ℝ (⊤ : ℕ∞) (smoothRamp a b) := by unfold smoothRamp have h1 : ContDiff ℝ (⊤ : ℕ∞) (fun u : ℝ => smoothStep (u - a)) := contDiff_smoothStep.comp (contDiff_id.sub contDiff_const) have h2 : ContDiff ℝ (⊤ : ℕ∞) (fun u : ℝ => smoothStep (b - u)) := contDiff_smoothStep.comp (contDiff_const.sub contDiff_id) exact h1.div (h1.add h2) (fun u => ne_of_gt (smoothRamp_denom_pos hab u)) lemma smoothRamp_eq_zero_of_le {a b u : ℝ} (hu : u ≤ a) : smoothRamp a b u = 0 := by unfold smoothRamp rw [smoothStep_eq_zero_of_le (by linarith), zero_div] lemma smoothRamp_eq_one_of_ge {a b u : ℝ} (hab : a < b) (hu : b ≤ u) : smoothRamp a b u = 1 := by unfold smoothRamp have hpos : 0 < smoothStep (u - a) := smoothStep_pos_of_pos (by linarith) have h0 : smoothStep (b - u) = 0 := smoothStep_eq_zero_of_le (by linarith) rw [h0, add_zero, div_self (ne_of_gt hpos)] /-- Smooth cutoff partition `χ : Fin 2 → ℝ → ℂ` on `ℝ` transitioning on `[0, 3]` with an overlap plateau `χ 0 = χ 1 = 1 / 2` on `[1, 2]`: - `χ 0 u = 1, χ 1 u = 0` for `u ≤ 0`, - `χ 0 u = 1/2, χ 1 u = 1/2` for `u ∈ [1, 2]`, - `χ 0 u = 0, χ 1 u = 1` for `u ≥ 3`. -/ noncomputable def overlapCutoff : Fin 2 → ℝ → ℂ | ⟨0, _⟩ => fun u => ((1 - (smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) | ⟨1, _⟩ => fun u => (((smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) lemma contDiff_overlapCutoff (i : Fin 2) : ContDiff ℝ (⊤ : ℕ∞) (overlapCutoff i) := by have hr1 : ContDiff ℝ (⊤ : ℕ∞) (smoothRamp 0 1) := contDiff_smoothRamp (by norm_num) have hr2 : ContDiff ℝ (⊤ : ℕ∞) (smoothRamp 2 3) := contDiff_smoothRamp (by norm_num) have hs : ContDiff ℝ (⊤ : ℕ∞) (fun u => (smoothRamp 0 1 u + smoothRamp 2 3 u) / 2) := (hr1.add hr2).div_const 2 fin_cases i · exact Complex.ofRealCLM.contDiff.comp (contDiff_const.sub hs) · exact Complex.ofRealCLM.contDiff.comp hs lemma overlapCutoff_sum_one (u : ℝ) : ∑ i : Fin 2, overlapCutoff i u = 1 := by rw [Fin.sum_univ_two] change ((1 - (smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) + (((smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) = 1 rw [← Complex.ofReal_add] norm_cast ring /-- **Explicit Non-Constant Overlapping Smooth-Cutoff Witness (F04 §8 / Gap 2)**: Applying the non-constant smooth partition of unity `overlapCutoff` (`χ₀ + χ₁ = 1` on `ℝ`, `χ₀ ≡ 1` on `(-∞, 0]`, `χ₀ ≡ 0` on `[3, ∞)`, `χ₁ = 1 - χ₀`) to a smooth `ψ` supported in `[-2, 5]` produces two locally balanced cutoff pieces `φ₀ = diffOp (mulCutoff χ₀ ψ)` (supported in `[-2, 2]`) and `φ₁ = diffOp (mulCutoff χ₁ ψ)` (supported in `[1, 5]`) that: 1. Are individually balanced (`IsBalanced φ₀`, `IsBalanced φ₁`) and sum to `diffOp ψ`, 2. Have strictly positive overlap inner product `0 < (corr φ₁ φ₀ 0).re` (`corr φ₁ φ₀ 0 ≠ 0`), 3. Exhibit strict `L^2` overlap defect `normSq φ₀ + normSq φ₁ < normSq (diffOp ψ)`, and 4. Trigger the singular `t → 0⁺` Weil-integral obstruction for `B_form φ₁ φ₀`. -/ theorem explicit_overlapping_cutoff_defect : let ψ : TestFn := bumpTestFn (-2) (-1) + bumpTestFn (5 / 4) (7 / 4) + bumpTestFn 4 5 let φ : Fin 2 → TestFn := fun i => diffOp (mulCutoff (overlapCutoff i) (contDiff_overlapCutoff i) ψ) SupportedIn ψ (-2) 5 ∧ SupportedIn (φ 0) (-2) 2 ∧ SupportedIn (φ 1) 1 5 ∧ IsBalanced (φ 0) ∧ IsBalanced (φ 1) ∧ φ 0 + φ 1 = diffOp ψ ∧ 0 < (corr (φ 1) (φ 0) 0).re ∧ corr (φ 1) (φ 0) 0 ≠ 0 ∧ normSq (φ 0) + normSq (φ 1) < normSq (diffOp ψ) ∧ ¬ IntegrableOn (fun t => (weilWeight t : ℂ) * corr (φ 1) (φ 0) 0) (Ioi (0 : ℝ)) volume := by dsimp only set bL := bumpTestFn (-2) (-1) set bM := bumpTestFn (5 / 4) (7 / 4) set bR := bumpTestFn 4 5 set ψ : TestFn := bL + bM + bR set φ : Fin 2 → TestFn := fun i => diffOp (mulCutoff (overlapCutoff i) (contDiff_overlapCutoff i) ψ) have hsupp_bL : SupportedIn bL (-2) (-1) := fun u hu => by have hnot : u ∉ Ioo (-2 : ℝ) (-1) := fun h => hu ⟨le_of_lt h.1, le_of_lt h.2⟩ simp [bL, bumpTestFn, bumpReal_eq_zero_of_notMem_Ioo hnot] have hsupp_bM : SupportedIn bM (5 / 4) (7 / 4) := fun u hu => by have hnot : u ∉ Ioo (5 / 4 : ℝ) (7 / 4) := fun h => hu ⟨le_of_lt h.1, le_of_lt h.2⟩ simp [bM, bumpTestFn, bumpReal_eq_zero_of_notMem_Ioo hnot] have hsupp_bR : SupportedIn bR 4 5 := fun u hu => by have hnot : u ∉ Ioo (4 : ℝ) 5 := fun h => hu ⟨le_of_lt h.1, le_of_lt h.2⟩ simp [bR, bumpTestFn, bumpReal_eq_zero_of_notMem_Ioo hnot] have hsupp_ψ : SupportedIn ψ (-2) 5 := ((hsupp_bL.mono (by norm_num) (by norm_num)).add (hsupp_bM.mono (by norm_num) (by norm_num))).add (hsupp_bR.mono (by norm_num) (by norm_num)) -- Exact identification of `mulCutoff (overlapCutoff 0) ψ` and `mulCutoff (overlapCutoff 1) ψ`. have hm0 : mulCutoff (overlapCutoff 0) (contDiff_overlapCutoff 0) ψ = bL + ((1 / 2 : ℝ) : ℂ) • bM := by ext u change overlapCutoff 0 u * (bL u + bM u + bR u) = bL u + ((1 / 2 : ℝ) : ℂ) * bM u by_cases hL : u ∈ Icc (-2 : ℝ) (-1) · have hM0 : bM u = 0 := hsupp_bM u (fun h => by linarith [hL.2, h.1]) have hR0 : bR u = 0 := hsupp_bR u (fun h => by linarith [hL.2, h.1]) have hc : overlapCutoff 0 u = 1 := by change ((1 - (smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) = 1 rw [smoothRamp_eq_zero_of_le (by linarith [hL.2]), smoothRamp_eq_zero_of_le (by linarith [hL.2])] norm_num rw [hM0, hR0, hc]; ring · by_cases hM : u ∈ Icc (5 / 4 : ℝ) (7 / 4) · have hL0 : bL u = 0 := hsupp_bL u hL have hR0 : bR u = 0 := hsupp_bR u (fun h => by linarith [hM.2, h.1]) have hc : overlapCutoff 0 u = ((1 / 2 : ℝ) : ℂ) := by change ((1 - (smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) = _ rw [smoothRamp_eq_one_of_ge (by norm_num) (by linarith [hM.1]), smoothRamp_eq_zero_of_le (by linarith [hM.2])] norm_num rw [hL0, hR0, hc]; ring · by_cases hR : u ∈ Icc (4 : ℝ) 5 · have hL0 : bL u = 0 := hsupp_bL u hL have hM0 : bM u = 0 := hsupp_bM u hM have hc : overlapCutoff 0 u = 0 := by change ((1 - (smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) = 0 rw [smoothRamp_eq_one_of_ge (by norm_num) (by linarith [hR.1]), smoothRamp_eq_one_of_ge (by norm_num) (by linarith [hR.1])] norm_num rw [hL0, hM0, hc]; ring · rw [hsupp_bL u hL, hsupp_bM u hM, hsupp_bR u hR]; ring have hm1 : mulCutoff (overlapCutoff 1) (contDiff_overlapCutoff 1) ψ = ((1 / 2 : ℝ) : ℂ) • bM + bR := by ext u change overlapCutoff 1 u * (bL u + bM u + bR u) = ((1 / 2 : ℝ) : ℂ) * bM u + bR u by_cases hL : u ∈ Icc (-2 : ℝ) (-1) · have hM0 : bM u = 0 := hsupp_bM u (fun h => by linarith [hL.2, h.1]) have hR0 : bR u = 0 := hsupp_bR u (fun h => by linarith [hL.2, h.1]) have hc : overlapCutoff 1 u = 0 := by change (((smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) = 0 rw [smoothRamp_eq_zero_of_le (by linarith [hL.2]), smoothRamp_eq_zero_of_le (by linarith [hL.2])] norm_num rw [hM0, hR0, hc]; ring · by_cases hM : u ∈ Icc (5 / 4 : ℝ) (7 / 4) · have hL0 : bL u = 0 := hsupp_bL u hL have hR0 : bR u = 0 := hsupp_bR u (fun h => by linarith [hM.2, h.1]) have hc : overlapCutoff 1 u = ((1 / 2 : ℝ) : ℂ) := by change (((smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) = _ rw [smoothRamp_eq_one_of_ge (by norm_num) (by linarith [hM.1]), smoothRamp_eq_zero_of_le (by linarith [hM.2])] norm_num rw [hL0, hR0, hc]; ring · by_cases hR : u ∈ Icc (4 : ℝ) 5 · have hL0 : bL u = 0 := hsupp_bL u hL have hM0 : bM u = 0 := hsupp_bM u hM have hc : overlapCutoff 1 u = 1 := by change (((smoothRamp 0 1 u + smoothRamp 2 3 u) / 2 : ℝ) : ℂ) = 1 rw [smoothRamp_eq_one_of_ge (by norm_num) (by linarith [hR.1]), smoothRamp_eq_one_of_ge (by norm_num) (by linarith [hR.1])] norm_num rw [hL0, hM0, hc]; ring · rw [hsupp_bL u hL, hsupp_bM u hM, hsupp_bR u hR]; ring -- Linearity of `diffOp` on sums and scalar multiples. have hdiff_add : ∀ f g : TestFn, diffOp (f + g) = diffOp f + diffOp g := by intro f g; ext u have hd1 : deriv (f + g).toFun = fun t => deriv f.toFun t + deriv g.toFun t := by ext t exact ((f.differentiable t).hasDerivAt.add (g.differentiable t).hasDerivAt).deriv have hd2 : deriv (deriv (f + g).toFun) u = deriv (deriv f.toFun) u + deriv (deriv g.toFun) u := by rw [hd1] exact ((f.contDiff_deriv.differentiable (by simp) u).hasDerivAt.add (g.contDiff_deriv.differentiable (by simp) u).hasDerivAt).deriv change deriv (deriv (f + g).toFun) u - ((1 / 4 : ℝ) : ℂ) * (f u + g u) = (deriv (deriv f.toFun) u - ((1 / 4 : ℝ) : ℂ) * f u) + (deriv (deriv g.toFun) u - ((1 / 4 : ℝ) : ℂ) * g u) rw [hd2]; ring have hdiff_smul : ∀ (c : ℂ) (f : TestFn), diffOp (c • f) = c • diffOp f := by intro c f; ext u have hd1 : deriv (c • f).toFun = fun t => c * deriv f.toFun t := by ext t exact ((f.differentiable t).hasDerivAt.const_mul c).deriv have hd2 : deriv (deriv (c • f).toFun) u = c * deriv (deriv f.toFun) u := by rw [hd1] exact ((f.contDiff_deriv.differentiable (by simp) u).hasDerivAt.const_mul c).deriv change deriv (deriv (c • f).toFun) u - ((1 / 4 : ℝ) : ℂ) * (c * f u) = c * (deriv (deriv f.toFun) u - ((1 / 4 : ℝ) : ℂ) * f u) rw [hd2]; ring have hφ0_eq : φ 0 = diffOp bL + ((1 / 2 : ℝ) : ℂ) • diffOp bM := by change diffOp (mulCutoff (overlapCutoff 0) (contDiff_overlapCutoff 0) ψ) = _ rw [hm0, hdiff_add, hdiff_smul] have hφ1_eq : φ 1 = ((1 / 2 : ℝ) : ℂ) • diffOp bM + diffOp bR := by change diffOp (mulCutoff (overlapCutoff 1) (contDiff_overlapCutoff 1) ψ) = _ rw [hm1, hdiff_add, hdiff_smul] have hsupp_φ0 : SupportedIn (φ 0) (-2) 2 := by rw [hφ0_eq] exact (hsupp_bL.diffOp.mono (by norm_num) (by norm_num)).add ((hsupp_bM.diffOp.smul _).mono (by norm_num) (by norm_num)) have hsupp_φ1 : SupportedIn (φ 1) 1 5 := by rw [hφ1_eq] exact ((hsupp_bM.diffOp.smul _).mono (by norm_num) (by norm_num)).add (hsupp_bR.diffOp.mono (by norm_num) (by norm_num)) have hrecon_pair := cutoff_reconstruction_sum overlapCutoff contDiff_overlapCutoff ψ isOpen_univ (subset_univ _) (fun u _ => overlapCutoff_sum_one u) have hsum_eq : φ 0 + φ 1 = diffOp ψ := by have h := hrecon_pair.2 rw [Fin.sum_univ_two] at h exact h -- Compute `corr (φ 1) (φ 0) 0 = (1/4) * normSq (diffOp bM)`. have hcorr0 : corr (φ 1) (φ 0) 0 = ((1 / 4 : ℝ) * normSq (diffOp bM) : ℂ) := by rw [hφ1_eq, hφ0_eq, corr_add_left, corr_add_right, corr_add_right, corr_smul_left, corr_smul_right, corr_smul_left, corr_smul_right] have hML : corr (diffOp bM) (diffOp bL) 0 = 0 := corr_eq_zero_of_le hsupp_bM.diffOp hsupp_bL.diffOp (by norm_num) have hRL : corr (diffOp bR) (diffOp bL) 0 = 0 := corr_eq_zero_of_le hsupp_bR.diffOp hsupp_bL.diffOp (by norm_num) have hRM : corr (diffOp bR) (diffOp bM) 0 = 0 := corr_eq_zero_of_le hsupp_bR.diffOp hsupp_bM.diffOp (by norm_num) have hMM : corr (diffOp bM) (diffOp bM) 0 = (normSq (diffOp bM) : ℂ) := autoCorr_zero _ rw [hML, hRL, hRM, hMM, Complex.conj_ofReal] push_cast; ring have hnormM_pos : 0 < normSq (diffOp bM) := normSq_pos_of_ne_zero (diffOp_bumpTestFn_ne_zero (by norm_num)) have hre_pos : 0 < (corr (φ 1) (φ 0) 0).re := by rw [hcorr0, ← Complex.ofReal_mul, Complex.ofReal_re] linarith have hcorr_ne : corr (φ 1) (φ 0) 0 ≠ 0 := by intro h0; rw [h0, Complex.zero_re] at hre_pos; linarith have hdef : normSq (φ 0) + normSq (φ 1) < normSq (diffOp ψ) := by have h := normSq_sum_eq_diag_add_overlap φ rw [Fin.sum_univ_two, hsum_eq, Fin.sum_univ_two, Fin.sum_univ_two] at h have hf0 : Finset.univ.filter (fun j : Fin 2 => (0 : Fin 2) < j) = {1} := by decide have hf1 : Finset.univ.filter (fun j : Fin 2 => (1 : Fin 2) < j) = ∅ := by decide rw [hf0, hf1, Finset.sum_singleton, Finset.sum_empty, add_zero] at h linarith exact ⟨hsupp_ψ, hsupp_φ0, hsupp_φ1, hrecon_pair.1 0, hrecon_pair.1 1, hsum_eq, hre_pos, hcorr_ne, hdef, not_integrableOn_weilWeight_mul_corr_zero hcorr_ne⟩ /-! ### 2. Sharp Separation Breakdown as Gap `d → 0⁺` and Uniform-in-`N` Chain Saturation -/ /-- Elementary lower bound `residualWeight d ≥ 1 / (2 d)` on `(0, 1/5]`. -/ lemma residualWeight_ge_inv_two_mul {d : ℝ} (hd : 0 < d) (hd_le : d ≤ 1 / 5) : 1 / (2 * d) ≤ residualWeight d := by unfold residualWeight have hnum : (1 / 2 : ℝ) ≤ Real.exp (-(5 * d / 2)) := by have h := Real.add_one_le_exp (-(5 * d / 2)) linarith have hden_pos : 0 < 1 - Real.exp (-(2 * d)) := one_sub_exp_neg_two_pos hd have hden_le : 1 - Real.exp (-(2 * d)) ≤ 2 * d := by have h := Real.add_one_le_exp (-(2 * d)) linarith calc 1 / (2 * d) ≤ 1 / (1 - Real.exp (-(2 * d))) := one_div_le_one_div_of_le hden_pos hden_le _ ≤ (2 * Real.exp (-(5 * d / 2))) / (1 - Real.exp (-(2 * d))) := div_le_div_of_nonneg_right (by linarith) (le_of_lt hden_pos) /-- Elementary lower bound `R_bound L₁ L₂ d ≥ √(L₁ L₂) / (4 d)` on `(0, 1/5]`. -/ lemma R_bound_ge_sqrt_div_four_mul {L₁ L₂ d : ℝ} (hd : 0 < d) (hd_le : d ≤ 1 / 5) : Real.sqrt (L₁ * L₂) / (4 * d) ≤ R_bound L₁ L₂ d := by have hr := residualWeight_ge_inv_two_mul hd hd_le unfold residualWeight at hr unfold R_bound have hhalf : 1 / (4 * d) ≤ Real.exp (-(5 * d / 2)) / (1 - Real.exp (-(2 * d))) := by have hmul : 2 * (Real.exp (-(5 * d / 2)) / (1 - Real.exp (-(2 * d)))) = 2 * Real.exp (-(5 * d / 2)) / (1 - Real.exp (-(2 * d))) := by ring have h4 : 2 * (1 / (4 * d)) = 1 / (2 * d) := by ring linarith have hmul := mul_le_mul_of_nonneg_left hhalf (Real.sqrt_nonneg (L₁ * L₂)) have hrew : Real.sqrt (L₁ * L₂) * (1 / (4 * d)) = Real.sqrt (L₁ * L₂) / (4 * d) := by ring linarith /-- `residualWeight d → +∞` as `d → 0⁺`. -/ theorem tendsto_residualWeight_atZero : Tendsto residualWeight (𝓝[>] (0 : ℝ)) atTop := by rw [Filter.tendsto_atTop] intro M set δ := min (1 / 5 : ℝ) (1 / (2 * (max M 0 + 1))) have hδ_pos : 0 < δ := lt_min (by norm_num) (by positivity) filter_upwards [Ioo_mem_nhdsGT hδ_pos] with d hd have hd_pos : 0 < d := hd.1 have hd_le : d ≤ 1 / 5 := le_trans (le_of_lt hd.2) (min_le_left _ _) have hd_lt : d < 1 / (2 * (max M 0 + 1)) := lt_of_lt_of_le hd.2 (min_le_right _ _) have hprod : 2 * d * (max M 0 + 1) < 1 := by have := (lt_div_iff₀ (show (0 : ℝ) < 2 * (max M 0 + 1) by positivity)).mp hd_lt linarith have hdiv : max M 0 + 1 < 1 / (2 * d) := by rw [lt_div_iff₀ (by positivity)] linarith have hM_le : M ≤ max M 0 := le_max_left M 0 linarith [residualWeight_ge_inv_two_mul hd_pos hd_le] /-- **Sharp Continuous Blow-Up (`R_bound → +∞` as gap `d → 0⁺`)**: For any fixed positive window widths `L₁ > 0` and `L₂ > 0`, `R_bound L₁ L₂ d → +∞` as `d → 0⁺`. -/ theorem tendsto_R_bound_atZero {L₁ L₂ : ℝ} (hL₁ : 0 < L₁) (hL₂ : 0 < L₂) : Tendsto (R_bound L₁ L₂) (𝓝[>] (0 : ℝ)) atTop := by have hsq : 0 < Real.sqrt (L₁ * L₂) / 2 := by positivity have heq : R_bound L₁ L₂ = fun d => (Real.sqrt (L₁ * L₂) / 2) * residualWeight d := by ext d; unfold R_bound residualWeight; ring rw [heq] exact Filter.Tendsto.const_mul_atTop hsq tendsto_residualWeight_atZero /-- Pointwise upper bound `weilWeight t ≤ exp (L / 2) / t` for `0 < t ≤ L`. -/ lemma weilWeight_le_exp_half_div {t L : ℝ} (ht : 0 < t) (htL : t ≤ L) : weilWeight t ≤ Real.exp (L / 2) / t := by unfold weilWeight have h1 : Real.exp (t / 2) ≤ Real.exp (L / 2) := Real.exp_le_exp.mpr (by linarith) have h2 : t ≤ Real.sinh t := t_le_sinh (le_of_lt ht) calc Real.exp (t / 2) / Real.sinh t ≤ Real.exp (L / 2) / Real.sinh t := div_le_div_of_nonneg_right h1 (le_of_lt (sinh_pos_of_pos ht)) _ ≤ Real.exp (L / 2) / t := div_le_div_of_nonneg_left (le_of_lt (Real.exp_pos _)) ht h2 /-- Elementary constant-majorant bound on each finite-chain `B`-increment: `B(L / n) - B(L / (n - 1)) ≤ exp (L / 2) / (n - 1)` for all `n ≥ 2` and `L > 0`. -/ lemma B_func_div_sub_le {n : ℕ} (hn : 2 ≤ n) {L : ℝ} (hL : 0 < L) : B_func (L / (n : ℝ)) - B_func (L / ((n : ℝ) - 1)) ≤ Real.exp (L / 2) / ((n : ℝ) - 1) := by have hn_pos : (0 : ℝ) < (n : ℝ) := by exact_mod_cast (show 0 < n by omega) have hnm1_ge : (1 : ℝ) ≤ (n : ℝ) - 1 := by have : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn linarith have hnm1_pos : (0 : ℝ) < (n : ℝ) - 1 := by linarith have ha : 0 < L / (n : ℝ) := div_pos hL hn_pos have hab : L / (n : ℝ) ≤ L / ((n : ℝ) - 1) := div_le_div_of_nonneg_left (le_of_lt hL) hnm1_pos (by linarith) have hbL : L / ((n : ℝ) - 1) ≤ L := div_le_self (le_of_lt hL) hnm1_ge rw [← setIntegral_Ioc_weilWeight ha hab] have hw_int : IntegrableOn weilWeight (Ioc (L / (n : ℝ)) (L / ((n : ℝ) - 1))) volume := (continuousOn_weilWeight.mono (fun t ht => lt_of_lt_of_le ha ht.1)).integrableOn_Icc.mono_set Ioc_subset_Icc_self have hconst_int : IntegrableOn (fun _ : ℝ => Real.exp (L / 2) / (L / (n : ℝ))) (Ioc (L / (n : ℝ)) (L / ((n : ℝ) - 1))) volume := integrableOn_const (by simp) have hle : ∫ t in Ioc (L / (n : ℝ)) (L / ((n : ℝ) - 1)), weilWeight t ≤ ∫ _t in Ioc (L / (n : ℝ)) (L / ((n : ℝ) - 1)), (Real.exp (L / 2) / (L / (n : ℝ))) := by refine MeasureTheory.setIntegral_mono_on hw_int hconst_int measurableSet_Ioc (fun t ht => ?_) have ht_pos : 0 < t := lt_trans ha ht.1 have ht_le : t ≤ L := le_trans ht.2 hbL exact le_trans (weilWeight_le_exp_half_div ht_pos ht_le) (div_le_div_of_nonneg_left (le_of_lt (Real.exp_pos _)) ha (le_of_lt ht.1)) rw [MeasureTheory.setIntegral_const, smul_eq_mul, Measure.real, Real.volume_Ioc, ENNReal.toReal_ofReal (sub_nonneg.mpr hab)] at hle have halg : (L / ((n : ℝ) - 1) - L / (n : ℝ)) * (Real.exp (L / 2) / (L / (n : ℝ))) = Real.exp (L / 2) / ((n : ℝ) - 1) := by have hL_ne : L ≠ 0 := ne_of_gt hL have hn_ne : (n : ℝ) ≠ 0 := ne_of_gt hn_pos have hnm1_ne : (n : ℝ) - 1 ≠ 0 := ne_of_gt hnm1_pos field_simp ring linarith /-- Telescoping upper bound on each `chainTerm n L` (`n ≥ 2`, `L > 0`): `chainTerm n L ≤ (exp (L / 2) * π^2 / 9) * (1 / (n - 1) - 1 / n)`. -/ lemma chainTerm_le_telescope {n : ℕ} (hn : 2 ≤ n) {L : ℝ} (hL : 0 < L) : chainTerm n L ≤ (Real.exp (L / 2) * Real.pi ^ 2 / 9) * (1 / ((n : ℝ) - 1) - 1 / (n : ℝ)) := by unfold chainTerm have hn_ge2 : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn have hn_pos : (0 : ℝ) < (n : ℝ) := by linarith have hnm1_pos : (0 : ℝ) < (n : ℝ) - 1 := by linarith have hn1_pos : (0 : ℝ) < (n : ℝ) + 1 := by linarith have hcos : 1 - Real.cos (Real.pi / ((n : ℝ) + 1)) ≤ (Real.pi / ((n : ℝ) + 1)) ^ 2 / 2 := one_sub_cos_le_sq_div_two (div_nonneg (le_of_lt Real.pi_pos) (le_of_lt hn1_pos)) have hB : B_func (L / (n : ℝ)) - B_func (L / ((n : ℝ) - 1)) ≤ Real.exp (L / 2) / ((n : ℝ) - 1) := B_func_div_sub_le hn hL have hB_nn : 0 ≤ B_func (L / (n : ℝ)) - B_func (L / ((n : ℝ) - 1)) := B_func_sub_B_func_nonneg (div_pos hL hn_pos) (div_le_div_of_nonneg_left (le_of_lt hL) hnm1_pos (by linarith)) have hmul : (1 - Real.cos (Real.pi / ((n : ℝ) + 1))) * (B_func (L / (n : ℝ)) - B_func (L / ((n : ℝ) - 1))) ≤ ((Real.pi / ((n : ℝ) + 1)) ^ 2 / 2) * (Real.exp (L / 2) / ((n : ℝ) - 1)) := mul_le_mul hcos hB hB_nn (by positivity) -- Use `9 * n ≤ 2 * (n + 1)^2` for `n ≥ 2` (since `2(n+1)^2 - 9n = (2n - 1)(n - 2) ≥ 0`). have hquad : 9 * (n : ℝ) ≤ 2 * ((n : ℝ) + 1) ^ 2 := by nlinarith have hstep : ((Real.pi / ((n : ℝ) + 1)) ^ 2 / 2) * (Real.exp (L / 2) / ((n : ℝ) - 1)) ≤ (Real.exp (L / 2) * Real.pi ^ 2 / 9) * (1 / ((n : ℝ) - 1) - 1 / (n : ℝ)) := by have hlhs : ((Real.pi / ((n : ℝ) + 1)) ^ 2 / 2) * (Real.exp (L / 2) / ((n : ℝ) - 1)) = (Real.exp (L / 2) * Real.pi ^ 2) / (2 * ((n : ℝ) + 1) ^ 2 * ((n : ℝ) - 1)) := by have hn1_ne : (n : ℝ) + 1 ≠ 0 := ne_of_gt hn1_pos have hnm1_ne : (n : ℝ) - 1 ≠ 0 := ne_of_gt hnm1_pos field_simp have hrhs : (Real.exp (L / 2) * Real.pi ^ 2 / 9) * (1 / ((n : ℝ) - 1) - 1 / (n : ℝ)) = (Real.exp (L / 2) * Real.pi ^ 2) / (9 * (n : ℝ) * ((n : ℝ) - 1)) := by have hn_ne : (n : ℝ) ≠ 0 := ne_of_gt hn_pos have hnm1_ne : (n : ℝ) - 1 ≠ 0 := ne_of_gt hnm1_pos field_simp ring rw [hlhs, hrhs] refine div_le_div_of_nonneg_left (by positivity) (by positivity) ?_ exact mul_le_mul_of_nonneg_right hquad (le_of_lt hnm1_pos) exact le_trans hmul hstep /-- Exact telescoping bound `∑_{n=2}^N (1 / (n - 1) - 1 / n) ≤ 1` for every `N : ℕ`. -/ lemma sum_inv_sub_inv_le_one (N : ℕ) : ∑ n ∈ Finset.Icc 2 N, ((1 : ℝ) / ((n : ℝ) - 1) - 1 / (n : ℝ)) ≤ 1 := by induction N with | zero => simp | succ k ih => rcases eq_or_ne k 0 with rfl | hk0 · simp · have hk1 : 1 ≤ k := Nat.one_le_iff_ne_zero.mpr hk0 have hval : ∀ m : ℕ, 1 ≤ m → ∑ n ∈ Finset.Icc 2 m, ((1 : ℝ) / ((n : ℝ) - 1) - 1 / (n : ℝ)) = 1 - 1 / (m : ℝ) := by intro m hm induction m, hm using Nat.le_induction with | base => simp | succ j hj ihj => have hset : Finset.Icc 2 (j + 1) = insert (j + 1) (Finset.Icc 2 j) := by ext x; simp only [Finset.mem_Icc, Finset.mem_insert]; omega rw [hset, Finset.sum_insert (by simp only [Finset.mem_Icc]; omega), ihj] push_cast have hsub : (j : ℝ) + 1 - 1 = (j : ℝ) := by ring rw [hsub] ring rw [hval (k + 1) (by omega)] have hpos : (0 : ℝ) < 1 / ((k + 1 : ℕ) : ℝ) := by positivity linarith /-- **Uniform-in-`N` Finite-Chain Saturation Bound**: For EVERY `N : ℕ` and EVERY `L > 0`, `chainContrib N L ≤ exp (L / 2) * π^2 / 9`. -/ theorem chainContrib_le_of_pos (N : ℕ) {L : ℝ} (hL : 0 < L) : chainContrib N L ≤ Real.exp (L / 2) * Real.pi ^ 2 / 9 := by unfold chainContrib calc ∑ n ∈ Finset.Icc 2 N, chainTerm n L ≤ ∑ n ∈ Finset.Icc 2 N, (Real.exp (L / 2) * Real.pi ^ 2 / 9) * (1 / ((n : ℝ) - 1) - 1 / (n : ℝ)) := Finset.sum_le_sum (fun n hn => chainTerm_le_telescope (Finset.mem_Icc.mp hn).1 hL) _ = (Real.exp (L / 2) * Real.pi ^ 2 / 9) * ∑ n ∈ Finset.Icc 2 N, (1 / ((n : ℝ) - 1) - 1 / (n : ℝ)) := by rw [← Finset.mul_sum] _ ≤ (Real.exp (L / 2) * Real.pi ^ 2 / 9) * 1 := mul_le_mul_of_nonneg_left (sum_inv_sub_inv_le_one N) (by positivity) _ = Real.exp (L / 2) * Real.pi ^ 2 / 9 := mul_one _ /-- Uniform-in-`(N, L)` bound on `(0, log 2]`: `chainContrib N L ≤ π^2` for all `N : ℕ` and all `0 < L ≤ log 2`. -/ theorem chainContrib_le_pi_sq (N : ℕ) {L : ℝ} (hL : 0 < L) (hL_le : L ≤ Real.log 2) : chainContrib N L ≤ Real.pi ^ 2 := by have h1 := chainContrib_le_of_pos N hL have hexp : Real.exp (L / 2) ≤ 2 := by calc Real.exp (L / 2) ≤ Real.exp (Real.log 2) := Real.exp_le_exp.mpr (by linarith) _ = 2 := Real.exp_log (by norm_num) have hpi : 0 ≤ Real.pi ^ 2 := sq_nonneg Real.pi nlinarith /-- Uniform-in-`N` upper bound on `m_chain N L` for every `L > 0`. -/ theorem m_chain_le_of_pos (N : ℕ) {L : ℝ} (hL : 0 < L) : m_chain N L ≤ m_func L + Real.exp (L / 2) * Real.pi ^ 2 / 9 := by unfold m_chain linarith [chainContrib_le_of_pos N hL] /-- Uniform-in-`N` upper bound `m_chain N L ≤ m_func L + π^2` for `0 < L ≤ log 2`. -/ theorem m_chain_le_add_pi_sq (N : ℕ) {L : ℝ} (hL : 0 < L) (hL_le : L ≤ Real.log 2) : m_chain N L ≤ m_func L + Real.pi ^ 2 := by unfold m_chain linarith [chainContrib_le_pi_sq N hL hL_le] /-- Exact evaluation of `quadForm (compMatrixChain N a b) ![1, 1]` on two windows. -/ lemma quadForm_compMatrixChain_two_ones (N : ℕ) (a b : Fin 2 → ℝ) : quadForm (compMatrixChain N a b) ![1, 1] = m_chain N (b 0 - a 0) + m_chain N (b 1 - a 1) - 2 * E_bound (b 0 - a 0) (b 1 - a 1) (a 1 - b 0) (b 1 - a 0) := by rw [quadForm_compMatrixChain] have hdiag : (∑ i : Fin 2, m_chain N (b i - a i) * (![1, 1] : Fin 2 → ℝ) i ^ 2) = m_chain N (b 0 - a 0) + m_chain N (b 1 - a 1) := by rw [Fin.sum_univ_two]; norm_num have hoff : (∑ i : Fin 2, ∑ j ∈ Finset.univ.filter (fun j : Fin 2 => i < j), offDiagBound a b i j * (![1, 1] : Fin 2 → ℝ) i * (![1, 1] : Fin 2 → ℝ) j) = E_bound (b 0 - a 0) (b 1 - a 1) (a 1 - b 0) (b 1 - a 0) := by rw [Fin.sum_univ_two] have hf0 : Finset.univ.filter (fun j : Fin 2 => (0 : Fin 2) < j) = {1} := by decide have hf1 : Finset.univ.filter (fun j : Fin 2 => (1 : Fin 2) < j) = ∅ := by decide rw [hf0, hf1, Finset.sum_singleton, Finset.sum_empty, add_zero, offDiagBound_of_lt a b (by decide : (0 : Fin 2) < 1)] norm_num rw [hdiag, hoff] /-- Exact evaluation of `quadForm (compMatrix a b) ![1, 1]` on two windows. -/ lemma quadForm_compMatrix_two_ones (a b : Fin 2 → ℝ) : quadForm (compMatrix a b) ![1, 1] = m_func (b 0 - a 0) + m_func (b 1 - a 1) - 2 * E_bound (b 0 - a 0) (b 1 - a 1) (a 1 - b 0) (b 1 - a 0) := by have h1 := quadForm_compMatrixChain_two_ones 1 a b rw [m_chain_one, m_chain_one] at h1 rw [← h1] unfold quadForm refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_)) congr 1; congr 1 simp only [compMatrix, compMatrixChain, Matrix.of_apply, m_chain_one] /-- **Uniform-in-`N` Small-Gap Breakdown of the Finite-Chain Comparison Matrix**: For ANY fixed positive window widths `L₁ > 0, L₂ > 0`, there exists a SINGLE gap threshold `δ > 0` (independent of `N`) such that for EVERY finite-chain order `N : ℕ` and EVERY pair of adjacent windows `[a 0, b 0]` and `[a 1, b 1]` of widths `L₁, L₂` with gap `0 < a 1 - b 0 < δ`: `quadForm (compMatrixChain N a b) ![1, 1] < 0`. -/ theorem compMatrixChain_fails_small_gap_uniform {L₁ L₂ : ℝ} (hL₁ : 0 < L₁) (hL₂ : 0 < L₂) : ∃ δ > 0, ∀ (N : ℕ) (a b : Fin 2 → ℝ), b 0 - a 0 = L₁ → b 1 - a 1 = L₂ → 0 < a 1 - b 0 → a 1 - b 0 < δ → quadForm (compMatrixChain N a b) ![1, 1] < 0 := by set M := (m_func L₁ + Real.exp (L₁ / 2) * Real.pi ^ 2 / 9) + (m_func L₂ + Real.exp (L₂ / 2) * Real.pi ^ 2 / 9) set δ := min (1 / 5 : ℝ) (Real.sqrt (L₁ * L₂) / (2 * (max M 0 + 1))) have hsqrt_pos : 0 < Real.sqrt (L₁ * L₂) := Real.sqrt_pos.mpr (mul_pos hL₁ hL₂) have hδ_pos : 0 < δ := lt_min (by norm_num) (by positivity) refine ⟨δ, hδ_pos, fun N a b hlen0 hlen1 hd_pos hd_lt => ?_⟩ rw [quadForm_compMatrixChain_two_ones, hlen0, hlen1] have hm_le : m_chain N L₁ + m_chain N L₂ ≤ M := by dsimp only [M] linarith [m_chain_le_of_pos N hL₁, m_chain_le_of_pos N hL₂] have hd_le_fifth : a 1 - b 0 ≤ 1 / 5 := le_trans (le_of_lt hd_lt) (min_le_left _ _) have hd_lt_bound : a 1 - b 0 < Real.sqrt (L₁ * L₂) / (2 * (max M 0 + 1)) := lt_of_lt_of_le hd_lt (min_le_right _ _) have hR_ge : Real.sqrt (L₁ * L₂) / (4 * (a 1 - b 0)) ≤ R_bound L₁ L₂ (a 1 - b 0) := R_bound_ge_sqrt_div_four_mul hd_pos hd_le_fifth have hE_ge : R_bound L₁ L₂ (a 1 - b 0) ≤ E_bound L₁ L₂ (a 1 - b 0) (b 1 - a 0) := by unfold E_bound linarith [P_bound_nonneg (a 1 - b 0) (b 1 - a 0)] have h2R : max M 0 + 1 < 2 * R_bound L₁ L₂ (a 1 - b 0) := by have hmul : (a 1 - b 0) * (2 * (max M 0 + 1)) < Real.sqrt (L₁ * L₂) := (lt_div_iff₀ (show (0 : ℝ) < 2 * (max M 0 + 1) by positivity)).mp hd_lt_bound have hdiv : max M 0 + 1 < Real.sqrt (L₁ * L₂) / (2 * (a 1 - b 0)) := by rw [lt_div_iff₀ (by positivity)] linarith have h2 : 2 * (Real.sqrt (L₁ * L₂) / (4 * (a 1 - b 0))) = Real.sqrt (L₁ * L₂) / (2 * (a 1 - b 0)) := by have hd_ne : a 1 - b 0 ≠ 0 := ne_of_gt hd_pos field_simp ring linarith have hM_le : M ≤ max M 0 := le_max_left M 0 linarith /-- **Small-Gap Breakdown for Any Fixed Finite-Chain Order `N`**: For any `N : ℕ` and fixed positive widths `L₁, L₂ > 0`, there exists `δ > 0` below which `compMatrixChain N a b` fails positive semidefiniteness (and even copositivity on `ℝ_{≥ 0}^2`), witnessed by `v = ![1, 1]`. -/ theorem compMatrixChain_fails_small_gap {N : ℕ} {L₁ L₂ : ℝ} (hL₁ : 0 < L₁) (hL₂ : 0 < L₂) : ∃ δ > 0, ∀ (a b : Fin 2 → ℝ), b 0 - a 0 = L₁ → b 1 - a 1 = L₂ → 0 < a 1 - b 0 → a 1 - b 0 < δ → quadForm (compMatrixChain N a b) ![1, 1] < 0 ∧ ¬ (∀ v : Fin 2 → ℝ, (∀ i, 0 ≤ v i) → 0 ≤ quadForm (compMatrixChain N a b) v) := by obtain ⟨δ, hδ, hfail⟩ := compMatrixChain_fails_small_gap_uniform hL₁ hL₂ refine ⟨δ, hδ, fun a b h0 h1 hd_pos hd_lt => ?_⟩ have hneg := hfail N a b h0 h1 hd_pos hd_lt refine ⟨hneg, fun hpsd => ?_⟩ have hge := hpsd ![1, 1] (fun i => by fin_cases i <;> norm_num) linarith /-- **Small-Gap Breakdown of the `N = 1` Comparison Matrix `compMatrix`**: For any fixed positive widths `L₁, L₂ > 0`, there exists `δ > 0` below which `quadForm (compMatrix a b) ![1, 1] < 0` and `compMatrix a b` fails positive semidefiniteness (and even copositivity on `ℝ_{≥ 0}^2`). -/ theorem compMatrix_fails_small_gap {L₁ L₂ : ℝ} (hL₁ : 0 < L₁) (hL₂ : 0 < L₂) : ∃ δ > 0, ∀ (a b : Fin 2 → ℝ), b 0 - a 0 = L₁ → b 1 - a 1 = L₂ → 0 < a 1 - b 0 → a 1 - b 0 < δ → quadForm (compMatrix a b) ![1, 1] < 0 ∧ ¬ (∀ v : Fin 2 → ℝ, (∀ i, 0 ≤ v i) → 0 ≤ quadForm (compMatrix a b) v) := by obtain ⟨δ, hδ, hfail⟩ := compMatrixChain_fails_small_gap (N := 1) hL₁ hL₂ refine ⟨δ, hδ, fun a b h0 h1 hd_pos hd_lt => ?_⟩ have hneg1 := (hfail a b h0 h1 hd_pos hd_lt).1 have heq : quadForm (compMatrix a b) ![1, 1] = quadForm (compMatrixChain 1 a b) ![1, 1] := by rw [quadForm_compMatrix_two_ones, quadForm_compMatrixChain_two_ones, m_chain_one, m_chain_one] rw [← heq] at hneg1 exact ⟨hneg1, fun hcopos => by linarith [hcopos ![1, 1] (fun i => by fin_cases i <;> norm_num)]⟩ /-! ### 3. Sharp Single-Window Width Threshold at `L > log 2` and Diagonal Sign Failure -/ /-- **Prime `p = 2` Enters the Single-Window Correlation Range Above `log 2`**: Whenever `b - a > log 2`, `2 ∈ primePowerRange 0 (b - a)` with strictly positive arithmetic weight `arithWeight 2 = log 2 / √2`. -/ theorem prime_enters_diagonal_above_log_two {a b : ℝ} (hL : Real.log 2 < b - a) : 2 ∈ primePowerRange 0 (b - a) ∧ 0 < arithWeight 2 ∧ arithWeight 2 = Real.log 2 / Real.sqrt 2 := by have hlog2_pos : 0 < Real.log 2 := Real.log_pos (by norm_num) have hmem : 2 ∈ primePowerRange 0 (b - a) := mem_primePowerRange_iff.mpr ⟨le_refl 2, le_of_lt hlog2_pos, le_of_lt hL⟩ have hval : arithWeight 2 = Real.log 2 / Real.sqrt 2 := by unfold arithWeight simp [vonMangoldt_two] have hpos : 0 < arithWeight 2 := by rw [hval] exact div_pos hlog2_pos (Real.sqrt_pos.mpr (by norm_num)) exact ⟨hmem, hpos, hval⟩ /-- Contrast below the threshold: for `b - a ≤ log 2`, every prime-power term vanishes identically for every test function supported in `[a, b]`. -/ theorem single_window_no_prime_below_log_two {a b : ℝ} (hL : b - a ≤ Real.log 2) {φ : TestFn} (hsupp : SupportedIn φ a b) : (∀ n : ℕ, arithTermQ φ n = 0) ∧ (∑' n : ℕ, arithTermQ φ n) = 0 := by have hall : ∀ n : ℕ, arithTermQ φ n = 0 := by intro n by_cases h2 : n < 2 · simp [arithTermQ, arithWeight_eq_zero_of_lt_two h2] · push Not at h2 have hlog : Real.log 2 ≤ Real.log (n : ℝ) := Real.log_le_log (by norm_num) (by exact_mod_cast h2) have hc0 : autoCorr φ (Real.log (n : ℝ)) = 0 := autoCorr_eq_zero_of_ge hsupp (le_trans hL hlog) simp [arithTermQ, hc0] exact ⟨hall, by simp [hall]⟩ /-- Translation equivariance of `diffOp` on shifted bump functions: `diffOp (bumpTestFn (a + c) (b + c)) u = diffOp (bumpTestFn a b) (u - c)`. -/ lemma diffOp_bumpTestFn_shift (a b c u : ℝ) : diffOp (bumpTestFn (a + c) (b + c)) u = diffOp (bumpTestFn a b) (u - c) := by have hshift_fun : (bumpTestFn (a + c) (b + c)).toFun = fun x => (bumpTestFn a b).toFun (x - c) := by ext x change (bumpReal (a + c) (b + c) x : ℂ) = (bumpReal a b (x - c) : ℂ) congr 1 unfold bumpReal have h1 : x - (a + c) = x - c - a := by ring have h2 : b + c - x = b - (x - c) := by ring rw [h1, h2] have hd1 : deriv (bumpTestFn (a + c) (b + c)).toFun = fun x => deriv (bumpTestFn a b).toFun (x - c) := by ext x rw [hshift_fun] have hlin : HasDerivAt (fun t : ℝ => t - c) 1 x := by simpa using (hasDerivAt_id' x).sub_const c have hcomp := ((bumpTestFn a b).differentiable (x - c)).hasDerivAt.scomp x hlin rw [one_smul] at hcomp exact hcomp.deriv have hd2 : deriv (deriv (bumpTestFn (a + c) (b + c)).toFun) u = deriv (deriv (bumpTestFn a b).toFun) (u - c) := by rw [hd1] have hlin : HasDerivAt (fun t : ℝ => t - c) 1 u := by simpa using (hasDerivAt_id' u).sub_const c have hcomp := ((bumpTestFn a b).contDiff_deriv.differentiable (by simp) (u - c)).hasDerivAt.scomp u hlin rw [one_smul] at hcomp exact hcomp.deriv change deriv (deriv (bumpTestFn (a + c) (b + c)).toFun) u - ((1 / 4 : ℝ) : ℂ) * (bumpTestFn (a + c) (b + c)).toFun u = deriv (deriv (bumpTestFn a b).toFun) (u - c) - ((1 / 4 : ℝ) : ℂ) * (bumpTestFn a b).toFun (u - c) rw [hd2, hshift_fun] /-- **Sharp Single-Window Width Threshold at `L > log 2` (F04 §8 / Gap 2)**: For ANY interval `[a, b]` with `b - a > log 2`, there exists an explicit smooth, compactly supported, locally balanced test function `φ` supported in `[a, b]` (`φ ≠ 0`, `IsBalanced φ`) such that: 1. `0 < (autoCorr φ (Real.log 2)).re` (hence `autoCorr φ (Real.log 2) ≠ 0`), 2. `0 < arithTermQ φ 2` with `arithTermQ φ 2 = (Real.log 2 / Real.sqrt 2) * (autoCorr φ (Real.log 2)).re`, 3. Every other prime-power term vanishes (`∑' n, arithTermQ φ n = arithTermQ φ 2`), so the prime `p = 2` enters `Q_form φ` with a strictly negative contribution `-2 * arithTermQ φ 2 < 0`. -/ theorem single_window_diagonal_fails_large_L {a b : ℝ} (hL : Real.log 2 < b - a) : ∃ φ : TestFn, SupportedIn φ a b ∧ IsBalanced φ ∧ φ ≠ 0 ∧ 0 < (autoCorr φ (Real.log 2)).re ∧ autoCorr φ (Real.log 2) ≠ 0 ∧ 0 < arithTermQ φ 2 ∧ arithTermQ φ 2 = (Real.log 2 / Real.sqrt 2) * (autoCorr φ (Real.log 2)).re ∧ (∑' n : ℕ, arithTermQ φ n) = arithTermQ φ 2 ∧ Q_form φ = (∫ t in Ioi (0 : ℝ), weilWeight t * (normSq φ - (autoCorr φ t).re)) - weilConstA * normSq φ - 2 * arithTermQ φ 2 := by have hlog2_pos : 0 < Real.log 2 := Real.log_pos (by norm_num) set δ := min ((b - a - Real.log 2) / 2) (Real.log 2 / 4) have hδ_pos : 0 < δ := lt_min (by linarith) (by positivity) have hδ_half : δ ≤ (b - a - Real.log 2) / 2 := min_le_left _ _ have hδ_quarter : δ ≤ Real.log 2 / 4 := min_le_right _ _ set η₁ : TestFn := diffOp (bumpTestFn a (a + δ)) set η₂ : TestFn := diffOp (bumpTestFn (a + Real.log 2) (a + δ + Real.log 2)) set φ : TestFn := η₁ + η₂ have hsupp_b1 : SupportedIn (bumpTestFn a (a + δ)) a (a + δ) := fun u hu => by have hnot : u ∉ Ioo a (a + δ) := fun h => hu ⟨le_of_lt h.1, le_of_lt h.2⟩ simp [bumpTestFn, bumpReal_eq_zero_of_notMem_Ioo hnot] have hsupp_b2 : SupportedIn (bumpTestFn (a + Real.log 2) (a + δ + Real.log 2)) (a + Real.log 2) (a + δ + Real.log 2) := fun u hu => by have hnot : u ∉ Ioo (a + Real.log 2) (a + δ + Real.log 2) := fun h => hu ⟨le_of_lt h.1, le_of_lt h.2⟩ simp [bumpTestFn, bumpReal_eq_zero_of_notMem_Ioo hnot] have hsupp₁ : SupportedIn η₁ a (a + δ) := hsupp_b1.diffOp have hsupp₂ : SupportedIn η₂ (a + Real.log 2) (a + δ + Real.log 2) := hsupp_b2.diffOp have hsupp_φ_tight : SupportedIn φ a (a + δ + Real.log 2) := (hsupp₁.mono (le_refl _) (by linarith)).add (hsupp₂.mono (by linarith) (le_refl _)) have hsupp_φ : SupportedIn φ a b := hsupp_φ_tight.mono (le_refl _) (by linarith) have hbal_φ : IsBalanced φ := (isBalanced_diffOp _).add (isBalanced_diffOp _) -- Compute `autoCorr φ (Real.log 2) = (normSq η₁ : ℂ)`. have hauto2 : autoCorr φ (Real.log 2) = (normSq η₁ : ℂ) := by unfold autoCorr rw [corr_add_left, corr_add_right, corr_add_right] have h11 : corr η₁ η₁ (Real.log 2) = 0 := corr_eq_zero_of_ge hsupp₁ hsupp₁ (by linarith) have h22 : corr η₂ η₂ (Real.log 2) = 0 := corr_eq_zero_of_ge hsupp₂ hsupp₂ (by linarith) have h12 : corr η₁ η₂ (Real.log 2) = 0 := corr_eq_zero_of_ge hsupp₁ hsupp₂ (by linarith) have h21 : corr η₂ η₁ (Real.log 2) = (normSq η₁ : ℂ) := by have hshift : ∀ v : ℝ, η₂ (v + Real.log 2) = η₁ v := by intro v have h := diffOp_bumpTestFn_shift a (a + δ) (Real.log 2) (v + Real.log 2) have hsub : v + Real.log 2 - Real.log 2 = v := by ring rwa [hsub] at h calc corr η₂ η₁ (Real.log 2) = ∫ v, η₂ (v + Real.log 2) * starRingEnd ℂ (η₁ v) := rfl _ = ∫ v, η₁ (v + 0) * starRingEnd ℂ (η₁ v) := by congr 1; ext v; rw [hshift v, add_zero] _ = autoCorr η₁ 0 := rfl _ = (normSq η₁ : ℂ) := autoCorr_zero η₁ rw [h11, h12, h21, h22] ring have hη₁_ne : η₁ ≠ 0 := diffOp_bumpTestFn_ne_zero (by linarith) have hnorm₁_pos : 0 < normSq η₁ := normSq_pos_of_ne_zero hη₁_ne have hre2_pos : 0 < (autoCorr φ (Real.log 2)).re := by rw [hauto2, Complex.ofReal_re] exact hnorm₁_pos have hauto2_ne : autoCorr φ (Real.log 2) ≠ 0 := by intro h0; rw [h0, Complex.zero_re] at hre2_pos; linarith have hφ_ne : φ ≠ 0 := by intro h0 apply hauto2_ne rw [h0] exact corr_zero_left 0 (Real.log 2) have harith2_eq : arithTermQ φ 2 = (Real.log 2 / Real.sqrt 2) * (autoCorr φ (Real.log 2)).re := by unfold arithTermQ arithWeight simp [vonMangoldt_two] have harith2_pos : 0 < arithTermQ φ 2 := by rw [harith2_eq] exact mul_pos (div_pos hlog2_pos (Real.sqrt_pos.mpr (by norm_num))) hre2_pos -- Every other `n ≠ 2` has `arithTermQ φ n = 0` because `δ + log 2 ≤ (5/4) log 2 < 1 < log 3`. have hother : ∀ n : ℕ, n ≠ 2 → arithTermQ φ n = 0 := by intro n hne by_cases hlt : n < 2 · simp [arithTermQ, arithWeight_eq_zero_of_lt_two hlt] · have h3 : 3 ≤ n := by omega have hlog3 : Real.log 3 ≤ Real.log (n : ℝ) := Real.log_le_log (by norm_num) (by exact_mod_cast h3) have hspan_lt : (a + δ + Real.log 2) - a ≤ Real.log (n : ℝ) := by linarith [log_two_lt, log_three_gt] have hc0 : autoCorr φ (Real.log (n : ℝ)) = 0 := autoCorr_eq_zero_of_ge hsupp_φ_tight hspan_lt simp [arithTermQ, hc0] have htsum_eq : (∑' n : ℕ, arithTermQ φ n) = arithTermQ φ 2 := by rw [tsum_eq_single 2 hother] refine ⟨φ, hsupp_φ, hbal_φ, hφ_ne, hre2_pos, hauto2_ne, harith2_pos, harith2_eq, htsum_eq, ?_⟩ unfold Q_form rw [htsum_eq] /-- Specialization of `single_window_diagonal_fails_large_L` to `[0, L]` for any `L > log 2`. -/ theorem single_window_diagonal_fails_Icc_zero {L : ℝ} (hL : Real.log 2 < L) : ∃ φ : TestFn, SupportedIn φ 0 L ∧ IsBalanced φ ∧ φ ≠ 0 ∧ 0 < (autoCorr φ (Real.log 2)).re ∧ 0 < arithTermQ φ 2 ∧ (∑' n : ℕ, arithTermQ φ n) = arithTermQ φ 2 := by obtain ⟨φ, hsupp, hbal, hne, hre, _, ha2, _, htsum, _⟩ := single_window_diagonal_fails_large_L (a := 0) (b := L) (by linarith) exact ⟨φ, hsupp, hbal, hne, hre, ha2, htsum⟩ /-- `m_func` is antitone on `(0, ∞)`. -/ lemma m_func_antitoneOn : AntitoneOn m_func (Ioi (0 : ℝ)) := by intro L₁ hL₁ L₂ hL₂ hle unfold m_func linarith [B_func_sub_B_func_nonneg hL₁ hle] /-- At `L = 1 / 5`, the `N = 1` single-interval diagonal bound `m_func (1 / 5)` is strictly negative. -/ lemma m_func_one_fifth_neg : m_func (1 / 5) < 0 := by unfold m_func B_func weilConstA set q := Real.exp (-((1 / 5 : ℝ) / 2)) with hq_def have hq_pos : 0 < q := Real.exp_pos _ have hq_lt : q < 91 / 100 := by have h := (exp_neg_taylor_bounds (x := 1 / 10) (by norm_num)).2 have h10 : (1 / 5 : ℝ) / 2 = 1 / 10 := by norm_num rw [hq_def, h10] have hnum : 1 - (1 / 10 : ℝ) + (1 / 10) ^ 2 / 2 - (1 / 10) ^ 3 / 6 + (1 / 10) ^ 4 / 24 - (1 / 10) ^ 5 / 120 + (1 / 10) ^ 6 / 720 < 91 / 100 := by norm_num linarith have h1mq_pos : 0 < 1 - q := by linarith have hratio_lt : (1 + q) / (1 - q) < 8 * Real.pi := by have hstep : (1 + q) / (1 - q) < 24 := by rw [div_lt_iff₀ h1mq_pos] linarith linarith [pi_gt_three] have hlog_lt : Real.log ((1 + q) / (1 - q)) < Real.log (8 * Real.pi) := Real.log_lt_log (div_pos (by linarith) h1mq_pos) hratio_lt have hatan_lt : 2 * arctan q < Real.pi / 2 := by have h1 : arctan q < arctan 1 := arctan_lt_arctan_of_lt (by linarith) rw [arctan_one] at h1 linarith linarith [eulerGamma_nonneg] /-- **Single-Interval `N = 1` Diagonal Bound Fails for All `L ≥ 1 / 5`**: For every window length `L ≥ 1 / 5` (including `L = 1 / 2` and `L = log 2`), `m_func L < 0`. -/ theorem m_func_neg_of_large_L {L : ℝ} (hL : 1 / 5 ≤ L) : m_func L < 0 := by have hmono : m_func L ≤ m_func (1 / 5) := m_func_antitoneOn (by norm_num : (0 : ℝ) < 1 / 5) (by linarith : (0 : ℝ) < L) hL linarith [m_func_one_fifth_neg] /-- Corollary for `L ≥ 1 / 2`: `m_func L < 0`. -/ theorem m_func_neg_of_ge_half {L : ℝ} (hL : 1 / 2 ≤ L) : m_func L < 0 := m_func_neg_of_large_L (by linarith) /-- **Uniform-in-`N` Finite-Chain Diagonal Failure at the Endpoint `L = log 2`**: Even after adding arbitrarily many finite-chain terms (`N → ∞`), the single-interval coercivity bound `m_chain N (log 2)` stays strictly negative for EVERY `N : ℕ`. -/ theorem m_chain_log_two_neg (N : ℕ) : m_chain N (Real.log 2) < 0 := by have hlog2_pos : 0 < Real.log 2 := Real.log_pos (by norm_num) have hsqrt2_pos : 0 < Real.sqrt 2 := Real.sqrt_pos.mpr (by norm_num) have hsqrt2_sq : Real.sqrt 2 ^ 2 = 2 := Real.sq_sqrt (by norm_num) have hsqrt2_lt : Real.sqrt 2 < 142 / 100 := by have hsq : (2 : ℝ) < (142 / 100) ^ 2 := by norm_num calc Real.sqrt 2 < Real.sqrt ((142 / 100 : ℝ) ^ 2) := Real.sqrt_lt_sqrt (by norm_num) hsq _ = 142 / 100 := Real.sqrt_sq (by norm_num) have hexp_half : Real.exp (Real.log 2 / 2) = Real.sqrt 2 := by have hpos : 0 ≤ Real.exp (Real.log 2 / 2) := le_of_lt (Real.exp_pos _) have hsq : Real.exp (Real.log 2 / 2) ^ 2 = 2 := by rw [sq, ← Real.exp_add] have hhalf : Real.log 2 / 2 + Real.log 2 / 2 = Real.log 2 := by ring rw [hhalf, Real.exp_log (by norm_num)] conv_rhs => rw [← hsq] exact (Real.sqrt_sq hpos).symm -- Upper bound `chainContrib N (log 2) < 157 / 100`. have hchain_lt : chainContrib N (Real.log 2) < 157 / 100 := by have h1 := chainContrib_le_of_pos N hlog2_pos rw [hexp_half] at h1 have hpi_lt : Real.pi < 315 / 100 := by linarith [pi_lt_315] have hpi_sq : Real.pi ^ 2 < (315 / 100 : ℝ) ^ 2 := pow_lt_pow_left₀ (n := 2) hpi_lt (le_of_lt Real.pi_pos) two_ne_zero have hprod : Real.sqrt 2 * Real.pi ^ 2 < (142 / 100) * (315 / 100) ^ 2 := by have h1' : Real.sqrt 2 * Real.pi ^ 2 < Real.sqrt 2 * (315 / 100 : ℝ) ^ 2 := mul_lt_mul_of_pos_left hpi_sq hsqrt2_pos have h2' : Real.sqrt 2 * (315 / 100 : ℝ) ^ 2 < (142 / 100) * (315 / 100 : ℝ) ^ 2 := mul_lt_mul_of_pos_right hsqrt2_lt (by norm_num) linarith have hnum : ((142 / 100 : ℝ) * (315 / 100) ^ 2) / 9 < 157 / 100 := by norm_num linarith -- Upper bound `m_func (log 2) < -547 / 300`. have hm_lt : m_func (Real.log 2) < -(547 / 300) := by unfold m_func B_func weilConstA set q := Real.exp (-(Real.log 2 / 2)) with hq_def have hq_eq : q = (Real.sqrt 2)⁻¹ := by rw [hq_def, Real.exp_neg, hexp_half] have hsqrt2_gt1 : 1 < Real.sqrt 2 := by calc (1 : ℝ) = Real.sqrt 1 := Real.sqrt_one.symm _ < Real.sqrt 2 := Real.sqrt_lt_sqrt (by norm_num) (by norm_num) have h1mq_pos : 0 < 1 - q := by rw [hq_eq] have : (Real.sqrt 2)⁻¹ < 1 := (inv_lt_one₀ hsqrt2_pos).mpr hsqrt2_gt1 linarith have hratio_eq : (1 + q) / (1 - q) = 3 + 2 * Real.sqrt 2 := by rw [hq_eq] have hne1 : Real.sqrt 2 ≠ 0 := ne_of_gt hsqrt2_pos have hne2 : 1 - (Real.sqrt 2)⁻¹ ≠ 0 := by rw [← hq_eq] exact ne_of_gt h1mq_pos rw [div_eq_iff hne2] have hmul : (3 + 2 * Real.sqrt 2) * (1 - (Real.sqrt 2)⁻¹) = 3 + 2 * Real.sqrt 2 - 3 * (Real.sqrt 2)⁻¹ - 2 * (Real.sqrt 2 * (Real.sqrt 2)⁻¹) := by ring rw [hmul, mul_inv_cancel₀ hne1] have hinv2 : Real.sqrt 2 = 2 * (Real.sqrt 2)⁻¹ := by rw [eq_mul_inv_iff_mul_eq₀ hne1, ← sq, hsqrt2_sq] linarith have hratio_lt6 : (1 + q) / (1 - q) < 6 := by rw [hratio_eq] linarith have hlog_diff : Real.log ((1 + q) / (1 - q)) - Real.log (8 * Real.pi) < -(138 / 100) := by have h1 : Real.log ((1 + q) / (1 - q)) < Real.log 6 := Real.log_lt_log (div_pos (by linarith [Real.exp_pos (-(Real.log 2 / 2))]) h1mq_pos) hratio_lt6 have h2 : Real.log 24 < Real.log (8 * Real.pi) := Real.log_lt_log (by norm_num) (by linarith [pi_gt_three]) have h24 : Real.log (24 : ℝ) = Real.log 6 + Real.log 4 := by have : (24 : ℝ) = 6 * 4 := by norm_num rw [this, Real.log_mul (by norm_num) (by norm_num)] linarith [log_four_eq, log_two_gt] have hatan_lt : 2 * arctan q < Real.pi / 2 := by have hq_lt1 : q < 1 := exp_neg_half_lt_one hlog2_pos have h1 := arctan_lt_arctan_of_lt hq_lt1 rw [arctan_one] at h1 linarith have hgamma_gt : 133 / 300 < eulerGamma := by have hlow := eulerLowerSeq_le_eulerGamma 2 unfold eulerLowerSeq at hlow have hH3 : ∑ k ∈ Finset.range 3, (1 : ℝ) / ((k : ℝ) + 1) = 11 / 6 := by norm_num [Finset.sum_range_succ] rw [show (2 + 1 : ℕ) = 3 by rfl, hH3] at hlow have h4 : ((2 : ℕ) : ℝ) + 2 = 4 := by norm_num rw [h4, log_four_eq] at hlow linarith [log_two_lt] linarith unfold m_chain linarith end F04Riemann