AFTD Auto-Formalizing Theoretical Domains

orderedFactorizationCount_eq_sum_properDivisors

theoremverifiedformalization

For 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 proper divisor d.

Statement

theorem orderedFactorizationCount_eq_sum_properDivisors (m : ℕ) (hm : 1 < m) :
    orderedFactorizationCount m = ∑ d ∈ m.properDivisors, orderedFactorizationCount d
Formalizes
arXiv:2611.18194 (The Möbius function of factorizations with a simple prime factor), Section 3: the recursion H(m) = Σ_{d|m, d<m} H(d) for m > 1
Verified
17 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • orderedFactorizationCountH(m), the number of ordered factorizations of m: the number of finite sequences of integers greater than 1 whose product is m, with H(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…
  • orderedFactorization_finiteEvery natural number has finitely many ordered factorizations into integers greater than 1.
Used by 1

Read back from the Lean

For every natural number $m$ strictly greater than $1$, the ordered factorization count of $m$ is equal to the sum over all proper divisors $d$ of $m$ of the ordered factorization count of $d$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

Any ordered factorization of an integer m > 1 can be uniquely viewed as a non-trivial first factor m/d > 1 followed by an ordered factorization of the proper divisor d. The proof uses this bijection between the ordered factorizations of m and the disjoint union of ordered factorizations over all proper divisors d of m. Since each proper divisor has only finitely many factorizations, the cardinality of the disjoint union equals the sum of the cardinalities of the fibers, yielding the recurrence.

  1. There is a bijection between ordered factorizations of m and pairs (d, t) where d is a proper divisor of m and t is an ordered factorization of d.

    Applying orderedFactorization_equiv_sigma with the hypothesis m > 1 produces an explicit equivalence e between the type of ordered factorizations of m and the dependent sum (sigma type) of ordered factorizations of proper divisors d of m.

    line 3

    uses orderedFactorization_equiv_sigma

      obtain ⟨e⟩ := orderedFactorization_equiv_sigma m hm
  2. For every proper divisor d of m, the type of ordered factorizations of d is finite.

    For each proper divisor d, orderedFactorization_finite applied to d.1 establishes that the collection of ordered factorizations of d is finite. This finiteness condition is required by the cardinality theorem for dependent sums.

    lines 4–6

    uses orderedFactorization_finite

      have : ∀ d : m.properDivisors,
          Finite {t : List ℕ // (∀ a ∈ t, 1 < a) ∧ t.prod = d.1} :=
        fun d => orderedFactorization_finite d.1
  3. The number of ordered factorizations of m equals the sum of the numbers of ordered factorizations of its proper divisors.

    Unfolding orderedFactorizationCount on the left-hand side gives the cardinality of the factorizations of m. Rewriting by Nat.card_congr e replaces this with the cardinality of the sigma type. Because each fiber is finite and the set of proper divisors is finite, Nat.card_sigma turns this into a sum over proper divisors of the fiber cardinalities. Finally, rewriting the right-hand sum over the finset into a sum over the subtype using Finset.sum_coe_sort makes both sides definitionally equal sums of orderedFactorizationCount d, which rfl closes.

    lines 7–9

    uses orderedFactorizationCount, Nat.card_congr, Nat.card_sigma, Finset.sum_coe_sort

      rw [orderedFactorizationCount, Nat.card_congr e, Nat.card_sigma,
        ← Finset.sum_coe_sort m.properDivisors]
      rfl
orderedFactorization_equiv_sigma
For n > 1, the type of ordered factorizations of n is equivalent to the disjoint union (sigma type), over all proper divisors d of n, of the ordered factorizations of d.
orderedFactorization_finite
For any natural number n, the type of ordered factorizations of n (lists of integers greater than 1 with product n) is finite.
orderedFactorizationCount
The definition of the ordered factorization count of m as the cardinality (Nat.card) of the type of lists of integers greater than 1 whose product is m.
Nat.card_congr
If two types are equivalent (in bijection), their cardinalities (Nat.card) are equal.
Nat.card_sigma
The cardinality of a disjoint union (sigma type) over a finite index type with finite fibers is the sum of the cardinalities of the fibers.
Finset.sum_coe_sort
A sum over a finite set (Finset) equals the sum over the corresponding subtype.

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

theorem orderedFactorizationCount_eq_sum_properDivisors (m : ℕ) (hm : 1 < m) :    orderedFactorizationCount m = ∑ d ∈ m.properDivisors, orderedFactorizationCount d := by  obtain ⟨e⟩ := orderedFactorization_equiv_sigma m hm  have : ∀ d : m.properDivisors,      Finite {t : List ℕ // (∀ a ∈ t, 1 < a) ∧ t.prod = d.1} :=    fun d => orderedFactorization_finite d.1  rw [orderedFactorizationCount, Nat.card_congr e, Nat.card_sigma,    ← Finset.sum_coe_sort m.properDivisors]  rfl
See it in the graphDiscuss this resultChallenge it