[Math] Showing unique prime factorization in first-order logic

logicprime factorizationprime numbers

Suppose I have the symbols $\{\neg, \rightarrow, =, <,\cdot, \leftrightarrow,\land, \lor \}$ and functions $Div(x,y)$ ($x$ divides $y$), $Prime(x)$ true if $x$ is a prime, and domain $\mathbb{N}$. How can I construct a formula that expresses the fact that every number greater than 0 has unique prime factorization?

My thought requires the ability to have ellipses, to show for example for a number $k$ it is that $\exists a_1,\ldots,a_k$ such that $a_1^{n_1}\cdots a_{j}^{n_j}= k$ for $j \leq k$. For example, $4 = 2^2$.

Something like this, I don't know.

How can I construct such a formula?

Best Answer

The challenge here is that there is no a priori bound on the number of factors. So, to express the fundamental theorem of arithmetic in a first-order theory such as Peano arithmetic, you first need to show that the theory is able to express the idea of quantifying over finite sequences. The machinery to do this is well understood; one commonly used method is the $\beta$ function introduced by Kurt Gödel.

The general idea is that the final sentence will say "for every $n > 1$ there is a finite sequence $\sigma$ such that (1) each number appearing in $\sigma$ is prime, and (2) $n$ is the product of the numbers appearing in $\sigma$."