number_theory.l_seriesMathlib.NumberTheory.LSeries.Basic

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -108,7 +108,7 @@ theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
   rw [Complex.cpow_def, Complex.cpow_def, if_neg h0, if_neg h0, Complex.abs_exp_eq_iff_re_eq]
   simp only [h, Complex.mul_re, mul_eq_mul_left_iff, sub_right_inj]
   right
-  rw [Complex.log_im, ← Complex.ofReal_nat_cast]
+  rw [Complex.log_im, ← Complex.ofReal_natCast]
   exact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re LSeriesSummable_iff_of_re_eq_re
 -/
Diff
@@ -6,7 +6,7 @@ Authors: Aaron Anderson
 import Analysis.NormedSpace.FiniteDimension
 import Analysis.PSeries
 import NumberTheory.ArithmeticFunction
-import Topology.Algebra.InfiniteSum.Basic
+import Topology.Algebra.InfiniteSum.Defs
 
 #align_import number_theory.l_series from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
 
@@ -125,8 +125,8 @@ theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m
 
 open scoped ArithmeticFunction
 
-#print zeta_LSeriesSummable_iff_one_lt_re /-
-theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
+#print ArithmeticFunction.LSeriesSummable_zeta_iff /-
+theorem ArithmeticFunction.LSeriesSummable_zeta_iff {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re), l_series_summable, ←
     summable_norm_iff, ← Real.summable_one_div_nat_rpow, iff_iff_eq]
@@ -142,7 +142,7 @@ theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔
     simp only [cast_zero, nat_coe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
       Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
     rw [← cast_one, ← cast_add, Complex.abs_natCast, cast_add, cast_one]
-#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re zeta_LSeriesSummable_iff_one_lt_re
+#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re ArithmeticFunction.LSeriesSummable_zeta_iff
 -/
 
 #print LSeries_add /-
Diff
@@ -41,37 +41,37 @@ namespace Nat
 
 namespace ArithmeticFunction
 
-#print ArithmeticFunction.LSeries /-
+#print LSeries /-
 /-- The L-series of an `arithmetic_function`. -/
-def ArithmeticFunction.LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
+def LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
   ∑' n, f n / n ^ z
-#align nat.arithmetic_function.l_series ArithmeticFunction.LSeries
+#align nat.arithmetic_function.l_series LSeries
 -/
 
-#print ArithmeticFunction.LSeriesSummable /-
+#print LSeriesSummable /-
 /-- `f.l_series_summable z` indicates that the L-series of `f` converges at `z`. -/
-def ArithmeticFunction.LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) : Prop :=
+def LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) : Prop :=
   Summable fun n => f n / n ^ z
-#align nat.arithmetic_function.l_series_summable ArithmeticFunction.LSeriesSummable
+#align nat.arithmetic_function.l_series_summable LSeriesSummable
 -/
 
-#print ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable /-
-theorem ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable (f : ArithmeticFunction ℂ)
-    (z : ℂ) : ¬f.LSeriesSummable z → f.LSeries z = 0 :=
+#print LSeries.eq_zero_of_not_LSeriesSummable /-
+theorem LSeries.eq_zero_of_not_LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) :
+    ¬f.LSeriesSummable z → f.LSeries z = 0 :=
   tsum_eq_zero_of_not_summable
-#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable
+#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable LSeries.eq_zero_of_not_LSeriesSummable
 -/
 
-#print ArithmeticFunction.LSeriesSummable_zero /-
+#print LSeriesSummable_zero /-
 @[simp]
-theorem ArithmeticFunction.LSeriesSummable_zero {z : ℂ} : ArithmeticFunction.LSeriesSummable 0 z :=
-  by simp [l_series_summable, summable_zero]
-#align nat.arithmetic_function.l_series_summable_zero ArithmeticFunction.LSeriesSummable_zero
+theorem LSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
+  simp [l_series_summable, summable_zero]
+#align nat.arithmetic_function.l_series_summable_zero LSeriesSummable_zero
 -/
 
-#print ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real /-
-theorem ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ}
-    {m : ℝ} (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
+#print LSeriesSummable_of_bounded_of_one_lt_real /-
+theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
+    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
   by
   by_cases h0 : m = 0
   · subst h0
@@ -89,12 +89,12 @@ theorem ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real {f : Arithm
     simp only [map_div₀, Complex.norm_eq_abs]
     apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
     rw [Complex.abs_cpow_real, Complex.abs_natCast]
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real LSeriesSummable_of_bounded_of_one_lt_real
 -/
 
-#print ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re /-
-theorem ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
-    (h : w.re = z.re) : f.LSeriesSummable w ↔ f.LSeriesSummable z :=
+#print LSeriesSummable_iff_of_re_eq_re /-
+theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
+    f.LSeriesSummable w ↔ f.LSeriesSummable z :=
   by
   suffices h :
     ∀ n : ℕ, Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)
@@ -110,24 +110,23 @@ theorem ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFuncti
   right
   rw [Complex.log_im, ← Complex.ofReal_nat_cast]
   exact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
-#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
+#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re LSeriesSummable_iff_of_re_eq_re
 -/
 
-#print ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re /-
-theorem ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ}
-    {m : ℝ} (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z :=
+#print LSeriesSummable_of_bounded_of_one_lt_re /-
+theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
+    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re)]
   apply l_series_summable_of_bounded_of_one_lt_real h
   exact hz
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re LSeriesSummable_of_bounded_of_one_lt_re
 -/
 
 open scoped ArithmeticFunction
 
-#print ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re /-
-theorem ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} :
-    ArithmeticFunction.LSeriesSummable ζ z ↔ 1 < z.re :=
+#print zeta_LSeriesSummable_iff_one_lt_re /-
+theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re), l_series_summable, ←
     summable_norm_iff, ← Real.summable_one_div_nat_rpow, iff_iff_eq]
@@ -143,20 +142,19 @@ theorem ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} :
     simp only [cast_zero, nat_coe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
       Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
     rw [← cast_one, ← cast_add, Complex.abs_natCast, cast_add, cast_one]
-#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
+#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re zeta_LSeriesSummable_iff_one_lt_re
 -/
 
-#print ArithmeticFunction.LSeries_add /-
+#print LSeries_add /-
 @[simp]
-theorem ArithmeticFunction.LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ}
-    (hf : f.LSeriesSummable z) (hg : g.LSeriesSummable z) :
-    (f + g).LSeries z = f.LSeries z + g.LSeries z :=
+theorem LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSummable z)
+    (hg : g.LSeriesSummable z) : (f + g).LSeries z = f.LSeries z + g.LSeries z :=
   by
   simp only [l_series, add_apply]
   rw [← tsum_add hf hg]
   apply congr rfl (funext fun n => _)
   apply _root_.add_div
-#align nat.arithmetic_function.l_series_add ArithmeticFunction.LSeries_add
+#align nat.arithmetic_function.l_series_add LSeries_add
 -/
 
 end ArithmeticFunction
Diff
@@ -41,37 +41,37 @@ namespace Nat
 
 namespace ArithmeticFunction
 
-#print Nat.ArithmeticFunction.LSeries /-
+#print ArithmeticFunction.LSeries /-
 /-- The L-series of an `arithmetic_function`. -/
-def LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
+def ArithmeticFunction.LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
   ∑' n, f n / n ^ z
-#align nat.arithmetic_function.l_series Nat.ArithmeticFunction.LSeries
+#align nat.arithmetic_function.l_series ArithmeticFunction.LSeries
 -/
 
-#print Nat.ArithmeticFunction.LSeriesSummable /-
+#print ArithmeticFunction.LSeriesSummable /-
 /-- `f.l_series_summable z` indicates that the L-series of `f` converges at `z`. -/
-def LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) : Prop :=
+def ArithmeticFunction.LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) : Prop :=
   Summable fun n => f n / n ^ z
-#align nat.arithmetic_function.l_series_summable Nat.ArithmeticFunction.LSeriesSummable
+#align nat.arithmetic_function.l_series_summable ArithmeticFunction.LSeriesSummable
 -/
 
-#print Nat.ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable /-
-theorem LSeries_eq_zero_of_not_LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) :
-    ¬f.LSeriesSummable z → f.LSeries z = 0 :=
+#print ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable /-
+theorem ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable (f : ArithmeticFunction ℂ)
+    (z : ℂ) : ¬f.LSeriesSummable z → f.LSeries z = 0 :=
   tsum_eq_zero_of_not_summable
-#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable Nat.ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable
+#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable
 -/
 
-#print Nat.ArithmeticFunction.LSeriesSummable_zero /-
+#print ArithmeticFunction.LSeriesSummable_zero /-
 @[simp]
-theorem LSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
-  simp [l_series_summable, summable_zero]
-#align nat.arithmetic_function.l_series_summable_zero Nat.ArithmeticFunction.LSeriesSummable_zero
+theorem ArithmeticFunction.LSeriesSummable_zero {z : ℂ} : ArithmeticFunction.LSeriesSummable 0 z :=
+  by simp [l_series_summable, summable_zero]
+#align nat.arithmetic_function.l_series_summable_zero ArithmeticFunction.LSeriesSummable_zero
 -/
 
-#print Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real /-
-theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
+#print ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real /-
+theorem ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ}
+    {m : ℝ} (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
   by
   by_cases h0 : m = 0
   · subst h0
@@ -89,12 +89,12 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
     simp only [map_div₀, Complex.norm_eq_abs]
     apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
     rw [Complex.abs_cpow_real, Complex.abs_natCast]
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
 -/
 
-#print Nat.ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re /-
-theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
-    f.LSeriesSummable w ↔ f.LSeriesSummable z :=
+#print ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re /-
+theorem ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
+    (h : w.re = z.re) : f.LSeriesSummable w ↔ f.LSeriesSummable z :=
   by
   suffices h :
     ∀ n : ℕ, Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)
@@ -110,23 +110,24 @@ theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
   right
   rw [Complex.log_im, ← Complex.ofReal_nat_cast]
   exact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
-#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
+#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
 -/
 
-#print Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re /-
-theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z :=
+#print ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re /-
+theorem ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ}
+    {m : ℝ} (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re)]
   apply l_series_summable_of_bounded_of_one_lt_real h
   exact hz
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
 -/
 
 open scoped ArithmeticFunction
 
-#print Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re /-
-theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
+#print ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re /-
+theorem ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} :
+    ArithmeticFunction.LSeriesSummable ζ z ↔ 1 < z.re :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re), l_series_summable, ←
     summable_norm_iff, ← Real.summable_one_div_nat_rpow, iff_iff_eq]
@@ -142,19 +143,20 @@ theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔
     simp only [cast_zero, nat_coe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
       Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
     rw [← cast_one, ← cast_add, Complex.abs_natCast, cast_add, cast_one]
-#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
+#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
 -/
 
-#print Nat.ArithmeticFunction.LSeries_add /-
+#print ArithmeticFunction.LSeries_add /-
 @[simp]
-theorem LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSummable z)
-    (hg : g.LSeriesSummable z) : (f + g).LSeries z = f.LSeries z + g.LSeries z :=
+theorem ArithmeticFunction.LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ}
+    (hf : f.LSeriesSummable z) (hg : g.LSeriesSummable z) :
+    (f + g).LSeries z = f.LSeries z + g.LSeries z :=
   by
   simp only [l_series, add_apply]
   rw [← tsum_add hf hg]
   apply congr rfl (funext fun n => _)
   apply _root_.add_div
-#align nat.arithmetic_function.l_series_add Nat.ArithmeticFunction.LSeries_add
+#align nat.arithmetic_function.l_series_add ArithmeticFunction.LSeries_add
 -/
 
 end ArithmeticFunction
Diff
@@ -79,7 +79,7 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
       arithmetic_function.ext fun n =>
         complex.abs.eq_zero.1 (le_antisymm (h n) (complex.abs.nonneg _))
     simp [hf]
-  refine' summable_of_norm_bounded (fun n : ℕ => m / n ^ z) _ _
+  refine' Summable.of_norm_bounded (fun n : ℕ => m / n ^ z) _ _
   · simp_rw [div_eq_mul_inv]
     exact (summable_mul_left_iff h0).2 (Real.summable_nat_rpow_inv.2 hz)
   · intro n
@@ -88,7 +88,7 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
     · simp [hm, Real.zero_rpow (ne_of_gt (lt_trans Real.zero_lt_one hz))]
     simp only [map_div₀, Complex.norm_eq_abs]
     apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
