Solution (source code)

= Solution

Suppose $V=L$. If $x\in L_{\omega_1}$, then $x\in L_\alpha$ for some <countable ordinal> $\alpha$. The set $L_\alpha$ is transitive and countable, so the <transitive closure> of $x$ lies in a countable set. Thus $x$ is <hereditarily countable set>[hereditarily countable], proving
$$
L_{\omega_1}\subseteq H_{\aleph_1}.
$$

Conversely, let $x\in H_{\aleph_1}$ and choose a sufficiently large $L_\theta$ containing $x$. By the <Downward Lowenheim-Skolem theorem>, there is a countable elementary substructure $N\prec L_\theta$ that contains every member of $\operatorname{TC}(\{x\})$. The <Mostowski collapse theorem> gives a transitive collapse of $N$, and the <condensation lemma for the constructible universe> identifies it with $L_\beta$ for a countable ordinal $\beta$. Because $N$ contains the transitive closure of $x$ pointwise, the collapse fixes $x$. Thus $x\in L_\beta\subseteq L_{\omega_1}$. Hence
$$
\boxed{L_{\omega_1}=H_{\aleph_1}.}
$$