I am reading The Algorithmic Foundations of Differential Privacy and get confused about the proof of Therom 3.6 on page 36:
Theorem 3.6. The Laplace mechanism preserves $(ε, 0)$-differential privacy. Proof. Let $x∈{\mathbb{N}}^{|\chi|}$ and $y∈{\mathbb{N}}^{|\chi|}$ be such that $||x − y||_1 ≤ 1$, and let $f(·)$ be some function $f : {\mathbb{N}}^{|\chi|} → {\mathbb{R}}^k$. Let $p_x$ denote the probability density function of $\mathcal{M}_L(x, f(·), ε)$ , and let $p_y$ denote the probability density function of $\mathcal{M}_L(y, f(·), ε)$. We compare the two at some arbitrary point $z ∈{\mathbb{R}}^k$ $$\begin{split} \frac{p_x(z)}{p_y(z)}&={\prod}^k_{i=1}(\frac{exp(-\frac{\varepsilon|f(x)_i-z_i|}{\Delta f})}{exp(-\frac{\varepsilon|f(y)_i-z_i|}{\Delta f})})\\ &={\prod}^k_{i=1}exp(\frac{\varepsilon(|f(y)_i-z_i|-|f(x)_i-z_i|)}{\Delta f})\\ &\leq{\prod}^k_{i=1}exp(\frac{\varepsilon|f(x)_i-f(y)_i|}{\Delta f})\\ &=exp(\frac{\varepsilon \cdot ||f(x)-f(y)||_1}{\Delta f})\\ &\leq exp(\varepsilon) \end{split}$$
According to the definition of differential privacy given at Definition 2.4, we can use probabilities of an event to compute the privacy loss (e.g., Claim 3.5). So why did the authors use the probability density functions here, and why does it work..?
It can be shown that $\frac{p_x(z)}{p_y(z)} \leq \exp(\varepsilon)$ implies $\frac{Pr[A(x) \in S]}{Pr[A(y) \in S]} \leq \exp(\varepsilon)$ for all $S \subseteq range(A)$:
\begin{align} Pr[A(x) \in S] &= \int_S p_x(z) dz \\ &\leq \int_S \exp(\varepsilon) \cdot p_y(z) dz \\ &= \exp(\varepsilon) \int_S p_y(z) dz \\ &= \exp(\varepsilon) \cdot Pr[A(y) \in S] \end{align}
I assume the authors used the probability densities to simplify the proof since they do not need to deal with arbitrary sets $S$. I hope that explains all your questions!