Divisor Finsets #
This file defines sets of divisors of a natural number. This is particularly useful as background for defining Dirichlet convolution.
Main Definitions #
Let n : ℕ. All of the following definitions are in the Nat namespace:
divisors nis theFinsetof natural numbers that dividen.properDivisors nis theFinsetof natural numbers that dividen, other thann.divisorsAntidiagonal nis theFinsetof pairs(x,y)such thatx * y = n.Perfect nis true whennis positive and the sum ofproperDivisors nisn.
Conventions #
Since 0 has infinitely many divisors, none of the definitions in this file make sense for it.
Therefore we adopt the convention that Nat.divisors 0, Nat.properDivisors 0,
Nat.divisorsAntidiagonal 0 and Int.divisorsAntidiag 0 are all ∅.
Tags #
divisors, perfect numbers
properDivisors n is the Finset of divisors of n, other than n.
By convention, we set properDivisors 0 = ∅.
Instances For
Pairs of divisors of a natural number as a finset.
n.divisorsAntidiagonal is the finset of pairs (a, b) : ℕ × ℕ such that a * b = n.
By convention, we set Nat.divisorsAntidiagonal 0 = ∅.
O(n).
Instances For
Pairs of divisors of a natural number, as a list.
n.divisorsAntidiagonalList is the list of pairs (a, b) : ℕ × ℕ such that a * b = n, ordered
by increasing a. By convention, we set Nat.divisorsAntidiagonalList 0 = [].
Instances For
The Finset and List versions agree by definition.
See also Nat.mem_properDivisors.
n : ℕ is perfect if and only the sum of the proper divisors of n is n and n
is positive.
Instances For
The factors of n are the prime divisors
Useful lemma for reordering sums.
Pairs of divisors of an integer as a finset.
z.divisorsAntidiag is the finset of pairs (a, b) : ℤ × ℤ such that a * b = z.
By convention, we set Int.divisorsAntidiag 0 = ∅.
O(|z|). Computed from Nat.divisorsAntidiagonal.
Instances For
This lemma justifies its existence from its utility in crystallographic root system theory.
This lemma justifies its existence from its utility in crystallographic root system theory.