The areas / V12. Number theory
Mathlib.NumberTheory.FactorisationProperties
43 declarations. Mathlib docs · Source
Factorisation properties of natural numbers
This file defines abundant, pseudoperfect, deficient, and weird numbers and formalizes their relations with prime and perfect numbers.
Main Definitions
Nat.Abundant: a natural numbernis abundant if the sum of its proper divisors is greater thannNat.Pseudoperfect: a natural numbernis pseudoperfect if the sum of a subset of its proper divisors equalsnNat.Deficient: a natural numbernis deficient if the sum of its proper divisors is less thannNat.Weird: a natural number is weird if it is abundant but not pseudoperfect
Main Results
Nat.deficient_or_perfect_or_abundant: A positive natural number is either deficient, perfect, or abundant.Nat.Prime.deficient: All prime natural numbers are deficient.Nat.infinite_deficient: There are infinitely many deficient numbers.Nat.Prime.deficient_pow: Any natural number power of a prime is deficient.
Implementation notes
- Zero is not included in any of the definitions and these definitions only apply to natural numbers greater than zero.
References
- [R. W. Prielipp, PERFECT NUMBERS, ABUNDANT NUMBERS, AND DEFICIENT NUMBERS][Prielipp1970]
Tags
abundant, deficient, weird, pseudoperfect
def Nat.Abundant E3 #
ℕ → Prop
n : ℕ is abundant if the sum of the proper divisors of n is greater than n.
instance Nat.instDecidableAbundant E0 #
(n : ℕ) → Decidable n.Abundant
def Nat.Deficient E3 #
ℕ → Prop
n : ℕ is deficient if the sum of the proper divisors of n is less than n.
instance Nat.instDecidableDeficient E0 #
(n : ℕ) → Decidable n.Deficient
def Nat.Pseudoperfect E3 #
ℕ → Prop
A positive natural number n is pseudoperfect if there exists a subset of the proper
divisors of n such that the sum of that subset is equal to n.
instance Nat.instDecidablePseudoperfect E0 #
(n : ℕ) → Decidable n.Pseudoperfect
def Nat.Weird E3 #
ℕ → Prop
n : ℕ is a weird number if and only if it is abundant but not pseudoperfect.
instance Nat.instDecidableWeird E0 #
(n : ℕ) → Decidable n.Weird
def Nat.abundancyIndex E1 #
ℕ → ℚ
abundancyIndex n is the sum of the divisors of n divided by n.
theorem Nat.not_pseudoperfect_iff_forall E1 #
∀ {n : ℕ}, ¬n.Pseudoperfect ↔ n = 0 ∨ ∀ s ⊆ n.properDivisors, ∑ i ∈ s, i ≠ n
theorem Nat.not_deficient_zero E1 #
¬Nat.Deficient 0
theorem Nat.deficient_one E1 #
Nat.Deficient 1
theorem Nat.deficient_two E1 #
Nat.Deficient 2
theorem Nat.deficient_three E1 #
Nat.Deficient 3
theorem Nat.not_abundant_zero E1 #
¬Nat.Abundant 0
theorem Nat.abundant_twelve E1 #
Nat.Abundant 12
theorem Nat.not_weird_zero E1 #
¬Nat.Weird 0
theorem Nat.weird_seventy E1 #
Nat.Weird 70
theorem Nat.Deficient.pos E1 #
∀ {n : ℕ}, n.Deficient → 0 < n
theorem Nat.Abundant.pos E1 #
∀ {n : ℕ}, n.Abundant → 0 < n
theorem Nat.Weird.pos E1 #
∀ {n : ℕ}, n.Weird → 0 < n
theorem Nat.deficient_iff_not_abundant_and_not_perfect E1 #
∀ {n : ℕ}, n ≠ 0 → (n.Deficient ↔ ¬n.Abundant ∧ ¬n.Perfect)
theorem Nat.perfect_iff_not_abundant_and_not_deficient E1 #
∀ {n : ℕ}, 0 ≠ n → (n.Perfect ↔ ¬n.Abundant ∧ ¬n.Deficient)
theorem Nat.abundant_iff_not_perfect_and_not_deficient E1 #
∀ {n : ℕ}, 0 ≠ n → (n.Abundant ↔ ¬n.Perfect ∧ ¬n.Deficient)
theorem Nat.deficient_or_perfect_or_abundant E3 #
∀ {n : ℕ}, 0 ≠ n → n.Deficient ∨ n.Abundant ∨ n.Perfect
A positive natural number is either deficient, perfect, or abundant
theorem Nat.Perfect.pseudoperfect E1 #
∀ {n : ℕ}, n.Perfect → n.Pseudoperfect
theorem Nat.Prime.not_abundant E1 #
∀ {n : ℕ}, Nat.Prime n → ¬n.Abundant
theorem Nat.Prime.not_weird E1 #
∀ {n : ℕ}, Nat.Prime n → ¬n.Weird
theorem Nat.Prime.not_pseudoperfect E1 #
∀ {p : ℕ}, Nat.Prime p → ¬p.Pseudoperfect
theorem Nat.Prime.not_perfect E1 #
∀ {p : ℕ}, Nat.Prime p → ¬p.Perfect
theorem Nat.Prime.deficient_pow E3 #
∀ {n m : ℕ}, Nat.Prime n → (n ^ m).Deficient
Any natural number power of a prime is deficient
theorem IsPrimePow.deficient E1 #
∀ {n : ℕ}, IsPrimePow n → n.Deficient
theorem Nat.Prime.deficient E3 #
∀ {n : ℕ}, Nat.Prime n → n.Deficient
theorem Nat.infinite_deficient E3 #
{n | n.Deficient}.Infinite
There exists infinitely many deficient numbers
theorem Nat.infinite_even_deficient E1 #
{n | Even n ∧ n.Deficient}.Infinite
theorem Nat.infinite_odd_deficient E1 #
{n | Odd n ∧ n.Deficient}.Infinite
theorem Nat.abundant_iff_sum_divisors E1 #
∀ {n : ℕ}, n.Abundant ↔ 2 * n < ∑ i ∈ n.divisors, i
theorem Nat.abundant_iff_two_lt_abundancyIndex E1 #
∀ {n : ℕ}, n.Abundant ↔ 2 < n.abundancyIndex
theorem Nat.abundancyIndex_le_of_dvd E1 #
∀ {n m : ℕ}, n ≠ 0 → m ∣ n → m.abundancyIndex ≤ n.abundancyIndex
theorem Nat.Abundant.of_dvd E1 #
∀ {n m : ℕ}, m.Abundant → m ∣ n → n ≠ 0 → n.Abundant
theorem Nat.Abundant.mul_left E1 #
∀ {n m : ℕ}, n.Abundant → m ≠ 0 → (m * n).Abundant
theorem Nat.infinite_even_abundant E1 #
{n | Even n ∧ n.Abundant}.Infinite
theorem Nat.infinite_odd_abundant E1 #
{n | Odd n ∧ n.Abundant}.Infinite