-    rw [Complex.abs_cpow_real, Complex.abs_cast_nat]
+    rw [Complex.abs_cpow_real, Complex.abs_natCast]
 #align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
 -/
 
Diff
@@ -141,7 +141,7 @@ theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔
     · simp [h0]
     simp only [cast_zero, nat_coe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
       Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
-    rw [← cast_one, ← cast_add, Complex.abs_of_nat, cast_add, cast_one]
+    rw [← cast_one, ← cast_add, Complex.abs_natCast, cast_add, cast_one]
 #align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
 -/
 
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2021 Aaron Anderson. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson
 -/
-import Mathbin.Analysis.NormedSpace.FiniteDimension
-import Mathbin.Analysis.PSeries
-import Mathbin.NumberTheory.ArithmeticFunction
-import Mathbin.Topology.Algebra.InfiniteSum.Basic
+import Analysis.NormedSpace.FiniteDimension
+import Analysis.PSeries
+import NumberTheory.ArithmeticFunction
+import Topology.Algebra.InfiniteSum.Basic
 
 #align_import number_theory.l_series from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2021 Aaron Anderson. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson
-
-! This file was ported from Lean 3 source module number_theory.l_series
-! leanprover-community/mathlib commit 61b5e2755ccb464b68d05a9acf891ae04992d09d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.NormedSpace.FiniteDimension
 import Mathbin.Analysis.PSeries
 import Mathbin.NumberTheory.ArithmeticFunction
 import Mathbin.Topology.Algebra.InfiniteSum.Basic
 
+#align_import number_theory.l_series from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
+
 /-!
 # L-series
 
Diff
@@ -44,26 +44,35 @@ namespace Nat
 
 namespace ArithmeticFunction
 
+#print Nat.ArithmeticFunction.LSeries /-
 /-- The L-series of an `arithmetic_function`. -/
 def LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
   ∑' n, f n / n ^ z
 #align nat.arithmetic_function.l_series Nat.ArithmeticFunction.LSeries
+-/
 
+#print Nat.ArithmeticFunction.LSeriesSummable /-
 /-- `f.l_series_summable z` indicates that the L-series of `f` converges at `z`. -/
 def LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) : Prop :=
   Summable fun n => f n / n ^ z
 #align nat.arithmetic_function.l_series_summable Nat.ArithmeticFunction.LSeriesSummable
+-/
 
+#print Nat.ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable /-
 theorem LSeries_eq_zero_of_not_LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) :
     ¬f.LSeriesSummable z → f.LSeries z = 0 :=
   tsum_eq_zero_of_not_summable
 #align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable Nat.ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable
+-/
 
+#print Nat.ArithmeticFunction.LSeriesSummable_zero /-
 @[simp]
 theorem LSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
   simp [l_series_summable, summable_zero]
 #align nat.arithmetic_function.l_series_summable_zero Nat.ArithmeticFunction.LSeriesSummable_zero
+-/
 
+#print Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real /-
 theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
     (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
   by
@@ -84,7 +93,9 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
     apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
     rw [Complex.abs_cpow_real, Complex.abs_cast_nat]
 #align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
+-/
 
+#print Nat.ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re /-
 theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
     f.LSeriesSummable w ↔ f.LSeriesSummable z :=
   by
@@ -103,7 +114,9 @@ theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
   rw [Complex.log_im, ← Complex.ofReal_nat_cast]
   exact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
+-/
 
+#print Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re /-
 theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
     (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z :=
   by
@@ -111,9 +124,11 @@ theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m
   apply l_series_summable_of_bounded_of_one_lt_real h
   exact hz
 #align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
+-/
 
 open scoped ArithmeticFunction
 
+#print Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re /-
 theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re), l_series_summable, ←
@@ -131,7 +146,9 @@ theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔
       Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
     rw [← cast_one, ← cast_add, Complex.abs_of_nat, cast_add, cast_one]
 #align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
+-/
 
+#print Nat.ArithmeticFunction.LSeries_add /-
 @[simp]
 theorem LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSummable z)
     (hg : g.LSeriesSummable z) : (f + g).LSeries z = f.LSeries z + g.LSeries z :=
@@ -141,6 +158,7 @@ theorem LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSumm
   apply congr rfl (funext fun n => _)
   apply _root_.add_div
 #align nat.arithmetic_function.l_series_add Nat.ArithmeticFunction.LSeries_add
+-/
 
 end ArithmeticFunction
 
Diff
@@ -101,7 +101,7 @@ theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
   simp only [h, Complex.mul_re, mul_eq_mul_left_iff, sub_right_inj]
   right
   rw [Complex.log_im, ← Complex.ofReal_nat_cast]
-  exact Complex.arg_of_real_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
+  exact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
 
 theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson
 
 ! This file was ported from Lean 3 source module number_theory.l_series
-! leanprover-community/mathlib commit 32253a1a1071173b33dc7d6a218cf722c6feb514
+! leanprover-community/mathlib commit 61b5e2755ccb464b68d05a9acf891ae04992d09d
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,9 @@ import Mathbin.Topology.Algebra.InfiniteSum.Basic
 /-!
 # L-series
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Given an arithmetic function, we define the corresponding L-series.
 
 ## Main Definitions
@@ -42,26 +45,26 @@ namespace Nat
 namespace ArithmeticFunction
 
 /-- The L-series of an `arithmetic_function`. -/
-def lSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
+def LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
   ∑' n, f n / n ^ z
-#align nat.arithmetic_function.l_series Nat.ArithmeticFunction.lSeries
+#align nat.arithmetic_function.l_series Nat.ArithmeticFunction.LSeries
 
 /-- `f.l_series_summable z` indicates that the L-series of `f` converges at `z`. -/
 def LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) : Prop :=
   Summable fun n => f n / n ^ z
 #align nat.arithmetic_function.l_series_summable Nat.ArithmeticFunction.LSeriesSummable
 
-theorem lSeries_eq_zero_of_not_lSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) :
-    ¬f.LSeriesSummable z → f.lSeries z = 0 :=
+theorem LSeries_eq_zero_of_not_LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) :
+    ¬f.LSeriesSummable z → f.LSeries z = 0 :=
   tsum_eq_zero_of_not_summable
-#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable Nat.ArithmeticFunction.lSeries_eq_zero_of_not_lSeriesSummable
+#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable Nat.ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable
 
 @[simp]
-theorem lSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
+theorem LSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
   simp [l_series_summable, summable_zero]
-#align nat.arithmetic_function.l_series_summable_zero Nat.ArithmeticFunction.lSeriesSummable_zero
+#align nat.arithmetic_function.l_series_summable_zero Nat.ArithmeticFunction.LSeriesSummable_zero
 
-theorem lSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
+theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
     (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
   by
   by_cases h0 : m = 0
@@ -80,9 +83,9 @@ theorem lSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
     simp only [map_div₀, Complex.norm_eq_abs]
     apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
     rw [Complex.abs_cpow_real, Complex.abs_cast_nat]
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real Nat.ArithmeticFunction.lSeriesSummable_of_bounded_of_one_lt_real
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
 
-theorem lSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
+theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
     f.LSeriesSummable w ↔ f.LSeriesSummable z :=
   by
   suffices h :
@@ -99,19 +102,19 @@ theorem lSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
   right
   rw [Complex.log_im, ← Complex.ofReal_nat_cast]
   exact Complex.arg_of_real_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
-#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.lSeriesSummable_iff_of_re_eq_re
+#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
 
-theorem lSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
+theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
     (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re)]
   apply l_series_summable_of_bounded_of_one_lt_real h
   exact hz
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re Nat.ArithmeticFunction.lSeriesSummable_of_bounded_of_one_lt_re
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
 
 open scoped ArithmeticFunction
 
-theorem zeta_lSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
+theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re), l_series_summable, ←
     summable_norm_iff, ← Real.summable_one_div_nat_rpow, iff_iff_eq]
@@ -127,17 +130,17 @@ theorem zeta_lSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔
     simp only [cast_zero, nat_coe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
       Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
     rw [← cast_one, ← cast_add, Complex.abs_of_nat, cast_add, cast_one]
-#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re Nat.ArithmeticFunction.zeta_lSeriesSummable_iff_one_lt_re
+#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
 
 @[simp]
-theorem lSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSummable z)
-    (hg : g.LSeriesSummable z) : (f + g).lSeries z = f.lSeries z + g.lSeries z :=
+theorem LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSummable z)
+    (hg : g.LSeriesSummable z) : (f + g).LSeries z = f.LSeries z + g.LSeries z :=
   by
   simp only [l_series, add_apply]
   rw [← tsum_add hf hg]
   apply congr rfl (funext fun n => _)
   apply _root_.add_div
-#align nat.arithmetic_function.l_series_add Nat.ArithmeticFunction.lSeries_add
+#align nat.arithmetic_function.l_series_add Nat.ArithmeticFunction.LSeries_add
 
 end ArithmeticFunction
 
Diff
@@ -35,7 +35,7 @@ Given an arithmetic function, we define the corresponding L-series.
 
 noncomputable section
 
-open BigOperators
+open scoped BigOperators
 
 namespace Nat
 
@@ -109,7 +109,7 @@ theorem lSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m
   exact hz
 #align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re Nat.ArithmeticFunction.lSeriesSummable_of_bounded_of_one_lt_re
 
-open ArithmeticFunction
+open scoped ArithmeticFunction
 
 theorem zeta_lSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
   by
Diff
@@ -89,8 +89,7 @@ theorem lSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
     ∀ n : ℕ, Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)
   · simp [l_series_summable, ← summable_norm_iff, h, Complex.norm_eq_abs]
   intro n
-  cases n
-  · simp
+  cases n; · simp
   apply congr rfl
   have h0 : (n.succ : ℂ) ≠ 0 := by
     rw [Ne.def, Nat.cast_eq_zero]
@@ -118,8 +117,7 @@ theorem zeta_lSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔
     summable_norm_iff, ← Real.summable_one_div_nat_rpow, iff_iff_eq]
   by_cases h0 : z.re = 0
   · rw [h0, ← summable_nat_add_iff 1]
-    swap
-    · infer_instance
+    swap; · infer_instance
     apply congr rfl
     ext n
     simp [n.succ_ne_zero]
Diff
@@ -62,8 +62,8 @@ theorem lSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
 #align nat.arithmetic_function.l_series_summable_zero Nat.ArithmeticFunction.lSeriesSummable_zero
 
 theorem lSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.AbsTheory.Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) :
-    f.LSeriesSummable z := by
+    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
+  by
   by_cases h0 : m = 0
   · subst h0
     have hf : f = 0 :=
@@ -86,9 +86,7 @@ theorem lSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
     f.LSeriesSummable w ↔ f.LSeriesSummable z :=
   by
   suffices h :
-    ∀ n : ℕ,
-      Complex.AbsTheory.Complex.abs (f n) / Complex.AbsTheory.Complex.abs (↑n ^ w) =
-        Complex.AbsTheory.Complex.abs (f n) / Complex.AbsTheory.Complex.abs (↑n ^ z)
+    ∀ n : ℕ, Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)
   · simp [l_series_summable, ← summable_norm_iff, h, Complex.norm_eq_abs]
   intro n
   cases n
@@ -105,8 +103,7 @@ theorem lSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.lSeriesSummable_iff_of_re_eq_re
 
 theorem lSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.AbsTheory.Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) :
-    f.LSeriesSummable z :=
+    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z :=
   by
   rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re)]
   apply l_series_summable_of_bounded_of_one_lt_real h
Diff
@@ -62,8 +62,8 @@ theorem lSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
 #align nat.arithmetic_function.l_series_summable_zero Nat.ArithmeticFunction.lSeriesSummable_zero
 
 theorem lSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
-  by
+    (h : ∀ n : ℕ, Complex.AbsTheory.Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) :
+    f.LSeriesSummable z := by
   by_cases h0 : m = 0
   · subst h0
     have hf : f = 0 :=
@@ -86,7 +86,9 @@ theorem lSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
     f.LSeriesSummable w ↔ f.LSeriesSummable z :=
   by
   suffices h :
-    ∀ n : ℕ, Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)
+    ∀ n : ℕ,
+      Complex.AbsTheory.Complex.abs (f n) / Complex.AbsTheory.Complex.abs (↑n ^ w) =
+        Complex.AbsTheory.Complex.abs (f n) / Complex.AbsTheory.Complex.abs (↑n ^ z)
   · simp [l_series_summable, ← summable_norm_iff, h, Complex.norm_eq_abs]
   intro n
   cases n
