When I learn recursive theory, I see a lemma that says, in the language of arithmetic, $(0, S, +, \cdot)$, if a Theory $T$ which $T\vdash (0 \text{ and } 0 \neq S(0))$, and a relation $R$ belongs to $N^k$, then $R$ is representable in $T$ iff $\chi_R$ (aka its characteristic function) is representable (as a function) in $T$.
This lemma seems straightforward however I can't figure out a clear proof. Can anyone help to explain how to prove this lemma?
Hint. If $\varphi(x)$ represents $R$ (and to reduce clutter, let's just consider the case where $R$ is one-place), then to represent the function $\chi_R$, put
$$\varphi'(x, y) =_{def} (\varphi(x)\wedge y =0) \vee (\neg\varphi (x)\wedge y = 1).$$
(if like Gödel you use '0' for true and '1' for false).
If that hint isn't enough, see §16.1 of my Intro to Gödel's Theorems which is freely downloadable from https://www.logicmatters.net/igt -- the result you want is Theorem 16.1 (I use "capturing" for "representing").