Given an infinite cardinal $\kappa$, Goedel'sGödel's function is a well-known bijection $p:\kappa^2$ onto $\kappa$$p:\kappa^2\to\kappa$.
Is $p$ definable in the structure $<\kappa;\in>$$\langle\kappa;\in\rangle$?
Is $p$ definable in a bigger 2nd order structure $<\kappa;\mathcal P(\kappa);\in>$$\langle\kappa;\mathcal P(\kappa);\in\rangle$?
It looks like any typical attempt to code something like this (even + on ordinals) somehow refers to a pairing function.