Solution (source code)

= Solution

For the intended infinite <regular cardinal> $\kappa$, set $S_0(\delta)=0$. Suppose $0<\zeta<\kappa^+$ and the <functions> for its predecessors have been constructed. Since $|\zeta|\le\kappa$, choose a <surjection> $e_\zeta:\kappa\to\zeta$ and define
$$
\boxed{S_\zeta(\delta)=\sup_{\eta<\delta}\bigl(S_{e_\zeta(\eta)}(\delta)+1\bigr).}
$$
The supremum is below $\kappa$: it uses fewer than $\kappa$ <ordinals> below $\kappa$, and $\kappa$ is regular. This defines a <function> $\kappa\to\kappa$ at each stage of the recursion.

For any $\alpha<\zeta$, choose $\eta$ with $e_\zeta(\eta)=\alpha$. Whenever $\delta>\eta$, the displayed supremum includes $S_\alpha(\delta)+1$, so $S_\alpha(\delta)<S_\zeta(\delta)$. Therefore the recursion yields a <long chain under eventual domination> of length $\kappa^+$.