l3lab/ntp-mathlib huggingface dataset:
/--
If each costructured arrow category on `G` has a terminal object, construct a right adjoint to `G`.
It is shown that it is a right adjoint in `adjunctionOfStructuredArrowInitials`.
-/
def rightAdjointOfCostructuredArrowTerminals : C ⥤ D :=
  Adjunction.rightAdjointOfEquiv (rightAdjointOfCostructuredArrowTerminalsAux G)
      fun B₁ B₂ A f g => by
    

Proof state:
C : Type u₁
D : Type u₂
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Category.{v₂, u₂} D
G : D ⥤ C
inst✝ : ∀ (A : C), HasTerminal (CostructuredArrow G A)
B₁ B₂ : D
A : C
f : B₁ ⟶ B₂
g : G.obj B₂ ⟶ A
⊢ (rightAdjointOfCostructuredArrowTerminalsAux G B₁ A) (G.map f ≫ g) =
    f ≫ (rightAdjointOfCostructuredArrowTerminalsAux G B₂ A) g

Next tactic:
rw [← Equiv.eq_symm_apply]
/--
If each costructured arrow category on `G` has a terminal object, construct a right adjoint to `G`.
It is shown that it is a right adjoint in `adjunctionOfStructuredArrowInitials`.
-/
def rightAdjointOfCostructuredArrowTerminals : C ⥤ D :=
  Adjunction.rightAdjointOfEquiv (rightAdjointOfCostructuredArrowTerminalsAux G)
      fun B₁ B₂ A f g => by
    rw [← Equiv.eq_symm_apply]
    

Proof state:
C : Type u₁
D : Type u₂
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Category.{v₂, u₂} D
G : D ⥤ C
inst✝ : ∀ (A : C), HasTerminal (CostructuredArrow G A)
B₁ B₂ : D
A : C
f : B₁ ⟶ B₂
g : G.obj B₂ ⟶ A
⊢ G.map f ≫ g =
    (rightAdjointOfCostructuredArrowTerminalsAux G B₁ A).symm
      (f ≫ (rightAdjointOfCostructuredArrowTerminalsAux G B₂ A) g)

Next tactic:
simp
/-- Given a left adjoint to `G`, we can construct an initial object in each structured arrow
category on `G`. -/
def mkInitialOfLeftAdjoint (h : F ⊣ G) (A : C) :
    IsInitial (StructuredArrow.mk (h.unit.app A) : StructuredArrow A G)
    where
  desc B := StructuredArrow.homMk ((h.homEquiv _ _).symm B.pt.hom)
  uniq s m _ := by
    

Proof state:
C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
G : D ⥤ C
F : C ⥤ D
h : F ⊣ G
A : C
s : Cocone (Functor.empty (StructuredArrow A G))
m : (asEmptyCocone (StructuredArrow.mk (h.unit.app A))).pt ⟶ s.pt
x✝ : ∀ (j : Discrete PEmpty.{1}), (asEmptyCocone (StructuredArrow.mk (h.unit.app A))).ι.app j ≫ m = s.ι.app j
⊢ m = (fun B => StructuredArrow.homMk ((Adjunction.homEquiv h A B.pt.right).symm B.pt.hom)) s

Next tactic:
apply StructuredArrow.ext
/-- Given a left adjoint to `G`, we can construct an initial object in each structured arrow
category on `G`. -/
def mkInitialOfLeftAdjoint (h : F ⊣ G) (A : C) :
    IsInitial (StructuredArrow.mk (h.unit.app A) : StructuredArrow A G)
    where
  desc B := StructuredArrow.homMk ((h.homEquiv _ _).symm B.pt.hom)
  uniq s m _ := by
    apply StructuredArrow.ext
    

Proof state:
case a
C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
G : D ⥤ C
F : C ⥤ D
h : F ⊣ G
A : C
s : Cocone (Functor.empty (StructuredArrow A G))
m : (asEmptyCocone (StructuredArrow.mk (h.unit.app A))).pt ⟶ s.pt
x✝ : ∀ (j : Discrete PEmpty.{1}), (asEmptyCocone (StructuredArrow.mk (h.unit.app A))).ι.app j ≫ m = s.ι.app j
⊢ m.right = ((fun B => StructuredArrow.homMk ((Adjunction.homEquiv h A B.pt.right).symm B.pt.hom)) s).right

