# What are the steps to derive the original GAN loss function from the generalized version?

I am trying to understand how the loss function from the original GAN paper

$$\min_{G} \max_{D} V(D, G)=\mathbb{E}_{\boldsymbol{x} \sim p_{\text {data }}(\boldsymbol{x})}[\log D(\boldsymbol{x})]+\mathbb{E}_{\boldsymbol{z} \sim p_{\boldsymbol{z}}(\boldsymbol{z})}[\log (1-D(G(\boldsymbol{z})))]$$

relates to generalization in the Nagarajan & Kolter (2017)

$$\min_{G} \max_{D} V(D, G)=\mathbb{E}_{\boldsymbol{x} \sim p_{\text {data }}(\boldsymbol{x})}[f(D(x))]+\mathbb{E}_{\boldsymbol{z} \sim p_{\boldsymbol{z}}(\boldsymbol{z})}[f(-D(G(z)))]$$

where supposedly the original loss function could be recovered via

$$f(x) = -\log(1 + \exp(-x))$$

But when I try to substitute $$f$$ into the generalized version of the loss function I am not getting the original one. What would be the correct steps to recover the original loss function?

Rewrite the first formula, consider the output from $$D(x)$$ is the real value, it will become:
$$\min_{G} \max_{D} V(D, G)=\mathbb{E}_{\boldsymbol{x} \sim p_{\text {data }}(\boldsymbol{x})}[\log {\frac{1}{1+exp(-D(x))}})]+\mathbb{E}_{\boldsymbol{z} \sim p_{\boldsymbol{z}}(\boldsymbol{z})}[\log (1-\frac{1}{1+exp(-D(G(z)))})]$$