Lambda definition of primitive recursion (source code)

= Lambda definition of primitive recursion

Using a <fixed-point combinator>, Church Boolean conditionals, a zero test, and a predecessor term, lambda-definable $g$ and $h$ give
$$
R\mathbf x0=g(\mathbf x),
\qquad
R\mathbf x(n+1)=h(\mathbf x,n,R\mathbf x n).
$$
Normal-order beta reduction evaluates only the selected conditional branch, so this term implements primitive recursion on <Church numeral>[Church numerals].