Solution
= Solution
Let $S(n)=n+1$ be the <successor function>. Define $f$ by <primitive recursion>
$$
f(0)=0,\qquad f(n+1)=S(S(f(n))).
$$
Induction gives $f(n)=2n$. Then define
$$
g(n)=S(f(n))=2n+1
$$
by composition. Initial functions, composition, and primitive recursion produce <primitive recursive functions>, so $f$ and $g$ are <partial recursive functions> and are visibly defined for every $n$. \b[Both functions are total.]