- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
I have to show that the following functions and sets are primitive recursive:
The basic primitive functions are the constant, the succesor $S(x)$, the projection $P_n^m(x_1, \cdot , x_m)=x_n, m \geq n$.
Is this correct?? (Wondering) Could I improve something?? (Wondering)
For the last one we have that a set is primitive recursive iff its characteristic function is primitive recursive, right??
Could you explain to me how I could apply this?? (Wondering)
I have to show that the following functions and sets are primitive recursive:
- $$f(x,y)=x+y$$
- $$f(x,y)=x \cdot y$$
- $$sign (x)=\left\{\begin{matrix}
1 &\text{ if } x=0\\
0 &\text{ if } x>0
\end{matrix}\right. $$
- $$x \dot - y=\left\{\begin{matrix}
x-y &\text{ if } x \geq y\\
0 &\text{ else }
\end{matrix}\right. $$
- $$f(x)=\left\{\begin{matrix}
1 & \text{ if } g(x)=0 \\
0 & \text{ if } h(x)=0
\end{matrix}\right. \\ g,h: \mathbb{N}_0\rightarrow \mathbb{N}_0 \text{ primitive recursive and } \forall x: g(x) \cdot h(x)=0, g(x)+h(x)>0 $$
- $$f(y)=\sum_{x=0}^y g(x) \text{ if } g \text{ is primitive recursive } $$
- $$f(y)=\prod_{x=0}^y g(x) \text{ if } g \text{ is primitive recursive } $$
- $$\{y \mid \exists x \leq y : x \in A\}, \{y \mid \forall x \leq y : x \in A\} \text{ if } A \text{ is primitive recursive}$$
The basic primitive functions are the constant, the succesor $S(x)$, the projection $P_n^m(x_1, \cdot , x_m)=x_n, m \geq n$.
- $$f(0,y)=P_1^1(y) \\ f(x+1,y)=S(P_2^3(x,f(x,y),y))=S \circ P_2^3(x,f(x,y),y)$$
- $$f(0,y)=0 (\text{ constant } ) \\
f(x+1, y)=(x+1)\cdot y=x \cdot y +1 =S(P_2^3(x,f(x,y),y))=S \circ P_2^3(x,f(x,y),y)$$
- $$sign(0)=1 ( \text{ constant } ) \\
sign(x+1)=0 (\text{ constant } ) $$
- $$f(x,y)=x \dot - y \\ f(0,y)=0 (\text{ constant } ) \\
f(x+1,y)=\left\{\begin{matrix}
x+1-y=(x-y)+1=S(P_2^3(x,f(x,y),y))=S \circ P_2^3(x,f(x,y),y) &\text{ if } x+1 \geq y\\
0 &\text{ else }
\end{matrix}\right. $$
- $$f(0)=\left\{\begin{matrix}
1 & \text{ if } g(0)=0 \\
0 & \text{ if } h(0)=0
\end{matrix}\right. \\ \Rightarrow f(0) \text{ constant } \\
f(x+1)=\left\{\begin{matrix}
1 & \text{ if } g(x+1)=0 \\
0 & \text{ if } h(x+1)=0
\end{matrix}\right. \\ \Rightarrow f(x+1) \text{ constant } $$
- $$f(0)=\sum_{x=0}^0 g(x)=g(0)$$ which is a primitive recursive function, since $g$ is a primitive function
$$f(y+1)=\sum_{x=0}^{y+1} g(x)=\sum_{x=0}^y g(x) + g(y+1)=f(y)+g(y+1)=sum(f(y),g(y+1))$$
where $sum(x,y)$ is the first function $f(x,y)=x+y$.
But this is not of the form $h(y,f(y))$ What could I change?? Should I use a composition?? But with which function ??
- $$ f(0)=\prod_{x=0}^0 g(x)=g(0)$$ which is a primitive recursive function, since $g$ is a primitive function
$$f(y+1)=\prod_{x=0}^{y+1} g(x)=\left (\prod_{x=0}^y g(x) \right ) \cdot g(y+1)= f(y) \cdot g(y+1)=prod(f(y), g(y+1))$$
where $prod(x,y)$ is the first function $f(x,y)=x \cdot y$.
But this is not of the form $h(y,f(y))$ What could I change?? Should I use a composition?? But with which function ??
Is this correct?? (Wondering) Could I improve something?? (Wondering)
For the last one we have that a set is primitive recursive iff its characteristic function is primitive recursive, right??
Could you explain to me how I could apply this?? (Wondering)