Next tactic:
dsimp
/-- Given a left adjoint to `G`, we can construct an initial object in each structured arrow
category on `G`. -/
def mkInitialOfLeftAdjoint (h : F ⊣ G) (A : C) :
    IsInitial (StructuredArrow.mk (h.unit.app A) : StructuredArrow A G)
    where
  desc B := StructuredArrow.homMk ((h.homEquiv _ _).symm B.pt.hom)
  uniq s m _ := by
    apply StructuredArrow.ext
    dsimp
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case a
C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
G : D ⥤ C
F : C ⥤ D
h : F ⊣ G
A : C
s : Cocone (Functor.empty (StructuredArrow A G))
m : (asEmptyCocone (StructuredArrow.mk (h.unit.app A))).pt ⟶ s.pt
x✝ : ∀ (j : Discrete PEmpty.{1}), (asEmptyCocone (StructuredArrow.mk (h.unit.app A))).ι.app j ≫ m = s.ι.app j
⊢ m.right = (Adjunction.homEquiv h A s.pt.right).symm s.pt.hom

Next tactic:
erw [Equiv.eq_symm_apply, Adjunction.homEquiv_unit]
/-- Given a left adjoint to `G`, we can construct an initial object in each structured arrow
category on `G`. -/
def mkInitialOfLeftAdjoint (h : F ⊣ G) (A : C) :
    IsInitial (StructuredArrow.mk (h.unit.app A) : StructuredArrow A G)
    where
  desc B := StructuredArrow.homMk ((h.homEquiv _ _).symm B.pt.hom)
  uniq s m _ := by
    apply StructuredArrow.ext
    dsimp
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [Equiv.eq_symm_apply, Adjunction.homEquiv_unit]
    

Proof state:
case a
C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
G : D ⥤ C
F : C ⥤ D
h : F ⊣ G
A : C
s : Cocone (Functor.empty (StructuredArrow A G))
m : (asEmptyCocone (StructuredArrow.mk (h.unit.app A))).pt ⟶ s.pt
x✝ : ∀ (j : Discrete PEmpty.{1}), (asEmptyCocone (StructuredArrow.mk (h.unit.app A))).ι.app j ≫ m = s.ι.app j
⊢ h.unit.app A ≫ G.map m.right = s.pt.hom

Next tactic:
apply StructuredArrow.w m
/-- Given a right adjoint to `F`, we can construct a terminal object in each costructured arrow
category on `F`. -/
def mkTerminalOfRightAdjoint (h : F ⊣ G) (A : D) :
    IsTerminal (CostructuredArrow.mk (h.counit.app A) : CostructuredArrow F A)
    where
  lift B := CostructuredArrow.homMk (h.homEquiv _ _ B.pt.hom)
  uniq s m _ := by
    

Proof state:
C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
G : D ⥤ C
F : C ⥤ D
h : F ⊣ G
A : D
s : Cone (Functor.empty (CostructuredArrow F A))
m : s.pt ⟶ (asEmptyCone (CostructuredArrow.mk (h.counit.app A))).pt
x✝ : ∀ (j : Discrete PEmpty.{1}), m ≫ (asEmptyCone (CostructuredArrow.mk (h.counit.app A))).π.app j = s.π.app j
⊢ m = (fun B => CostructuredArrow.homMk ((Adjunction.homEquiv h B.pt.left A) B.pt.hom)) s

Next tactic:
apply CostructuredArrow.ext
/-- Given a right adjoint to `F`, we can construct a terminal object in each costructured arrow
category on `F`. -/
def mkTerminalOfRightAdjoint (h : F ⊣ G) (A : D) :
    IsTerminal (CostructuredArrow.mk (h.counit.app A) : CostructuredArrow F A)
    where
  lift B := CostructuredArrow.homMk (h.homEquiv _ _ B.pt.hom)
  uniq s m _ := by
    apply CostructuredArrow.ext
    

Proof state:
case h
C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
G : D ⥤ C
F : C ⥤ D
h : F ⊣ G
A : D
s : Cone (Functor.empty (CostructuredArrow F A))
m : s.pt ⟶ (asEmptyCone (CostructuredArrow.mk (h.counit.app A))).pt
x✝ : ∀ (j : Discrete PEmpty.{1}), m ≫ (asEmptyCone (CostructuredArrow.mk (h.counit.app A))).π.app j = s.π.app j
⊢ m.left = ((fun B => CostructuredArrow.homMk ((Adjunction.homEquiv h B.pt.left A) B.pt.hom)) s).left

