Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions Mathlib/NumberTheory/ArithmeticFunction/Zeta.lean
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,18 @@ theorem sum_divisorsAntidiagonal_eq_sum_divisors {M} [Semiring R] [AddCommMonoid
∑ i ∈ divisors x, f i := by
simp [← coe_zeta_smul_apply (R := R)]

theorem coe_zeta_mul_comm [Semiring R] {f : ArithmeticFunction R} : ζ * f = f * ζ := by
ext x
rw [mul_apply, ← map_swap_divisorsAntidiagonal, Finset.sum_map]
simp [mul_apply]
Comment on lines 77 to +80
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this to be above coe_zeta_mul_apply? That way moe_coe_zeta and coe_zeta_mul will be next to eachother in the docs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this lemma is true for zeta replaced by any ArithmeticFunction Nat, but if this breaks anything I'm happy to fix this in a follow-up PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestion! I'm actually not an expert in this field and don't completely understand the broader definitions. Given that, I'd rather not touch this part right now just to be safe. Would it be okay if we hold off on this change for now?


theorem coe_zeta_mul_apply [Semiring R] {f : ArithmeticFunction R} {x : ℕ} :
(ζ * f) x = ∑ i ∈ divisors x, f i :=
coe_zeta_smul_apply

theorem coe_mul_zeta_apply [Semiring R] {f : ArithmeticFunction R} {x : ℕ} :
(f * ζ) x = ∑ i ∈ divisors x, f i := by
rw [mul_apply]
trans ∑ i ∈ divisorsAntidiagonal x, f i.1
· refine sum_congr rfl fun i hi => ?_
rcases mem_divisorsAntidiagonal.1 hi with ⟨rfl, h⟩
rw [natCoe_apply, zeta_apply_ne (right_ne_zero_of_mul h), cast_one, mul_one]
· rw [← map_div_right_divisors, sum_map, Function.Embedding.coeFn_mk]

theorem coe_zeta_mul_comm [Semiring R] {f : ArithmeticFunction R} : ζ * f = f * ζ := by
ext x
rw [coe_zeta_mul_apply, coe_mul_zeta_apply]
rw [← coe_zeta_mul_comm, coe_zeta_mul_apply]

theorem zeta_mul_apply {f : ArithmeticFunction ℕ} {x : ℕ} : (ζ * f) x = ∑ i ∈ divisors x, f i := by
rw [← natCoe_nat ζ, coe_zeta_mul_apply]
Expand Down
Loading