Fundamental theorem of arithmetic --- existence
ProvedFundamentalTheoremOfArithmetic.fta_existenceThis is the existence half of the Fundamental Theorem of Arithmetic (Apostol, Introduction to Analytic Number Theory, 1976, Theorem 1.9): every nonzero natural number can be written as a product of primes.
Here ranges over multisets of natural numbers — a multiset is an unordered collection that tracks how many times each element occurs. The witnessing multiset need not be unique at this stage; that is the content of the companion uniqueness milestone. For , the empty multiset witnesses the claim, since the empty product equals .
This lemma alone gives every nonzero integer some representation as a product of primes, without yet ruling out that a different product of primes could give the same value.
Formalization Note. The factorization is represented as Multiset ℕ, and l.prod denotes the product of its elements with multiplicity, under the convention that the empty multiset has product .
import Mathlib
namespace FundamentalTheoremOfArithmetic
theorem fta_existence (n : ℕ) (hn : n ≠ 0) :
∃ l : Multiset ℕ, (∀ p ∈ l, p.Prime) ∧ l.prod = n := by sorry
end FundamentalTheoremOfArithmeticRead-back
What the Lean code literally says, in plain math · claude-sonnet-5
This theorem is stated for a single natural number , together with the hypothesis (so the zero case is excluded from the claim entirely). Under this hypothesis, the theorem asserts:
Concretely: there exists a multiset of natural numbers (a finite unordered collection allowing repeats) such that every element of satisfies Nat.Prime p --- Mathlib's standard primality predicate on (asserting and having no divisors other than and ) --- and such that the product of all elements of , taken in the commutative monoid , equals . The product is Multiset.prod, i.e. the multiset elements multiplied together with multiplicity, under the convention that the product of the empty multiset is (so would only witness the case ).
No claim of uniqueness is made: the statement is purely existential (, not ), so it does not assert that is the unique such multiset, nor does it say anything about the multiset being sorted, canonical, or related to any specific factorization algorithm. There is no claim about what happens when ; that case is excluded by the hypothesis and the theorem is vacuously silent about it. The only free variable is , universally quantified via the theorem's own argument binder, with as the sole hypothesis; is existentially bound within the conclusion. No typeclass assumptions beyond the ambient structure of and Multiset ℕ are used.
Confirmed by the mission captain (proposal self-audit).