Recursive functions: $\mathbb{N}_0^k \to \mathbb{N}_0$
Class of recursive functions:
The minimal subclass of the class of all the functions $f: \mathbb{N}_0^k \to \mathbb{N}, k=1,2, \dots$ that contains the
- $f(x)=c$ (constants)
- $S(x)=x+1$ (successor)
- $P_n^m(x_1, \dots, x_m)=x_n \ (m \geq n)$ (projections)
and is closed under the following
If $h,g_1, \dots, g_n: \mathbb{N}_0^m \to \mathbb{N}_0$ are recursive then $f(\overline{x})=h(g_1(\overline{x}), \dots, g_n(\overline{x})): \mathbb{N}_0^m \to \mathbb{N}$ is recursive . (composition)
If $g: \mathbb{N}_0^{k-1} \to \mathbb{N}_0$ and $h: \mathbb{N}_0^{k+1} \to \mathbb{N}_0$ are recursive then $f: \mathbb{N}_0^k \to \mathbb{N}_0$ is also recursive $$f(0,\overline{y})=g(\overline{y}) \\ f(x+1, \overline{y})=h(x, f(x, \overline{y}), \overline{y})$$ (recursion)
If $g$ is recursive and $\forall \overline{x} \ \exists z \ g(z, \overline{x})=0\\ f(\overline{x})=\mu z \ (g(z, \overline{x})=0)= \min \{ z \in \mathbb{N}_0 \mid g(z, \overline{x})=0\}$
If $A \subset \mathbb{N}_0^k$ then $A$ is a recursive set iff the characteristic function of $A$ is recursive.
I want to show that the following functions and sets are recursive:
- $f(x,y)=x+y$
- $f(x,y)=xy$
- $\DeclareMathOperator{sign}{sign}\sign(x)=\begin{cases} 1 &, x=0 \\ 0 & , x>0 \end{cases}.$
- $f(x)=\begin{cases} 1 &, g(x)=0 \\ 0 &, h(x)=0 \end{cases}$, under the term that $g,h: \mathbb{N}_0 \to \mathbb{N}_0$ are recursive and $\forall x(g(x)h(x)=0, g(x)+h(x)>0)$
- $f(y)=\prod_{x=0}^y g(x)$
- $B = \{ y \mid \exists x \leq y \ x \in A \}, C = \{ y \mid \forall x \leq y \ x \in A\}$ if $A$ recursive.
- $x \dot{-} y=\left\{\begin{matrix} x-y &, x \geq y \\ 0 &, \text{otherwise} \end{matrix}\right.$
- $f(y)=\sum_{x=0}^y g(x)$ if $g$ is recursive
Since I haven't seen any example, could you maybe explain to me with an example how we show that a specific function is recursive using the above definition?