Solution (source code)

= Solution

Let regeneration cycles have lengths $C_i$, contain $A_i$ arrivals, and accrue queue-length reward
$$
R_i=\int_{\text{cycle }i}Q(t)dt.
$$
Fubini's geometric identity writes this area as the sum, over customers in the cycle, of their time in the system, up to boundary terms whose contribution vanishes over many cycles. The renewal-reward theorem therefore gives
$$
L=\frac{\mathbb ER_1}{\mathbb EC_1},
\qquad
\lambda=\frac{\mathbb EA_1}{\mathbb EC_1},
\qquad
W=\frac{\mathbb ER_1}{\mathbb EA_1}.
$$
Hence <Little law> is
$$
\boxed{L=\lambda W.}
$$