[guided]The goal is to compute entropy from finite symbolic data. We work on the product measurable space $(A^{\mathbb Z},\mathcal{B}(A^{\mathbb Z}))$, where $\mathcal{B}(A^{\mathbb Z})$ is the product $\sigma$-algebra, and we use the left shift
\begin{align*}
(\sigma x)_r:=x_{r+1}.
\end{align*}
For each time $r \in \mathbb{Z}$ and each symbol $a \in A$, the set
\begin{align*}
C_r(a) := \{x \in A^{\mathbb{Z}} : x_r = a\}
\end{align*}
records the event that the coordinate at time $r$ equals $a$. The finite partition
\begin{align*}
\mathcal{P}_r := \{C_r(a) : a \in A\}
\end{align*}
therefore records exactly one coordinate.
For $n \in \mathbb{N}$, the join
\begin{align*}
\mathcal{Q}_n := \bigvee_{r=0}^{n-1} \mathcal{P}_r
\end{align*}
records the word seen from time $0$ through time $n-1$. Its atoms are precisely the cylinders
\begin{align*}
C(a_0,\dots,a_{n-1}) := \{x \in A^{\mathbb{Z}} : x_0 = a_0,\dots,x_{n-1}=a_{n-1}\},
\end{align*}
with $(a_0,\dots,a_{n-1}) \in A^n$.
Because $\pi P=\pi$, the cylinder formula defining the stationary Markov measure is unchanged after shifting all time indices by $1$. Thus $\mu_{\pi,P}(\sigma^{-1}E)=\mu_{\pi,P}(E)$ first on cylinder sets $E$ and hence, by generation of the product $\sigma$-algebra by cylinders, on all measurable sets $E\subset A^{\mathbb{Z}}$. Therefore $(A^{\mathbb{Z}},\mathcal{B}(A^{\mathbb{Z}}),\mu_{\pi,P},\sigma)$ is a probability-preserving system.
Because the alphabet $A$ is finite, the one-coordinate partition $\mathcal{P}_0$ is finite. Its shifts distinguish all coordinates of a bi-infinite sequence, so the partitions $\sigma^{-r}\mathcal{P}_0$, with $r \in \mathbb{Z}$, generate the product $\sigma$-algebra on $A^{\mathbb{Z}}$. These are precisely the hypotheses needed for the Kolmogorov-Sinai generator theorem for a finite generating partition. Therefore the Kolmogorov-Sinai entropy of $\sigma$ is computed by the partition entropy rate of these finite block partitions:
\begin{align*}
h_{\mu_{\pi,P}}(\sigma)= \lim_{n \to \infty} \frac{1}{n} H_{\mu_{\pi,P}}(\mathcal{Q}_n).
\end{align*}
Here the entropy of $\mathcal{Q}_n$ is
\begin{align*}
H_{\mu_{\pi,P}}(\mathcal{Q}_n)
= -\sum_{(a_0,\dots,a_{n-1}) \in A^n}
\mu_{\pi,P}(C(a_0,\dots,a_{n-1}))
\log \mu_{\pi,P}(C(a_0,\dots,a_{n-1})).
\end{align*}
As usual for Shannon entropy, atoms of measure $0$ contribute nothing, so terms with zero measure are omitted.[/guided]