How I can prove that $f(x) = g(x)$ is a primitive recursive function, where $f(x)$ and $g(x)$ is a primitive recursive function.
Thank you!
How I can prove that $f(x) = g(x)$ is a primitive recursive function, where $f(x)$ and $g(x)$ is a primitive recursive function.
Thank you!
You can't! ... since that is a relation, not a function!
However, you can prove that the characteristic function of this relation is primitive recursive, where the characteristic function returns $1$ if the relation holds, and $0$ if not.
For example, you can easily show that the 'modified difference' function $f(x,y) = x \dot- y$ is primitive recursive, where:
$$x \dot- y = \begin{cases} x - y &x \ge y\\ 0 & x < y\\ \end{cases} $$
You can also easily show the 'signum' function $sg(x)$ to be primitive recursive, where:
$$sg(x) = \begin{cases} 1 &x > 0\\ 0 & x= 0\\ \end{cases} $$
And now the characteristic function $c_{=}(x,y)$ for the relation $x = y$ can be defined as:
$$c_{=}(x,y) = (1-sg(x \dot- y))*(1-sg(y \dot- x))$$
So finally, the characteristic function of your relation $f(x)=g(x)$ is given by:
$$c_{=}(f(x),g(x))$$
Since $c_s$, $f$, and $g$ are primitive recursive functions, that means that this characteristic function is primitive resursive as well, and that means that the relation $f(x) = g(x)$ itself is a primitive recursive relation.