Take the 2-minute tour ×
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.

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|improve this question

1 Answer 1

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|improve this answer

Your Answer

 
discard

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.