@@ -590,6 +590,12 @@ theorem map_prod_of_subset_primeFactors [CommSemiring R] {f : ArithmeticFunction
590
590
f (∏ a ∈ t, a) = ∏ a ∈ t, f a :=
591
591
map_prod_of_prime h_mult t fun _ a => prime_of_mem_primeFactors (ht a)
592
592
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
+
593
599
@[arith_mult]
594
600
theorem natCast {f : ArithmeticFunction ℕ} [Semiring R] (h : f.IsMultiplicative) :
595
601
IsMultiplicative (f : ArithmeticFunction R) :=
@@ -771,6 +777,24 @@ theorem lcm_apply_mul_gcd_apply [CommMonoidWithZero R] {f : ArithmeticFunction R
771
777
apply Finset.inter_subset_union
772
778
· simp [factorization_lcm hx hy]
773
779
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
+
774
798
end IsMultiplicative
775
799
776
800
section SpecialFunctions
0 commit comments