Primitive recursive function: Difference between revisions

Content deleted Content added
mNo edit summary
n+1 must be rewritten in sub to S(n) to be formal correct
Line 48:
 
::sub(0,''x'')=''P''<sub>0</sub><sup>1</sup>(''x'')
::sub(S(''n''+1),''x'')=pred(''P''<sub>0</sub><sup>3</sup>(sub(''n'',''x''),''n'',''x''))
 
:(Note that for the sake of simplicity, the order of the arguments has been switched from the "standard" definition to fit the requirements of primitive recursion, i.e. sub(''a'',''b'') corresponds to ''b''-''a''. This could easily be rectified using composition with suitable projections.)