Skip to content

Commit

Permalink
chore(topology/algebra/infinite_sum): add lemmas about division (#18351)
Browse files Browse the repository at this point in the history
This also flips the direction of some misnamed statements.
  • Loading branch information
eric-wieser committed Feb 3, 2023
1 parent 85e3c05 commit b363547
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/number_theory/l_series.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ begin
simp [hf] },
refine summable_of_norm_bounded (λ (n : ℕ), m / (n ^ z)) _ _,
{ simp_rw [div_eq_mul_inv],
exact (summable_mul_left_iff h0).1 (real.summable_nat_rpow_inv.2 hz) },
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,
Expand Down
29 changes: 19 additions & 10 deletions src/topology/algebra/infinite_sum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1120,29 +1120,38 @@ by simp only [div_eq_mul_inv, h.mul_right b⁻¹]
lemma summable.div_const (h : summable f) (b : α) : summable (λ x, f x / b) :=
(h.has_sum.div_const b).summable

lemma has_sum_mul_left_iff (h : a₂ ≠ 0) : has_sum f a₁ ↔ has_sum (λb, a₂ * f b) (a₂ * a₁) :=
has_sum.mul_left _, λ H, by simpa only [inv_mul_cancel_left₀ h] using H.mul_left a₂⁻¹⟩
lemma has_sum_mul_left_iff (h : a₂ ≠ 0) : has_sum (λb, a₂ * f b) (a₂ * a₁) ↔ has_sum f a₁ :=
⟨λ H, by simpa only [inv_mul_cancel_left₀ h] using H.mul_left a₂⁻¹, has_sum.mul_left _

lemma has_sum_mul_right_iff (h : a₂ ≠ 0) : has_sum f a₁ ↔ has_sum (λb, f b * a₂) (a₁ * a₂) :=
has_sum.mul_right _, λ H, by simpa only [mul_inv_cancel_right₀ h] using H.mul_right a₂⁻¹⟩
lemma has_sum_mul_right_iff (h : a₂ ≠ 0) : has_sum (λb, f b * a₂) (a₁ * a₂) ↔ has_sum f a₁ :=
⟨λ H, by simpa only [mul_inv_cancel_right₀ h] using H.mul_right a₂⁻¹, has_sum.mul_right _

lemma summable_mul_left_iff (h : a ≠ 0) : summable f ↔ summable (λb, a * f b) :=
⟨λ H, H.mul_left _, λ H, by simpa only [inv_mul_cancel_left₀ h] using H.mul_left a⁻¹⟩
lemma has_sum_div_const_iff (h : a0) : has_sum (λb, f b / a₂) (a₁ / a₂) ↔ has_sum f a₁ :=
by simpa only [div_eq_mul_inv] using has_sum_mul_right_iff (inv_ne_zero h)

lemma summable_mul_right_iff (h : a ≠ 0) : summable f ↔ summable (λb, f b * a) :=
⟨λ H, H.mul_right _, λ H, by simpa only [mul_inv_cancel_right₀ h] using H.mul_right a⁻¹⟩
lemma summable_mul_left_iff (h : a ≠ 0) : summable (λb, a * f b) ↔ summable f :=
⟨λ H, by simpa only [inv_mul_cancel_left₀ h] using H.mul_left a⁻¹, λ H, H.mul_left _⟩

lemma summable_mul_right_iff (h : a ≠ 0) : summable (λb, f b * a) ↔ summable f :=
⟨λ H, by simpa only [mul_inv_cancel_right₀ h] using H.mul_right a⁻¹, λ H, H.mul_right _⟩

lemma summable_div_const_iff (h : a ≠ 0) : summable (λb, f b / a) ↔ summable f :=
by simpa only [div_eq_mul_inv] using summable_mul_right_iff (inv_ne_zero h)

lemma tsum_mul_left [t2_space α] : (∑' x, a * f x) = a * ∑' x, f x :=
if hf : summable f then hf.tsum_mul_left a
else if ha : a = 0 then by simp [ha]
else by rw [tsum_eq_zero_of_not_summable hf,
tsum_eq_zero_of_not_summable (mt (summable_mul_left_iff ha).2 hf), mul_zero]
tsum_eq_zero_of_not_summable (mt (summable_mul_left_iff ha).mp hf), mul_zero]

lemma tsum_mul_right [t2_space α] : (∑' x, f x * a) = (∑' x, f x) * a :=
if hf : summable f then hf.tsum_mul_right a
else if ha : a = 0 then by simp [ha]
else by rw [tsum_eq_zero_of_not_summable hf,
tsum_eq_zero_of_not_summable (mt (summable_mul_right_iff ha).2 hf), zero_mul]
tsum_eq_zero_of_not_summable (mt (summable_mul_right_iff ha).mp hf), zero_mul]

lemma tsum_div_const [t2_space α] : (∑' x, f x / a) = (∑' x, f x) / a :=
by simpa only [div_eq_mul_inv] using tsum_mul_right

end division_ring

Expand Down

0 comments on commit b363547

Please sign in to comment.