Show that function is primitive recursive.

Having trouble with showing that function is primitive recursive. Have the following problem.

Let $f: \mathbb{N} \rightarrow \mathbb{N}$ be decreasing function. Show that $f$ is primitive recursive.

I see that $f$ will eventually decrease to a certain constant and that I could say that it is a constant function with over certain numbers which would make it primitive recursive. I don't think this is enough, however, and that I need something more.

if n = 1 then return ...

• So because I know that the function will turn into a constant at a certain point $n$ that is less than infinity I can say that the function will limited number of intructions which is pretty much the definition of primitive recursion. I think I got it now. – E.K. Apr 11 '17 at 13:45