I have been struggling to understand the only derivation of Ampère's law from the Biot-Savart law for a tridimensional distribution of current (which, needless to say, is not the case of a linear distribution of current discussed here) that I have been able to find, i.e. Wikipedia's outline of proof, for more than a month with no result.
I was not excluding that Wikipedia's outline of proof is one of those cases, whose set I have been told to be non-empy, where physics, at least at some level, renounces the rigour of mathematics, until I was told that the proof is indeed rigourous. Although I have recently asked for an alternative proof of the same entailment, the fact that it is not to be excluded that Wikipedia's outline of proof is rigourous has made me decide, as it has been suggested to me in these comments, to ask for an explanation of the single steps that I do not understand of that outline of proof.
My first doubt starts at the first commutation between the integral and curl signs. I know that $$\mathbf{J}(\mathbf{l})\times\frac{\mathbf{r}-\mathbf{l}}{|\mathbf{r}-\mathbf{l}|^3}=\nabla_r\times\left(\frac{\mathbf{J}(\mathbf{l})}{|\mathbf{r}-\mathbf{l}|}\right)$$provided that we read the components of $\nabla_r$ as ordinary derivatives (see below) in the sense of elementary multivariable calculus. The outline of proof says that $$\mathbf{B}(\mathbf{r}):=\iiint_V\,d^3l\,\mathbf{J}(\mathbf{l})\times\frac{\mathbf{r}-\mathbf{l}}{|\mathbf{r}-\mathbf{l}|^3}=\nabla_r\times\iiint_V\,d^3l\,\frac{\mathbf{J}(\mathbf{l})}{|\mathbf{r}-\mathbf{l}|}.$$What mathematical result justifies that commutation between integral and curl? I heartily thank you for any answer.
In order to take the problem on, it is obviously needed to understand what the integral and the derivatives in $\nabla$ are, but I am not sure about what they are. Since theorems such as Stokes' are usually applied when integrating $\nabla\times\mathbf{B}$, I would tempted to believe that the components of $\nabla_r$ are ordinary derivatives of elementary multivariable/vector calculus, but Dirac's $\delta$, which is a tool of the theory of distributions, "pops out" at a certain point in the outline of proof, and in the theory of distributions there exist derivatives of distributions which are a very different thing, although they are taken, as far as I know, with respect to the variables written as "variables of integration" in the distribution integral notation, while, here, we start with $\nabla_r\times \mathbf{B}$ with $r$, while the integral is $\iiint_V d^3l$ with $l$. As to the integral sign, I would tend to interpretate it as the Lebesgue integral $$\int_V\mathbf{J}(\mathbf{l})\times\frac{\mathbf{r}-\mathbf{l}}{|\mathbf{r}-\mathbf{l}|^3}\,d\mu_{\mathbf{l}}$$ or as the limit of a Riemann integral (where $B(\mathbf{r},\varepsilon)$ is the ball centred in $\mathbf{r}$ with radius $\varepsilon$) $$\lim_{\varepsilon\to 0}\iiint_{V\setminus B(\mathbf{r},\varepsilon)}\mathbf{J}(\mathbf{l})\times\frac{\mathbf{r}-\mathbf{l}}{|\mathbf{r}-\mathbf{l}|^3}\,dl_1dl_2dl_3$$but, then, if the commutations between integral and differential operators used Wikipedia's outline of proof were licit for this interpretation, we would then conclude that $\iiint_V\,d^3l\, \mathbf{J}(\mathbf{l})\nabla_l^2\left(\frac{1}{|\mathbf{r}-\mathbf{l}|}\right)$ $=\int_V \mathbf{J}(\mathbf{l})\nabla_l^2\left(\frac{1}{|\mathbf{r}-\mathbf{l}|}\right)\,d\mu_{\mathbf{l}}$ $=\int_{V\setminus{\{\mathbf{r}}\}} \mathbf{J}(\mathbf{l})\nabla_l^2\left(\frac{1}{|\mathbf{r}-\mathbf{l}|}\right)\,d\mu_{\mathbf{l}}=\mathbf{0}$ even where $\mathbf{J}(\mathbf{r})\ne\mathbf{0}$, which must not be the case.