title: Prolog: nat(s(s(0))) to "normal" decimal numbers
body: <p>If an integers is defined like this in Prolog:</p>
  
  <pre><code>nat(0).
  nat(s(X)) :- nat(X).
  </code></pre>
  
  <p>How do I convert such a number to a decimal number?</p>
  
  <p>The input is for example:</p>
  
  <blockquote>
    <p>s(s(s(0)))</p>
  </blockquote>
  
  <p>I probably should add that I am very new to Prolog.</p>
  
  <p>EDIT:
  I tried it this way:</p>
  
  <pre><code>nat(0).
  nat(s(X)) :- nat(X).
  
  convert(N, C) :-
      C is C + 1,
      nat(N),
      convert(N, C).
  </code></pre>