About the definition of hereditary cardinality I've seen these two definitions of sets that are hereditarily of cardinality $< \kappa$.

*

*$x$ is hereditarily of cardinality $< \kappa$ iff $|trcl(x)| < \kappa$


*$x$ is hereditarily of cardinality $< \kappa$ iff $|x| < \kappa $, and for all $y\in trcl(x)$, $|y| < \kappa$
According to this article (and also this answer), the two definitions agree when $\kappa$ is regular and don't agree when it is singular. I'm not very fluent with regular/singular cardinals, and the author of the cited answer said he couldn't find a reference that discusses these two definitions. Could anyone explain (in detail, if possible) why the above definitions are equivalent for regular cardinals and what goes wrong for singular ones? (I know that the cited question partially answers my second question ("the definition should include any cofinal subset of $\kappa$ with size less than $\kappa$" ), but I'd appreciate more details.)
 A: The one key point here is that $\kappa$ is a regular if and only if whenever $\lambda<\kappa$, and $\{A_i\mid i<\lambda\}$ is such that $|A_i|<\kappa$, then $|\bigcup\{A_i\mid i<\lambda\}|<\kappa$.
Now, if $\kappa$ is regular, note that $\operatorname{trcl}(x)=x\cup\bigcup x\cup\bigcup\bigcup x\cup\bigcup\bigcup\bigcup x\cup\dots$. If $|x|<\kappa$, and each $y\in x$ has cardinality less than $\kappa$, then $\bigcup x$ has size less than $\kappa$; inductively, the whole union, which is $\operatorname{trcl}(x)$, has size less than $\kappa$ (note that if $\kappa=\omega$, then these iterated $\bigcup$ operations must stabilise after a finite number of steps, too).
In the other direction, if $\operatorname{trcl}(x)$ is smaller than $\kappa$, then by the virtue of transitivity, whenever $y\in\operatorname{trcl}(x)$, it must also be a subset of $\operatorname{trcl}(x)$, as would $x$ itself be, so the 2nd definition must hold as well.

Now, if $\kappa$ is singular, there is some $\lambda<\kappa$ and $A_i$ for $i<\lambda$ such that $|A_i|<\kappa$, but $\bigcup A_i=\kappa$. For example, in the case of $\kappa=\aleph_\omega$, simply take $\lambda=\omega$ and $A_i=\aleph_i$.
But now the set $x=\{A_i\mid i<\lambda\}$ has size $\lambda<\kappa$; each of its elements is a subset of $\kappa$ of size $<\kappa$, and $\operatorname{trcl}(x)=\kappa\cup x$, so easily all of the elements there have size $<\kappa$ as well. But, alas, $\operatorname{trcl}(x)$ has size $\kappa$.
