Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Primitive recursive function
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Addition=== A definition of the 2-ary function <math>Add</math>, to compute the sum of its arguments, can be obtained using the primitive recursion operator <math>\rho</math>. To this end, the well-known equations :<math>\begin{array}{rcll} 0+y & = & y & \text{ and} \\ S(x)+y & = & S(x+y) & . \\ \end{array}</math> are "rephrased in primitive recursive function terminology": In the definition of <math>\rho(g,h)</math>, the first equation suggests to choose <math>g = P_1^1</math> to obtain <math>Add(0,y) = g(y) = y</math>; the second equation suggests to choose <math>h = S \circ P_2^3</math> to obtain <math>Add(S(x),y) = h(x,Add(x,y),y) = (S \circ P_2^3)(x,Add(x,y),y) = S(Add(x,y))</math>. Therefore, the addition function can be defined as <math>Add = \rho(P_1^1,S \circ P_2^3)</math>. As a computation example, :<math>\begin{array}{lll} & Add(1,7) \\ = & \rho(P_1^1,S \circ P_2^3) \; (S(0),7) & \text{ by Def. } Add, S \\ = & (S \circ P_2^3)(0,Add(0,7),7) & \text{ by case } \rho(g,h) \; (S(...),...) \\ = & S(Add(0,7)) & \text{ by Def. } \circ, P_2^3 \\ = & S( \; \rho(P_1^1,S \circ P_2^3) \; (0,7) \; ) & \text{ by Def. } Add \\ = & S(P_1^1(7)) & \text{ by case } \rho(g,h) \; (0,...) \\ = & S(7) & \text{ by Def. } P_1^1 \\ = & 8 & \text{ by Def. } S . \\ \end{array}</math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)