abbrev
definition
bigOmega
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.NumberTheory.Primes.ArithmeticFunctions on GitHub at line 73.
browse module
All declarations in this module, on Recognition.
explainer page
used by
-
bigOmega_apply -
bigOmega_def -
bigOmega_eight -
bigOmega_eighthundredforty -
bigOmega_eq_omega_of_squarefree -
bigOmega_factorial_five -
bigOmega_factorial_four -
bigOmega_factorial_three -
bigOmega_factorial_two -
bigOmega_fortyfive -
bigOmega_mul -
bigOmega_one -
bigOmega_onehundredtwenty -
bigOmega_pow -
bigOmega_prime -
bigOmega_prime_pow -
bigOmega_six -
bigOmega_thirty -
bigOmega_threehundredsixty -
bigOmega_twelve -
bigOmega_twohundredten -
bigOmega_twothousandthreehundredten -
isFiveAlmostPrime -
isFourAlmostPrime -
isSemiprime -
isSixAlmostPrime -
isThreeAlmostPrime -
liouville -
liouville_eq -
liouville_prime -
liouville_prime_pow -
mobius_sq_eq_one_iff_squarefree
formal source
70/-! ### Additional arithmetic function wrappers -/
71
72/-- Number of prime factors (with multiplicity) — Ω(n). -/
73abbrev bigOmega : ArithmeticFunction ℕ := ArithmeticFunction.cardFactors
74
75@[simp] theorem bigOmega_def : bigOmega = ArithmeticFunction.cardFactors := rfl
76
77/-- `Ω(n) = n.primeFactorsList.length`. -/
78theorem bigOmega_apply {n : ℕ} : bigOmega n = n.primeFactorsList.length := by
79 simp only [bigOmega, ArithmeticFunction.cardFactors_apply]
80
81/-- Number of distinct prime divisors — ω(n). -/
82abbrev omega : ArithmeticFunction ℕ := ArithmeticFunction.cardDistinctFactors
83
84@[simp] theorem omega_def : omega = ArithmeticFunction.cardDistinctFactors := rfl
85
86/-- `ω(n) = n.primeFactorsList.dedup.length`. -/
87theorem omega_apply {n : ℕ} : omega n = n.primeFactorsList.dedup.length := by
88 simp only [omega, ArithmeticFunction.cardDistinctFactors_apply]
89
90/-- For squarefree `n ≠ 0`, `Ω(n) = ω(n)` (all exponents are 1). -/
91theorem bigOmega_eq_omega_of_squarefree {n : ℕ} (hn : n ≠ 0) (hsq : Squarefree n) :
92 bigOmega n = omega n := by
93 simp only [bigOmega, omega]
94 exact ((ArithmeticFunction.cardDistinctFactors_eq_cardFactors_iff_squarefree hn).mpr hsq).symm
95
96/-! ### Euler's totient function φ (via `Nat.totient`) -/
97
98/-- Euler's totient function wrapper. -/
99def totient (n : ℕ) : ℕ := Nat.totient n
100
101@[simp] theorem totient_apply {n : ℕ} : totient n = Nat.totient n := rfl
102
103/-- φ(1) = 1. -/