Next tactic:
dsimp
/-- Given a right adjoint to `F`, we can construct a terminal object in each costructured arrow
category on `F`. -/
def mkTerminalOfRightAdjoint (h : F ⊣ G) (A : D) :
    IsTerminal (CostructuredArrow.mk (h.counit.app A) : CostructuredArrow F A)
    where
  lift B := CostructuredArrow.homMk (h.homEquiv _ _ B.pt.hom)
  uniq s m _ := by
    apply CostructuredArrow.ext
    dsimp
    

Proof state:
case h
C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
G : D ⥤ C
F : C ⥤ D
h : F ⊣ G
A : D
s : Cone (Functor.empty (CostructuredArrow F A))
m : s.pt ⟶ (asEmptyCone (CostructuredArrow.mk (h.counit.app A))).pt
x✝ : ∀ (j : Discrete PEmpty.{1}), m ≫ (asEmptyCone (CostructuredArrow.mk (h.counit.app A))).π.app j = s.π.app j
⊢ m.left = (Adjunction.homEquiv h s.pt.left A) s.pt.hom

Next tactic:
rw [h.eq_homEquiv_apply, Adjunction.homEquiv_counit]
/-- Given a right adjoint to `F`, we can construct a terminal object in each costructured arrow
category on `F`. -/
def mkTerminalOfRightAdjoint (h : F ⊣ G) (A : D) :
    IsTerminal (CostructuredArrow.mk (h.counit.app A) : CostructuredArrow F A)
    where
  lift B := CostructuredArrow.homMk (h.homEquiv _ _ B.pt.hom)
  uniq s m _ := by
    apply CostructuredArrow.ext
    dsimp
    rw [h.eq_homEquiv_apply, Adjunction.homEquiv_counit]
    

Proof state:
case h
C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
G : D ⥤ C
F : C ⥤ D
h : F ⊣ G
A : D
s : Cone (Functor.empty (CostructuredArrow F A))
m : s.pt ⟶ (asEmptyCone (CostructuredArrow.mk (h.counit.app A))).pt
x✝ : ∀ (j : Discrete PEmpty.{1}), m ≫ (asEmptyCone (CostructuredArrow.mk (h.counit.app A))).π.app j = s.π.app j
⊢ F.map m.left ≫ h.counit.app A = s.pt.hom

Next tactic:
exact CostructuredArrow.w m
@[simp]
theorem LSeriesSummable_zero {z : ℂ} : LSeriesSummable 0 z := by
  

Proof state:
z : ℂ
⊢ LSeriesSummable 0 z

Next tactic:
simp [LSeriesSummable, summable_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
  

Proof state:
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
⊢ LSeriesSummable f ↑z

Next tactic:
by_cases h0 : m = 0
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
  · 

Proof state:
case pos
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : m = 0
⊢ LSeriesSummable f ↑z

Next tactic:
subst h0
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
    

Proof state:
case pos
f : ArithmeticFunction ℂ
z : ℝ
hz : 1 < z
h : ∀ (n : ℕ), Complex.abs (f n) ≤ 0
⊢ LSeriesSummable f ↑z

Next tactic:
have hf : f = 0 := ArithmeticFunction.ext fun n =>
      Complex.abs.eq_zero.1 (le_antisymm (h n) (Complex.abs.nonneg _))
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 _))
    

Proof state:
case pos
f : ArithmeticFunction ℂ
z : ℝ
hz : 1 < z
h : ∀ (n : ℕ), Complex.abs (f n) ≤ 0
hf : f = 0
⊢ LSeriesSummable f ↑z

Next tactic:
simp [hf]
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]
  

Proof state:
case neg
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
⊢ LSeriesSummable f ↑z

Next tactic:
refine' .of_norm_bounded (fun n : ℕ => m / n ^ z) _ _
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) _ _
  · 

Proof state:
case neg.refine'_1
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
⊢ Summable fun n => m / ↑n ^ z

Next tactic:
simp_rw [div_eq_mul_inv]
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]
    

Proof state:
case neg.refine'_1
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
⊢ Summable fun n => m * (↑n ^ z)⁻¹

Next tactic:
exact (summable_mul_left_iff h0).2 (Real.summable_nat_rpow_inv.2 hz)
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)
  · 

Proof state:
case neg.refine'_2
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
⊢ ∀ (i : ℕ), ‖f i / ↑i ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) i

Next tactic:
intro n
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
    

Proof state:
case neg.refine'_2
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
n : ℕ
⊢ ‖f n / ↑n ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) n

Next tactic:
have hm : 0 ≤ m := le_trans (Complex.abs.nonneg _) (h 0)
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)
    

Proof state:
case neg.refine'_2
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
n : ℕ
hm : 0 ≤ m
⊢ ‖f n / ↑n ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) n

