orderedFactorization_finite
Every natural number has finitely many ordered factorizations into integers greater than 1.
Statement
theorem orderedFactorization_finite (n : ℕ) :
Finite {l : List ℕ // (∀ a ∈ l, 1 < a) ∧ l.prod = n}- Source
- arXiv:2611.18194 (The Möbius function of factorizations with a simple prime factor): helper for H(m) (Section 3)
- Verified
- 17 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- orderedFactorization_equiv_sigmaFor n > 1, the ordered factorizations of n (lists of integers > 1 with product n) are in bijection with pairs (d, t) of a proper divisor d…
- Used by 2
- setOf_isNatFactorization_finiteEvery natural number has only finitely many factorizations into integers greater than 1.
- orderedFactorizationCount_eq_sum_properDivisorsFor m > 1, H(m) = Σ_{d | m, d < m} H(d): an ordered factorization of m is its first factor m/d > 1 followed by an ordered factorization of…
The proof, explained
The proof proceeds by strong induction on n. When n = 0 there are no valid factorizations because any product of integers strictly greater than 1 is positive, and when n = 1 the only valid factorization is the empty list, so both base cases are finite. For n > 1, `orderedFactorization_equiv_sigma` establishes a bijection between the ordered factorizations of n and the disjoint union over all proper divisors d of n of the factorizations of d. Since each proper divisor satisfies d < n, each fiber is finite by the induction hypothesis, and a finite union of finite sets is finite.
We proceed by strong induction on n.
We set up strong induction on n, giving us the induction hypothesis `ih` that every natural number m < n has finitely many ordered factorizations.
uses
Nat.strong_induction_oninduction n using Nat.strong_induction_on with | _ n ih =>
Any list of integers strictly greater than 1 has a strictly positive product.
Since every element a of such a list satisfies 1 < a, each element is strictly positive (0 < a). By `List.prod_pos`, the product of the list is strictly positive.
uses
List.prod_poshave hpos : ∀ l : List ℕ, (∀ a ∈ l, 1 < a) → 0 < l.prod := fun l hl => List.prod_pos (fun a ha => by have := hl a ha; omega)
It suffices to consider three cases: n = 0, n = 1, and 1 < n.
Linear arithmetic over the natural numbers establishes the trichotomy n = 0 ∨ n = 1 ∨ 1 < n, splitting the induction step into three cases.
rcases (by omega : n = 0 ∨ n = 1 ∨ 1 < n) with rfl | rfl | hn
When n = 0, the set of ordered factorizations is empty, hence finite.
Any valid list of factors has a strictly positive product by the helper lemma, which contradicts having product 0. Thus the subtype of factorizations is empty (`IsEmpty`), which immediately implies it is finite.
· have : IsEmpty {l : List ℕ // (∀ a ∈ l, 1 < a) ∧ l.prod = 0} := ⟨fun l => (hpos l.1 l.2.1).ne' l.2.2⟩ infer_instance
When n = 1, the only ordered factorization is the empty list, so the set has at most one element and is finite.
We prove an auxiliary lemma `hnil` showing that any valid list factorizing 1 must be empty: if it were non-empty with head a, then a would divide 1, forcing a = 1 by `Nat.eq_one_of_mul_eq_one_right`, contradicting a > 1. Consequently, any two factorizations of 1 are equal to [], making the subtype a `Subsingleton` via `Subtype.ext`, which is therefore finite.
uses
List.prod_cons,Nat.eq_one_of_mul_eq_one_right,Subtype.ext· have : Subsingleton {l : List ℕ // (∀ a ∈ l, 1 < a) ∧ l.prod = 1} := by constructor have hnil : ∀ l : List ℕ, (∀ a ∈ l, 1 < a) → l.prod = 1 → l = [] := by intro l h1 h2 cases l with | nil => rfl | cons a t => have ha := h1 a (by simp) simp only [List.prod_cons] at h2 have := Nat.eq_one_of_mul_eq_one_right h2 omega rintro ⟨x, hx1, hx2⟩ ⟨y, hy1, hy2⟩ exact Subtype.ext ((hnil x hx1 hx2).trans (hnil y hy1 hy2).symm) infer_instance
For every proper divisor d of n, the set of ordered factorizations of d is finite.
By definition of proper divisors (`Nat.mem_properDivisors.mp`), every proper divisor d of n satisfies d < n. Applying the strong induction hypothesis `ih` to d yields that the set of ordered factorizations of d is finite.
uses
Nat.mem_properDivisors.mp· have : ∀ d : n.properDivisors, Finite {t : List ℕ // (∀ a ∈ t, 1 < a) ∧ t.prod = d.1} := fun d => ih d.1 (Nat.mem_properDivisors.mp d.2).2
When 1 < n, the set of ordered factorizations of n is finite.
By `orderedFactorization_equiv_sigma`, factorizations of n correspond bijectively to pairs (d, t) where d is a proper divisor of n and t is an ordered factorization of d. Because the proper divisors of n form a finite set and each fiber is finite by the previous step, this dependent sum is finite; transporting finiteness across the bijection with `Finite.of_equiv` completes the proof.
uses
orderedFactorization_equiv_sigma,Finite.of_equivobtain ⟨e⟩ := orderedFactorization_equiv_sigma n hn exact Finite.of_equiv _ e.symm
Nat.strong_induction_on- Strong induction principle on ℕ: to prove a property holds for n, it suffices to prove it for n assuming it holds for all m < n.
List.prod_pos- If every element in a list of numbers is strictly positive, then the product of the list is strictly positive.
List.prod_cons- The product of a non-empty list `a :: l` is equal to `a` times the product of `l`.
Nat.eq_one_of_mul_eq_one_right- If the product of two natural numbers is 1, then the first factor must be 1.
Subtype.ext- Two elements of a subtype are equal if their underlying values are equal.
Nat.mem_properDivisors.mp- A natural number is a proper divisor of n if and only if it divides n and is strictly less than n.
orderedFactorization_equiv_sigma- For n > 1, the ordered factorizations of n into integers greater than 1 are in bijection with pairs (d, t), where d is a proper divisor of n and t is an ordered factorization of d.
Finite.of_equiv- A type is finite if it is in bijection with a type known to be finite.
- Lean automatically infers the finiteness of empty types, subsingletons, and dependent sums indexed by a finite set through typeclass resolution (`infer_instance`), so the finiteness of the sigma type in the final step requires no explicit proof steps.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem orderedFactorization_finite (n : ℕ) : Finite {l : List ℕ // (∀ a ∈ l, 1 < a) ∧ l.prod = n} := by induction n using Nat.strong_induction_on with | _ n ih => have hpos : ∀ l : List ℕ, (∀ a ∈ l, 1 < a) → 0 < l.prod := fun l hl => List.prod_pos (fun a ha => by have := hl a ha; omega) rcases (by omega : n = 0 ∨ n = 1 ∨ 1 < n) with rfl | rfl | hn · have : IsEmpty {l : List ℕ // (∀ a ∈ l, 1 < a) ∧ l.prod = 0} := ⟨fun l => (hpos l.1 l.2.1).ne' l.2.2⟩ infer_instance · have : Subsingleton {l : List ℕ // (∀ a ∈ l, 1 < a) ∧ l.prod = 1} := by constructor have hnil : ∀ l : List ℕ, (∀ a ∈ l, 1 < a) → l.prod = 1 → l = [] := by intro l h1 h2 cases l with | nil => rfl | cons a t => have ha := h1 a (by simp) simp only [List.prod_cons] at h2 have := Nat.eq_one_of_mul_eq_one_right h2 omega rintro ⟨x, hx1, hx2⟩ ⟨y, hy1, hy2⟩ exact Subtype.ext ((hnil x hx1 hx2).trans (hnil y hy1 hy2).symm) infer_instance · have : ∀ d : n.properDivisors, Finite {t : List ℕ // (∀ a ∈ t, 1 < a) ∧ t.prod = d.1} := fun d => ih d.1 (Nat.mem_properDivisors.mp d.2).2 obtain ⟨e⟩ := orderedFactorization_equiv_sigma n hn exact Finite.of_equiv _ e.symm