In information theory, the joint entropy $H(X,Y)$ of a pair of discrete random variables $(X,Y)$ is defined as:

$$
H(X,Y) = -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}p(x,y)log\_2p(x,y)\tag{1}\label{eq1}
$$

And the conditional entropy $H(Y \mid X)$ of the same $(X,Y)$ as:

$$
H(Y \mid X) = -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}p(x,y)log\_2p(y\mid x)\tag{2}\label{eq2}
$$

With the chain rule of probability, the theorem:

$$
H(X,Y) = H(X)+H(Y \mid X)\tag{3}\label{eq3}
$$

is another interpretation of the joint entropy for $(X,Y)$.

A corollary of this theorem is:
$$
H(X,Y \mid Z) = H(X \mid Z)+H(Y \mid X,Z)
$$

Proof:

\begin{align}
H(X,Y \mid Z) &= -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}\sum\_{z\in \mathcal Z}p(x,y,z)log\_2p(x,y \mid z) \\
 &= -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}\sum\_{z\in \mathcal Z}p(x,y,z)log\_2p(y \mid z,x)p(x\mid z) \\
 &= -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}\sum\_{z\in \mathcal Z}p(x,y, z)log\_2p(x\mid z) -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}\sum\_{z\in \mathcal Z}p(x,y,z)log\_2p(y \mid z,x)\\
&= -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}\sum\_{z\in \mathcal Z}p(y\mid x,z)p(x,z)log\_2p(x\mid z) -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}\sum\_{z\in \mathcal Z}p(x,y,z)log\_2p(y \mid z,x)\\
&= -\sum\_{x\in \mathcal X}\sum\_{z\in \mathcal Z}p(x,z)log\_2p(x\mid z) -\sum\_{x\in \mathcal X}\sum\_{y\in \mathcal Y}\sum\_{z\in \mathcal Z}p(x,y,z)log\_2p(y \mid z,x)\\
&= H(X \mid Z)+H(Y \mid X,Z)
\end{align}

I would like to know if it is right.