How to write a recursive definition for the constant function?

444 Views Asked by At

I know that we can define the constant function as a function $f: \mathbb{N} \rightarrow \mathbb{N}$ by lettting:

$f(0) = c$

$f(n+1) = c$

Let $g = z$ so that $g(n) = 0$ for all $n \in \mathbb{N}$

Let $h = s$

Let $h_1 = \pi_n^n$

Then we can write a recursive definition of the constant function $f: \mathbb{N} \rightarrow \mathbb{N}$ as follows:

$f(0) = h_1(g, s(g), s(s(g)), s(s(s(g)))...)$

$f(n) = h_1(g, s(g), s(s(g)), s(s(s(g)))...)$

Am I on the right track here?