fact stringlengths 6 3.84k | type stringclasses 11
values | library stringclasses 32
values | imports listlengths 1 14 | filename stringlengths 20 95 | symbolic_name stringlengths 1 90 | docstring stringlengths 7 20k ⌀ |
|---|---|---|---|---|---|---|
mul_zeta_apply {f : ArithmeticFunction ℕ} {x : ℕ} : (f * ζ) x = ∑ i ∈ divisors x, f i := by
rw [← natCoe_nat ζ, coe_mul_zeta_apply] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | mul_zeta_apply | null |
pmul [MulZeroClass R] (f g : ArithmeticFunction R) : ArithmeticFunction R :=
⟨fun x => f x * g x, by simp⟩
@[simp] | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pmul | This is the pointwise product of `ArithmeticFunction`s. |
pmul_apply [MulZeroClass R] {f g : ArithmeticFunction R} {x : ℕ} : f.pmul g x = f x * g x :=
rfl | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pmul_apply | null |
pmul_comm [CommMonoidWithZero R] (f g : ArithmeticFunction R) : f.pmul g = g.pmul f := by
ext
simp [mul_comm] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pmul_comm | null |
pmul_assoc [SemigroupWithZero R] (f₁ f₂ f₃ : ArithmeticFunction R) :
pmul (pmul f₁ f₂) f₃ = pmul f₁ (pmul f₂ f₃) := by
ext
simp only [pmul_apply, mul_assoc] | lemma | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pmul_assoc | null |
@[simp]
pmul_zeta (f : ArithmeticFunction R) : f.pmul ↑ζ = f := by
ext x
cases x <;> simp
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pmul_zeta | null |
zeta_pmul (f : ArithmeticFunction R) : (ζ : ArithmeticFunction R).pmul f = f := by
ext x
cases x <;> simp | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | zeta_pmul | null |
ppow (f : ArithmeticFunction R) (k : ℕ) : ArithmeticFunction R :=
if h0 : k = 0 then ζ else ⟨fun x ↦ f x ^ k, by simp_rw [map_zero, zero_pow h0]⟩
@[simp] | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | ppow | This is the pointwise power of `ArithmeticFunction`s. |
ppow_zero {f : ArithmeticFunction R} : f.ppow 0 = ζ := by rw [ppow, dif_pos rfl]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | ppow_zero | null |
ppow_apply {f : ArithmeticFunction R} {k x : ℕ} (kpos : 0 < k) : f.ppow k x = f x ^ k := by
rw [ppow, dif_neg (Nat.ne_of_gt kpos), coe_mk] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | ppow_apply | null |
ppow_succ' {f : ArithmeticFunction R} {k : ℕ} : f.ppow (k + 1) = f.pmul (f.ppow k) := by
ext x
rw [ppow_apply (Nat.succ_pos k), _root_.pow_succ']
induction k <;> simp | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | ppow_succ' | null |
ppow_succ {f : ArithmeticFunction R} {k : ℕ} {kpos : 0 < k} :
f.ppow (k + 1) = (f.ppow k).pmul f := by
ext x
rw [ppow_apply (Nat.succ_pos k), _root_.pow_succ]
induction k <;> simp | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | ppow_succ | null |
pdiv [GroupWithZero R] (f g : ArithmeticFunction R) : ArithmeticFunction R :=
⟨fun n => f n / g n, by simp only [map_zero, div_zero]⟩
@[simp] | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pdiv | This is the pointwise division of `ArithmeticFunction`s. |
pdiv_apply [GroupWithZero R] (f g : ArithmeticFunction R) (n : ℕ) :
pdiv f g n = f n / g n := rfl | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pdiv_apply | null |
@[simp]
pdiv_zeta [DivisionSemiring R] (f : ArithmeticFunction R) :
pdiv f zeta = f := by
ext n
cases n <;> simp | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pdiv_zeta | This result only holds for `DivisionSemiring`s instead of `GroupWithZero`s because zeta takes
values in ℕ, and hence the coercion requires an `AddMonoidWithOne`. TODO: Generalise zeta |
prodPrimeFactors [CommMonoidWithZero R] (f : ℕ → R) : ArithmeticFunction R where
toFun d := if d = 0 then 0 else ∏ p ∈ d.primeFactors, f p
map_zero' := if_pos rfl
open Batteries.ExtendedBinder | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | prodPrimeFactors | The map $n \mapsto \prod_{p \mid n} f(p)$ as an arithmetic function |
IsMultiplicative [MonoidWithZero R] (f : ArithmeticFunction R) : Prop :=
f 1 = 1 ∧ ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | IsMultiplicative | `∏ᵖ p ∣ n, f p` is custom notation for `prodPrimeFactors f n` -/
scoped syntax (name := bigproddvd) "∏ᵖ " extBinder " ∣ " term ", " term:67 : term
scoped macro_rules (kind := bigproddvd)
| `(∏ᵖ $x:ident ∣ $n, $r) => `(prodPrimeFactors (fun $x ↦ $r) $n)
@[simp]
theorem prodPrimeFactors_apply [CommMonoidWithZero R] {f... |
@[simp, arith_mult]
map_one {f : ArithmeticFunction R} (h : f.IsMultiplicative) : f 1 = 1 :=
h.1
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | map_one | null |
map_mul_of_coprime {f : ArithmeticFunction R} (hf : f.IsMultiplicative) {m n : ℕ}
(h : m.gcd n = 1) : f (m * n) = f m * f n :=
hf.2 h | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | map_mul_of_coprime | null |
map_prod {ι : Type*} [CommMonoidWithZero R] (g : ι → ℕ) {f : ArithmeticFunction R}
(hf : f.IsMultiplicative) (s : Finset ι) (hs : (s : Set ι).Pairwise (Coprime on g)) :
f (∏ i ∈ s, g i) = ∏ i ∈ s, f (g i) := by
classical
induction s using Finset.induction_on with
| empty => simp [hf]
| insert _ _ ... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | map_prod | null |
map_prod_of_prime [CommMonoidWithZero R] {f : ArithmeticFunction R}
(h_mult : ArithmeticFunction.IsMultiplicative f)
(t : Finset ℕ) (ht : ∀ p ∈ t, p.Prime) :
f (∏ a ∈ t, a) = ∏ a ∈ t, f a :=
map_prod _ h_mult t fun x hx y hy hxy => (coprime_primes (ht x hx) (ht y hy)).mpr hxy | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | map_prod_of_prime | null |
map_prod_of_subset_primeFactors [CommMonoidWithZero R] {f : ArithmeticFunction R}
(h_mult : ArithmeticFunction.IsMultiplicative f) (l : ℕ)
(t : Finset ℕ) (ht : t ⊆ l.primeFactors) :
f (∏ a ∈ t, a) = ∏ a ∈ t, f a :=
map_prod_of_prime h_mult t fun _ a => prime_of_mem_primeFactors (ht a) | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | map_prod_of_subset_primeFactors | null |
prod_primeFactors [CommMonoidWithZero R] {f : ArithmeticFunction R}
(h_mult : f.IsMultiplicative) {l : ℕ} (hl : Squarefree l) :
∏ a ∈ l.primeFactors, f a = f l := by
rw [← h_mult.map_prod_of_subset_primeFactors l _ Finset.Subset.rfl,
prod_primeFactors_of_squarefree hl] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | prod_primeFactors | null |
map_div_of_coprime [GroupWithZero R] {f : ArithmeticFunction R}
(hf : IsMultiplicative f) {l d : ℕ} (hdl : d ∣ l) (hl : (l / d).Coprime d) (hd : f d ≠ 0) :
f (l / d) = f l / f d := by
apply (div_eq_of_eq_mul hd ..).symm
rw [← hf.right hl, Nat.div_mul_cancel hdl]
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | map_div_of_coprime | null |
natCast {f : ArithmeticFunction ℕ} [Semiring R] (h : f.IsMultiplicative) :
IsMultiplicative (f : ArithmeticFunction R) :=
⟨by simp [h], fun {m n} cop => by simp [h.2 cop]⟩
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | natCast | null |
intCast {f : ArithmeticFunction ℤ} [Ring R] (h : f.IsMultiplicative) :
IsMultiplicative (f : ArithmeticFunction R) :=
⟨by simp [h], fun {m n} cop => by simp [h.2 cop]⟩
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | intCast | null |
mul [CommSemiring R] {f g : ArithmeticFunction R} (hf : f.IsMultiplicative)
(hg : g.IsMultiplicative) : IsMultiplicative (f * g) := by
refine ⟨by simp [hf.1, hg.1], ?_⟩
simp only [mul_apply]
intro m n cop
rw [sum_mul_sum, ← sum_product']
symm
apply sum_nbij fun ((i, j), k, l) ↦ (i * k, j * l)
· rintro... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | mul | null |
pmul [CommSemiring R] {f g : ArithmeticFunction R} (hf : f.IsMultiplicative)
(hg : g.IsMultiplicative) : IsMultiplicative (f.pmul g) :=
⟨by simp [hf, hg], fun {m n} cop => by
simp only [pmul_apply, hf.map_mul_of_coprime cop, hg.map_mul_of_coprime cop]
ring⟩
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pmul | null |
pdiv [CommGroupWithZero R] {f g : ArithmeticFunction R} (hf : IsMultiplicative f)
(hg : IsMultiplicative g) : IsMultiplicative (pdiv f g) :=
⟨by simp [hf, hg], fun {m n} cop => by
simp only [pdiv_apply, map_mul_of_coprime hf cop, map_mul_of_coprime hg cop,
div_eq_mul_inv, mul_inv]
apply mul_mul_mul_... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pdiv | null |
multiplicative_factorization [CommMonoidWithZero R] (f : ArithmeticFunction R)
(hf : f.IsMultiplicative) {n : ℕ} (hn : n ≠ 0) :
f n = n.factorization.prod fun p k => f (p ^ k) :=
Nat.multiplicative_factorization f (fun _ _ => hf.2) hf.1 hn | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | multiplicative_factorization | For any multiplicative function `f` and any `n > 0`,
we can evaluate `f n` by evaluating `f` at `p ^ k` over the factorization of `n` |
iff_ne_zero [MonoidWithZero R] {f : ArithmeticFunction R} :
IsMultiplicative f ↔
f 1 = 1 ∧ ∀ {m n : ℕ}, m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n := by
refine and_congr_right' (forall₂_congr fun m n => ⟨fun h _ _ => h, fun h hmn => ?_⟩)
rcases eq_or_ne m 0 with (rfl | hm)
· simp
rcases eq_or... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | iff_ne_zero | A recapitulation of the definition of multiplicative that is simpler for proofs |
eq_iff_eq_on_prime_powers [CommMonoidWithZero R] (f : ArithmeticFunction R)
(hf : f.IsMultiplicative) (g : ArithmeticFunction R) (hg : g.IsMultiplicative) :
f = g ↔ ∀ p i : ℕ, Nat.Prime p → f (p ^ i) = g (p ^ i) := by
constructor
· intro h p i _
rw [h]
intro h
ext n
by_cases hn : n = 0
· rw [hn,... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | eq_iff_eq_on_prime_powers | Two multiplicative functions `f` and `g` are equal if and only if
they agree on prime powers |
prodPrimeFactors [CommMonoidWithZero R] (f : ℕ → R) :
IsMultiplicative (prodPrimeFactors f) := by
rw [iff_ne_zero]
simp only [ne_eq, one_ne_zero, not_false_eq_true, prodPrimeFactors_apply, primeFactors_one,
prod_empty, true_and]
intro x y hx hy hxy
have hxy₀ : x * y ≠ 0 := mul_ne_zero hx hy
rw [prodPr... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | prodPrimeFactors | null |
prodPrimeFactors_add_of_squarefree [CommSemiring R] {f g : ArithmeticFunction R}
(hf : IsMultiplicative f) (hg : IsMultiplicative g) {n : ℕ} (hn : Squarefree n) :
∏ᵖ p ∣ n, (f + g) p = (f * g) n := by
rw [prodPrimeFactors_apply hn.ne_zero]
simp_rw [add_apply (f := f) (g := g)]
rw [Finset.prod_add, mul_app... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | prodPrimeFactors_add_of_squarefree | null |
lcm_apply_mul_gcd_apply [CommMonoidWithZero R] {f : ArithmeticFunction R}
(hf : f.IsMultiplicative) {x y : ℕ} :
f (x.lcm y) * f (x.gcd y) = f x * f y := by
by_cases hx : x = 0
· simp only [hx, f.map_zero, zero_mul, Nat.lcm_zero_left, Nat.gcd_zero_left]
by_cases hy : y = 0
· simp only [hy, f.map_zero, mu... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | lcm_apply_mul_gcd_apply | null |
map_gcd [CommGroupWithZero R] {f : ArithmeticFunction R}
(hf : f.IsMultiplicative) {x y : ℕ} (hf_lcm : f (x.lcm y) ≠ 0) :
f (x.gcd y) = f x * f y / f (x.lcm y) := by
rw [← hf.lcm_apply_mul_gcd_apply, mul_div_cancel_left₀ _ hf_lcm] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | map_gcd | null |
map_lcm [CommGroupWithZero R] {f : ArithmeticFunction R}
(hf : f.IsMultiplicative) {x y : ℕ} (hf_gcd : f (x.gcd y) ≠ 0) :
f (x.lcm y) = f x * f y / f (x.gcd y) := by
rw [← hf.lcm_apply_mul_gcd_apply, mul_div_cancel_right₀ _ hf_gcd] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | map_lcm | null |
eq_zero_of_squarefree_of_dvd_eq_zero [MonoidWithZero R] {f : ArithmeticFunction R}
(hf : IsMultiplicative f) {m n : ℕ} (hn : Squarefree n) (hmn : m ∣ n)
(h_zero : f m = 0) :
f n = 0 := by
rcases hmn with ⟨k, rfl⟩
simp only [zero_mul, hf.map_mul_of_coprime (coprime_of_squarefree_mul hn), h_zero] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | eq_zero_of_squarefree_of_dvd_eq_zero | null |
id : ArithmeticFunction ℕ :=
⟨_root_.id, rfl⟩
@[simp] | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | id | The identity on `ℕ` as an `ArithmeticFunction`. |
id_apply {x : ℕ} : id x = x :=
rfl | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | id_apply | null |
pow (k : ℕ) : ArithmeticFunction ℕ :=
id.ppow k
@[simp] | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pow | `pow k n = n ^ k`, except `pow 0 0 = 0`. |
pow_apply {k n : ℕ} : pow k n = if k = 0 ∧ n = 0 then 0 else n ^ k := by
cases k <;> simp [pow] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pow_apply | null |
pow_zero_eq_zeta : pow 0 = ζ := by
ext n
simp | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | pow_zero_eq_zeta | null |
sigma (k : ℕ) : ArithmeticFunction ℕ :=
⟨fun n => ∑ d ∈ divisors n, d ^ k, by simp⟩
@[inherit_doc]
scoped[ArithmeticFunction] notation "σ" => ArithmeticFunction.sigma
@[inherit_doc]
scoped[ArithmeticFunction.sigma] notation "σ" => ArithmeticFunction.sigma | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma | `σ k n` is the sum of the `k`th powers of the divisors of `n` |
sigma_apply {k n : ℕ} : σ k n = ∑ d ∈ divisors n, d ^ k :=
rfl
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_apply | null |
sigma_eq_zero {k n : ℕ} : σ k n = 0 ↔ n = 0 := by
rcases eq_or_ne n 0 with rfl | hn
· simp
· refine iff_of_false ?_ hn
simp_rw [ArithmeticFunction.sigma_apply, Finset.sum_eq_zero_iff, not_forall]
use 1
simp [hn]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_eq_zero | null |
sigma_pos_iff {k n} : 0 < σ k n ↔ 0 < n := by
simp [pos_iff_ne_zero] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_pos_iff | null |
sigma_apply_prime_pow {k p i : ℕ} (hp : p.Prime) :
σ k (p ^ i) = ∑ j ∈ .range (i + 1), p ^ (j * k) := by
simp [sigma_apply, divisors_prime_pow hp, Nat.pow_mul] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_apply_prime_pow | null |
sigma_one_apply (n : ℕ) : σ 1 n = ∑ d ∈ divisors n, d := by simp [sigma_apply] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_one_apply | null |
sigma_one_apply_prime_pow {p i : ℕ} (hp : p.Prime) :
σ 1 (p ^ i) = ∑ k ∈ .range (i + 1), p ^ k := by
simp [sigma_apply_prime_pow hp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_one_apply_prime_pow | null |
sigma_eq_sum_div (k n : ℕ) : sigma k n = ∑ d ∈ Nat.divisors n, (n / d) ^ k := by
rw [sigma_apply, ← Nat.sum_div_divisors] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_eq_sum_div | null |
sigma_zero_apply (n : ℕ) : σ 0 n = #n.divisors := by simp [sigma_apply] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_zero_apply | null |
sigma_zero_apply_prime_pow {p i : ℕ} (hp : p.Prime) : σ 0 (p ^ i) = i + 1 := by
simp [sigma_apply_prime_pow hp]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_zero_apply_prime_pow | null |
sigma_one (k : ℕ) : σ k 1 = 1 := by
simp only [sigma_apply, divisors_one, sum_singleton, one_pow] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_one | null |
sigma_pos (k n : ℕ) (hn0 : n ≠ 0) : 0 < σ k n := by
rwa [sigma_pos_iff, pos_iff_ne_zero] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_pos | null |
sigma_mono (k k' n : ℕ) (hk : k ≤ k') : σ k n ≤ σ k' n := by
simp_rw [sigma_apply]
gcongr with d hd
exact Nat.pos_of_mem_divisors hd | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_mono | null |
zeta_mul_pow_eq_sigma {k : ℕ} : ζ * pow k = σ k := by
ext
rw [sigma, zeta_mul_apply]
apply sum_congr rfl
intro x hx
rw [pow_apply, if_neg (not_and_of_not_right _ _)]
contrapose! hx
simp [hx]
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | zeta_mul_pow_eq_sigma | null |
isMultiplicative_one [MonoidWithZero R] : IsMultiplicative (1 : ArithmeticFunction R) :=
IsMultiplicative.iff_ne_zero.2
⟨by simp, by
intro m n hm _hn hmn
rcases eq_or_ne m 1 with (rfl | hm')
· simp
rw [one_apply_ne, one_apply_ne hm', zero_mul]
rw [Ne, mul_eq_one, not_and_or]
ex... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | isMultiplicative_one | null |
isMultiplicative_zeta : IsMultiplicative ζ :=
IsMultiplicative.iff_ne_zero.2 ⟨by simp, by simp +contextual⟩
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | isMultiplicative_zeta | null |
isMultiplicative_id : IsMultiplicative ArithmeticFunction.id :=
⟨rfl, fun {_ _} _ => rfl⟩
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | isMultiplicative_id | null |
IsMultiplicative.ppow [CommSemiring R] {f : ArithmeticFunction R} (hf : f.IsMultiplicative)
{k : ℕ} : IsMultiplicative (f.ppow k) := by
induction k with
| zero => exact isMultiplicative_zeta.natCast
| succ k hi => rw [ppow_succ']; apply hf.pmul hi
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | IsMultiplicative.ppow | null |
isMultiplicative_pow {k : ℕ} : IsMultiplicative (pow k) :=
isMultiplicative_id.ppow
@[arith_mult] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | isMultiplicative_pow | null |
isMultiplicative_sigma {k : ℕ} : IsMultiplicative (σ k) := by
rw [← zeta_mul_pow_eq_sigma]
apply isMultiplicative_zeta.mul isMultiplicative_pow | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | isMultiplicative_sigma | null |
_root_.Nat.card_divisors {n : ℕ} (hn : n ≠ 0) :
#n.divisors = n.primeFactors.prod (n.factorization · + 1) := by
rw [← sigma_zero_apply, isMultiplicative_sigma.multiplicative_factorization _ hn]
exact Finset.prod_congr n.support_factorization fun _ h =>
sigma_zero_apply_prime_pow <| Nat.prime_of_mem_primeFac... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | _root_.Nat.card_divisors | null |
_root_.Nat.divisors_card_eq_one_iff (n : ℕ) : #n.divisors = 1 ↔ n = 1 := by
rcases eq_or_ne n 0 with rfl | hn
· simp
· refine ⟨fun h ↦ ?_, fun h ↦ by simp [h]⟩
exact (card_le_one.mp h.le 1 (one_mem_divisors.mpr hn) n (n.mem_divisors_self hn)).symm | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | _root_.Nat.divisors_card_eq_one_iff | null |
private sigma_zero_eq_one_iff (n : ℕ) : σ 0 n = 1 ↔ n = 1 := by
simp [sigma_zero_apply]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_zero_eq_one_iff | `sigma_eq_one_iff` is to be preferred. |
sigma_eq_one_iff (k n : ℕ) : σ k n = 1 ↔ n = 1 := by
by_cases hn0 : n = 0
· subst hn0
simp
constructor
· intro h
rw [← sigma_zero_eq_one_iff]
have zero_lt_sigma := sigma_pos 0 n hn0
have sigma_zero_le_sigma := sigma_mono 0 k n (Nat.zero_le k)
cutsat
· rintro rfl
simp | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | sigma_eq_one_iff | null |
_root_.Nat.sum_divisors {n : ℕ} (hn : n ≠ 0) :
∑ d ∈ n.divisors, d = ∏ p ∈ n.primeFactors, ∑ k ∈ .range (n.factorization p + 1), p ^ k := by
rw [← sigma_one_apply, isMultiplicative_sigma.multiplicative_factorization _ hn]
exact Finset.prod_congr n.support_factorization fun _ h =>
sigma_one_apply_prime_pow <... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | _root_.Nat.sum_divisors | null |
cardFactors : ArithmeticFunction ℕ :=
⟨fun n => n.primeFactorsList.length, by simp⟩
@[inherit_doc]
scoped[ArithmeticFunction] notation "Ω" => ArithmeticFunction.cardFactors
@[inherit_doc]
scoped[ArithmeticFunction.Omega] notation "Ω" => ArithmeticFunction.cardFactors | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors | `Ω n` is the number of prime factors of `n`. |
cardFactors_apply {n : ℕ} : Ω n = n.primeFactorsList.length :=
rfl | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_apply | null |
cardFactors_zero : Ω 0 = 0 := by simp
@[simp] theorem cardFactors_one : Ω 1 = 0 := by simp [cardFactors_apply]
@[simp] | lemma | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_zero | null |
cardFactors_eq_zero_iff_eq_zero_or_one {n : ℕ} : Ω n = 0 ↔ n = 0 ∨ n = 1 := by
rw [cardFactors_apply, List.length_eq_zero_iff, primeFactorsList_eq_nil]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_eq_zero_iff_eq_zero_or_one | null |
cardFactors_pos_iff_one_lt {n : ℕ} : 0 < Ω n ↔ 1 < n := by
rw [cardFactors_apply, List.length_pos_iff, primeFactorsList_ne_nil]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_pos_iff_one_lt | null |
cardFactors_eq_one_iff_prime {n : ℕ} : Ω n = 1 ↔ n.Prime := by
refine ⟨fun h => ?_, fun h => List.length_eq_one_iff.2 ⟨n, primeFactorsList_prime h⟩⟩
cases n with | zero => simp at h | succ n =>
rcases List.length_eq_one_iff.1 h with ⟨x, hx⟩
rw [← prod_primeFactorsList n.add_one_ne_zero, hx, List.prod_singleton]... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_eq_one_iff_prime | null |
cardFactors_mul {m n : ℕ} (m0 : m ≠ 0) (n0 : n ≠ 0) : Ω (m * n) = Ω m + Ω n := by
rw [cardFactors_apply, cardFactors_apply, cardFactors_apply, ← Multiset.coe_card, ← factors_eq,
UniqueFactorizationMonoid.normalizedFactors_mul m0 n0, factors_eq, factors_eq,
Multiset.card_add, Multiset.coe_card, Multiset.coe_ca... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_mul | null |
cardFactors_multiset_prod {s : Multiset ℕ} (h0 : s.prod ≠ 0) :
Ω s.prod = (Multiset.map Ω s).sum := by
induction s using Multiset.induction_on with
| empty => simp
| cons ih => simp_all [cardFactors_mul, not_or]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_multiset_prod | null |
cardFactors_apply_prime {p : ℕ} (hp : p.Prime) : Ω p = 1 :=
cardFactors_eq_one_iff_prime.2 hp | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_apply_prime | null |
cardFactors_pow {m k : ℕ} : Ω (m ^ k) = k * Ω m := by
by_cases hm : m = 0
· subst hm
cases k <;> simp
induction k with
| zero => simp
| succ n ih =>
rw [pow_succ, cardFactors_mul (pow_ne_zero n hm) hm, ih]
ring
@[simp] | lemma | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_pow | null |
cardFactors_apply_prime_pow {p k : ℕ} (hp : p.Prime) : Ω (p ^ k) = k := by
simp [cardFactors_pow, hp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_apply_prime_pow | null |
cardFactors_eq_sum_factorization {n : ℕ} :
Ω n = n.factorization.sum fun _ k => k := by
simp [cardFactors_apply, ← List.sum_toFinset_count_eq_length, Finsupp.sum] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardFactors_eq_sum_factorization | null |
cardDistinctFactors : ArithmeticFunction ℕ :=
⟨fun n => n.primeFactorsList.dedup.length, by simp⟩
@[inherit_doc]
scoped[ArithmeticFunction] notation "ω" => ArithmeticFunction.cardDistinctFactors
@[inherit_doc]
scoped[ArithmeticFunction.omega] notation "ω" => ArithmeticFunction.cardDistinctFactors | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors | `ω n` is the number of distinct prime factors of `n`. |
cardDistinctFactors_zero : ω 0 = 0 := by simp
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors_zero | null |
cardDistinctFactors_one : ω 1 = 0 := by simp [cardDistinctFactors] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors_one | null |
cardDistinctFactors_apply {n : ℕ} : ω n = n.primeFactorsList.dedup.length :=
rfl
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors_apply | null |
cardDistinctFactors_eq_zero {n : ℕ} : ω n = 0 ↔ n ≤ 1 := by
simp [cardDistinctFactors_apply, Nat.le_one_iff_eq_zero_or_eq_one]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors_eq_zero | null |
cardDistinctFactors_pos {n : ℕ} : 0 < ω n ↔ 1 < n := by simp [pos_iff_ne_zero] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors_pos | null |
cardDistinctFactors_eq_cardFactors_iff_squarefree {n : ℕ} (h0 : n ≠ 0) :
ω n = Ω n ↔ Squarefree n := by
rw [squarefree_iff_nodup_primeFactorsList h0, cardDistinctFactors_apply]
constructor <;> intro h
· rw [← n.primeFactorsList.dedup_sublist.eq_of_length h]
apply List.nodup_dedup
· simp [h.dedup, cardFa... | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors_eq_cardFactors_iff_squarefree | null |
cardDistinctFactors_apply_prime_pow {p k : ℕ} (hp : p.Prime) (hk : k ≠ 0) :
ω (p ^ k) = 1 := by
rw [cardDistinctFactors_apply, hp.primeFactorsList_pow, List.replicate_dedup hk,
List.length_singleton]
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors_apply_prime_pow | null |
cardDistinctFactors_apply_prime {p : ℕ} (hp : p.Prime) : ω p = 1 := by
rw [← pow_one p, cardDistinctFactors_apply_prime_pow hp one_ne_zero] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | cardDistinctFactors_apply_prime | null |
moebius : ArithmeticFunction ℤ :=
⟨fun n => if Squarefree n then (-1) ^ cardFactors n else 0, by simp⟩
@[inherit_doc]
scoped[ArithmeticFunction] notation "μ" => ArithmeticFunction.moebius
@[inherit_doc]
scoped[ArithmeticFunction.Moebius] notation "μ" => ArithmeticFunction.moebius
@[simp] | def | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius | `μ` is the Möbius function. If `n` is squarefree with an even number of distinct prime factors,
`μ n = 1`. If `n` is squarefree with an odd number of distinct prime factors, `μ n = -1`.
If `n` is not squarefree, `μ n = 0`. |
moebius_apply_of_squarefree {n : ℕ} (h : Squarefree n) : μ n = (-1) ^ cardFactors n :=
if_pos h
@[simp] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius_apply_of_squarefree | null |
moebius_eq_zero_of_not_squarefree {n : ℕ} (h : ¬Squarefree n) : μ n = 0 :=
if_neg h | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius_eq_zero_of_not_squarefree | null |
moebius_apply_one : μ 1 = 1 := by simp | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius_apply_one | null |
moebius_ne_zero_iff_squarefree {n : ℕ} : μ n ≠ 0 ↔ Squarefree n := by
constructor <;> intro h
· contrapose! h
simp [h]
· simp [h] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius_ne_zero_iff_squarefree | null |
moebius_eq_or (n : ℕ) : μ n = 0 ∨ μ n = 1 ∨ μ n = -1 := by
simp only [moebius, coe_mk]
split_ifs
· right
exact neg_one_pow_eq_or ..
· left
rfl | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius_eq_or | null |
moebius_ne_zero_iff_eq_or {n : ℕ} : μ n ≠ 0 ↔ μ n = 1 ∨ μ n = -1 := by
have := moebius_eq_or n
cutsat | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius_ne_zero_iff_eq_or | null |
moebius_sq_eq_one_of_squarefree {l : ℕ} (hl : Squarefree l) : μ l ^ 2 = 1 := by
rw [moebius_apply_of_squarefree hl, ← pow_mul, mul_comm, pow_mul, neg_one_sq, one_pow] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius_sq_eq_one_of_squarefree | null |
abs_moebius_eq_one_of_squarefree {l : ℕ} (hl : Squarefree l) : |μ l| = 1 := by
simp only [moebius_apply_of_squarefree hl, abs_pow, abs_neg, abs_one, one_pow] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | abs_moebius_eq_one_of_squarefree | null |
moebius_sq {n : ℕ} :
μ n ^ 2 = if Squarefree n then 1 else 0 := by
split_ifs with h
· exact moebius_sq_eq_one_of_squarefree h
· simp only [moebius_eq_zero_of_not_squarefree h,
zero_pow (show 2 ≠ 0 by simp)] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | moebius_sq | null |
abs_moebius {n : ℕ} :
|μ n| = if Squarefree n then 1 else 0 := by
split_ifs with h
· exact abs_moebius_eq_one_of_squarefree h
· simp only [moebius_eq_zero_of_not_squarefree h, abs_zero] | theorem | NumberTheory | [
"Mathlib.Algebra.BigOperators.Ring.Finset",
"Mathlib.Algebra.Module.BigOperators",
"Mathlib.NumberTheory.Divisors",
"Mathlib.Data.Nat.Squarefree",
"Mathlib.Data.Nat.GCD.BigOperators",
"Mathlib.Data.Nat.Factorization.Induction",
"Mathlib.Tactic.ArithMult"
] | Mathlib/NumberTheory/ArithmeticFunction.lean | abs_moebius | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.