Using von Neumann definition of ordinals, is it true that for all cardinal numbers $a$ and $b$ the following equation holds:
$$ a^b = |a^{(b)}| $$
where on the left side is the cardinal exponentiation defined as $$a^b := |\{f:b \rightarrow a\}|$$
and on the right side is the ordinal exponentiation a set
$$a^{(b)} := \{f \mid f:b \rightarrow a \text{ such that f(x) = 0 for all but finitely many elements x ∈ b} \} $$
with the lexicographical order with the least significant position first.
It's clear to me that the equality holds for finite $b$, but I think it isn't true for $b \geq \aleph_0$. If it isn't so, then what does $|a^{(b)}|$ equal for arbitrary ordinals $a$ and $b$?
No, if one of $a, b$ is is infinite, $a\geq 2$ and $b\geq 1$, then $\lvert a^{(b)}\rvert=\max(\lvert a\rvert,\lvert b\rvert)$.
To see this (rather, the nontrivial inequality), note that $a^{(b)}=\bigcup_{n\in\omega} A_n$, where $A_n$ consists of functions $b\to a$ with support of size $n$. On the other hand, we have a natural injection $A_n\to a^n\times [b]^n$, where $[b]^n$ consists of $n$-element subsets of $b$ (which injects naturally into $b^n$). Thus $$\lvert A_n\rvert\leq \lvert a^n\rvert\cdot \lvert [b]^n\rvert\leq (\lvert a\rvert+\aleph_0)\cdot (\lvert b\rvert +\aleph_0).$$
The conclusion follows.