Recently I've been reading some notes on distribution theory and the author makes the following definition:
Let $\zeta\in \mathcal{D}'(\mathbb{R})$ be a distribution and $f$ a $C^\infty$ function, we define $\zeta\circ f$ to be the distribution:
$$(\zeta\circ f, \phi)=(\zeta, |J^{-1}|\phi\circ f^{-1}),$$
where $J^{-1}$ is the jacobian of the inverse transformation $f^{-1}$.
The obvious problem is: if $f$ were not a bijection this would make no sense. This definition, thus, works just when $f$ is a invertible.
Now, it is quite obvious that this is too restrictive. In this framework it is not possible, for example, to prove that:
$$\delta \circ f = \sum_i \dfrac{1}{f'(x_i)}\delta_{x_i},$$
where $x_i$ are the zeroes of $f$ and $\delta_{x_i}$ is the delta centered at $x_i$. With the presented definition $\delta \circ f$ makes no sense, because $f$ is not injective since $\# f^{-1}(0)> 1$.
This property is, though, well-known and true.
In that sense, how should we correctly define the composition of distribution and a $C^\infty$ function? What is the correct definition which allows us to tackle cases in which the function is not injective?