I need some help with an exercise in set theory, which is about certain constant functions.
Let $S$ be a stationary subset of a regular uncountable cardinal $\lambda$. Given an ordinal $\alpha$, let $c_\alpha^\lambda$ denote the constant function with domain $\lambda$ and range $\{\alpha\}$.
Letting $\psi,\varphi$ range over all ordinal-valued functions with domain $\lambda$, define $$\varphi<_S\psi\mbox{ if and only if }\{\delta\in S\mid \varphi(\delta)≥\psi(\delta)\}\mbox{ is non-stationary}.$$ The relation $<_S$ is well-founded, so we can use it to define a rank $\|\cdot\|_S$ by recursion as $$ \|\psi\|_S=\bigcup\{\|\varphi\|_S+1\mid \varphi<_S\psi\}. $$
How can we prove that, for all $\alpha\in{\rm Ord}$, $\|c_\alpha^\lambda\|_S \ge\alpha$ holds?
How can we determine the value of $\|c_\alpha^\lambda\|_S$ for all $\alpha<\lambda$?
Can we prove that $\|c_\lambda^\lambda\|_S >\lambda$?
Note that $\alpha\mapsto\|c_\alpha^\lambda\|_S$ is strictly increasing (trivially): After all, $$\{\delta\in S\mid c_\beta^\lambda(\delta)\ge c_\alpha^\lambda(\delta)\}=\{\delta\in S\mid\beta\ge \alpha\}=\emptyset$$ if $\beta<\alpha$. This immediately gives that $\|c_\alpha^\lambda\|_S\ge\alpha$ for all $\alpha$.
Suppose now that $f<c_\alpha^\lambda$. This means that $\{\delta\in S\mid f(\delta)\ge \alpha\}$ is non-stationary, or, what is the same, $f(\delta)<\alpha$ for almost every $\delta\in S$. If, in addition, $\alpha<\lambda$, then in fact $f(\delta)<\delta$ for almost every $\delta\in S$. Use Fodor's lemma to conclude that $f$ coincides with some $c_\beta^\lambda$ for some $\beta<\alpha$ ("coincides" in the sense of $=_S$, where $f=_S g$ implies in particular that $\|f\|_S=\|g\|_S$). This should give you that $\|c_\alpha^\lambda\|_S=\alpha$ for all $\alpha<\lambda$.
Finally, check that the identity map is above all $c_\alpha^\lambda$, $\alpha<\lambda$, and below $c_\lambda^\lambda$.