Note: this is [cross-posted](https://math.stackexchange.com/questions/3964161/coding-a-function-g-kappa-to-v-zeta1-by-an-element-of-v-zeta1) from MSE.  

This question is about the following remark (modified to be self-contained), found in Donald Martin's [book](https://www.math.ucla.edu/%7Edam/booketc/D.A._Martin,_Determinacy_of_Infinitely_Long_Games.pdf) on determinacy, page 340. The context is proving agreement between $V$ and some inner model $M$ containing a same extender (although this context doesn't seem to matter). Here, $\kappa$ is a cardinal and $\zeta\geq\kappa$ is any ordinal.



> 
> Any function $f:\kappa\to\zeta^+$ can be coded by a wellordering $R$ of $\zeta$ of ordertype sup(range($f$)) and a $\tilde g:\kappa\to \zeta$. **The pair $\langle R, \tilde g \rangle$ can be coded by a $g:\kappa\to V\_{\zeta+1}$. Such a $g$ can in turn be coded by an element of $V\_{\zeta+1}$**.
> 
> 
> 


I don't see why the sentences in bold are true. Or more specifically, I don't know how to construct such a coding (Gödel pairing might not work, because we don't know if $\zeta$ is closed under the Gödel pairing function). I'm particularly puzzled by the last statement, that we can code $g:\kappa\to V\_{\zeta+1}$ by an element of $V\_{\zeta+1}$. The [flat pairing](https://en.wikipedia.org/wiki/Ordered_pair#Quine%E2%80%93Rosser_definition) construction in the style of Quine seems to only produce a subset of $V\_{\zeta+1}$, hence an element of $V\_{\zeta+2}$.


The coding referred to in the first sentence is something like this: assume without loss of generality that $f:\kappa\to \zeta^+$ has range bounded by an ordinal $\alpha$ between $\zeta$ and $\zeta^+$. This is okay, because $\zeta^+$ is regular and we can always modify $f$ so that it sends something above $\zeta$. So $\alpha$ is the ordertype of some wellordering $R\subseteq(\zeta\times\zeta)$, and $\alpha$ has cardinality $\zeta$. Furthermore, if $g'$ is a bijection between $\alpha$ and $\zeta$, then we can define $\tilde g:\kappa\to\zeta$ by setting $\tilde g(x)=g'(f(x))$. So given such a wellordering $R$ and function $\tilde g$, we can recover $f$ by asking for the ordertype of $R$, and then seeing the pointwise preimage of $g'$.



Coding a function $g:\kappa\to V_{\zeta+1}$ by an element of $V_{\zeta+1}$
Fix a flat pairing function $p : V\times V\to V$. For any infinite ordinal $\alpha$, if $S$ is a binary relation on $V\_\alpha$,
let $A\_S = p[S]$, which is an element of $V\_{\alpha+1}$ coding $S$. The coding in the second sentence can be implemented by setting $g(0)$ equal $A\_R$ and $g(1+\alpha) = \tilde{g}(\alpha)$ for $\alpha < \kappa$. For the third sentence, note that any function $g : V\_\zeta\to V\_{\zeta+1}$ is coded by the binary relation $R\_g = \{(a,b)\in V\_\zeta\times V\_\zeta : b\in f(a)\}$, which in turn is coded by the set $A\_{R\_g}\in V\_{\zeta+1}$.