@@ -98,14 +100,15 @@ theorem lSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
   rw [Complex.cpow_def, Complex.cpow_def, if_neg h0, if_neg h0, Complex.abs_exp_eq_iff_re_eq]
   simp only [h, Complex.mul_re, mul_eq_mul_left_iff, sub_right_inj]
   right
-  rw [Complex.log_im, ← Complex.of_real_nat_cast]
+  rw [Complex.log_im, ← Complex.ofReal_nat_cast]
   exact Complex.arg_of_real_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.lSeriesSummable_iff_of_re_eq_re
 
 theorem lSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z :=
+    (h : ∀ n : ℕ, Complex.AbsTheory.Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) :
+    f.LSeriesSummable z :=
   by
-  rw [← l_series_summable_iff_of_re_eq_re (Complex.of_real_re z.re)]
+  rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re)]
   apply l_series_summable_of_bounded_of_one_lt_real h
   exact hz
 #align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re Nat.ArithmeticFunction.lSeriesSummable_of_bounded_of_one_lt_re
@@ -114,7 +117,7 @@ open ArithmeticFunction
 
 theorem zeta_lSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re :=
   by
-  rw [← l_series_summable_iff_of_re_eq_re (Complex.of_real_re z.re), l_series_summable, ←
+  rw [← l_series_summable_iff_of_re_eq_re (Complex.ofReal_re z.re), l_series_summable, ←
     summable_norm_iff, ← Real.summable_one_div_nat_rpow, iff_iff_eq]
   by_cases h0 : z.re = 0
   · rw [h0, ← summable_nat_add_iff 1]

Changes in mathlib4

mathlib3
mathlib4
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -294,7 +294,7 @@ lemma LSeriesSummable.le_const_mul_rpow {f : ℕ → ℂ} {s : ℂ} (h : LSeries
   exact (this.trans_lt hn).false.elim
 
 open Filter in
-/-- If the `LSeries` of `f` is summable at `s`, then `f = O(n^(re s))`.-/
+/-- If the `LSeries` of `f` is summable at `s`, then `f = O(n^(re s))`. -/
 lemma LSeriesSummable.isBigO_rpow {f : ℕ → ℂ} {s : ℂ} (h : LSeriesSummable f s) :
     f =O[atTop] fun n ↦ (n : ℝ) ^ s.re := by
   obtain ⟨C, hC⟩ := h.le_const_mul_rpow
feat(NumberTheory/LSeries/Dirichlet): new file, material on specific L-series (#11712)

This PR adds a new file NumberTheory.LSeries.Dirichlet that contains results on L-series of specific functions:

  • the Möbius function
  • Dirichlet characters, with the constant function 1 as a special case
  • the arithmetic function ζ (which has the same L-series as the constant function 1)
  • the von Mangoldt function and its twists by Dirichlet characters

It also adds (L-series of zero and of the indicator function of {1}) and removes (convergence of the L-series of the constant function 1 / of ζ; this is moved to the new file) some material to/from NumberTheory.LSeries.Basic.

See this thread on Zulip.

Diff
@@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson, Michael Stoll
 -/
 import Mathlib.Analysis.PSeries
-import Mathlib.NumberTheory.ArithmeticFunction
 import Mathlib.Analysis.NormedSpace.FiniteDimension
 
 #align_import number_theory.l_series from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
@@ -46,11 +45,6 @@ to `N` and `R` coerces to `ℂ`) as arguments to `LSeries` etc.
 ## Tags
 
 L-series
-
-## TODO
-
-* Move `LSeriesSummable.one_iff_one_lt_re` and `zeta_LSeriesSummable_iff_one_lt_r`
-  to a new file on L-series of specific functions
 -/
 
 open scoped BigOperators
@@ -86,7 +80,7 @@ lemma term_of_ne_zero {n : ℕ} (hn : n ≠ 0) (f : ℕ → ℂ) (s : ℂ) :
     term f s n = f n / n ^ s :=
   if_neg hn
 
-lemma term_congr {f g : ℕ → ℂ} (h : ∀ n ≠ 0, f n = g n) (s : ℂ) (n : ℕ) :
+lemma term_congr {f g : ℕ → ℂ} (h : ∀ {n}, n ≠ 0 → f n = g n) (s : ℂ) (n : ℕ) :
     term f s n = term g s n := by
   rcases eq_or_ne n 0 with hn | hn <;> simp [hn, h]
 
@@ -130,7 +124,7 @@ def LSeries (f : ℕ → ℂ) (s : ℂ) : ℂ :=
   ∑' n, term f s n
 #align nat.arithmetic_function.l_series LSeries
 
-lemma LSeries_congr {f g : ℕ → ℂ} (s : ℂ) (h : ∀ n ≠ 0, f n = g n) :
+lemma LSeries_congr {f g : ℕ → ℂ} (s : ℂ) (h : ∀ {n}, n ≠ 0 → f n = g n) :
     LSeries f s = LSeries g s :=
   tsum_congr <| term_congr h s
 
@@ -139,7 +133,7 @@ def LSeriesSummable (f : ℕ → ℂ) (s : ℂ) : Prop :=
   Summable (term f s)
 #align nat.arithmetic_function.l_series_summable LSeriesSummable
 
-lemma LSeriesSummable_congr {f g : ℕ → ℂ} (s : ℂ) (h : ∀ n ≠ 0, f n = g n) :
+lemma LSeriesSummable_congr {f g : ℕ → ℂ} (s : ℂ) (h : ∀ {n}, n ≠ 0 → f n = g n) :
     LSeriesSummable f s ↔ LSeriesSummable g s :=
   summable_congr <| term_congr h s
 
@@ -197,7 +191,7 @@ lemma LSeriesHasSum_iff {f : ℕ → ℂ} {s a : ℂ} :
     LSeriesHasSum f s a ↔ LSeriesSummable f s ∧ LSeries f s = a :=
   ⟨fun H ↦ ⟨H.LSeriesSummable, H.LSeries_eq⟩, fun ⟨H₁, H₂⟩ ↦ H₂ ▸ H₁.LSeriesHasSum⟩
 
-lemma LSeriesHasSum_congr {f g : ℕ → ℂ} (s a : ℂ) (h : ∀ n ≠ 0, f n = g n) :
+lemma LSeriesHasSum_congr {f g : ℕ → ℂ} (s a : ℂ) (h : ∀ {n}, n ≠ 0 → f n = g n) :
     LSeriesHasSum f s a ↔ LSeriesHasSum g s a := by
   simp only [LSeriesHasSum_iff, LSeriesSummable_congr s h, LSeries_congr s h]
 
@@ -211,6 +205,9 @@ theorem LSeriesSummable_iff_of_re_eq_re {f : ℕ → ℂ} {s s' : ℂ} (h : s.re
   ⟨fun H ↦ H.of_re_le_re h.le, fun H ↦ H.of_re_le_re h.symm.le⟩
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re LSeriesSummable_iff_of_re_eq_re
 
+/-- The indicator function of `{1} ⊆ ℕ` with values in `ℂ`. -/
+def LSeries.delta (n : ℕ) : ℂ :=
+  if n = 1 then 1 else 0
 
 /-!
 ### Notation
@@ -226,6 +223,57 @@ or `↗f` when `f : ArithmeticFunction R` or simply `f : N → R` with a coercio
 as an argument to `LSeries`, `LSeriesHasSum`, `LSeriesSummable` etc. -/
 scoped[LSeries.notation] notation:max "↗" f:max => fun n : ℕ ↦ (f n : ℂ)
 
+@[inherit_doc]
+scoped[LSeries.notation] notation "δ" => delta
+
+/-!
+### LSeries of 0 and δ
+-/
+
+@[simp]
+lemma LSeries_zero : LSeries 0 = 0 := by
+  ext
+  simp only [LSeries, LSeries.term, Pi.zero_apply, zero_div, ite_self, tsum_zero]
+
+section delta
+
+open scoped LSeries.notation
+
+namespace LSeries
+
+open Nat Complex
+
+lemma term_delta (s : ℂ) (n : ℕ) : term δ s n = if n = 1 then 1 else 0 := by
+  rcases eq_or_ne n 0 with rfl | hn
+  · simp only [term_zero, zero_ne_one, ↓reduceIte]
+  · simp only [ne_eq, hn, not_false_eq_true, term_of_ne_zero, delta]
+    rcases eq_or_ne n 1 with rfl | hn'
+    · simp only [↓reduceIte, cast_one, one_cpow, ne_eq, one_ne_zero, not_false_eq_true, div_self]
+    · simp only [hn', ↓reduceIte, zero_div]
+
+lemma mul_delta_eq_smul_delta {f : ℕ → ℂ} : f * δ = f 1 • δ := by
+  ext n
+  simp only [Pi.mul_apply, delta, mul_ite, mul_one, mul_zero, Pi.smul_apply, smul_eq_mul]
+  split_ifs with hn <;> simp only [hn]
+
+lemma mul_delta {f : ℕ → ℂ} (h : f 1 = 1) : f * δ = δ := by
+  rw [mul_delta_eq_smul_delta, h, one_smul]
+
+lemma delta_mul_eq_smul_delta {f : ℕ → ℂ} : δ * f = f 1 • δ :=
+  mul_comm δ f ▸ mul_delta_eq_smul_delta
+
+lemma delta_mul {f : ℕ → ℂ} (h : f 1 = 1) : δ * f = δ :=
+  mul_comm δ f ▸ mul_delta h
+
+end LSeries
+
+/-- The L-series of `δ` is the constant function `1`. -/
+lemma LSeries_delta : LSeries δ = 1 := by
+  ext
+  simp only [LSeries, LSeries.term_delta, tsum_ite_eq, Pi.one_apply]
+
+end delta
+
 
 /-!
 ### Criteria for and consequences of summability of L-series
@@ -322,26 +370,3 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ℕ → ℂ} {m : ℝ}
     LSeriesSummable f s :=
   LSeriesSummable_of_bounded_of_one_lt_re h <| by simp only [ofReal_re, hs]
 #align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real LSeriesSummable_of_bounded_of_one_lt_real
-
--- TODO: Move this to a separate file on concrete L-series
-
-open Set in
-/-- The `LSeries` with all coefficients `1` converges at `s` if and only if `re s > 1`. -/
-theorem LSeriesSummable.one_iff_one_lt_re {s : ℂ} : LSeriesSummable 1 s ↔ 1 < s.re := by
-  rw [← LSeriesSummable_iff_of_re_eq_re (Complex.ofReal_re s.re), LSeriesSummable,
-    ← summable_norm_iff, ← Real.summable_one_div_nat_rpow]
-  simp_rw [← Finite.summable_compl_iff (finite_singleton 0), summable_subtype_iff_indicator]
-  refine summable_congr fun n ↦ ?_
-  by_cases hn : n ∈ ({0}ᶜ :Set ℕ)
-  · simp only [indicator_of_mem hn, norm_term_eq]
-    simp only [show n ≠ 0 from hn, ↓reduceIte, Pi.one_apply, norm_one, ofReal_re]
-  · simp only [indicator_of_not_mem hn]
-
-open scoped ArithmeticFunction in
-/-- The `LSeries` associated to the arithmetic function `ζ` converges at `s` if and only if
-`re s > 1`. -/
-theorem zeta_LSeriesSummable_iff_one_lt_re {s : ℂ} : LSeriesSummable (ζ ·) s ↔ 1 < s.re := by
-  have (n : ℕ) (hn : n ≠ 0) : ζ n = (1 : ℕ → ℂ) n := by
-    simp only [ArithmeticFunction.zeta_apply, hn, ↓reduceIte, Nat.cast_one, Pi.one_apply]
-  exact (LSeriesSummable_congr s this).trans <| LSeriesSummable.one_iff_one_lt_re
-#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re zeta_LSeriesSummable_iff_one_lt_re
feat(NumberTheory/LSeries/Deriv): derivatives of L-series (#11245)

This adds a file Mathlib.NumberTheory.LSeries.Deriv that contains results on differentiability and derivatives of L-series, including the fact that the L-series is holomorphic on its right half-plane of absolute convergence.

See this thread on Zulip.

Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>

Diff
@@ -143,6 +143,28 @@ lemma LSeriesSummable_congr {f g : ℕ → ℂ} (s : ℂ) (h : ∀ n ≠ 0, f n
     LSeriesSummable f s ↔ LSeriesSummable g s :=
   summable_congr <| term_congr h s
 
+open Filter in
+/-- If `f` and `g` agree on large `n : ℕ` and the `LSeries` of `f` converges at `s`,
+then so does that of `g`. -/
+lemma LSeriesSummable.congr' {f g : ℕ → ℂ} (s : ℂ) (h : f =ᶠ[atTop] g) (hf : LSeriesSummable f s) :
+    LSeriesSummable g s := by
+  rw [← Nat.cofinite_eq_atTop] at h
+  refine (summable_norm_iff.mpr hf).of_norm_bounded_eventually _ ?_
+  have : term f s =ᶠ[cofinite] term g s := by
+    rw [eventuallyEq_iff_exists_mem] at h ⊢
+    obtain ⟨S, hS, hS'⟩ := h
+    refine ⟨S \ {0}, diff_mem hS <| (Set.finite_singleton 0).compl_mem_cofinite, fun n hn ↦ ?_⟩
+    simp only [Set.mem_diff, Set.mem_singleton_iff] at hn
+    simp only [term_of_ne_zero hn.2, hS' hn.1]
+  exact Eventually.mono this.symm fun n hn ↦ by simp only [hn, le_rfl]
+
+open Filter in
+/-- If `f` and `g` agree on large `n : ℕ`, then the `LSeries` of `f` converges at `s`
+if and only if that of `g` does. -/
+lemma LSeriesSummable_congr' {f g : ℕ → ℂ} (s : ℂ) (h : f =ᶠ[atTop] g) :
+    LSeriesSummable f s ↔ LSeriesSummable g s :=
+  ⟨fun H ↦ H.congr' s h, fun H ↦ H.congr' s h.symm⟩
+
 theorem LSeries.eq_zero_of_not_LSeriesSummable (f : ℕ → ℂ) (s : ℂ) :
     ¬ LSeriesSummable f s → LSeries f s = 0 :=
   tsum_eq_zero_of_not_summable
feat(NumberTheory/LSeries/Linearity): move/add statements on linearity of L-series (#11214)

This adds a file NumberTheory.LSeries.Linearity, which contains statements on

  • addition (moved from NumberTheory.LSeries.Basic)
  • negation and
  • scalar multiplication

of L-series, and corresponding statements for LSeries.term, LSeriesHasSum and LSeriesSummable.

See this thread on Zulip.

Diff
@@ -51,8 +51,6 @@ L-series
 
 * Move `LSeriesSummable.one_iff_one_lt_re` and `zeta_LSeriesSummable_iff_one_lt_r`
   to a new file on L-series of specific functions
-
-* Move `LSeries_add` and friends to a new file on algebraic operations on L-series
 -/
 
 open scoped BigOperators
@@ -325,35 +323,3 @@ theorem zeta_LSeriesSummable_iff_one_lt_re {s : ℂ} : LSeriesSummable (ζ ·) s
     simp only [ArithmeticFunction.zeta_apply, hn, ↓reduceIte, Nat.cast_one, Pi.one_apply]
   exact (LSeriesSummable_congr s this).trans <| LSeriesSummable.one_iff_one_lt_re
 #align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re zeta_LSeriesSummable_iff_one_lt_re
-
--- TODO: Move this to a separate file on operations on L-series
-
-lemma LSeries.term_add (f g : ℕ → ℂ) (s : ℂ) :
-    term (f + g) s = term f s + term g s := by
-  ext ⟨- | n⟩
-  · simp only [term_zero, Pi.add_apply, add_zero]
-  · simp only [term_of_ne_zero (Nat.succ_ne_zero _), Pi.add_apply, _root_.add_div]
-
-lemma LSeries.term_add_apply (f g : ℕ → ℂ) (s : ℂ) (n : ℕ) :
-    term (f + g) s n = term f s n + term g s n := by
-  rw [term_add, Pi.add_apply]
-
-lemma LSeriesHasSum_add {f g : ℕ → ℂ} {s a b : ℂ} (hf : LSeriesHasSum f s a)
-    (hg : LSeriesHasSum g s b) :
-    LSeriesHasSum (f + g) s (a + b) := by
-  simpa only [LSeriesHasSum, term_add] using HasSum.add hf hg
-
-@[simp]
-theorem LSeries_add {f g : ℕ → ℂ} {s : ℂ} (hf : LSeriesSummable f s)
-    (hg : LSeriesSummable g s) : LSeries (f + g) s = LSeries f s + LSeries g s := by
-  simp only [LSeries, Pi.add_apply]
-  rw [← tsum_add hf hg]
-  congr
-  exact term_add ..
-#align nat.arithmetic_function.l_series_add LSeries_add
-
-lemma LSeriesSummable_add {f g : ℕ → ℂ} {s : ℂ} (hf : LSeriesSummable f s)
-    (hg : LSeriesSummable g s) : LSeriesSummable (f + g) s := by
-  convert Summable.add hf hg
-  simp_rw [← term_add_apply]
-  rfl
feat(NumberTheory/LSeries): introduce notations (#11253)

This just introduces L as a short notation for LSeries and ↗f as notation for fun n : ℕ ↦ (f n : ℂ), both scoped to LSeries.notation. The latter makes it convenient to use arithmetic functions or Dirichlet characters (or anything that coerces to a function N → R, where coerces to N and R coerces to ) as arguments to LSeries etc. The first is for convenience (and agreement with informal math, where we write "L(f, s)"), and the second one considerably simplifies statements involving Dirichlet characters or arithmetic functions like the von Mangoldt function and their L-series.

See here on Zulip.

Diff
@@ -36,6 +36,13 @@ Given a sequence `f: ℕ → ℂ`, we define the corresponding L-series.
  * `LSeriesSummable.isBigO_rpow`: if the `LSeries` of `f` is summable at `s`,
     then `f = O(n^(re s))`.
 
+## Notation
+
+We introduce `L` as notation for `LSeries` and `↗f` as notation for `fun n : ℕ ↦ (f n : ℂ)`,
+both scoped to `LSeries.notation`. The latter makes it convenient to use arithmetic functions
+or Dirichlet characters (or anything that coerces to a function `N → R`, where `ℕ` coerces
+to `N` and `R` coerces to `ℂ`) as arguments to `LSeries` etc.
+
 ## Tags
 
 L-series
@@ -48,7 +55,6 @@ L-series
 * Move `LSeries_add` and friends to a new file on algebraic operations on L-series
 -/
 
-
 open scoped BigOperators
 
 open Complex
@@ -186,6 +192,21 @@ theorem LSeriesSummable_iff_of_re_eq_re {f : ℕ → ℂ} {s s' : ℂ} (h : s.re
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re LSeriesSummable_iff_of_re_eq_re
 
 
+/-!
+### Notation
+-/
+
+@[inherit_doc]
+scoped[LSeries.notation] notation "L" => LSeries
+
+/-- We introduce notation `↗f` for `f` interpreted as a function `ℕ → ℂ`.
+
+Let `R` be a ring with a coercion to `ℂ`. Then we can write `↗χ` when `χ : DirichletCharacter R`
+or `↗f` when `f : ArithmeticFunction R` or simply `f : N → R` with a coercion from `ℕ` to `N`
+as an argument to `LSeries`, `LSeriesHasSum`, `LSeriesSummable` etc. -/
+scoped[LSeries.notation] notation:max "↗" f:max => fun n : ℕ ↦ (f n : ℂ)
+
+
 /-!
 ### Criteria for and consequences of summability of L-series
 
refactor(NumberTheory/LSeries/*): change type of argument to ℕ → ℂ, add LSeries.term + API etc. (#11111)

See this thread on Zulip.

The main point of this PR is to refactor LSeries and friends to use an argument f : ℕ → ℂ instead of f : ArithmeticFunction ℂ. Since I was at it anyway, I also did a few more things:

  • Move the L-series stuff out of the ArithmeticFunction namespace. Use LSeries as a namespace for some of the declarations instead.
  • Introduce LSeries.term f s n; this denotes the nth term in the L-series LSeries f s. This is defined to be zero for n = 0; otherwise it is the usual f n / n ^ s. Provide basic API for it.
  • Re-write LSeries etc. in terms of LSeries.term. Attempt to isolate the meat of the proofs in suitable API lemmas for LSeries.term. Add some API (like congruence lemmas).
  • Use s for the complex variable (in place of z or w; s and s' when two are required), following the notational convention in analytic number theory.
  • Golf some proofs.
  • Add some documentation (and modify existing docstrings to fit the changes).

Co-authored-by: Michael Stoll <99838730+MichaelStollBayreuth@users.noreply.github.com>

Diff
@@ -12,140 +12,216 @@ import Mathlib.Analysis.NormedSpace.FiniteDimension
 /-!
 # L-series
 
-Given an arithmetic function, we define the corresponding L-series.
+Given a sequence `f: ℕ → ℂ`, we define the corresponding L-series.
 
 ## Main Definitions
 
- * `ArithmeticFunction.LSeries` is the `LSeries` with a given arithmetic function as its
-  coefficients. This is not the analytic continuation, just the infinite series.
+ * `LSeries.term f s n` is the `n`th term of the L-series of the sequence `f` at `s : ℂ`.
+    We define it to be zero when `n = 0`.
 
- * `ArithmeticFunction.LSeriesSummable` indicates that the `LSeries`
-  converges at a given point.
+ * `LSeries f` is the L-series with a given sequence `f` as its
+    coefficients. This is not the analytic continuation (which does not necessarily exist),
+    just the sum of the infinite series if it exists and zero otherwise.
 
- * `ArithmeticFunction.LSeriesHasSum f s a` expresses that the L-series
-  of `f : ArithmeticFunction ℂ` converges (absolutely) at `s : ℂ` to `a : ℂ`.
+ * `LSeriesSummable f s` indicates that the L-series of `f` converges at `s : ℂ`.
+
+ * `LSeriesHasSum f s a` expresses that the L-series of `f` converges (absolutely)
+    at `s : ℂ` to `a : ℂ`.
 
 ## Main Results
 
- * `ArithmeticFunction.LSeriesSummable_of_le_const_mul_rpow`: the `LSeries` of an
-  arithmetic function bounded by a constant times `n^(x-1)` converges at `s` when `x < s.re`.
+ * `LSeriesSummable_of_isBigO_rpow`: the `LSeries` of a sequence `f` such that
+    `f = O(n^(x-1))` converges at `s` when `x < s.re`.
 
- * `ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re`: the `LSeries` of `ζ`
-  (whose analytic continuation is the Riemann ζ) converges iff `1 < z.re`.
+ * `LSeriesSummable.isBigO_rpow`: if the `LSeries` of `f` is summable at `s`,
+    then `f = O(n^(re s))`.
 
 ## Tags
 
-L-series, abscissa of convergence
+L-series
 
 ## TODO
 
-* Move `zeta_LSeriesSummable_iff_one_lt_r` to a new file on L-series of specific functions
+* Move `LSeriesSummable.one_iff_one_lt_re` and `zeta_LSeriesSummable_iff_one_lt_r`
+  to a new file on L-series of specific functions
 
-* Move `LSeries_add` to a new file on algebraic operations on L-series
+* Move `LSeries_add` and friends to a new file on algebraic operations on L-series
 -/
 
 
 open scoped BigOperators
 
-namespace ArithmeticFunction
+open Complex
+
+/-!
+### The terms of an L-series
+
+We define the `n`th term evaluated at a complex number `s` of the L-series associated
+to a sequence `f : ℕ → ℂ`, `LSeries.term f s n`, and provide some basic API.
 
-open Complex Nat
+We set `LSeries.term f s 0 = 0`, and for positive `n`, `LSeries.term f s n = f n / n ^ s`.
+-/
+
+namespace LSeries
 
-/-- The L-series of an `ArithmeticFunction`. -/
+/-- The `n`th term of the L-series of `f` evaluated at `s`. We set it to zero when `n = 0`. -/
 noncomputable
-def LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
-  ∑' n, f n / n ^ z
-#align nat.arithmetic_function.l_series ArithmeticFunction.LSeries
+def term (f : ℕ → ℂ) (s : ℂ) (n : ℕ) : ℂ :=
+  if n = 0 then 0 else f n / n ^ s
+
+lemma term_def (f : ℕ → ℂ) (s : ℂ) (n : ℕ) :
+    term f s n = if n = 0 then 0 else f n / n ^ s :=
+  rfl
+
+@[simp]
+lemma term_zero (f : ℕ → ℂ) (s : ℂ) : term f s 0 = 0 := rfl
+
+-- We put `hn` first for convnience, so that we can write `rw [LSeries.term_of_ne_zero hn]` etc.
+@[simp]
+lemma term_of_ne_zero {n : ℕ} (hn : n ≠ 0) (f : ℕ → ℂ) (s : ℂ) :
+    term f s n = f n / n ^ s :=
+  if_neg hn
+
+lemma term_congr {f g : ℕ → ℂ} (h : ∀ n ≠ 0, f n = g n) (s : ℂ) (n : ℕ) :
+    term f s n = term g s n := by
+  rcases eq_or_ne n 0 with hn | hn <;> simp [hn, h]
+
+lemma norm_term_eq (f : ℕ → ℂ) (s : ℂ) (n : ℕ) :
+    ‖term f s n‖ = if n = 0 then 0 else ‖f n‖ / n ^ s.re := by
+  rcases eq_or_ne n 0 with rfl | hn
+  · simp only [term_zero, norm_zero, ↓reduceIte]
+  · rw [if_neg hn, term_of_ne_zero hn, norm_div, norm_natCast_cpow_of_pos <| Nat.pos_of_ne_zero hn]
+
+lemma norm_term_le {f g : ℕ → ℂ} (s : ℂ) {n : ℕ} (h : ‖f n‖ ≤ ‖g n‖) :
+    ‖term f s n‖ ≤ ‖term g s n‖ := by
+  simp only [norm_term_eq]
+  split
+  · rfl
+  · gcongr
+
+lemma norm_term_le_of_re_le_re (f : ℕ → ℂ) {s s' : ℂ} (h : s.re ≤ s'.re) (n : ℕ) :
+    ‖term f s' n‖ ≤ ‖term f s n‖ := by
+  simp only [norm_term_eq]
+  split
+  next => rfl
+  next hn => gcongr; exact Nat.one_le_cast.mpr <| Nat.one_le_iff_ne_zero.mpr hn
+
+end LSeries
+
+/-!
+### Definition of the L-series and related statements
+
+We define `LSeries f s` of `f : ℕ → ℂ` as the sum over `LSeries.term f s`.
+We also provide predicates `LSeriesSummable f s` stating that `LSeries f s` is summable
+and `LSeriesHasSum f s a` stating that the L-series of `f` is summable at `s` and converges
+to `a : ℂ`.
+-/
 
-/-- `f.LSeriesSummable z` indicates that the L-series of `f` converges at `z`. -/
-def LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) : Prop :=
-  Summable fun n => f n / n ^ z
-#align nat.arithmetic_function.l_series_summable ArithmeticFunction.LSeriesSummable
+open LSeries
 
-theorem LSeries_eq_zero_of_not_LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) :
-    ¬f.LSeriesSummable z → f.LSeries z = 0 :=
+/-- The value of the L-series of the sequence `f` at the point `s`
+if it converges absolutely there, and `0` otherwise. -/
+noncomputable
+def LSeries (f : ℕ → ℂ) (s : ℂ) : ℂ :=
+  ∑' n, term f s n
+#align nat.arithmetic_function.l_series LSeries
+
+lemma LSeries_congr {f g : ℕ → ℂ} (s : ℂ) (h : ∀ n ≠ 0, f n = g n) :
+    LSeries f s = LSeries g s :=
+  tsum_congr <| term_congr h s
+
+/-- `LSeriesSummable f s` indicates that the L-series of `f` converges absolutely at `s`. -/
+def LSeriesSummable (f : ℕ → ℂ) (s : ℂ) : Prop :=
+  Summable (term f s)
+#align nat.arithmetic_function.l_series_summable LSeriesSummable
+
+lemma LSeriesSummable_congr {f g : ℕ → ℂ} (s : ℂ) (h : ∀ n ≠ 0, f n = g n) :
+    LSeriesSummable f s ↔ LSeriesSummable g s :=
+  summable_congr <| term_congr h s
+
+theorem LSeries.eq_zero_of_not_LSeriesSummable (f : ℕ → ℂ) (s : ℂ) :
+    ¬ LSeriesSummable f s → LSeries f s = 0 :=
   tsum_eq_zero_of_not_summable
-#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable
+#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable LSeries.eq_zero_of_not_LSeriesSummable
 
 @[simp]
-theorem LSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
-  simp [LSeriesSummable, summable_zero]
-#align nat.arithmetic_function.l_series_summable_zero ArithmeticFunction.LSeriesSummable_zero
+theorem LSeriesSummable_zero {s : ℂ} : LSeriesSummable 0 s := by
+  simp only [LSeriesSummable, funext (term_def 0 s), Pi.zero_apply, zero_div, ite_self,
+    summable_zero]
+#align nat.arithmetic_function.l_series_summable_zero LSeriesSummable_zero
 
-/-- This states that the L-series of the arithmetic function `f` converges at `s` to `a`. -/
-def LSeriesHasSum (f : ArithmeticFunction ℂ) (s a : ℂ) : Prop :=
-  HasSum (fun (n : ℕ) => f n / n ^ s) a
+/-- This states that the L-series of the sequence `f` converges absolutely at `s` and that
+the value there is `a`. -/
+def LSeriesHasSum (f : ℕ → ℂ) (s a : ℂ) : Prop :=
+  HasSum (term f s) a
 
-lemma LSeriesHasSum.LSeriesSummable {f : ArithmeticFunction ℂ} {s a : ℂ}
+lemma LSeriesHasSum.LSeriesSummable {f : ℕ → ℂ} {s a : ℂ}
     (h : LSeriesHasSum f s a) : LSeriesSummable f s :=
   h.summable
 
-lemma LSeriesHasSum.LSeries_eq {f : ArithmeticFunction ℂ} {s a : ℂ}
+lemma LSeriesHasSum.LSeries_eq {f : ℕ → ℂ} {s a : ℂ}
     (h : LSeriesHasSum f s a) : LSeries f s = a :=
   h.tsum_eq
 
-lemma LSeriesSummable.LSeriesHasSum {f : ArithmeticFunction ℂ} {s : ℂ} (h : LSeriesSummable f s) :
+lemma LSeriesSummable.LSeriesHasSum {f : ℕ → ℂ} {s : ℂ} (h : LSeriesSummable f s) :
     LSeriesHasSum f s (LSeries f s) :=
   h.hasSum
 
-lemma norm_LSeriesTerm_eq (f : ArithmeticFunction ℂ) (s : ℂ) (n : ℕ) :
-    ‖f n / n ^ s‖ = ‖f n‖ / n ^ s.re := by
-  rcases n.eq_zero_or_pos with rfl | hn
-  · simp only [map_zero, zero_div, norm_zero, zero_mul]
-  rw [norm_div, norm_natCast_cpow_of_pos hn]
+lemma LSeriesHasSum_iff {f : ℕ → ℂ} {s a : ℂ} :
+    LSeriesHasSum f s a ↔ LSeriesSummable f s ∧ LSeries f s = a :=
+  ⟨fun H ↦ ⟨H.LSeriesSummable, H.LSeries_eq⟩, fun ⟨H₁, H₂⟩ ↦ H₂ ▸ H₁.LSeriesHasSum⟩
 
-lemma norm_LSeriesTerm_le_of_re_le_re (f : ArithmeticFunction ℂ) {w : ℂ} {z : ℂ}
-    (h : w.re ≤ z.re) (n : ℕ) : ‖f n / n ^ z‖ ≤ ‖f n / n ^ w‖ := by
-  rcases n.eq_zero_or_pos with rfl | hn
-  · simp only [map_zero, CharP.cast_eq_zero, zero_div, norm_zero, le_refl]
-  have hn' := norm_natCast_cpow_pos_of_pos hn w
-  simp_rw [norm_div]
-  suffices H : ‖(n : ℂ) ^ w‖ ≤ ‖(n : ℂ) ^ z‖ from div_le_div (norm_nonneg _) le_rfl hn' H
-  refine (one_le_div hn').mp ?_
-  rw [← norm_div, ← cpow_sub _ _ <| cast_ne_zero.mpr hn.ne', norm_natCast_cpow_of_pos hn]
-  exact Real.one_le_rpow (one_le_cast.mpr hn) <| by simp only [sub_re, sub_nonneg, h]
-
-lemma LSeriesSummable.of_re_le_re {f : ArithmeticFunction ℂ} {w : ℂ} {z : ℂ} (h : w.re ≤ z.re)
-    (hf : LSeriesSummable f w) : LSeriesSummable f z := by
+lemma LSeriesHasSum_congr {f g : ℕ → ℂ} (s a : ℂ) (h : ∀ n ≠ 0, f n = g n) :
+    LSeriesHasSum f s a ↔ LSeriesHasSum g s a := by
+  simp only [LSeriesHasSum_iff, LSeriesSummable_congr s h, LSeries_congr s h]
+
+lemma LSeriesSummable.of_re_le_re {f : ℕ → ℂ} {s s' : ℂ} (h : s.re ≤ s'.re)
+    (hf : LSeriesSummable f s) : LSeriesSummable f s' := by
   rw [LSeriesSummable, ← summable_norm_iff] at hf ⊢
-  exact hf.of_nonneg_of_le (fun _ ↦ norm_nonneg _) (norm_LSeriesTerm_le_of_re_le_re f h)
+  exact hf.of_nonneg_of_le (fun _ ↦ norm_nonneg _) (norm_term_le_of_re_le_re f h)
+
+theorem LSeriesSummable_iff_of_re_eq_re {f : ℕ → ℂ} {s s' : ℂ} (h : s.re = s'.re) :
+    LSeriesSummable f s ↔ LSeriesSummable f s' :=
+  ⟨fun H ↦ H.of_re_le_re h.le, fun H ↦ H.of_re_le_re h.symm.le⟩
+#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re LSeriesSummable_iff_of_re_eq_re
 
-theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
-    f.LSeriesSummable w ↔ f.LSeriesSummable z :=
-  ⟨fun H ↦  H.of_re_le_re h.le, fun H ↦ H.of_re_le_re h.symm.le⟩
-#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
 
-lemma LSeriesSummable.le_const_mul_rpow {f : ArithmeticFunction ℂ} {s : ℂ}
-    (h : LSeriesSummable f s) : ∃ C, ∀ n, ‖f n‖ ≤ C * n ^ s.re := by
+/-!
+### Criteria for and consequences of summability of L-series
+
+We relate summability of L-series with bounds on the coefficients in terms of powers of `n`.
+-/
+
+/-- If the `LSeries` of `f` is summable at `s`, then `f n` is bounded in absolute value
+by a constant times `n^(re s)`. -/
+lemma LSeriesSummable.le_const_mul_rpow {f : ℕ → ℂ} {s : ℂ} (h : LSeriesSummable f s) :
+    ∃ C, ∀ n ≠ 0, ‖f n‖ ≤ C * n ^ s.re := by
   replace h := h.norm
   by_contra! H
-  obtain ⟨n, hn⟩ := H (tsum fun n ↦ ‖f n / n ^ s‖)
-  have hn₀ : 0 < n := by
-    refine n.eq_zero_or_pos.resolve_left ?_
-    rintro rfl
-    rw [map_zero, norm_zero, Nat.cast_zero, mul_neg_iff] at hn
-    replace hn := hn.resolve_left <| fun hh ↦ hh.2.not_le <| Real.rpow_nonneg (le_refl 0) s.re
-    exact hn.1.not_le <| tsum_nonneg (fun _ ↦ norm_nonneg _)
+  obtain ⟨n, hn₀, hn⟩ := H (tsum fun n ↦ ‖term f s n‖)
   have := le_tsum h n fun _ _ ↦ norm_nonneg _
-  rw [norm_LSeriesTerm_eq, div_le_iff <| Real.rpow_pos_of_pos (Nat.cast_pos.mpr hn₀) _] at this
+  rw [norm_term_eq, if_neg hn₀,
+    div_le_iff <| Real.rpow_pos_of_pos (Nat.cast_pos.mpr <| Nat.pos_of_ne_zero hn₀) _] at this
   exact (this.trans_lt hn).false.elim
 
 open Filter in
-lemma LSeriesSummable.isBigO_rpow {f : ArithmeticFunction ℂ} {s : ℂ}
-    (h : LSeriesSummable f s) : f =O[atTop] fun n ↦ (n : ℝ) ^ s.re := by
+/-- If the `LSeries` of `f` is summable at `s`, then `f = O(n^(re s))`.-/
+lemma LSeriesSummable.isBigO_rpow {f : ℕ → ℂ} {s : ℂ} (h : LSeriesSummable f s) :
+    f =O[atTop] fun n ↦ (n : ℝ) ^ s.re := by
   obtain ⟨C, hC⟩ := h.le_const_mul_rpow
-  refine Asymptotics.IsBigO.of_bound C ?_
-  convert eventually_of_forall hC using 4 with n
-  have hn₀ : (0 : ℝ) ≤ n := Nat.cast_nonneg _
-  rw [Real.norm_eq_abs, Real.abs_rpow_of_nonneg hn₀, _root_.abs_of_nonneg hn₀]
-
-lemma LSeriesSummable_of_le_const_mul_rpow {f : ArithmeticFunction ℂ} {x : ℝ} {s : ℂ}
-    (hs : x < s.re) (h : ∃ C, ∀ n, ‖f n‖ ≤ C * n ^ (x - 1)) :
+  refine Asymptotics.IsBigO.of_bound C <| eventually_atTop.mpr ⟨1, fun n hn ↦ ?_⟩
+  convert hC n (Nat.pos_iff_ne_zero.mp hn) using 2
+  rw [Real.norm_eq_abs, Real.abs_rpow_of_nonneg n.cast_nonneg, _root_.abs_of_nonneg n.cast_nonneg]
+
+/-- If `f n` is bounded in absolute value by a constant times `n^(x-1)` and `re s > x`,
+then the `LSeries` of `f` is summable at `s`. -/
+lemma LSeriesSummable_of_le_const_mul_rpow {f : ℕ → ℂ} {x : ℝ} {s : ℂ} (hs : x < s.re)
+    (h : ∃ C, ∀ n ≠ 0, ‖f n‖ ≤ C * n ^ (x - 1)) :
     LSeriesSummable f s := by
   obtain ⟨C, hC⟩ := h
   have hC₀ : 0 ≤ C := by
-    specialize hC 1
-    simp only [cast_one, Real.one_rpow, mul_one] at hC
+    specialize hC 1 one_ne_zero
+    simp only [Nat.cast_one, Real.one_rpow, mul_one] at hC
     exact (norm_nonneg _).trans hC
   have hsum : Summable fun n : ℕ ↦ ‖(C : ℂ) / n ^ (s + (1 - x))‖ := by
     simp_rw [div_eq_mul_inv, norm_mul, ← cpow_neg]
@@ -160,18 +236,19 @@ lemma LSeriesSummable_of_le_const_mul_rpow {f : ArithmeticFunction ℂ} {x : ℝ
       ring
   refine Summable.of_norm <| hsum.of_nonneg_of_le (fun _ ↦ norm_nonneg _) (fun n ↦ ?_)
   rcases n.eq_zero_or_pos with rfl | hn
-  · simp only [map_zero, zero_div, norm_zero, norm_nonneg]
+  · simp only [term_zero, norm_zero]
+    exact norm_nonneg _
   have hn' : 0 < (n : ℝ) ^ s.re := Real.rpow_pos_of_pos (Nat.cast_pos.mpr hn) _
-  simp_rw [norm_div, norm_natCast_cpow_of_pos hn, div_le_iff hn', add_re, sub_re, one_re,
-    ofReal_re, Real.rpow_add <| Nat.cast_pos.mpr hn, div_eq_mul_inv, mul_inv]
-  rw [mul_assoc, mul_comm _ ((n : ℝ) ^ s.re), ← mul_assoc ((n : ℝ) ^ s.re), mul_inv_cancel hn'.ne',
-    ← Real.rpow_neg n.cast_nonneg, norm_eq_abs (C : ℂ), abs_ofReal, _root_.abs_of_nonneg hC₀,
-    neg_sub, one_mul]
-  exact hC n
+  simp_rw [term_of_ne_zero hn.ne', norm_div, norm_natCast_cpow_of_pos hn, div_le_iff hn',
+    norm_eq_abs (C : ℂ), abs_ofReal, _root_.abs_of_nonneg hC₀, div_eq_mul_inv, mul_assoc,
+    ← Real.rpow_neg <| Nat.cast_nonneg _, ← Real.rpow_add <| Nat.cast_pos.mpr hn]
+  simp only [add_re, sub_re, one_re, ofReal_re, neg_add_rev, neg_sub, neg_add_cancel_right]
+  exact hC n <| Nat.pos_iff_ne_zero.mp hn
 
 open Filter Finset Real Nat in
-lemma LSeriesSummable_of_isBigO_rpow {f : ArithmeticFunction ℂ} {x : ℝ} {s : ℂ}
-    (hs : x < s.re) (h : f =O[atTop] fun n ↦ (n : ℝ) ^ (x - 1)) :
+/-- If `f = O(n^(x-1))` and `re s > x`, then the `LSeries` of `f` is summable at `s`. -/
+lemma LSeriesSummable_of_isBigO_rpow {f : ℕ → ℂ} {x : ℝ} {s : ℂ} (hs : x < s.re)
+    (h : f =O[atTop] fun n ↦ (n : ℝ) ^ (x - 1)) :
     LSeriesSummable f s := by
   obtain ⟨C, hC⟩ := Asymptotics.isBigO_iff.mp h
   obtain ⟨m, hm⟩ := eventually_atTop.mp hC
@@ -179,54 +256,83 @@ lemma LSeriesSummable_of_isBigO_rpow {f : ArithmeticFunction ℂ} {x : ℝ} {s :
     (insert_nonempty 0 _))
   have hC'₀ : 0 ≤ C' := (le_max' _ _ (mem_insert.mpr (Or.inl rfl))).trans <| le_max_right ..
   have hCC' : C ≤ C' := le_max_left ..
-  refine LSeriesSummable_of_le_const_mul_rpow hs ⟨C', fun n ↦ ?_⟩
+  refine LSeriesSummable_of_le_const_mul_rpow hs ⟨C', fun n hn₀ ↦ ?_⟩
   rcases le_or_lt m n with hn | hn
   · refine (hm n hn).trans ?_
     have hn₀ : (0 : ℝ) ≤ n := cast_nonneg _
     gcongr
     rw [Real.norm_eq_abs, abs_rpow_of_nonneg hn₀, _root_.abs_of_nonneg hn₀]
-  · rcases n.eq_zero_or_pos with rfl | hn'
-    · simpa only [map_zero, norm_zero, cast_zero] using mul_nonneg hC'₀ <| zero_rpow_nonneg _
+  · have hn' : 0 < n := Nat.pos_of_ne_zero hn₀
     refine (div_le_iff <| rpow_pos_of_pos (cast_pos.mpr hn') _).mp ?_
     refine (le_max' _ _ <| mem_insert_of_mem ?_).trans <| le_max_right ..
     exact mem_image.mpr ⟨n, mem_range.mpr hn, rfl⟩
 
-theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z := by
-  refine LSeriesSummable_of_le_const_mul_rpow hz ⟨m, fun n ↦ ?_⟩
-  simp only [norm_eq_abs, sub_self, Real.rpow_zero, mul_one, h n]
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
-
-theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
-  LSeriesSummable_of_bounded_of_one_lt_re h <| by simp only [ofReal_re, hz]
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
-
-open scoped ArithmeticFunction
-
-theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re := by
-  rw [← LSeriesSummable_iff_of_re_eq_re (Complex.ofReal_re z.re), LSeriesSummable, ←
-    summable_norm_iff, ← Real.summable_one_div_nat_rpow, iff_iff_eq]
-  by_cases h0 : z.re = 0
-  · rw [h0, ← summable_nat_add_iff 1]
-    apply congr rfl
-    ext n
-    simp [n.succ_ne_zero]
-  · apply congr rfl
-    ext ⟨- | n⟩
-    · simp [h0]
-    simp only [cast_zero, natCoe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
-      Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
-    rw [← cast_one, ← cast_add, Complex.abs_natCast, cast_add, cast_one]
-#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
+/-- If `f` is bounded, then its `LSeries` is summable at `s` when `re s > 1`. -/
+theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ℕ → ℂ} {m : ℝ}
+    (h : ∀ n ≠ 0, Complex.abs (f n) ≤ m) {s : ℂ} (hs : 1 < s.re) :
+    LSeriesSummable f s := by
+  refine LSeriesSummable_of_le_const_mul_rpow hs ⟨m, fun n hn ↦ ?_⟩
+  simp only [norm_eq_abs, sub_self, Real.rpow_zero, mul_one, h n hn]
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re LSeriesSummable_of_bounded_of_one_lt_re
+
+/-- If `f` is bounded, then its `LSeries` is summable at `s : ℝ` when `s > 1`. -/
+theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ℕ → ℂ} {m : ℝ}
+    (h : ∀ n ≠ 0, Complex.abs (f n) ≤ m) {s : ℝ} (hs : 1 < s) :
+    LSeriesSummable f s :=
+  LSeriesSummable_of_bounded_of_one_lt_re h <| by simp only [ofReal_re, hs]
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real LSeriesSummable_of_bounded_of_one_lt_real
+
+-- TODO: Move this to a separate file on concrete L-series
+
+open Set in
+/-- The `LSeries` with all coefficients `1` converges at `s` if and only if `re s > 1`. -/
+theorem LSeriesSummable.one_iff_one_lt_re {s : ℂ} : LSeriesSummable 1 s ↔ 1 < s.re := by
+  rw [← LSeriesSummable_iff_of_re_eq_re (Complex.ofReal_re s.re), LSeriesSummable,
+    ← summable_norm_iff, ← Real.summable_one_div_nat_rpow]
+  simp_rw [← Finite.summable_compl_iff (finite_singleton 0), summable_subtype_iff_indicator]
+  refine summable_congr fun n ↦ ?_
+  by_cases hn : n ∈ ({0}ᶜ :Set ℕ)
+  · simp only [indicator_of_mem hn, norm_term_eq]
+    simp only [show n ≠ 0 from hn, ↓reduceIte, Pi.one_apply, norm_one, ofReal_re]
+  · simp only [indicator_of_not_mem hn]
+
+open scoped ArithmeticFunction in
+/-- The `LSeries` associated to the arithmetic function `ζ` converges at `s` if and only if
+`re s > 1`. -/
+theorem zeta_LSeriesSummable_iff_one_lt_re {s : ℂ} : LSeriesSummable (ζ ·) s ↔ 1 < s.re := by
+  have (n : ℕ) (hn : n ≠ 0) : ζ n = (1 : ℕ → ℂ) n := by
+    simp only [ArithmeticFunction.zeta_apply, hn, ↓reduceIte, Nat.cast_one, Pi.one_apply]
+  exact (LSeriesSummable_congr s this).trans <| LSeriesSummable.one_iff_one_lt_re
+#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re zeta_LSeriesSummable_iff_one_lt_re
+
+-- TODO: Move this to a separate file on operations on L-series
+
+lemma LSeries.term_add (f g : ℕ → ℂ) (s : ℂ) :
+    term (f + g) s = term f s + term g s := by
+  ext ⟨- | n⟩
+  · simp only [term_zero, Pi.add_apply, add_zero]
+  · simp only [term_of_ne_zero (Nat.succ_ne_zero _), Pi.add_apply, _root_.add_div]
+
+lemma LSeries.term_add_apply (f g : ℕ → ℂ) (s : ℂ) (n : ℕ) :
+    term (f + g) s n = term f s n + term g s n := by
+  rw [term_add, Pi.add_apply]
+
+lemma LSeriesHasSum_add {f g : ℕ → ℂ} {s a b : ℂ} (hf : LSeriesHasSum f s a)
+    (hg : LSeriesHasSum g s b) :
+    LSeriesHasSum (f + g) s (a + b) := by
+  simpa only [LSeriesHasSum, term_add] using HasSum.add hf hg
 
 @[simp]
-theorem LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSummable z)
-    (hg : g.LSeriesSummable z) : (f + g).LSeries z = f.LSeries z + g.LSeries z := by
-  simp only [LSeries, add_apply]
+theorem LSeries_add {f g : ℕ → ℂ} {s : ℂ} (hf : LSeriesSummable f s)
+    (hg : LSeriesSummable g s) : LSeries (f + g) s = LSeries f s + LSeries g s := by
+  simp only [LSeries, Pi.add_apply]
   rw [← tsum_add hf hg]
-  apply congr rfl (funext fun n => _)
-  simp [_root_.add_div]
-#align nat.arithmetic_function.l_series_add ArithmeticFunction.LSeries_add
-
-end ArithmeticFunction
+  congr
+  exact term_add ..
+#align nat.arithmetic_function.l_series_add LSeries_add
+
+lemma LSeriesSummable_add {f g : ℕ → ℂ} {s : ℂ} (hf : LSeriesSummable f s)
+    (hg : LSeriesSummable g s) : LSeriesSummable (f + g) s := by
+  convert Summable.add hf hg
+  simp_rw [← term_add_apply]
+  rfl
feat(NumberTheory/LSeries/*): add material on convergence (#10728)

This continues a series of PRs on L-series.

Here we add ArithmeticFunction.LSeriesHasSum (in NumberTheory.LSeries.Basic) and ArithmeticFunction.abscissaOfAbsConv (in a new file NumberTheory.LSeries.Convergence), together with some results about these notions.

See here on Zulip.

Diff
@@ -1,12 +1,11 @@
 /-
 Copyright (c) 2021 Aaron Anderson. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
-Authors: Aaron Anderson
+Authors: Aaron Anderson, Michael Stoll
 -/
-import Mathlib.Analysis.NormedSpace.FiniteDimension
 import Mathlib.Analysis.PSeries
 import Mathlib.NumberTheory.ArithmeticFunction
-import Mathlib.Topology.Algebra.InfiniteSum.Basic
+import Mathlib.Analysis.NormedSpace.FiniteDimension
 
 #align_import number_theory.l_series from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
 
@@ -16,29 +15,44 @@ import Mathlib.Topology.Algebra.InfiniteSum.Basic
 Given an arithmetic function, we define the corresponding L-series.
 
 ## Main Definitions
+
  * `ArithmeticFunction.LSeries` is the `LSeries` with a given arithmetic function as its
   coefficients. This is not the analytic continuation, just the infinite series.
+
  * `ArithmeticFunction.LSeriesSummable` indicates that the `LSeries`
   converges at a given point.
 
+ * `ArithmeticFunction.LSeriesHasSum f s a` expresses that the L-series
+  of `f : ArithmeticFunction ℂ` converges (absolutely) at `s : ℂ` to `a : ℂ`.
+
 ## Main Results
- * `ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real`: the `LSeries` of a bounded
-  arithmetic function converges when `1 < z.re`.
+
+ * `ArithmeticFunction.LSeriesSummable_of_le_const_mul_rpow`: the `LSeries` of an
+  arithmetic function bounded by a constant times `n^(x-1)` converges at `s` when `x < s.re`.
+
  * `ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re`: the `LSeries` of `ζ`
   (whose analytic continuation is the Riemann ζ) converges iff `1 < z.re`.
 
--/
+## Tags
+
+L-series, abscissa of convergence
 
+## TODO
+
+* Move `zeta_LSeriesSummable_iff_one_lt_r` to a new file on L-series of specific functions
+
+* Move `LSeries_add` to a new file on algebraic operations on L-series
+-/
 
-noncomputable section
 
 open scoped BigOperators
 
 namespace ArithmeticFunction
 
-open Nat
+open Complex Nat
 
 /-- The L-series of an `ArithmeticFunction`. -/
+noncomputable
 def LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
   ∑' n, f n / n ^ z
 #align nat.arithmetic_function.l_series ArithmeticFunction.LSeries
@@ -58,50 +72,136 @@ theorem LSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
   simp [LSeriesSummable, summable_zero]
 #align nat.arithmetic_function.l_series_summable_zero ArithmeticFunction.LSeriesSummable_zero
 
-theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
-    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z := by
-  by_cases h0 : m = 0
-  · subst h0
-    have hf : f = 0 := ArithmeticFunction.ext fun n =>
-      Complex.abs.eq_zero.1 (le_antisymm (h n) (Complex.abs.nonneg _))
-    simp [hf]
-  refine' .of_norm_bounded (fun n : ℕ => m / n ^ z) _ _
-  · simp_rw [div_eq_mul_inv]
-    exact (summable_mul_left_iff h0).2 (Real.summable_nat_rpow_inv.2 hz)
-  · intro n
-    have hm : 0 ≤ m := le_trans (Complex.abs.nonneg _) (h 0)
-    cases' n with n
-    · simp [hm, Real.zero_rpow (_root_.ne_of_gt (lt_trans Real.zero_lt_one hz))]
-    simp only [map_div₀, Complex.norm_eq_abs]
-    apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
-    rw [Complex.abs_cpow_real, Complex.abs_natCast]
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
+/-- This states that the L-series of the arithmetic function `f` converges at `s` to `a`. -/
+def LSeriesHasSum (f : ArithmeticFunction ℂ) (s a : ℂ) : Prop :=
+  HasSum (fun (n : ℕ) => f n / n ^ s) a
+
+lemma LSeriesHasSum.LSeriesSummable {f : ArithmeticFunction ℂ} {s a : ℂ}
+    (h : LSeriesHasSum f s a) : LSeriesSummable f s :=
+  h.summable
+
+lemma LSeriesHasSum.LSeries_eq {f : ArithmeticFunction ℂ} {s a : ℂ}
+    (h : LSeriesHasSum f s a) : LSeries f s = a :=
+  h.tsum_eq
+
+lemma LSeriesSummable.LSeriesHasSum {f : ArithmeticFunction ℂ} {s : ℂ} (h : LSeriesSummable f s) :
+    LSeriesHasSum f s (LSeries f s) :=
+  h.hasSum
+
+lemma norm_LSeriesTerm_eq (f : ArithmeticFunction ℂ) (s : ℂ) (n : ℕ) :
+    ‖f n / n ^ s‖ = ‖f n‖ / n ^ s.re := by
+  rcases n.eq_zero_or_pos with rfl | hn
+  · simp only [map_zero, zero_div, norm_zero, zero_mul]
+  rw [norm_div, norm_natCast_cpow_of_pos hn]
+
+lemma norm_LSeriesTerm_le_of_re_le_re (f : ArithmeticFunction ℂ) {w : ℂ} {z : ℂ}
+    (h : w.re ≤ z.re) (n : ℕ) : ‖f n / n ^ z‖ ≤ ‖f n / n ^ w‖ := by
+  rcases n.eq_zero_or_pos with rfl | hn
+  · simp only [map_zero, CharP.cast_eq_zero, zero_div, norm_zero, le_refl]
+  have hn' := norm_natCast_cpow_pos_of_pos hn w
+  simp_rw [norm_div]
+  suffices H : ‖(n : ℂ) ^ w‖ ≤ ‖(n : ℂ) ^ z‖ from div_le_div (norm_nonneg _) le_rfl hn' H
+  refine (one_le_div hn').mp ?_
+  rw [← norm_div, ← cpow_sub _ _ <| cast_ne_zero.mpr hn.ne', norm_natCast_cpow_of_pos hn]
+  exact Real.one_le_rpow (one_le_cast.mpr hn) <| by simp only [sub_re, sub_nonneg, h]
+
+lemma LSeriesSummable.of_re_le_re {f : ArithmeticFunction ℂ} {w : ℂ} {z : ℂ} (h : w.re ≤ z.re)
+    (hf : LSeriesSummable f w) : LSeriesSummable f z := by
+  rw [LSeriesSummable, ← summable_norm_iff] at hf ⊢
+  exact hf.of_nonneg_of_le (fun _ ↦ norm_nonneg _) (norm_LSeriesTerm_le_of_re_le_re f h)
 
 theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
-    f.LSeriesSummable w ↔ f.LSeriesSummable z := by
-  suffices h : ∀ n : ℕ,
-      Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z) by
-    simp [LSeriesSummable, ← summable_norm_iff, h, Complex.norm_eq_abs]
-  intro n
-  cases' n with n; · simp
-  apply congr rfl
-  have h0 : (n.succ : ℂ) ≠ 0 := by
-    rw [Ne.def, Nat.cast_eq_zero]
-    apply n.succ_ne_zero
-  rw [Complex.cpow_def, Complex.cpow_def, if_neg h0, if_neg h0, Complex.abs_exp_eq_iff_re_eq]
-  simp only [h, Complex.mul_re, mul_eq_mul_left_iff, sub_right_inj]
-  right
-  rw [Complex.log_im, ← Complex.ofReal_nat_cast]
-  exact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
+    f.LSeriesSummable w ↔ f.LSeriesSummable z :=
+  ⟨fun H ↦  H.of_re_le_re h.le, fun H ↦ H.of_re_le_re h.symm.le⟩
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
 
+lemma LSeriesSummable.le_const_mul_rpow {f : ArithmeticFunction ℂ} {s : ℂ}
+    (h : LSeriesSummable f s) : ∃ C, ∀ n, ‖f n‖ ≤ C * n ^ s.re := by
+  replace h := h.norm
+  by_contra! H
+  obtain ⟨n, hn⟩ := H (tsum fun n ↦ ‖f n / n ^ s‖)
+  have hn₀ : 0 < n := by
+    refine n.eq_zero_or_pos.resolve_left ?_
+    rintro rfl
+    rw [map_zero, norm_zero, Nat.cast_zero, mul_neg_iff] at hn
+    replace hn := hn.resolve_left <| fun hh ↦ hh.2.not_le <| Real.rpow_nonneg (le_refl 0) s.re
+    exact hn.1.not_le <| tsum_nonneg (fun _ ↦ norm_nonneg _)
+  have := le_tsum h n fun _ _ ↦ norm_nonneg _
+  rw [norm_LSeriesTerm_eq, div_le_iff <| Real.rpow_pos_of_pos (Nat.cast_pos.mpr hn₀) _] at this
+  exact (this.trans_lt hn).false.elim
+
+open Filter in
+lemma LSeriesSummable.isBigO_rpow {f : ArithmeticFunction ℂ} {s : ℂ}
+    (h : LSeriesSummable f s) : f =O[atTop] fun n ↦ (n : ℝ) ^ s.re := by
+  obtain ⟨C, hC⟩ := h.le_const_mul_rpow
+  refine Asymptotics.IsBigO.of_bound C ?_
+  convert eventually_of_forall hC using 4 with n
+  have hn₀ : (0 : ℝ) ≤ n := Nat.cast_nonneg _
+  rw [Real.norm_eq_abs, Real.abs_rpow_of_nonneg hn₀, _root_.abs_of_nonneg hn₀]
+
+lemma LSeriesSummable_of_le_const_mul_rpow {f : ArithmeticFunction ℂ} {x : ℝ} {s : ℂ}
+    (hs : x < s.re) (h : ∃ C, ∀ n, ‖f n‖ ≤ C * n ^ (x - 1)) :
+    LSeriesSummable f s := by
+  obtain ⟨C, hC⟩ := h
+  have hC₀ : 0 ≤ C := by
+    specialize hC 1
+    simp only [cast_one, Real.one_rpow, mul_one] at hC
+    exact (norm_nonneg _).trans hC
+  have hsum : Summable fun n : ℕ ↦ ‖(C : ℂ) / n ^ (s + (1 - x))‖ := by
+    simp_rw [div_eq_mul_inv, norm_mul, ← cpow_neg]
+    have hsx : -s.re + x - 1 < -1 := by linarith only [hs]
+    refine Summable.mul_left _ <|
+      Summable.of_norm_bounded_eventually_nat (fun n ↦ (n : ℝ) ^ (-s.re + x - 1)) ?_ ?_
+    · simp only [Real.summable_nat_rpow, hsx]
+    · simp only [neg_add_rev, neg_sub, norm_norm, Filter.eventually_atTop]
+      refine ⟨1, fun n hn ↦ ?_⟩
+      simp only [norm_natCast_cpow_of_pos hn, add_re, sub_re, neg_re, ofReal_re, one_re]
+      convert le_refl ?_ using 2
+      ring
+  refine Summable.of_norm <| hsum.of_nonneg_of_le (fun _ ↦ norm_nonneg _) (fun n ↦ ?_)
+  rcases n.eq_zero_or_pos with rfl | hn
+  · simp only [map_zero, zero_div, norm_zero, norm_nonneg]
+  have hn' : 0 < (n : ℝ) ^ s.re := Real.rpow_pos_of_pos (Nat.cast_pos.mpr hn) _
+  simp_rw [norm_div, norm_natCast_cpow_of_pos hn, div_le_iff hn', add_re, sub_re, one_re,
+    ofReal_re, Real.rpow_add <| Nat.cast_pos.mpr hn, div_eq_mul_inv, mul_inv]
+  rw [mul_assoc, mul_comm _ ((n : ℝ) ^ s.re), ← mul_assoc ((n : ℝ) ^ s.re), mul_inv_cancel hn'.ne',
+    ← Real.rpow_neg n.cast_nonneg, norm_eq_abs (C : ℂ), abs_ofReal, _root_.abs_of_nonneg hC₀,
+    neg_sub, one_mul]
+  exact hC n
+
+open Filter Finset Real Nat in
+lemma LSeriesSummable_of_isBigO_rpow {f : ArithmeticFunction ℂ} {x : ℝ} {s : ℂ}
+    (hs : x < s.re) (h : f =O[atTop] fun n ↦ (n : ℝ) ^ (x - 1)) :
+    LSeriesSummable f s := by
+  obtain ⟨C, hC⟩ := Asymptotics.isBigO_iff.mp h
+  obtain ⟨m, hm⟩ := eventually_atTop.mp hC
+  let C' := max C (max' (insert 0 (image (fun n : ℕ ↦ ‖f n‖ / (n : ℝ) ^ (x - 1)) (range m)))
+    (insert_nonempty 0 _))
+  have hC'₀ : 0 ≤ C' := (le_max' _ _ (mem_insert.mpr (Or.inl rfl))).trans <| le_max_right ..
+  have hCC' : C ≤ C' := le_max_left ..
+  refine LSeriesSummable_of_le_const_mul_rpow hs ⟨C', fun n ↦ ?_⟩
+  rcases le_or_lt m n with hn | hn
+  · refine (hm n hn).trans ?_
+    have hn₀ : (0 : ℝ) ≤ n := cast_nonneg _
+    gcongr
+    rw [Real.norm_eq_abs, abs_rpow_of_nonneg hn₀, _root_.abs_of_nonneg hn₀]
+  · rcases n.eq_zero_or_pos with rfl | hn'
+    · simpa only [map_zero, norm_zero, cast_zero] using mul_nonneg hC'₀ <| zero_rpow_nonneg _
+    refine (div_le_iff <| rpow_pos_of_pos (cast_pos.mpr hn') _).mp ?_
+    refine (le_max' _ _ <| mem_insert_of_mem ?_).trans <| le_max_right ..
+    exact mem_image.mpr ⟨n, mem_range.mpr hn, rfl⟩
+
 theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
     (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z := by
-  rw [← LSeriesSummable_iff_of_re_eq_re (Complex.ofReal_re z.re)]
-  apply LSeriesSummable_of_bounded_of_one_lt_real h
-  exact hz
+  refine LSeriesSummable_of_le_const_mul_rpow hz ⟨m, fun n ↦ ?_⟩
+  simp only [norm_eq_abs, sub_self, Real.rpow_zero, mul_one, h n]
 #align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
 
+theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
+    (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z :=
+  LSeriesSummable_of_bounded_of_one_lt_re h <| by simp only [ofReal_re, hz]
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
+
 open scoped ArithmeticFunction
 
 theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔ 1 < z.re := by
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -79,9 +79,9 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
 
 theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
     f.LSeriesSummable w ↔ f.LSeriesSummable z := by
-  suffices h :
-    ∀ n : ℕ, Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)
-  · simp [LSeriesSummable, ← summable_norm_iff, h, Complex.norm_eq_abs]
+  suffices h : ∀ n : ℕ,
+      Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z) by
+    simp [LSeriesSummable, ← summable_norm_iff, h, Complex.norm_eq_abs]
   intro n
   cases' n with n; · simp
   apply congr rfl
chore(NumberTheory/ArithmeticFunction): remove Nat. part from ArithmeticFunction namespace (#10399)

This changes Nat.ArithmeticFunction to ArithmeticFunction since the Nat part seems redundant.

See here on Zulip.

Diff
@@ -16,15 +16,15 @@ import Mathlib.Topology.Algebra.InfiniteSum.Basic
 Given an arithmetic function, we define the corresponding L-series.
 
 ## Main Definitions
- * `Nat.ArithmeticFunction.LSeries` is the `LSeries` with a given arithmetic function as its
+ * `ArithmeticFunction.LSeries` is the `LSeries` with a given arithmetic function as its
   coefficients. This is not the analytic continuation, just the infinite series.
- * `Nat.ArithmeticFunction.LSeriesSummable` indicates that the `LSeries`
+ * `ArithmeticFunction.LSeriesSummable` indicates that the `LSeries`
   converges at a given point.
 
 ## Main Results
- * `Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real`: the `LSeries` of a bounded
+ * `ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real`: the `LSeries` of a bounded
   arithmetic function converges when `1 < z.re`.
- * `Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re`: the `LSeries` of `ζ`
+ * `ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re`: the `LSeries` of `ζ`
   (whose analytic continuation is the Riemann ζ) converges iff `1 < z.re`.
 
 -/
@@ -34,29 +34,29 @@ noncomputable section
 
 open scoped BigOperators
 
-namespace Nat
-
 namespace ArithmeticFunction
 
+open Nat
+
 /-- The L-series of an `ArithmeticFunction`. -/
 def LSeries (f : ArithmeticFunction ℂ) (z : ℂ) : ℂ :=
   ∑' n, f n / n ^ z
-#align nat.arithmetic_function.l_series Nat.ArithmeticFunction.LSeries
+#align nat.arithmetic_function.l_series ArithmeticFunction.LSeries
 
 /-- `f.LSeriesSummable z` indicates that the L-series of `f` converges at `z`. -/
 def LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) : Prop :=
   Summable fun n => f n / n ^ z
-#align nat.arithmetic_function.l_series_summable Nat.ArithmeticFunction.LSeriesSummable
+#align nat.arithmetic_function.l_series_summable ArithmeticFunction.LSeriesSummable
 
 theorem LSeries_eq_zero_of_not_LSeriesSummable (f : ArithmeticFunction ℂ) (z : ℂ) :
     ¬f.LSeriesSummable z → f.LSeries z = 0 :=
   tsum_eq_zero_of_not_summable
-#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable Nat.ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable
+#align nat.arithmetic_function.l_series_eq_zero_of_not_l_series_summable ArithmeticFunction.LSeries_eq_zero_of_not_LSeriesSummable
 
 @[simp]
 theorem LSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
   simp [LSeriesSummable, summable_zero]
-#align nat.arithmetic_function.l_series_summable_zero Nat.ArithmeticFunction.LSeriesSummable_zero
+#align nat.arithmetic_function.l_series_summable_zero ArithmeticFunction.LSeriesSummable_zero
 
 theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {m : ℝ}
     (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℝ} (hz : 1 < z) : f.LSeriesSummable z := by
@@ -75,7 +75,7 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
     simp only [map_div₀, Complex.norm_eq_abs]
     apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
     rw [Complex.abs_cpow_real, Complex.abs_natCast]
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
 
 theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
     f.LSeriesSummable w ↔ f.LSeriesSummable z := by
@@ -93,14 +93,14 @@ theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
   right
   rw [Complex.log_im, ← Complex.ofReal_nat_cast]
   exact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
-#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
+#align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
 
 theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
     (h : ∀ n : ℕ, Complex.abs (f n) ≤ m) {z : ℂ} (hz : 1 < z.re) : f.LSeriesSummable z := by
   rw [← LSeriesSummable_iff_of_re_eq_re (Complex.ofReal_re z.re)]
   apply LSeriesSummable_of_bounded_of_one_lt_real h
   exact hz
-#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
+#align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_re ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_re
 
 open scoped ArithmeticFunction
 
@@ -118,7 +118,7 @@ theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔
     simp only [cast_zero, natCoe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
       Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
     rw [← cast_one, ← cast_add, Complex.abs_natCast, cast_add, cast_one]
-#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
+#align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
 
 @[simp]
 theorem LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSummable z)
@@ -127,8 +127,6 @@ theorem LSeries_add {f g : ArithmeticFunction ℂ} {z : ℂ} (hf : f.LSeriesSumm
   rw [← tsum_add hf hg]
   apply congr rfl (funext fun n => _)
   simp [_root_.add_div]
-#align nat.arithmetic_function.l_series_add Nat.ArithmeticFunction.LSeries_add
+#align nat.arithmetic_function.l_series_add ArithmeticFunction.LSeries_add
 
 end ArithmeticFunction
-
-end Nat
chore(InfiniteSum): use dot notation (#8358)

Rename

  • summable_of_norm_bounded -> Summable.of_norm_bounded;
  • summable_of_norm_bounded_eventually -> Summable.of_norm_bounded_eventually;
  • summable_of_nnnorm_bounded -> Summable.of_nnnorm_bounded;
  • summable_of_summable_norm -> Summable.of_norm;
  • summable_of_summable_nnnorm -> Summable.of_nnnorm;

New lemmas

  • Summable.of_norm_bounded_eventually_nat
  • Summable.norm

Misc changes

  • Golf a few proofs.
Diff
@@ -65,7 +65,7 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
     have hf : f = 0 := ArithmeticFunction.ext fun n =>
       Complex.abs.eq_zero.1 (le_antisymm (h n) (Complex.abs.nonneg _))
     simp [hf]
-  refine' summable_of_norm_bounded (fun n : ℕ => m / n ^ z) _ _
+  refine' .of_norm_bounded (fun n : ℕ => m / n ^ z) _ _
   · simp_rw [div_eq_mul_inv]
     exact (summable_mul_left_iff h0).2 (Real.summable_nat_rpow_inv.2 hz)
   · intro n
chore(Data/Complex/Basic): add missing cast lemmas for Rat (#8225)

One Nat lemma was duplicated

Diff
@@ -74,7 +74,7 @@ theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ArithmeticFunction ℂ} {
     · simp [hm, Real.zero_rpow (_root_.ne_of_gt (lt_trans Real.zero_lt_one hz))]
     simp only [map_div₀, Complex.norm_eq_abs]
     apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
-    rw [Complex.abs_cpow_real, Complex.abs_cast_nat]
+    rw [Complex.abs_cpow_real, Complex.abs_natCast]
 #align nat.arithmetic_function.l_series_summable_of_bounded_of_one_lt_real Nat.ArithmeticFunction.LSeriesSummable_of_bounded_of_one_lt_real
 
 theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
chore: ofNat lemmas for Complex.normSq and abs (#7975)

Having _ofNat lemmas is important for confluence given that for both normSq and abs, the _ofReal lemma is @[simp] and so is ofReal_ofNat. We already have lemmas for 0 and 1 from the bundled classes for both functions, so I'm only adding lemmas for the AtLeastTwo case here.

Diff
@@ -117,7 +117,7 @@ theorem zeta_LSeriesSummable_iff_one_lt_re {z : ℂ} : LSeriesSummable ζ z ↔
     · simp [h0]
     simp only [cast_zero, natCoe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
       Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
-    rw [← cast_one, ← cast_add, Complex.abs_of_nat, cast_add, cast_one]
+    rw [← cast_one, ← cast_add, Complex.abs_natCast, cast_add, cast_one]
 #align nat.arithmetic_function.zeta_l_series_summable_iff_one_lt_re Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
 
 @[simp]
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2021 Aaron Anderson. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson
-
-! This file was ported from Lean 3 source module number_theory.l_series
-! leanprover-community/mathlib commit 32253a1a1071173b33dc7d6a218cf722c6feb514
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.NormedSpace.FiniteDimension
 import Mathlib.Analysis.PSeries
 import Mathlib.NumberTheory.ArithmeticFunction
 import Mathlib.Topology.Algebra.InfiniteSum.Basic
 
+#align_import number_theory.l_series from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
+
 /-!
 # L-series
 
chore: use ofReal instead of of_real in lemma names (#4934)
Diff
@@ -95,7 +95,7 @@ theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ}
   simp only [h, Complex.mul_re, mul_eq_mul_left_iff, sub_right_inj]
   right
   rw [Complex.log_im, ← Complex.ofReal_nat_cast]
-  exact Complex.arg_of_real_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
+  exact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))
 #align nat.arithmetic_function.l_series_summable_iff_of_re_eq_re Nat.ArithmeticFunction.LSeriesSummable_iff_of_re_eq_re
 
 theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ArithmeticFunction ℂ} {m : ℝ}
feat: port NumberTheory.LSeries (#4495)

Dependencies 12 + 864

865 files ported (98.6%)
381496 lines ported (98.5%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file