I have the next procedure for natural number is SWI-prolog:
natural_number(0). natural_number(s(X)) :- natural_number(X).
Now I want to do
natural_number(s(0), 0). natural_number(s(s(X)), N) :- natural_number(s(X), S), N is S + 1.