Divisor Count Function is Primitive Recursive

Theorem
The tau function is primitive recursive.

Proof
The tau function $\tau: \N \to \N$ is defined as:
 * $\displaystyle \tau \left({n}\right) = \sum_{d \mathop \backslash n} 1$

where $\displaystyle \sum_{d \mathop \backslash n}$ is the sum over all divisors of $n$.

Thus we can define $\tau \left({n}\right)$ as:
 * $\displaystyle \tau \left({n}\right) = \sum_{y \mathop = 1}^n \operatorname{div} \left({n, y}\right)$

where
 * $\operatorname{div} \left({n, y}\right) = \begin{cases}

1 & : y \mathop \backslash n \\ 0 & : y \nmid n \end{cases}$

Hence $\tau$ is defined by substitution from:
 * the primitive recursive function $\operatorname{div}$
 * the primitive recursive bounded summation $\displaystyle \sum_{y \mathop = 1}^n$.

Hence the result.