Definition
Factorial ( Primitive Recursion)
Factorial
, with , is primitive-recursive. Its recursive equations are The base returns
; each step multiplies the previous result by the next natural number . Thus Here,
is a constant with no arguments, is the successor function, is multiplication, and denotes a projection function.
Construction
Factorial has no unchanged parameters: its only input
The step function receives the previous index
If
Example
Building successive factorials