[Solved]: How to show that f(x) is primitive recursive?

Problem Detail: 

Let $$f(x)=begin{cases} x quad text{if Goldbach’s conjecture is true } 0 quad text{otherwise}end{cases}$$ Show that f(x) is primitive recursive.

I know a primitive recursive function is obtained by composition or recursion, but I don’t know what should I do about this problem.

Asked By : Gigili

Answered By : Dave Clarke

Goldbach’s conjecture is either true or false. Do a case analysis on the two possibilities. In one case, $f(x)=x$, which is primitive recursive. In the other case, $f(x)=0$, which is also primitive recursive. Therefore $f$ is primitive recursive.
Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/6122