Solution (source code)

= Solution
{c}

The <sigma-algebra generated by a random variable> $X$ is the smallest <sigma-algebra> on $\Omega$ making $X$ a <measurable function> into $(\mathbb R,\mathcal B(\mathbb R))$. Equivalently, it is the <intersection> of all <sigma-algebras> containing the <inverse images> $X^{-1}(C)$ of <Borel sets> $C$.

Let $\mathcal D=\{X^{-1}(C):C\in\mathcal B(\mathbb R)\}$. This collection is already a <sigma-algebra>: $X^{-1}(\mathbb R)=\Omega$,
$$
\bigl(X^{-1}(C)\bigr)^c=X^{-1}(C^c),\qquad
\bigcup_{j=1}^\infty X^{-1}(C_j)=X^{-1}\!\left(\bigcup_{j=1}^\infty C_j\right).
$$
The right-hand <sets> are in $\mathcal D$, since the <Borel sigma-algebra> is closed under the indicated operations. Any <sigma-algebra> making $X$ <measurable> must contain every member of $\mathcal D$. Conversely $\mathcal D$ makes $X$ <measurable> by definition. Hence
$$
\boxed{\sigma(X)=\{X^{-1}(C):C\in\mathcal B(\mathbb R)\}.}
$$
This equality holds exactly as a collection of <sets>, without completing the <sigma-algebra>.