Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If we want to show primitive recursion for

sgn(x) = 0 if x = 0 and 1 otherwise

Is it enough to say that sgn(0) = 0 and sgn(x+1) = 1?

Is there any details omitting here or anything needed to be polished?

Also, to show that x monus y = (x-y) if x >= y and 0 otherwise, where we have the monus function N^2 --> N as primitive recusive, is it enough to say that:

x monus 1 is primitive recursive as 0 monus 1 = 0, but not sure what else to continue here.

share|cite|improve this question
up vote 3 down vote accepted

Your first one is fine. For the second one, $x \dot{-} 1$ is primitive recursive, so you can set up a primitive recursion for $x\dot{-} y$ using this.

$$x \dot{-} 0 = x $$

$$x \dot{-} (a+1) = (x \dot{-} a) \dot{-} 1 $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.