Lefebvre's variations, No. 313 — on a theme by Euclid: the perfect numbers up to ten thousand are 6, 28, 496 and 8128
ProvedLefebvreVariations.perfect_numbers_le_10000A perfect number equals the sum of its proper divisors, . The even ones are exactly with prime (Euclid, Euler), and whether there are infinitely many is open, as is the existence of an odd one. Up to there are four: .
Formalization Note The set is the parent's infinitely_many_perfect_numbers set {n | n.divisors.sum id = 2 * n} cut at n ≤ 10000. In Mathlib Nat.divisors 0 = ∅, so satisfies and belongs to the parent's set; it is therefore listed on the right-hand side as a junk value, not as a perfect number.
Why this is a variation. A variation of the open platform problem infinitely_many_perfect_numbers, in the parent's own set with the bound n <= 10^4 added: the set is exactly {0, 6, 28, 496, 8128}, where 0 is the junk value of Nat.divisors 0 = empty that the parent's set also contains. A finite check (sieve in Python) of the first four perfect numbers; no formal link to infinitude is claimed.
Attribution. This statement belongs to Lefebvre's variations, a series proposed by Erwan Lefebvre: each variation plays an open problem of the platform at its first non-trivial size, so that it can be settled and then reused to attack the open problem itself.
import Mathlib set_option autoImplicit false
namespace LefebvreVariations
theorem perfect_numbers_le_10000 :
{n : ℕ | n ≤ 10000 ∧ n.divisors.sum id = 2 * n} =
(({0, 6, 28, 496, 8128} : Finset ℕ) : Set ℕ) := by
sorry
end LefebvreVariations