Next tactic:
cases' n with n
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
    · 

Proof state:
case neg.refine'_2.zero
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
hm : 0 ≤ m
⊢ ‖f Nat.zero / ↑Nat.zero ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) Nat.zero

Next tactic:
simp [hm, Real.zero_rpow (_root_.ne_of_gt (lt_trans Real.zero_lt_one hz))]
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))]
    

Proof state:
case neg.refine'_2.succ
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
hm : 0 ≤ m
n : ℕ
⊢ ‖f (succ n) / ↑(succ n) ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) (succ n)

Next tactic:
simp only [map_div₀, Complex.norm_eq_abs]
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]
    

Proof state:
case neg.refine'_2.succ
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
hm : 0 ≤ m
n : ℕ
⊢ Complex.abs (f (succ n)) / Complex.abs (↑(succ n) ^ ↑z) ≤ m / ↑(succ n) ^ z

Next tactic:
apply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)
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 _)
    

Proof state:
f : ArithmeticFunction ℂ
m : ℝ
h : ∀ (n : ℕ), Complex.abs (f n) ≤ m
z : ℝ
hz : 1 < z
h0 : ¬m = 0
hm : 0 ≤ m
n : ℕ
⊢ ↑(succ n) ^ z = Complex.abs (↑(succ n) ^ ↑z)

Next tactic:
rw [Complex.abs_cpow_real, Complex.abs_natCast]
theorem LSeriesSummable_iff_of_re_eq_re {f : ArithmeticFunction ℂ} {w z : ℂ} (h : w.re = z.re) :
    f.LSeriesSummable w ↔ f.LSeriesSummable z := by
  

Proof state:
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
⊢ LSeriesSummable f w ↔ LSeriesSummable f z

Next tactic:
suffices h :
    ∀ n : ℕ, Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)
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)
  · 

Proof state:
f : ArithmeticFunction ℂ
w z : ℂ
h✝ : w.re = z.re
h : ∀ (n : ℕ), Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)
⊢ LSeriesSummable f w ↔ LSeriesSummable f z

Next tactic:
simp [LSeriesSummable, ← summable_norm_iff, h, Complex.norm_eq_abs]
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]
  

Proof state:
case h
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
⊢ ∀ (n : ℕ), Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)

Next tactic:
intro n
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]
  intro n
  

Proof state:
case h
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
n : ℕ
⊢ Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)

Next tactic:
cases' n with n
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]
  intro n
  cases' n with n; · 

Proof state:
case h.zero
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
⊢ Complex.abs (f Nat.zero) / Complex.abs (↑Nat.zero ^ w) = Complex.abs (f Nat.zero) / Complex.abs (↑Nat.zero ^ z)

Next tactic:
simp
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]
  intro n
  cases' n with n; · simp
  

Proof state:
case h.succ
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
n : ℕ
⊢ Complex.abs (f (succ n)) / Complex.abs (↑(succ n) ^ w) = Complex.abs (f (succ n)) / Complex.abs (↑(succ n) ^ z)

Next tactic:
apply congr rfl
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]
  intro n
  cases' n with n; · simp
  apply congr rfl
  

Proof state:
case h.succ
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
n : ℕ
⊢ Complex.abs (↑(succ n) ^ w) = Complex.abs (↑(succ n) ^ z)

Next tactic:
have h0 : (n.succ : ℂ) ≠ 0 := by
    rw [Ne.def, Nat.cast_eq_zero]
    apply n.succ_ne_zero
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]
  intro n
  cases' n with n; · simp
  apply congr rfl
  have h0 : (n.succ : ℂ) ≠ 0 := by
    

Proof state:
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
n : ℕ
⊢ ↑(succ n) ≠ 0

Next tactic:
rw [Ne.def, Nat.cast_eq_zero]
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]
  intro n
  cases' n with n; · simp
  apply congr rfl
  have h0 : (n.succ : ℂ) ≠ 0 := by
    rw [Ne.def, Nat.cast_eq_zero]
    

Proof state:
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
n : ℕ
⊢ ¬succ n = 0

Next tactic:
apply n.succ_ne_zero
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]
  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
  

Proof state:
case h.succ
f : ArithmeticFunction ℂ
w z : ℂ
h : w.re = z.re
n : ℕ
h0 : ↑(succ n) ≠ 0
⊢ Complex.abs (↑(succ n) ^ w) = Complex.abs (↑(succ n) ^ z)

Next tactic:
rw [Complex.cpow_def, Complex.cpow_def, if_neg h0, if_neg h0, Complex.abs_exp_eq_iff_re_eq]