Example. Formal examples of inductively defined functions [00KN]
We have seen two informal examples of inductive definitions in Example [00KL]; we will now update these examples in light of Definition [00KM]:
- For every m: \mathbb {N}, function \mathsf {add}{\mathopen {}\left (m,-\right )\mathclose {}}\colon \mathbb {N}\to \mathbb {N} is the function \mathbf {\rho }_{m,{\mathopen {}\left (i,n\right )\mathclose {}}\mapsto n+1} inductively defined by m:\mathbb {N} and f{\mathopen {}\left (i,n\right )\mathclose {}} = n+1.
- The function \Sigma \colon \mathbb {N}\to \mathbb {N} taking n:\mathbb {N} to \sum _{0\leq i<n}i is the function \mathbf {\rho }_{0,\mathsf {add}} inductively defined by 0:\mathbb {N} and \mathsf {add}\colon \mathbb {N}\times \mathbb {N}\to \mathbb {N}.