Skip to content

Commit 0c5b1bc

Browse files
committed
update with to_additive
1 parent af87944 commit 0c5b1bc

File tree

2 files changed

+14
-36
lines changed

2 files changed

+14
-36
lines changed

Mathlib/Analysis/SpecialFunctions/Trigonometric/Cotangent.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,9 @@ theorem cot_series_rep' (hz : x ∈ ℂ_ℤ) : π * cot (π * x) - 1 / x =
216216
/-- The cotangent infinite sum representation. -/
217217
theorem cot_series_rep (hz : x ∈ ℂ_ℤ) :
218218
π * cot (π * x) = 1 / x + ∑' n : ℕ+, (1 / (x - n) + 1 / (x + n)) := by
219-
have h0 := tsum_pnat_eq_tsum_succ fun n ↦ 1 / (x - n) + 1 / (x + n)
220-
have h1 := cot_series_rep' hz
221-
simp only [one_div, Nat.cast_add, Nat.cast_one] at *
222-
rw [h0, ← h1]
219+
have h0 := tsum_pnat_eq_tsum_succ (f := fun n ↦ 1 / (x - n) + 1 / (x + n))
220+
rw [one_div] at *
221+
rw [h0, ← cot_series_rep' hz]
223222
ring
224223

225224
end MittagLeffler

Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -540,53 +540,32 @@ section pnat
540540

541541
variable {α R : Type*} [TopologicalSpace α] [CommMonoid α] [AddMonoidWithOne R]
542542

543-
--remove these once the to_additive bug is fixed below.
544-
@[to_additive]
545-
theorem pnat_multipliable_iff_multipliable_succ
546-
{f : ℕ → α} : Multipliable (fun x : ℕ+ => f x) ↔ Multipliable fun x : ℕ => f (x + 1) :=
547-
Equiv.pnatEquivNat.symm.multipliable_iff.symm
548-
549-
@[to_additive]
550-
theorem tprod_pnat_eq_tprod_succ (f : ℕ → α) :
551-
∏' n : ℕ+, f n = ∏' n, f (n + 1) := (Equiv.pnatEquivNat.symm.tprod_eq _).symm
552-
553-
@[to_additive]
554-
lemma tprod_zero_pnat_eq_tprod_nat {α : Type*} [TopologicalSpace α] [CommGroup α]
555-
[IsTopologicalGroup α] [T2Space α] (f : ℕ → α) (hf : Multipliable f) :
556-
f 0 * ∏' (n : ℕ+), f ↑n = ∏' (n : ℕ), f n := by
557-
simp [Multipliable.tprod_eq_zero_mul hf, tprod_pnat_eq_tprod_succ f]
558543

559-
theorem pnat_multipliable_iff_multipliable_succ' {f : R → α} :
544+
@[to_additive (dont_translate := R)]
545+
theorem pnat_multipliable_iff_multipliable_succ {f : R → α} :
560546
Multipliable (fun x : ℕ+ => f x) ↔ Multipliable fun x : ℕ => f (x + 1) := by
561547
convert Equiv.pnatEquivNat.symm.multipliable_iff.symm
562548
simp
563549

564-
theorem pnat_summable_iff_summable_succ' {α : Type*} [TopologicalSpace α]
565-
[AddCommMonoid α] {f : R → α} :
566-
Summable (fun x : ℕ+ => f x) ↔ Summable fun x : ℕ => f (x + 1) := by
567-
convert Equiv.pnatEquivNat.symm.summable_iff.symm
568-
simp
569-
570-
theorem tprod_pnat_eq_tprod_succ'
571-
(f : R → α) : ∏' n : ℕ+, f n = ∏' (n : ℕ), f (n + 1) := by
550+
@[to_additive (dont_translate := R)]
551+
theorem tprod_pnat_eq_tprod_succ {f : R → α} : ∏' n : ℕ+, f n = ∏' (n : ℕ), f (n + 1) := by
572552
convert (Equiv.pnatEquivNat.symm.tprod_eq _).symm
573553
simp
574554

575-
theorem tsum_pnat_eq_tsum_succ' {α : Type*}
576-
[TopologicalSpace α] [AddCommMonoid α]
577-
(f : R → α) : ∑' n : ℕ+, f n = ∑' (n : ℕ), f (n + 1) := by
578-
convert (Equiv.pnatEquivNat.symm.tsum_eq _).symm
579-
simp
555+
@[to_additive]
556+
lemma tprod_zero_pnat_eq_tprod_nat {α : Type*} [TopologicalSpace α] [CommGroup α]
557+
[IsTopologicalGroup α] [T2Space α] (f : ℕ → α) (hf : Multipliable f) :
558+
f 0 * ∏' (n : ℕ+), f ↑n = ∏' (n : ℕ), f n := by
559+
simpa [Multipliable.tprod_eq_zero_mul hf] using tprod_pnat_eq_tprod_succ (f := f)
580560

581561
theorem tsum_nat_eq_zero_two_pnat {α : Type*} [UniformSpace α] [Ring α] [IsUniformAddGroup α]
582562
[CompleteSpace α] [T2Space α] {f : ℤ → α} (hf : ∀ n : ℤ, f n = f (-n)) (hf2 : Summable f) :
583563
∑' n, f n = f 0 + 2 * ∑' n : ℕ+, f n := by
584564
rw [tsum_of_add_one_of_neg_add_one]
585565
· conv =>
586-
enter [1,2,1]
587-
ext n
566+
enter [1,2,1,n]
588567
rw [hf]
589-
simp only [neg_add_rev, Int.reduceNeg, neg_neg, tsum_pnat_eq_tsum_succ', two_mul]
568+
simp only [neg_add_rev, Int.reduceNeg, neg_neg, tsum_pnat_eq_tsum_succ, two_mul]
590569
abel
591570
· simpa using ((summable_nat_add_iff (k := 1)).mpr
592571
(summable_int_iff_summable_nat_and_neg.mp hf2).1)

0 commit comments

Comments
 (0)