Skip to main content
AlexKontorovich/PrimeNumberTheoremAnd
Source indexedtheorem · leanprover/lean4:v4.32.0

hardy_sigma_delayed_sub_s_eq

PrimeNumberTheoremAnd.Unused.Hardy_Tauberian_theorem · PrimeNumberTheoremAnd/Unused/Hardy_Tauberian_theorem.lean:122 to 141

Mathematical statement

Exact Lean statement

theorem hardy_sigma_delayed_sub_s_eq (u : ℕ → ℝ) (n k : ℕ) (hk : k ≠ 0) :
    hardy_sigma_delayed u n k - hardy_s u n =
    (1 / k) * ∑ j ∈ Finset.Icc 1 k, (k - j + 1 : ℝ) * u (n + j)

Complete declaration

Lean source

Canonical source
Full Lean sourceLean 4
theorem hardy_sigma_delayed_sub_s_eq (u :   ) (n k : ) (hk : k  0) :    hardy_sigma_delayed u n k - hardy_s u n =    (1 / k) * ∑ j  Finset.Icc 1 k, (k - j + 1 : ) * u (n + j) := by  field_simp;  -- By definition of $hardy_sigma_delayed$, we can rewrite the left-hand side of the equation.  have h_def : hardy_sigma_delayed u n k - hardy_s u n = (1 / k : ) * ∑ j  Finset.Icc 1 k, (hardy_s u (n + j) - hardy_s u n) := by    unfold hardy_sigma_delayed hardy_s; norm_num [ Finset.sum_Ioc_succ_top, (Nat.succ_eq_succFinset.Icc_succ_left_eq_Ioc) ] ; ring;    rw [ show ( Finset.Ioc n ( n + k ) ) = Finset.image ( fun x => n + x ) ( Finset.Ioc 0 k ) from ?_, Finset.sum_image ] <;> norm_num ; ring;    norm_num [ hk ];  -- By definition of $hardy_s$, we can rewrite the sum inside the parentheses.  have h_sum : ∑ j  Finset.Icc 1 k, (hardy_s u (n + j) - hardy_s u n) = ∑ j  Finset.Icc 1 k, ∑ m  Finset.Icc 1 j, u (n + m) := by    refine' Finset.sum_congr rfl fun j hj => _;    erw [ Finset.sum_Ico_eq_sub _ _ ] <;> norm_num [ Finset.sum_range_succ, hardy_s ];    rw [ Finset.sum_range_add ] ; ring;  -- By interchanging the order of summation, we can rewrite the double sum.  have h_interchange : ∑ j  Finset.Icc 1 k, ∑ m  Finset.Icc 1 j, u (n + m) = ∑ m  Finset.Icc 1 k, ∑ j  Finset.Icc m k, u (n + m) := by    erw [ Finset.sum_Ico_Ico_comm ];    rfl;  simp_all +decide [ Finset.sum_mul _ _ _ ];  rw [ inv_mul_eq_div, div_mul_cancel₀ _ ( by positivity ), Finset.sum_congr rfl ] ; intros ; rw [ Nat.cast_sub ] <;> push_cast <;> linarith [ Finset.mem_Icc.mp ‹_› ] ;