Divisor Count Function is Primitive Recursive

Theorem
The tau function is primitive recursive.

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

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

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

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

1 & : y \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 $\sum_{y = 1}^n$.

Hence the result.