Specific composition of probability kernels yields a probability kernel Question: Let $(X, \mathcal{X})$, $(Y,\mathcal{Y})$ and $(Z,\mathcal{Z})$ be measurable spaces. Let $\kappa_1:X \times \mathcal{Y} \to [0,1]$ and $\kappa_2:X \times Y \times \mathcal{Z} \to [0,1]$ be probability kernels.
Then, is the following $\kappa:X \times \mathcal{Z} \to [0,1]$ a probability kernel?
$$
\kappa(x,S) := \int_{y \in Y} \kappa_2(x,y,S) \kappa_1(x)(dy)
$$
Definitions: The integral is the Lebesgue integral with respect to measure $\kappa_1(x)$. $\kappa_2: (X \times Y) \times \mathcal{Z} \to [0,1]$ is a probability kernel in the sense that the $\sigma$-algebra on $X \times Y$ is generated in the usual way (by $\mathcal{X} \times \mathcal{Y}$).
 A: The following Lemma comes from How to construct Markov kernels into a product measurable space? :

Let $\kappa_1:X \times \mathcal{Y} \to [0,1]$ and $\kappa_1':X \times \mathcal{Z} \to [0,1]$ be probability kernels for measurable spaces $(X, \mathcal{X})$, $(Y, \mathcal{Y})$ and $(Z, \mathcal{Z})$. Then, $\kappa_1 \times \kappa_1':X \times \mathcal{P} \to [0,1]$ is a probability kernel, where
  $$
\kappa_1 \times \kappa_1'(x) = \kappa_1(x) \times \kappa_1'(x)
$$
  $\mathcal{P}$ is the $\sigma$-algebra on $Y \times Z$ generated by $\mathcal{Y} \times \mathcal{Z}$. $\kappa_1(x) \times \kappa_1'(x)$ is the product of the two measures $\kappa_1(x)$ and $\kappa_1'(x)$. This product exists and is unique (because $\kappa_1(x)$ and $\kappa_1'(x)$ are probability measures).

Then, let $\kappa_1'' := \kappa_1 \times \delta$, where $\delta:X \times \mathcal{X} \to [0,1]$ with $\delta(x)(S) = [x \in S]$ is the dirac delta.
\begin{align*}
\kappa(x,S) &= \int_{y \in Y} \kappa_2(x,y,S) \kappa_1(x)(dy) \\
&= \int_{x' \in X} \delta(x)(dx') \int_{y \in Y} \kappa_2(x',y,S) \kappa_1(x)(dy) && \text{property of dirac delta} \\
&= \int_{(x',y) \in X \times Y} \kappa_2(x',y,S) (\delta(x) \times \kappa_1(x))(d(x',y)) && \text{Fubini} \\
&= \int_{(x',y) \in X \times Y} \kappa_2(x',y,S) (\delta \times \kappa_1)(x)(d(x',y)) \\
&= \int_{(x',y) \in X \times Y} \kappa_2(x',y,S) \kappa_1''(x)(d(x',y)) \\
&= (\kappa_1'' >=> \kappa_2)(x)(S)
\end{align*}
The last line describes a probability kernel because it describes Kleisli composition of the probability kernels $\delta \times \kappa_1$ and $\kappa_2$.
