How is G(z) related to x in GAN proof? In the proofs for the original GAN paper, it is written:

$$∫_x p_{data}(x) \log D(x)dx+∫_zp(z)\log(1−D(G(z)))dz
=∫_xp_{data}(x)\log D(x)+p_G(x) \log(1−D(x))dx$$

I've seen some explanations asserting that the following equality is the key to understanding:

$$E_{z∼p_z(z)}log(1−D(G(z)))=E_{x∼p_G(x)}log(1−D(x))$$

which is a consequence of the LOTUS theorem and $x_g = g(z)$. Why is $x_g = g(z)$?
It's not supposed to be derived from some equation. That is the basic premise under which GANs work. The output of the Generator $G(z)$ is fed as an input $x_g$ to the discriminator.