# Integrating Dirac delta over two regions $A_1 \subset A_2$?

If $$a_1> a_2$$, and $$\delta$$ the Dirac-delta distribution, how does one evaluate $$\int_{a_1}^\infty dx \int_{a_2}^\infty dy\ f(x,y) \delta(x-y) \ ? \tag{1}$$ Is the above equivalent to $$\int_{a_1}^\infty dx \ f(x,x)$$ (for well-behaved $$f$$)? The limits of integration are confusing me.

In higher dimensions, is there a statement for $$A_1 \subset A_2$$ where $$\int_{A_1} d^n\mathbf{x} \int_{A_2} d^{n}\mathbf{y}\ f(\mathbf{x},\mathbf{y}) \delta^n(\mathbf{x}-\mathbf{y}) \ = \ \int_{A_1} d^{n}\mathbf{x}\ f(\mathbf{x},\mathbf{x}) \tag{2}$$ (where $$\delta^n$$ is the $$n$$-dimensional delta function)?

By definition the LHS of OP's eq. (2) means \begin{align}\int_{\mathbb{R}^n} d^n\mathbf{x} \int_{\mathbb{R}^n} d^{n}\mathbf{y}~ \underbrace{f(\mathbf{x},\mathbf{y})}_{\text{test fct.}} ~\underbrace{1_{A_1}(\mathbf{x})1_{A_2}(\mathbf{y})\delta^n(\mathbf{x}-\mathbf{y})}_{\text{distribution}} ~:=~&\int_{\mathbb{R}^n} d^n\mathbf{x} ~1_{A_1}(\mathbf{x})1_{A_2}(\mathbf{x})f(\mathbf{x},\mathbf{x})\cr ~=~&\int_{\mathbb{R}^n} d^n\mathbf{x} ~1_{A_1\cap A_2}(\mathbf{x})f(\mathbf{x},\mathbf{x})\cr ~=~&\int_{A_1\cap A_2} d^n\mathbf{x} ~f(\mathbf{x},\mathbf{x}).\end{align}