The areas / V12. Number theory
Mathlib.NumberTheory.AlmostPrime
13 declarations. Mathlib docs · Source
def Nat.IsAlmostPrime E1 #
ℕ → ℕ → Prop
IsAlmostPrime k n means that n is k-almost prime: it has exactly k
prime factors, counted with multiplicity. The side condition excludes 0, so 1 is
0-almost prime.
instance Nat.instDecidableIsAlmostPrime E0 #
(k n : ℕ) → Decidable (k.IsAlmostPrime n)
def Nat.IsAtMostAlmostPrime E1 #
ℕ → ℕ → Prop
IsAtMostAlmostPrime k n means that n has at most k prime factors,
counted with multiplicity.
instance Nat.instDecidableIsAtMostAlmostPrime E0 #
(k n : ℕ) → Decidable (k.IsAtMostAlmostPrime n)
abbrev Nat.IsSemiprime E1 #
ℕ → Prop
A semiprime is a 2-almost-prime number.
theorem Nat.isAlmostPrime_zero_iff E0 #
∀ {n : ℕ}, Nat.IsAlmostPrime 0 n ↔ n = 1
theorem Nat.isAlmostPrime_one_iff E0 #
∀ {n : ℕ}, Nat.IsAlmostPrime 1 n ↔ Nat.Prime n
theorem Nat.Prime.isAlmostPrime_one E1 #
∀ {p : ℕ}, Nat.Prime p → Nat.IsAlmostPrime 1 p
theorem Nat.IsAlmostPrime.mul E1 #
∀ {k l m n : ℕ}, k.IsAlmostPrime m → l.IsAlmostPrime n → (k + l).IsAlmostPrime (m * n)
theorem Nat.IsAtMostAlmostPrime.mul E1 #
∀ {k l m n : ℕ}, k.IsAtMostAlmostPrime m → l.IsAtMostAlmostPrime n → (k + l).IsAtMostAlmostPrime (m * n)
theorem Nat.IsAlmostPrime.isAtMost E1 #
∀ {k l n : ℕ}, k.IsAlmostPrime n → k ≤ l → l.IsAtMostAlmostPrime n
theorem Nat.Prime.mul_isAlmostPrime_two E1 #
∀ {p q : ℕ}, Nat.Prime p → Nat.Prime q → Nat.IsAlmostPrime 2 (p * q)
theorem Nat.Prime.sq_isAlmostPrime_two E1 #
∀ {p : ℕ}, Nat.Prime p → Nat.IsAlmostPrime 2 (p ^ 2)