Skip to content

Commit 51104eb

Browse files
committed
feat(NumberTheory/ArithmeticFunction): Miscellaneous lemmas about multiplicative arithmetic functions (#20025)
These are three small lemmas that were helpful while developing the Selberg sieve.
1 parent 6c80f3a commit 51104eb

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Mathlib/NumberTheory/ArithmeticFunction.lean

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,12 @@ theorem map_prod_of_subset_primeFactors [CommSemiring R] {f : ArithmeticFunction
590590
f (∏ a ∈ t, a) = ∏ a ∈ t, f a :=
591591
map_prod_of_prime h_mult t fun _ a => prime_of_mem_primeFactors (ht a)
592592

593+
theorem map_div_of_coprime [CommGroupWithZero R] {f : ArithmeticFunction R}
594+
(hf : IsMultiplicative f) {l d : ℕ} (hdl : d ∣ l) (hl : (l/d).Coprime d) (hd : f d ≠ 0) :
595+
f (l / d) = f l / f d := by
596+
apply (div_eq_of_eq_mul hd ..).symm
597+
rw [← hf.right hl, Nat.div_mul_cancel hdl]
598+
593599
@[arith_mult]
594600
theorem natCast {f : ArithmeticFunction ℕ} [Semiring R] (h : f.IsMultiplicative) :
595601
IsMultiplicative (f : ArithmeticFunction R) :=
@@ -771,6 +777,24 @@ theorem lcm_apply_mul_gcd_apply [CommMonoidWithZero R] {f : ArithmeticFunction R
771777
apply Finset.inter_subset_union
772778
· simp [factorization_lcm hx hy]
773779

780+
theorem map_gcd [CommGroupWithZero R] {f : ArithmeticFunction R}
781+
(hf : f.IsMultiplicative) {x y : ℕ} (hf_lcm : f (x.lcm y) ≠ 0) :
782+
f (x.gcd y) = f x * f y / f (x.lcm y) := by
783+
rw [←hf.lcm_apply_mul_gcd_apply, mul_div_cancel_left₀ _ hf_lcm]
784+
785+
theorem map_lcm [CommGroupWithZero R] {f : ArithmeticFunction R}
786+
(hf : f.IsMultiplicative) {x y : ℕ} (hf_gcd : f (x.gcd y) ≠ 0) :
787+
f (x.lcm y) = f x * f y / f (x.gcd y) := by
788+
rw [←hf.lcm_apply_mul_gcd_apply, mul_div_cancel_right₀ _ hf_gcd]
789+
790+
theorem eq_zero_of_squarefree_of_dvd_eq_zero [CommMonoidWithZero R] {f : ArithmeticFunction R}
791+
(hf : IsMultiplicative f) {m n : ℕ} (hn : Squarefree n) (hmn : m ∣ n)
792+
(h_zero : f m = 0) :
793+
f n = 0 := by
794+
rcases hmn with ⟨k, rfl⟩
795+
simp only [MulZeroClass.zero_mul, eq_self_iff_true, hf.map_mul_of_coprime
796+
(coprime_of_squarefree_mul hn), h_zero]
797+
774798
end IsMultiplicative
775799

776800
section SpecialFunctions

0 commit comments

Comments
 (0)