Consider the following two definitions
$\sigma$-algebra $\mathcal{G}$ is $\mathbb{P}$-dense in $\mathcal{F}$, if for every $E \in \mathcal{F}$ there exists $E' \in \mathcal{G}$ such that \begin{equation} \mathbb{P}[E \Delta E']=0, \end{equation} where $\Delta$ represents the symetric difference of sets.
Random variable $Y: \Omega \rightarrow \mathcal{Y}$ with a countable alphabet $\mathcal{Y}$ is called a generator of $(\Omega, \mathcal{F}, \mathbb{P}, \tau)$, where $\tau$ is a measure preserving function, if \begin{equation} \sigma\{Y, Y \circ \tau, \dots, Y \circ \tau^n, \dots\} \mbox{ is } \mathbb{P}\mbox{-dense in }\mathcal{F}. \end{equation}
Now given a measure-preserving function $\tau$ and random variable $X: \Omega \rightarrow \mathcal{X}$ with finite $\mathcal{X}$, we define the stationary process $\mathbb{X} = \{X \circ \tau^k, k=0,1, \dots\}$. It is stated here (https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-441-information-theory-spring-2016/lecture-notes/MIT6_441S16_chapter_8.pdf @ page 98-99) that if random variable Y is a generator of $(\Omega, \mathcal{F}, \mathbb{P}, \tau)$ then X is a function of $Y_0^{\infty}=(Y, Y\circ \tau, \dots, Y \circ \tau^n, \dots)$.
Could anyone please help me understand this result? I cannot really see how the generating property of the process $\mathbb{Y}=\{Y \circ \tau^k, k=0,1, \dots\}$ implies that $X$ must be a function of $Y_0^{\infty}$.
Denote $\mathcal X:=\left\{x_1,\dots,x_n\right\}$. For each $i\in \{1,\dots,n\}$, the set $\{X=x_i\}$ belongs to $\mathcal F$ hence there exists $A_i\in \sigma\{Y \circ \tau^n, n\in\mathbb N\}$ such that $\mathbb P\left(\{X=x_i\}\Delta A_i\right)=0$. Now define $Z=\sum_{i=1}^nx_i\mathbf 1_{A_i}$. Then $Z=X$ almost surely and $Z$ is a function of $Y_0^\infty$.