Solution (source code)

= Solution

Let $Z$ be the well-mixed <gas-phase metallicity>, measured as a metal mass fraction. Removing gas into <stars> takes metals at rate $Z\psi$; prompt return restores existing metals at rate $ZF\psi$, together with newly synthesized metals at rate $Y(1-F)\psi$. Thus the <closed-box model of galactic chemical evolution> has metal budget
$$
\frac{d(M_gZ)}{dt}=-Z(1-F)\psi+Y(1-F)\psi.
$$
Expand the left side and use $\dot M_g=-(1-F)\psi$. The terms proportional to existing <gas-phase metallicity> cancel, leaving
$$
M_g\dot Z=Y(1-F)\psi.
$$
Since $\psi=kM_g$, initially pristine gas obeys
$$
\boxed{Z(t)=Y(1-F)kt=Y\lambda t.}
$$
The <stellar yield> here is per permanently locked mass, so inserting another factor $1-F$ into $Y$ would double-count recycling. The approximation treats metals as a trace constituent and ignores finite stellar-return delays. Apply it while $Y\lambda t\ll1$; the formal unlimited linear growth is not a physical prediction for almost entirely metallic gas.