**Setup:**
Suppose $X = \{X_n\}_{n\in\mathbb{Z}}$ is a stationary ergodic proces on the real line and let $A = \prod_{n\in\mathbb{Z}}A_n$ be a Borel measurable set such that
$$
P(X \in A) = P\left(X_n\in A_n \quad\forall n\in\mathbb{Z}\right) > 0.
$$
Finally, let $\tau:\mathbb{R}^\mathbb{Z}\rightarrow \mathbb{R}^\mathbb{Z}$ denote the shift.

**Question:**
I need the result that, almost surely, there are infinitely many $k\in\mathbb{Z}$ such that $\tau^k(X) \in A$. My question is two-fold

- Is my short proof below correct.
- Can the result also be shown by using more basis results on ergodic sequences, like Poincarre's recurrence theorem.

Thank you in advance!

**My proof:**
This uses Birkhoff's ergodic theorem and the fact that measurable functions of stationary ergodic sequences are also stationary ergodic. Define the sequence $\{Y_n\}_{n\in\mathbb{Z}}$ as $Y_n = 1 $ if $\tau^n(X) \in A$ and zero otherwise. Then $\{Y_n\}_{n\in\mathbb{Z}}$ is stationary ergodic and thus
$$
\lim_{k\rightarrow\infty}\frac{1}{k}\sum_{n=0}^{k-1}Y_n = E(Y) = P(A) > 0,
$$
which implies infinitely many of the $Y_n$ have to be equal to one.