When calculating integrals with delta functions, the integration domains are usually rectangular. However, recently, I encountered a set of time ordered integrals over Dirac deltas of the following form: $$ \int_0^1 dt_1 \int_0^{t_1} dt_2 \int_0^{t_2} dt_3 \int_0^{t_3} dt_4 K(t_1,t_2,t_3,t_4) \delta(t_1-t_2)\delta(t_3-t_4) $$ $$ \int_0^1 dt_1 \int_0^{t_1} dt_2 \int_0^{t_2} dt_3 \int_0^{t_3} dt_4 K(t_1,t_2,t_3,t_4) \delta(t_1-t_3)\delta(t_2-t_4) $$ $$ \int_0^1 dt_1 \int_0^{t_1} dt_2 \int_0^{t_2} dt_3 \int_0^{t_3} dt_4 K(t_1,t_2,t_3,t_4) \delta(t_1-t_4)\delta(t_3-t_2) $$ Where $K(t_1,t_2,t_3,t_4)$ is some smooth function of the arguments.
For convenience, I set $K=1$ and evaluated these integrals in mathematica. All three of them are zero! This answer makes no sense to me, because suppose I add up these three integrals (for $K=1$), I would get: $$ \int_0^1 dt_1 \int_0^{t_1} dt_2 \int_0^{t_2} dt_3 \int_0^{t_3} dt_4 \bigg(\delta(t_1-t_2)\delta(t_3-t_4)+\delta(t_1-t_3)\delta(t_2-t_4)+\delta(t_1-t_4)\delta(t_2-t_3)\bigg) $$ This expression is manifestly symmetric wrt to all permutation of $t_i$'s. Therefore, the time ordered integral can be transformed into a regular integral over rectangular domains: $$ \frac{1}{24} \int_0^1 dt_1 \int_0^{1} dt_2 \int_0^{1} dt_3 \int_0^{1} dt_4 \bigg(\delta(t_1-t_2)\delta(t_3-t_4)+\delta(t_1-t_3)\delta(t_2-t_4)+\delta(t_1-t_4)\delta(t_2-t_3)\bigg) $$ This integral evaluates to $\frac{1}{8}$ instead of zero.
So the question is: which one is the correct answer? And more generally, how should I think about Dirac deltas rigorously in time-ordered integrals?
One trick:
Whenever you have $\delta (t_1 - t_2) \delta (t_3 - t_4)K(t_1, t_2, t_3, t_4)$ you can replace the integrals to be over just two variables, $t_1$ and $t_3$, say, and argument $K(t_1, t_1, t_3, t_3)$.