[proofplan]
The information function of the partition is constant on each atom of the measurable partition, with value $-\log \mu(A)$ on an atom $A$ of positive measure. We first isolate the positive-measure atoms, since zero-measure atoms do not contribute to the integral but may carry the value $+\infty$. Then we write the information function, up to a $\mu$-null set, as a countable sum of nonnegative weighted indicator functions and compute its integral directly from the definition of the [nonnegative Lebesgue integral](/page/Lebesgue%20Integral). The resulting series is exactly the entropy series of the partition.
[/proofplan]
[step:Separate the positive-measure atoms from the null atoms]
Let $I_\mu(\alpha):X\to[0,\infty]$ denote the information function of the measurable partition $\alpha$, defined by $I_\mu(\alpha)(x)=-\log\mu(A)$ when $x$ belongs to the atom $A\in\alpha$, with the convention $-\log 0=+\infty$.
Define
\begin{align*}
\alpha_+ = \{A \in \alpha : \mu(A)>0\}.
\end{align*}
Since $\alpha$ is countable, $\alpha_+$ is countable. Choose an enumeration indexed by a set $J$, where $J$ is either a finite set $\{1,\dots,N\}$ for some $N \in \mathbb N$ or $J=\mathbb N$, such that
\begin{align*}
\alpha_+ = \{A_k : k \in J\}.
\end{align*} For each $k \in J$, define the nonnegative number
\begin{align*}
c_k = -\log \mu(A_k).
\end{align*}
Because $(X,\mathcal B,\mu)$ is a probability space by hypothesis and $\mu(A_k)>0$, we have $0<\mu(A_k)\leq \mu(X)=1$, hence $c_k \in [0,\infty)$.
Let
\begin{align*}
N_\alpha = X \setminus \bigcup_{k \in J} A_k.
\end{align*}
Then $N_\alpha$ is the union of all atoms in $\alpha$ having $\mu$-measure $0$. Since $\alpha$ is countable and the atoms in a partition are pairwise disjoint, the countable additivity axiom for the measure $\mu$ gives $\mu(N_\alpha)=0$.
[/step]
[step:Represent the information function as a countable simple expansion]
For every $x \in X \setminus N_\alpha$, there is a unique $k \in J$ such that $x \in A_k$, and therefore
\begin{align*}
I_\mu(\alpha)(x) = c_k.
\end{align*}
Equivalently, on $X \setminus N_\alpha$,
\begin{align*}
I_\mu(\alpha)(x) = \sum_{k \in J} c_k \mathbb{1}_{A_k}(x).
\end{align*}
The function
\begin{align*}
S: X \to [0,\infty]
\end{align*}
defined by
\begin{align*}
S(x)=\sum_{k \in J} c_k \mathbb{1}_{A_k}(x)
\end{align*}
is $\mathcal B$-measurable because each $A_k$ belongs to $\mathcal B$ and $S$ is a pointwise countable sum of nonnegative [measurable functions](/page/Measurable%20Functions). The set $N_\alpha$ is $\mathcal B$-measurable as the complement of a countable union of elements of $\mathcal B$. On $X\setminus N_\alpha$ we have $I_\mu(\alpha)=S$, while on $N_\alpha$ the atom containing $x$ has $\mu$-measure $0$, so $I_\mu(\alpha)(x)=+\infty$ by the convention $-\log 0=+\infty$. Hence $I_\mu(\alpha)$ is $\mathcal B$-measurable. We now prove in this case that changing the value on $N_\alpha$ does not change the nonnegative integral. Since $S\leq I_\mu(\alpha)$ pointwise, monotonicity of the [nonnegative Lebesgue integral](/page/Lebesgue%20Integral) gives
\begin{align*}
\int_X S(x)\,d\mu(x) \leq \int_X I_\mu(\alpha)(x)\,d\mu(x).
\end{align*}
Conversely, let $\varphi:X\to[0,\infty)$ be a nonnegative [simple function](/page/Simple%20Function) with $\varphi\leq I_\mu(\alpha)$. Define $\psi:X\to[0,\infty)$ by $\psi(x)=\varphi(x)\mathbb{1}_{X\setminus N_\alpha}(x)$. Then $\psi\leq S$, and because $\mu(N_\alpha)=0$, the definition of the integral of a simple function gives
\begin{align*}
\int_X \varphi(x)\,d\mu(x)=\int_X \psi(x)\,d\mu(x)\leq \int_X S(x)\,d\mu(x).
\end{align*}
Taking the supremum over all such $\varphi$ in the definition of the nonnegative integral gives
\begin{align*}
\int_X I_\mu(\alpha)(x)\,d\mu(x) \leq \int_X S(x)\,d\mu(x).
\end{align*}
Therefore
\begin{align*}
\int_X I_\mu(\alpha)(x)\,d\mu(x) = \int_X S(x)\,d\mu(x).
\end{align*}
[guided]
The only subtle point is that atoms of measure zero can make $I_\mu(\alpha)$ take the value $+\infty$, because we use the convention $-\log 0=+\infty$. These atoms should not affect the integral, but we must justify that carefully.
We defined $\alpha_+=\{A\in\alpha:\mu(A)>0\}$ and enumerated it as $\{A_k:k\in J\}$. For each positive-measure atom $A_k$, the information value on that atom is the finite number
\begin{align*}
c_k=-\log\mu(A_k).
\end{align*}
This is finite and nonnegative because $0<\mu(A_k)\leq 1$.
Now define
\begin{align*}
N_\alpha = X \setminus \bigcup_{k \in J} A_k.
\end{align*}
This set is precisely the union of the atoms of $\alpha$ whose measure is $0$. Since the partition is countable and its atoms are pairwise disjoint, the countable additivity axiom for the measure $\mu$ gives $\mu(N_\alpha)=0$. Thus changing a nonnegative measurable function on $N_\alpha$ does not change its Lebesgue integral; below we verify this directly for the two functions at hand.
For $x \in X\setminus N_\alpha$, the point $x$ belongs to exactly one positive-measure atom $A_k$. Therefore
\begin{align*}
I_\mu(\alpha)(x)= -\log \mu(A_k)=c_k.
\end{align*}
The indicator expansion
\begin{align*}
S(x)=\sum_{k \in J} c_k\mathbb{1}_{A_k}(x)
\end{align*}
has exactly the same value: all indicator terms vanish except the single term corresponding to the atom containing $x$. The set $N_\alpha$ is measurable because it is the complement of the measurable set $\bigcup_{k\in J}A_k$. On $N_\alpha$, the atom containing $x$ has measure $0$, so the convention $-\log 0=+\infty$ gives $I_\mu(\alpha)(x)=+\infty$. Thus $I_\mu(\alpha)$ is measurable: it agrees with the measurable function $S$ on the measurable set $X\setminus N_\alpha$ and equals the constant value $+\infty$ on the measurable set $N_\alpha$.
Hence $I_\mu(\alpha)=S$ outside the null set $N_\alpha$. We verify the integral equality from the definition of the nonnegative integral. First, $S\leq I_\mu(\alpha)$ pointwise, because the two functions agree on $X\setminus N_\alpha$ and $S=0\leq +\infty=I_\mu(\alpha)$ on $N_\alpha$. Monotonicity gives
\begin{align*}
\int_X S(x)\,d\mu(x)\leq\int_X I_\mu(\alpha)(x)\,d\mu(x).
\end{align*}
For the reverse inequality, take any nonnegative simple function $\varphi:X\to[0,\infty)$ satisfying $\varphi\leq I_\mu(\alpha)$. Remove its values on the null set by defining $\psi:X\to[0,\infty)$ by $\psi(x)=\varphi(x)\mathbb{1}_{X\setminus N_\alpha}(x)$. On $X\setminus N_\alpha$ we have $I_\mu(\alpha)=S$, so $\psi\leq S$ there; on $N_\alpha$ we have $\psi=0\leq S$. Thus $\psi\leq S$ on all of $X$. Since $\mu(N_\alpha)=0$, deleting the values of a simple function on $N_\alpha$ does not change its simple-function integral, so
\begin{align*}
\int_X \varphi(x)\,d\mu(x)=\int_X \psi(x)\,d\mu(x)\leq\int_X S(x)\,d\mu(x).
\end{align*}
Taking the supremum over all nonnegative simple functions $\varphi\leq I_\mu(\alpha)$ gives
\begin{align*}
\int_X I_\mu(\alpha)(x)\,d\mu(x)\leq\int_X S(x)\,d\mu(x).
\end{align*}
Combining the two inequalities yields
\begin{align*}
\int_X I_\mu(\alpha)(x)\,d\mu(x)=\int_X S(x)\,d\mu(x).
\end{align*}
[/guided]
[/step]
[step:Integrate the countable atom expansion]
For each finite subset $F \subset J$, define the simple function
\begin{align*}
S_F: X \to [0,\infty)
\end{align*}
by
\begin{align*}
S_F(x)=\sum_{k \in F} c_k\mathbb{1}_{A_k}(x).
\end{align*}
Because the atoms $A_k$ are pairwise disjoint, the integral of $S_F$ is
\begin{align*}
\int_X S_F(x)\,d\mu(x)=\sum_{k \in F} c_k\mu(A_k).
\end{align*}
Order the finite subsets of $J$ by inclusion. The net $(S_F)$ over finite $F \subset J$ is increasing and has pointwise supremum $S$. The monotone convergence property built into the [nonnegative Lebesgue integral](/page/Lebesgue%20Integral) gives
\begin{align*}
\int_X S(x)\,d\mu(x)=\sup_{F \subset J,\, F \text{ finite}} \int_X S_F(x)\,d\mu(x).
\end{align*}
Using the preceding simple-function computation, this becomes
\begin{align*}
\int_X S(x)\,d\mu(x)=\sup_{F \subset J,\, F \text{ finite}} \sum_{k \in F} c_k\mu(A_k).
\end{align*}
Since all terms $c_k\mu(A_k)$ are nonnegative, the countable series over $J$ is defined as the supremum of its finite partial sums, and therefore
\begin{align*}
\int_X S(x)\,d\mu(x)=\sum_{k \in J} c_k\mu(A_k).
\end{align*}
Substituting $c_k=-\log\mu(A_k)$ gives
\begin{align*}
\int_X S(x)\,d\mu(x)=\sum_{k \in J} -\mu(A_k)\log\mu(A_k).
\end{align*}
[/step]
[step:Identify the resulting series with entropy]
Since $\{A_k:k\in J\}$ is exactly the collection of atoms $A\in\alpha$ with $\mu(A)>0$, the final series is the defining entropy series for the partition:
\begin{align*}
\sum_{k \in J} -\mu(A_k)\log\mu(A_k)=\sum_{A \in \alpha,\, \mu(A)>0} -\mu(A)\log\mu(A)=H_\mu(\alpha).
\end{align*}
Combining this identity with the equality of integrals from the previous steps yields
\begin{align*}
\int_X I_\mu(\alpha)(x)\,d\mu(x)=H_\mu(\alpha).
\end{align*}
This proves the claimed identity, with both sides allowed to be $+\infty$.
[/step]