Gluing lemma in optimal transport This thread is meant to record a question that I feel interesting during my self-study. I'm very happy to receive your suggestion and comments.

Gluing Lemma: Let $X,Y,Z$ be Polish spaces and $\mathcal P(X), \mathcal P(Y), \mathcal P(Z)$ the spaces of Borel probability measures on $X, Y, Z$ respectively. Let $\mu \in \mathcal P(X), \nu \in \mathcal P(Y), \omega \in \mathcal P(Z)$. Let $\pi_1 \in \Pi(\mu, \nu)$ and $\pi_2 \in \Pi(\nu, \omega)$. Let $P^{X \times Y}$ and $P^{Y \times Z}$ be the projection maps from $X \times Y \times Z$ to $X \times Y$ and $Y \times Z$ respectively. Then there is $\gamma \in \mathcal P(X \times Y \times Z)$ such that
$$
P^{X \times Y}_\sharp \gamma = \pi_1 \quad \text{and} \quad P^{Y \times Z}_\sharp \gamma = \pi_2.
$$
 A: 
Disintegration of Measures: Let $X, Z$ be Polish spaces, $f:X \to Z$ measurable, and $\pi \in \mathcal P (X)$. Let $\omega = f_\sharp \pi \in \mathcal P(Z)$ and $X_z := f^{-1} (z) \subset X$ for $z \in Z$. Then there is a family $\{\pi(\cdot |z)\}_{z\in Z}$ of Borel probability measures such that $\pi(\cdot |z) \in \mathcal P(X_z)$ and
$$
\int_X g \mathrm d \pi = \int_Z \int_{X_z} g(x) \mathrm d \pi (x|z) \mathrm d \omega (z)
$$
for all measurable function $g:X \to [0, +\infty]$. Moreover, $\{\pi(\cdot |z)\}_{z\in Z}$ is unique up to $\omega$-a.e.

By disintegration of measures,
$$
\pi_1 (A \times B) =\int_B  \pi_1(A |y) \mathrm d  \nu (y)
$$
for some family $\{\pi_1(\cdot |y)\}_{y \in Y} \subset \mathcal P(Y)$. Similarly,
$$
\pi_2 (B \times C) =\int_B  \pi_2(C |y) \mathrm d  \nu (y)
$$
for some family $\{\pi_2(\cdot |y)\}_{y \in Y} \subset \mathcal P(Y)$. Define a non-negative finite Borel measure $\gamma$ such that
$$
\gamma (A \times B \times C) := \int_B  \pi_1(A |y) \pi_2(C |y) \mathrm d  \nu (y).
$$
It's clear that  $\gamma$ is the required measure.
