orderedFactorization_equiv_sigma
For 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 of n and an ordered factorization t of d, via l ↦ (product of the tail, tail) and (d, t) ↦ (n/d) :: t.
Statement
theorem orderedFactorization_equiv_sigma (n : ℕ) (hn : 1 < n) :
Nonempty ({l : List ℕ // (∀ a ∈ l, 1 < a) ∧ l.prod = n} ≃
Σ d : n.properDivisors, {t : List ℕ // (∀ a ∈ t, 1 < a) ∧ t.prod = d.1})- Source
- arXiv:2611.18194 (The Möbius function of factorizations with a simple prime factor): helper for the recursion of H(m) (Section 3)
- Verified
- 17 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or… - LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder.
- TotalPreorderA total preorder: a preorder where
- Used by 2
- orderedFactorization_finiteEvery natural number has finitely many ordered 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 establishes a bijection between the ordered factorizations of n > 1 and pairs (d, t) where d is a proper divisor of n and t is an ordered factorization of d. The forward map sends a list l = a :: t to (t.prod, t), where the product of the tail is verified to be a proper divisor of n. The inverse map prepends n / d to t, where n / d > 1 because d < n divides n. Left and right invertibility follow by verifying that the head cancels to a in one direction and that the tail product equals d in the other.
Any list of natural numbers strictly greater than 1 has a strictly positive product.
Since every element a of the list satisfies a > 1, in particular a > 0. 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)
For any ordered factorization l of n, the product of the tail of l is a proper divisor of n.
The list l cannot be empty because its product is n > 1. Writing l = a :: t, its product is a * t.prod = n. Since a > 1 and t.prod > 0, t.prod divides n with quotient a, and t.prod < a * t.prod = n. Thus t.prod is a proper divisor of n.
uses
List.prod_cons,List.tail_cons,Nat.mem_properDivisors,mul_commhave tail_mem : ∀ l : List ℕ, (∀ a ∈ l, 1 < a) → l.prod = n → l.tail.prod ∈ n.properDivisors := by intro l h1 h2 cases l with | nil => simp at h2; omega | cons a t => have ha := h1 a (by simp) have ht := hpos t (fun b hb => h1 b (by simp [hb])) simp only [List.prod_cons] at h2 simp only [List.tail_cons, Nat.mem_properDivisors] refine ⟨⟨a, by rw [← h2, mul_comm]⟩, ?_⟩ rw [← h2] nlinarith
For any list whose elements are all strictly greater than 1, every element of its tail is also strictly greater than 1.
Any element of the tail belongs to the original list by List.mem_of_mem_tail, so the condition holds immediately.
uses
List.mem_of_mem_tailhave tail_ok : ∀ l : List ℕ, (∀ a ∈ l, 1 < a) → ∀ a ∈ l.tail, 1 < a := fun l h1 a ha => h1 a (List.mem_of_mem_tail ha)
For any proper divisor d of n, the quotient n / d is strictly greater than 1.
By definition of proper divisor, d divides n and d < n. Writing n = d * k, d cannot be 0 since n > 1, so d > 0. Then n / d = k by Nat.mul_div_cancel_left. From d = d * 1 < d * k, cancelling d via Nat.lt_of_mul_lt_mul_left gives 1 < k.
uses
Nat.mem_properDivisors.mp,Nat.eq_zero_or_pos,Nat.mul_div_cancel_left,Nat.lt_of_mul_lt_mul_lefthave head_ok : ∀ d ∈ n.properDivisors, 1 < n / d := by intro d hd obtain ⟨⟨k, hk⟩, hlt⟩ := Nat.mem_properDivisors.mp hd have hd0 : 0 < d := by rcases Nat.eq_zero_or_pos d with h | h · subst h; simp at hk; omega · exact h rw [hk, Nat.mul_div_cancel_left k hd0] rw [hk] at hlt have : d * 1 < d * k := by simpa using hlt exact Nat.lt_of_mul_lt_mul_left this
The equivalence maps are defined: toFun decomposes l into (tail product, tail), and invFun maps (d, t) to (n / d) :: t.
The forward map sends l to its tail product (a proper divisor by tail_mem) and its tail (a valid ordered factorization by tail_ok). The inverse map constructs the candidate list (n / d) :: t from a pair (d, t).
refine ⟨ { toFun := fun l => ⟨⟨l.1.tail.prod, tail_mem l.1 l.2.1 l.2.2⟩, ⟨l.1.tail, tail_ok l.1 l.2.1, rfl⟩⟩ invFun := fun s => ⟨(n / s.1.1) :: s.2.1, ?_, ?_⟩ left_inv := ?_ right_inv := ?_ }⟩
Every element of (n / d) :: t is strictly greater than 1.
By List.mem_cons, an element is either the head n / d or in the tail t. The head exceeds 1 by head_ok, and elements of t exceed 1 by the assumption that t is an ordered factorization of d.
uses
List.mem_cons· intro a ha simp only [List.mem_cons] at ha rcases ha with rfl | ha · exact head_ok _ s.1.2 · exact s.2.2.1 a ha
The product of (n / d) :: t is equal to n.
By List.prod_cons, the product is (n / d) * t.prod = (n / d) * d. Since d divides n, Nat.div_mul_cancel simplifies this to n.
uses
List.prod_cons,Nat.div_mul_cancel,Nat.mem_properDivisors.mp· rw [List.prod_cons, s.2.2.2] exact Nat.div_mul_cancel (Nat.mem_properDivisors.mp s.1.2).1
The inverse map is a left inverse of the forward map.
Given an ordered factorization l, it cannot be empty since its product is n > 1. Writing l = a :: t, the forward map produces (t.prod, t) and the inverse reconstructs (n / t.prod) :: t. Since n = a * t.prod and t.prod > 0, Nat.mul_div_cancel yields n / t.prod = a, recovering the original list.
uses
Subtype.ext,List.tail_cons,List.cons.injEq,and_true,List.prod_cons,Nat.mul_div_cancel· rintro ⟨l, h1, h2⟩ cases l with | nil => simp at h2; omega | cons a t => apply Subtype.ext simp only [List.tail_cons, List.cons.injEq, and_true] have ht := hpos t (fun b hb => h1 b (by simp [hb])) rw [← h2, List.prod_cons, Nat.mul_div_cancel _ ht]The inverse map is a right inverse of the forward map.
Applying the forward map to (n / d) :: t extracts its tail t and the tail product t.prod. Since t is an ordered factorization of d, t.prod = d, so both the divisor component and the factorization component match the original pair.
uses
Sigma.subtype_ext,Subtype.ext· rintro ⟨⟨d, hd⟩, t, ht1, ht2⟩ apply Sigma.subtype_ext · apply Subtype.ext simp [ht2] · rfl
and_true- Conjunction with True simplifies to the proposition itself.
List.cons.injEq- Two cons lists are equal if and only if their heads are equal and their tails are equal.
List.mem_cons- An element belongs to b :: l if and only if it equals b or belongs to l.
List.mem_of_mem_tail- Any element in the tail of a list is also in the list itself.
List.prod_cons- The product of a cons list a :: l is a * l.prod.
List.prod_pos- A list whose elements are all strictly positive has a strictly positive product.
List.tail_cons- The tail of a :: as is as.
mul_comm- Multiplication is commutative.
Nat.div_mul_cancel- If n divides m, then (m / n) * n = m.
Nat.eq_zero_or_pos- Every natural number is either zero or strictly positive.
Nat.lt_of_mul_lt_mul_left- If a * b < a * c for natural numbers, then b < c.
Nat.mem_properDivisors- A natural number d is a proper divisor of n if and only if d divides n and d < n.
Nat.mem_properDivisors.mp- If d is a proper divisor of n, then d divides n and d < n.
Nat.mul_div_cancel- For n > 0, (m * n) / n = m.
Nat.mul_div_cancel_left- For n > 0, (n * m) / n = m.
Sigma.subtype_ext- Two elements of a sigma type of subtypes are equal if their first components match and the underlying values of their second components match.
Subtype.ext- Two elements of a subtype are equal if their underlying values are equal.
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_equiv_sigma (n : ℕ) (hn : 1 < n) : Nonempty ({l : List ℕ // (∀ a ∈ l, 1 < a) ∧ l.prod = n} ≃ Σ d : n.properDivisors, {t : List ℕ // (∀ a ∈ t, 1 < a) ∧ t.prod = d.1}) := by 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) have tail_mem : ∀ l : List ℕ, (∀ a ∈ l, 1 < a) → l.prod = n → l.tail.prod ∈ n.properDivisors := by intro l h1 h2 cases l with | nil => simp at h2; omega | cons a t => have ha := h1 a (by simp) have ht := hpos t (fun b hb => h1 b (by simp [hb])) simp only [List.prod_cons] at h2 simp only [List.tail_cons, Nat.mem_properDivisors] refine ⟨⟨a, by rw [← h2, mul_comm]⟩, ?_⟩ rw [← h2] nlinarith have tail_ok : ∀ l : List ℕ, (∀ a ∈ l, 1 < a) → ∀ a ∈ l.tail, 1 < a := fun l h1 a ha => h1 a (List.mem_of_mem_tail ha) have head_ok : ∀ d ∈ n.properDivisors, 1 < n / d := by intro d hd obtain ⟨⟨k, hk⟩, hlt⟩ := Nat.mem_properDivisors.mp hd have hd0 : 0 < d := by rcases Nat.eq_zero_or_pos d with h | h · subst h; simp at hk; omega · exact h rw [hk, Nat.mul_div_cancel_left k hd0] rw [hk] at hlt have : d * 1 < d * k := by simpa using hlt exact Nat.lt_of_mul_lt_mul_left this refine ⟨ { toFun := fun l => ⟨⟨l.1.tail.prod, tail_mem l.1 l.2.1 l.2.2⟩, ⟨l.1.tail, tail_ok l.1 l.2.1, rfl⟩⟩ invFun := fun s => ⟨(n / s.1.1) :: s.2.1, ?_, ?_⟩ left_inv := ?_ right_inv := ?_ }⟩ · intro a ha simp only [List.mem_cons] at ha rcases ha with rfl | ha · exact head_ok _ s.1.2 · exact s.2.2.1 a ha · rw [List.prod_cons, s.2.2.2] exact Nat.div_mul_cancel (Nat.mem_properDivisors.mp s.1.2).1 · rintro ⟨l, h1, h2⟩ cases l with | nil => simp at h2; omega | cons a t => apply Subtype.ext simp only [List.tail_cons, List.cons.injEq, and_true] have ht := hpos t (fun b hb => h1 b (by simp [hb])) rw [← h2, List.prod_cons, Nat.mul_div_cancel _ ht] · rintro ⟨⟨d, hd⟩, t, ht1, ht2⟩ apply Sigma.subtype_ext · apply Subtype.ext simp [ht2] · rfl