Since  the ranks $q_{N,j}$'s are deterministic, the asymptotic normality of $\sum_{j=1}^N q_{N,j} Z_{N,j}$ can be derived in the same way as for the without regression adjustment  case. A closer look at the proofs of <ref> in the without regression adjustment  case reveals that the following results hold in this case as well, since <ref> plays the role of <ref>.

* As $N\to\infty,$ $\sum_{j=1}^N \left(q_{N,j} - \overline{q}_N\right)^2= \frac{1}{12}{N(N^2-1)} + o(N^3)$.

* $\lim_{N\to\infty} {\max_{1\le j \le N}  \left(q_{N,j} - \overline{q}_N\right)^2}/{\sum_{j=1}^N  \left(q_{N,j} - \overline{q}_N\right)^2} = 0$.

* Under $\tau=\tau_0$,
$\var(t_{N,\mathrm{adj}}) \sim \frac{1}{12}\lambda(1-\lambda)N^3$ as $N\to\infty$.

Equipped with (b) above, we apply Hoeffding's combinatorial CLT <cit.> to say that under $\tau=\tau_0$,

\begin{equation*}
\frac{t_{N,\mathrm{adj}} - \EE( t_{N,\mathrm{adj}})}{\sqrt{\var(t_{N,\mathrm{adj}})}} \dto \mathcal{N}(0,1)\text{ as $N\to\infty$.}
\end{equation*}

This, in conjunction with (c) above, completes the proof.

§.§ Proof of Theorem 3.2

Recall the notation
$\widetilde{b}_{N,i} = b_{N,i}- \vec{p}_{N,i}^\top \vec{b}_N$ ($1\le i\le N$) from (<ref>) of the main paper.
Under $\tau=\tau_{N},$ we have

$$\vec{Y}_N - \tau_0 \vec{Z}_N \dd \vec{b}_N + (\tau_N - \tau_0) \vec{Z}_N =  \vec{b}_N - \frac{h}{\sqrt{N}} \vec{Z}_N,$$

which implies that

\begin{align*}t_{N,\mathrm{adj}} &\dd  \sum_{j=1}^N Z_{N,j} \sum_{i=1}^N \ind{ \widetilde{b}_{N,i} - \frac{h}{\sqrt{N}} Z_{N,i} + \frac{h}{\sqrt{N}} \vec{p}_{N,i}^\top \vec{Z}_N \leq   \widetilde{b}_{N,j} - \frac{h}{\sqrt{N}} Z_{N,j} + \frac{h}{\sqrt{N}}\vec{p}_{N,j}^\top  \vec{Z}_N} \\
&= \sum_{j=1}^N Z_{N,j}\sum_{i=1}^N (1- Z_{N,i}) \ind{ \widetilde{b}_{N,i} + \frac{h}{\sqrt{N}}\vec{p}_{N,i}^\top \vec{Z}_N \leq  \widetilde{b}_{N,j} + \frac{h}{\sqrt{N}}\vec{p}_{N,j}^\top \vec{Z}_N - \frac{h}{\sqrt{N}} } + C_N,
\end{align*}

\begin{equation}\label{C_N.def}
C_N := \sum_{j=1}^N \sum_{i=1}^N Z_{N,j} Z_{N,i} \ind{ \widetilde{b}_{N,i} + \frac{h}{\sqrt{N}}\vec{p}_{N,i}^\top \vec{Z}_N  \leq  \widetilde{b}_{N,j} + \frac{h}{\sqrt{N}}\vec{p}_{N,j}^\top \vec{Z}_N }.
\end{equation}

Thus under $\tau=\tau_N$ we have
$t_{N,\mathrm{adj}} \dd \mathbf{I}_N - \mathbf{II}_N + C_N$,

\begin{equation}\label{I.II.N}
\mathbf{I}_N := \sum_{j=1}^N  \sum_{i=1}^N Z_{N,j}\xi_{N,i,j},\quad \text{and}\quad \mathbf{II}_N :=  \sum_{j=1}^N \sum_{i=1}^N Z_{N,j} Z_{N,i}\xi_{N,i,j},
\end{equation}

\begin{align*}
\xi_{N,i,j}  &:=\ind{ b_{N,i} - \vec{p}_{N,i}^\top (  \vec{b}_N - hN^{-1/2} \vec{Z}_N) \leq    b_{N,j}  - \vec{p}_{N,j}^\top (  \vec{b}_N - hN^{-1/2} \vec{Z}_N)- hN^{-1/2} }\\
&= \ind{hN^{-1/2} (\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N \leq  \widetilde{b}_{N,j} - \widetilde{b}_{N,i} - hN^{-1/2} }.
\end{align*}

The indicators $\xi_{N,i,j} $ are quite complicated to handle, since it depends on the entire random vector $(Z_{N,1}, \dots , Z_{N,N})$, for every pair $(i, j)$. To circumvent this technical hurdle, we replace $\xi_{N,i,j}$ with $\widetilde{\xi}_{N,i,j}$, where

$$ \widetilde{\xi}_{N,i,j} := \ind{0 \leq   \widetilde{b}_{N,j} - \widetilde{b}_{N,i} - hN^{-1/2} }.$$

\begin{equation}\label{I.II.tilde.N}
\widetilde{\mathbf{I}}_N := \sum_{j=1}^N Z_{N,j} \sum_{i=1}^N \widetilde{\xi}_{N,i,j},\quad \text{and}\quad
\widetilde{\mathbf{II}}_N :=  \sum_{j=1}^N \sum_{i=1}^N Z_{N,j} Z_{N,i} \widetilde{\xi}_{N,i,j}.\end{equation}

Thus we decompose $t_{N,\mathrm{adj}}$ under $\tau=\tau_N$ as

\begin{equation}\label{tNadj.decomp2}
t_{N,\mathrm{adj}} \dd \underbrace{\left(\widetilde{\mathbf{I}}_N - \widetilde{\mathbf{II}}_N+ C_N\right)}_{\widetilde{A}_{N,\textrm{adj}}^h}+ \underbrace{(\mathbf{I}_N - \widetilde{\mathbf{I}}_N)}_{D_n}- \underbrace{(\mathbf{II}_N -  \widetilde{\mathbf{II}}_N )}_{Q_n}.
\end{equation}

We first focus on  $\widetilde{A}_{N,\textrm{adj}}^h$. Note that in (<ref>) we are summing up the ranks of the $m$ numbers
$$\{\widetilde{b}_{N,j}  +hN^{-1/2} \vec{p}_{N,j}^\top \vec{Z}_N : 1\le j\le N, Z_{N,j} = 1\}$$
within this set. Unfortunately, due to possibility of ties, we cannot directly equate it with $m(m+1)/2$.
However, invoking <ref> we can show that $N^{-3/2}(C_N - m(m+1)/2) = o_P(1)$ as $N\to\infty$. Towards that, observe that for any $\delta>0$,

\begin{align*}
&\left|C_N - \frac{m(m+1)}{2}\right| = \sum_{j=1}^N\sum_{i=1}^N \ind{\widetilde{b}_{N,j} -\widetilde{b}_{N,i} + hN^{-1/2}(\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N = 0}\\
&\leq \sum_{j=1}^N\sum_{i=1}^N \ind{0\le \widetilde{b}_{N,j} -\widetilde{b}_{N,i} + hN^{-1/2}(\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N < \delta N^{-1/2}}\\
&\leq \sum_{(i,j): \left|(\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N\right|<\delta} \ind{0\le \widetilde{b}_{N,j} -\widetilde{b}_{N,i} + hN^{-1/2}(\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N < \delta N^{-1/2}}\\
&\qquad\qquad + \left|\left\{(i,j): \left|(\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N\right|\ge \delta\right\}\right|\\
&\leq \sum_{(i,j): \left|(\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N\right|<\delta} \ind{-h\delta N^{-1/2}\le \widetilde{b}_{N,j} -\widetilde{b}_{N,i} < (h+1) \delta N^{-1/2}}\\
&\qquad\qquad + \left|\left\{(i,j): \left|(\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N\right|\ge \delta\right\}\right|\\
&\leq \sum_{j=1}^N\sum_{i=1}^N\ind{ \left| \widetilde{b}_{N,j} -\widetilde{b}_{N,i}\right| \le (h+1) \delta N^{-1/2}} + \delta^{-2}\sum_{j=1}^N\sum_{i=1}^N \left((\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N\right)^2.\numberthis\label{C_N}
\end{align*}

Now we invoke <ref> to say that

\begin{equation*}
N^{-3/2}\sum_{j=1}^N\sum_{i=1}^N \EE \left[\left((\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N\right)^2\right] = O(N^{-1/2})=o(1),
\end{equation*}

for every fixed $\delta >0$.
This, in conjunction with (<ref>) and Markov inequality, tells us that for any fixed $\delta>0$,

$$N^{-3/2}\left|\left\{(i,j): \left|(\vec{p}_{N,j}-\vec{p}_{N,i})^\top \vec{Z}_N\right|\ge \delta\right\}\right|=o_P(1).$$

On the other hand, we can use <ref> to conclude that under <ref>,

\begin{equation*}
\lim_{N\to\infty} N^{-3/2}\sum_{j=1}^N\sum_{i=1}^N\ind{ \left| \widetilde{b}_{N,j} -\widetilde{b}_{N,i}\right| \le (h+1) \delta N^{-1/2}} = 2(h+1)\delta.
\end{equation*}

Appealing to (<ref>) we can now conclude, by letting $N\to\infty$ first, and then $\delta\to 0$, that
$$N^{-3/2} (C_N - m(m+1)/2) = o_P(1),\text{ as }N\to\infty.$$

This allows us to write
\begin{equation*}\label{anorm2} \widetilde{A}_{N,\textrm{adj}}^h =\sum_{j=1}^N Z_{N,j} \sum_{i=1}^N \ind{0\le \widetilde{b}_{N,j} - \widetilde{b}_{N,i} - hN^{-1/2} } + \frac{m(m+1)}{2} +o_P(1).\end{equation*}

In view of the above display, the asymptotic normality of $\widetilde{A}_{N,\textrm{adj}}^h$  under $\tau=\tau_N$ can be derived in the same manner as we proved the local asymptotic normality of $t_N$ in the without regression adjustment case. To be precise, it follows by mimicking the proof of <ref> (in the same manner as we proved <ref> by mimicking the proof of <ref>) that under $\tau=\tau_N$,

\begin{equation}\label{CLT_Atilde}
N^{-3/2}  (\widetilde{A}_{N,\textrm{adj}}^h- \frac{m(N+1)}{2})  \dto N\left(-h\lambda(1-\lambda) \mathcal{J}_b,\frac{\lambda(1-\lambda)}{12}\right),
\end{equation}

where $\mathcal{J}_b$ is as defined in <ref>.
The proof of the fact that $D_N$ and $Q_N$ defined in (<ref>) are asymptotically negligible, is split into a couple of lemmas in <ref>. <ref> give upper bounds on the second moments of $D_N$ and $Q_N$, respectively. Then <ref> shows that under <ref>, $N^{-3/2}D_N = o_P(1)$ and   $N^{-3/2}Q_N = o_P(1)$ as $N\to\infty$. This, in conjunction with (<ref>) completes the proof of <ref>.

§.§ Proof of Theorem 3.3

Recall from <ref> that under $\tau=\tau_0+hN^{-1/2}$, we have

\begin{equation*}
N^{-3/2}  \left(t_{N,\mathrm{adj}} -\frac{m(N+1)}{2}\right)  \dto \mathcal{N}\left(-h\lambda(1-\lambda) \mathcal{J}_b,\frac{\lambda(1-\lambda)}{12}\right),
\end{equation*}

where $\mathcal{J}_b$ is defined  in <ref>.
Now we invoke <ref> to complete the proof.

§.§ Proof of Theorem 3.4

Under the assumptions of this theorem, <ref> tells us that <ref> holds in probability, with $\mathcal{J}_b = (2\sqrt{\pi}\sigma)^{-1}$.
Next, fix any $h\in\mathbb{R}$ and define
$$\mathcal{I}_{h,N} := N^{-3/2} \sum_{j=1}^N \sum_{i=1}^N I_{h,N}(b_j -b_i),$$

where $I_{h,N}$ is defined in (<ref>) of the main paper. Without loss of generality, we take $h>0$ (the other case will be similar). For simplicity in notation, we shall omit the index $N$ in this proof for $\vec{b}_N,\vec{X}_N$ etc. From $\vec{b}=\vec{X}\vec{\beta}+\vec{\eps}$ we write $b_j - b_i = \eps_j - \eps_i + v_j - v_i$ where $v_i$ denotes the $i$-th coordinate of  $\vec{v}=\vec{X}\vec{\beta}$. It then follows that

\begin{align*}
\EE \mathcal{I}_{h,N} %&= N^{-3/2} \sum_{j=1}^N \sum_{i=1}^N P(0\le b_j -b_i < h/\sqrt{N})\\
&= N^{-3/2} \sum_{j=1}^N \sum_{i=1}^N P(0\le \eps_j - \eps_i + v_j - v_i < hN^{-1/2})\\
&= N^{-3/2} \sum_{j=1}^N \sum_{i=1}^N \left[\Phi\left(\frac{v_i-v_j + hN^{-1/2}}{\sqrt{2}\sigma}\right) - \Phi\left(\frac{v_i-v_j}{\sqrt{2}\sigma}\right)\right]\\
&= N^{-3/2} \sum_{j=1}^N \sum_{i=1}^N \left[\frac{h}{\sqrt{2}\sigma\sqrt{N}}\phi\left(\frac{v_i-v_j}{\sqrt{2}\sigma}\right) + \frac{h^2}{4N\sigma^2} \phi'(\xi_{i,j})\right]\\
&= \frac{h}{2\sqrt{\pi}\sigma}N^{-2} \sum_{j=1}^N \sum_{i=1}^N e^{-(v_j-v_i)^2/4\sigma^2} + (4\sigma^2)^{-1}h^2 N^{-5/2} \sum_{j=1}^N \sum_{i=1}^N\phi'(\xi_{i,j}),
\end{align*}

where for each $(i,j)$, $\xi_{i,j}$ is a number between $v_i-v_j$ and $v_i-v_j+N^{-1/2}$
Since $\phi'$ is bounded, we can show (by proceeding in the same manner as in the proof of <ref>) that the second sum in the above display is asymptotically negligible. Hence

\begin{equation}\label{JbIb-0}
\lim_{N\to\infty} \left(\EE \mathcal{I}_{h,N} -\frac{h}{2\sqrt{\pi}\sigma} N^{-2} \sum_{j=1}^N \sum_{i=1}^N e^{-(v_j-v_i)^2/4\sigma^2}\right)=0.\end{equation}

Since $0\le N^{-2} \sum_{j=1}^N \sum_{i=1}^N e^{-(v_j-v_i)^2/4\sigma^2}\le 1$, it follows that for any $h>0$,

\begin{equation*}
\limsup_{N\to\infty} \EE \mathcal{I}_{h,N}/h \le (2\sqrt{\pi}\sigma)^{-1}=\mathcal{J}_b.
\end{equation*}

Next we show that $\var(\mathcal{I}_{h,N})\to 0$. Towards that, we first write

$$\EE \mathcal{I}_{h,N}^2 = N^{-3}\sum_{i,j,k,l} P(0\le b_j-b_i<hN^{-1/2}, 0\le b_l-b_k<hN^{-1/2}).$$

Now, as mentioned earlier, <ref> holds in this setting (cf. <ref>); hence appealing to arguments similar to those given in <ref>, we argue that the contribution from the terms with repeated indices are negligible. So we are left with terms with distinct indices $i,j,k,l$. For such indices, note that we have $P(0\le b_j-b_i<hN^{-1/2}, 0\le b_l-b_k<hN^{-1/2})=P(0\le b_j-b_i<hN^{-1/2})P( 0\le b_l-b_k<hN^{-1/2})$, since the errors $\eps_i$'s are independent and $v_i$'s non-stochastic. We can thus write

$$\EE \mathcal{I}_{h,N}^2 =  \left(N^{-3/2}\sum_{i,j \text{ distinct }} P\left(0\le b_j-b_i<hN^{-1/2}\right)\right)^2 + o(1) = (\EE\mathcal{I}_{h,N})^2 + o(1),$$

from which the conclusion follows.
Moreover, (<ref>) tells us that <ref> holds, with $\lim_{N\to\infty}\EE \mathcal{I}_{h,N}/h=\ell (2\sqrt{\pi} \sigma)^{-1}=\ell \mathcal{J}_b.$
Finally, for any $x\in\mathbb{R},$

\begin{equation} e^{-x^2} \le \frac{1}{1+x^2} \le \max\left\{1-\frac{x^2}{2}, \frac{1}{2}\right\}.
\end{equation}

\begin{align*}
N^{-2} \sum_{j=1}^N \sum_{i=1}^N e^{-(v_j-v_i)^2/4\sigma^2}
&\le \max\left\{1-\frac{1}{2N^2}\sum_{j=1}^N \sum_{i=1}^N (v_j-v_i)^2, \frac{1}{2}\right\} \\
&= \max\left\{1-\frac{1}{N}\sum_{j=1}^N (v_j - \overline{v})^2, \frac{1}{2}\right\}.
\end{align*}

Therefore, if $ \liminf_{N\to\infty} \frac{1}{N}\sum_{j=1}^N (v_j - \overline{v})^2>0$, then

\begin{align*}
\limsup_{N\to\infty}\EE\mathcal{I}_{h,N}/h
& \leq \frac{1}{2\sqrt{\pi}\sigma} \limsup_{N\to\infty} \max\left\{1-\frac{1}{N}\sum_{j=1}^N (v_j - \overline{v})^2, \frac{1}{2}\right\}  \\
& \leq \frac{1}{2\sqrt{\pi}\sigma} \max\left\{1-\liminf_{N\to\infty} \frac{1}{N}\sum_{j=1}^N (v_j - \overline{v})^2, \frac{1}{2}\right\}  \\
%&\leq \frac{1}{2\sqrt{\pi}\sigma}  \max\left\{1-\sigma_v^2, \frac{1}{2}\right\} \\
&< \frac{1}{2\sqrt{\pi}\sigma} = \mathcal{J}_b.
\end{align*}

Hence the proof is complete.

§.§ Proof of Theorem 4.1

Recall the notations from <ref>. In this proof, we replace $\rsnu$ by $\widehat{\tau}_N$, where $\widehat{\tau}_N$ is any $\sqrt{N}$-consistent estimator of $\tau_0$.
For brevity, we shall skip the index $N$ for $b_{N,i}$'s and $Z_{N,i}$'s in this proof.
$$V_N := N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{0\le b_j - b_i < N^{-\nu}},$$

and note that <ref> yields that $V_N\to \mathcal{I}_b$ as $N\to\infty$. So, it suffices to show that $\widehat{V}_N - V_N \Pto 0$ as $N\to\infty$.
We write

\begin{align*}
\widehat{V}_N - V_N &= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \left( \ind{0\le \widehat{b}_j - \widehat{b}_i} - \ind{0\le b_j - b_i}\right)\\
&\quad\quad - N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \left( \ind{N^{-\nu}\le \widehat{b}_j - \widehat{b}_i} - \ind{N^{-\nu}\le b_j - b_i}\right).\numberthis\label{Vhat-V}
\end{align*}

Since $\widehat{b}_j - \widehat{b}_i = b_j - b_i -(\widehat{\tau}_N -\tau_0) (Z_j - Z_i)$, we can write

\begin{align*}
\Delta_{1,N} &:= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{0\le \widehat{b}_j - \widehat{b}_i} - \ind{0\le b_j - b_i}\right)\\
&= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{(\widehat{\tau}_N -\tau_0) (Z_j - Z_i)\le b_j- b_i} - \ind{0\le b_j - b_i}\right)\\
&= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{(\widehat{\tau}_N -\tau_0) (Z_j - Z_i)\le b_j- b_i < 0} - \ind{0\le b_j - b_i < (\widehat{\tau}_N -\tau_0) (Z_j - Z_i)}\right).
\end{align*}

Now pick $\nu<\nu'<1/2$ and let $E_N = \{ \left|\widehat{\tau}_N  - \tau_0\right| > N^{-\nu'}\}$. Since $\widehat{\tau}_N  - \tau_0=O_P(N^{-1/2})$ and $\nu'<1/2$, we get $\widehat{\tau}_N  - \tau_0=o_P(N^{-\nu'}),$ implying that $P(E_N) \to 0$ as $N\to\infty$.  Therefore for any $\epsilon>0$,
$$P(\left|\Delta_{1,N} \inds{E_N} \right|> \epsilon) \le P(\inds{E_N}=1) = P(E_N) \to 0.$$

On the other hand, we have $\left| (\widehat{\tau}_N -\tau_0) (Z_j - Z_i)\right| \le N^{-\nu'}$ on $E_N^c$, hence

\begin{align*}
&N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(\widehat{\tau}_N -\tau_0) (Z_j - Z_i)\le b_j- b_i < 0}\inds{E_N^c} \\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{-N^{-\nu'} \le b_j- b_i < 0}\inds{E_N^c}  \\
&\le N^{-(\nu'-\nu)} \left(N^{-(2-\nu')} \sum_{j=1}^N \sum_{i=1}^N \ind{-N^{-\nu'} \le b_j- b_i < 0}\right).
\end{align*}

<ref> tells us that the term in the above parentheses converges to $\mathcal{I}_b$. Since $\nu'>\nu$, we conclude that
$$N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(\widehat{\tau}_N -\tau_0) (Z_j - Z_i)\le b_j- b_i < 0}\inds{E_N^c}\Pto 0.$$

$$N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{0\le b_j - b_i < (\widehat{\tau}_N -\tau_0) (Z_j - Z_i)}\inds{E_N^c}\Pto 0.$$

Thus, $\Delta_{1,N} \inds{E_N^c}\Pto 0$ and consequently $\Delta_{1,N} \Pto 0,\text{ as }N\to\infty$.

We next focus on the second summand in the RHS of (<ref>).
The key idea to deal with this sum is to replace the indicators with smooth functions, such as a Gaussian CDF. Define
$\sigma_N :=N^{-\nu}(\log N)^{-1}$, $r_N(i,j) := b_j - b_i - N^{-\nu}$, and $\widehat{r}_N(i,j) := \widehat{b}_j - \widehat{b}_i - N^{-\nu}$.
\begin{align*}\widehat{V}_N - V_N - \Delta_{1,N} &= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{N^{-\nu}\le \widehat{b}_j - \widehat{b}_i} - \ind{N^{-\nu}\le b_j - b_i}\right)\\ &= \Delta_{3,N} - \Delta_{2,N} + \Delta_{4,N} + \Delta_{5,N},\end{align*}

$$\Delta_{2,N} :=
N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{r_N(i,j)>0 }- \Phi\left(\frac{r_N(i,j)}{\sigma_N}\right)\right),$$

$$\Delta_{3,N} :=
N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{\widehat{r}_N(i,j)>0 }- \Phi\left(\frac{\widehat{r}_N(i,j)}{\sigma_N}\right)\right),$$

$$ \Delta_{4,N} := N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left(\Phi\left(\frac{\widehat{r}_N(i,j)}{\sigma_N}\right)- \Phi\left(\frac{r_N(i,j)}{\sigma_N}\right)\right),$$

$$ \Delta_{5,N} := N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left(\ind{\widehat{r}_N(i,j)=0}- \ind{r_N(i,j)=0}\right).$$

Showing $\Delta_{2,N} \to0$, $\Delta_{k,N}\Pto 0$ for $k=3,4,5,$ will complete the proof.

(a) First we deal with  $\Delta_{5,N}$. Note that

$$N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{r_N(i,j)=0} \le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{N^{-\nu} \le b_j - b_i < (1+\delta)N^{-\nu}} \to \delta \mathcal{I}_b.$$

Now let $\delta\to 0$ to get
$$\lim_{N\to\infty} N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{r_N(i,j)=0}=0.$$
For $\widehat{r}_N(i,j)$ we  proceed just as in the proof of $\Delta_{1,N}\to 0$. Define $E_N = \{ \left|\widehat{\tau}_N  - \tau_0\right| > N^{-\nu'}\}$ for some $\nu<\nu'<1/2$. Then

\begin{align*}
&N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{\widehat{r}_N(i,j)=0}\inds{E_N^c} \\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{N^{-\nu} \le \widehat{b}_j - \widehat{b}_i < (1+\delta)N^{-\nu}}\inds{E_N^c} \\
&= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{N^{-\nu} \le b_j -b_i  - (\widehat{\tau}_N -\tau_0) (Z_j - Z_i)< (1+\delta)N^{-\nu}}\inds{E_N^c} \\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{-\left|\widehat{\tau}_N -\tau_0\right| +N^{-\nu} \le b_j -b_i < (1+\delta)N^{-\nu}+\left|\widehat{\tau}_N -\tau_0\right| }\inds{E_N^c} \\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{-N^{-\nu'} +N^{-\nu} \le b_j -b_i < (1+\delta)N^{-\nu}+N^{-\nu'}}.
\end{align*}

Since $\nu'>\nu,$ it holds for all sufficiently large $N$ that $N^{-\nu'} \le \delta N^{-\nu}$, and consequently

\begin{align*}
&\limsup_{N\to\infty} N^{-(2-\nu)} \EE\sum_{j=1}^N \sum_{i=1}^N \ind{\widehat{r}_N(i,j)=0}\inds{E_N^c}\\
&\le \limsup_{N\to\infty} N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(1-\delta)N^{-\nu} \le b_j -b_i < (1+2\delta)N^{-\nu}} = 3\delta \mathcal{I}_b.
\end{align*}

Letting $\delta\to 0$ here, and using $P(E_N) \to 0,$ we conclude that
$$N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{\widehat{r}_N(i,j)=0}\Pto 0, \text{ as }N\to\infty.$$

(b) Next we deal with $\Delta_{2,N},$ for which the bound provided by <ref> is crucial.
Recall that
$$\Delta_{2,N} = N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{r_N(i,j)>0 }- \Phi\left(\frac{r_N(i,j)}{\sigma_N}\right)\right),$$

where $\sigma_N =  N^{-\nu}(\log N)^{-1}$ and
$r_N(i,j) = b_j - b_i - N^{-\nu}$.
The key idea is to use the bound in <ref> only for those $i,j$ for which $r_N(i,j)$ is at least as large as $\delta N^{-\nu}$. Towards that, fix $\delta>0$ and define

$$\mathcal{S}_{N,\delta}  = \{(i, j) : \left| r_N(i,j) \right| \le \frac{\delta}{N^\nu}, 1\le i,j\le N\}.$$

Note that

\begin{align*}
(i,j)\in\mathcal{S}_{N,\delta}  &\implies \delta N^{-\nu} \ge \left| r_N (i,j) \right| \ge \left|\left|b_j - b_i\right| -N^{-\nu}\right| \\
&\implies \left|b_j -b_i\right| \in\left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right].
\end{align*}

Therefore <ref> implies that

\begin{equation}\label{S_N,delta.new}
\lim_{\delta\downarrow 0}\limsup_{N\to\infty} N^{-(2-\nu)} \left|\mathcal{S}_{N,\delta} \right| = 0.
\end{equation}

On the other hand, $(i,j)\not\in\mathcal{S}_{N,\delta} \implies \left| r_N (i,j) \right| >  \delta N^{-\nu}$, and then <ref> yields that

\begin{align*}\left| \ind{r_N(i,j)>0 }- \Phi\left(\frac{r_N(i,j)}{\sigma_N}\right)\right|
&\le \sigma_N \left|r_N(i,j)\right|^{-1} \exp(-r_N^2(i,j)/2\sigma_N^2)\\
&\le \sigma_N \delta^{-1} N^\nu \exp(-\delta^2N^{-2\nu}/2\sigma_N^2)\\
&= (\log N)^{-1} \delta^{-1} \exp\left(-\delta^2(\log N)^2/2\right)
\end{align*}

Combining the above bounds, the following chain of inequalities emerges.

\begin{align*}
\left|\Delta_{2,N}\right| &\le  N^{-(2-\nu)} \sum_{j=1}^N  \sum_{i=1}^N \left| \ind{r_N(i,j)>0 }- \Phi\left(\frac{r_N(i,j)}{\sigma_N}\right)\right|  \\
&\le N^{-(2-\nu)}  \sum_{(i,j)\in \mathcal{S}_{N,\delta} } 2 + N^{-(2-\nu)}  \sum_{(i,j)\not\in \mathcal{S}_{N,\delta} } \left| \ind{r_N(i,j)>0 }- \Phi\left(\frac{r_N(i,j)}{\sigma_N}\right)\right| \\
&\le 2N^{-(2-\nu)}  \left| \mathcal{S}_{N,\delta} \right|  + N^{-(2-\nu)}  N^2   (\log N)^{-1} \delta^{-1} \exp\left(-\delta^2(\log N)^2/2\right)\\
&=2N^{-(2-\nu)}  \left| \mathcal{S}_{N,\delta} \right|  +  (\log N)^{-1} \delta^{-1} \exp\left(\nu \log N-\delta^2(\log N)^2/2\right).
\end{align*}

$$\limsup_{N\to\infty} \left|\Delta_{2,N}\right| \le 2\limsup_{N\to\infty} N^{-(2-\nu)}  \left| \mathcal{S}_{N,\delta} \right|.$$

Letting $\delta\downarrow 0$ and invoking (<ref>) we get the desired conclusion.

(c) Recall that

$$\Delta_{3,N} =
N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{\widehat{r}_N(i,j)>0 }- \Phi\left(\frac{\widehat{r}_N(i,j)}{\sigma_N}\right)\right).$$

We can proceed just as in the previous proof. First we argue that for any fixed $\delta>0,$
$$N^{-(2-\nu)} \sum_{(i,j): \left|\widehat{r}_N(i,j)\right| > \delta N^{-\nu}} \left|\ind{\widehat{r}_N(i,j)>0 }- \Phi\left(\frac{\widehat{r}_N(i,j)}{\sigma_N}\right)\right| \Pto 0,\text{ as }N\to\infty.$$

Proof of the above part is exactly same as what we did in part (b). For the other part, it suffices to show that for any $\epsilon>0,$

\begin{equation}\label{plug-in.Ib.last}
\lim_{\delta\downarrow 0 }\limsup_{N\to\infty} P\left(N^{-(2-\nu)} \sum_{j=1}^N\sum_{i=1}^N \ind{\left|\widehat{b}_j -  \widehat{b}_i\right| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]} > \epsilon\right) = 0\end{equation}

because the above implies that
$$\lim_{\delta\downarrow 0 }\limsup_{N\to\infty} P\left(N^{-(2-\nu)} \left|\{(i,j): \left|\widehat{r}_N(i,j)\right| \le \delta N^{-\nu}\}\right| > \epsilon\right) = 0,$$

which further implies that
$$\lim_{\delta\downarrow 0 }\limsup_{N\to\infty} P\left(\left|\Delta_{3,N}\right| > \epsilon\right) = 0.$$

To prove (<ref>), we  again use the event $\widetilde{E}_{N,K} = \{ \left|\widehat{\tau}_N  - \tau_0\right| > N^{-\nu'}\}$ where $\nu<\nu'<1/2$.

\begin{align*}
& N^{-(2-\nu)} \sum_{j=1}^N\sum_{i=1}^N \ind{\left|\widehat{b}_j -  \widehat{b}_i\right| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{E_N^c}\\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(1-\delta)N^{-\nu} \le \widehat{b}_j - \widehat{b}_i < (1+\delta)N^{-\nu}}\inds{E_N^c} \\
&= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(1-\delta)N^{-\nu} \le b_j -b_i  - (\widehat{\tau}_N -\tau_0) (Z_j - Z_i)< (1+\delta)N^{-\nu}}\inds{E_N^c} \\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{-\left|\widehat{\tau}_N -\tau_0\right| +(1-\delta)N^{-\nu} \le b_j -b_i < (1+\delta)N^{-\nu}+\left|\widehat{\tau}_N -\tau_0\right| }\inds{E_N^c} \\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{-N^{-\nu'} +(1-\delta)N^{-\nu} \le b_j -b_i < (1+\delta)N^{-\nu}+N^{-\nu'}}.
\end{align*}

Since $\nu'>\nu,$ it holds for all sufficiently large $N$ that $N^{-\nu'} \le \delta N^{-\nu}$, and consequently

\begin{align*}
& \limsup_{N\to\infty} N^{-(2-\nu)} \EE\sum_{j=1}^N\sum_{i=1}^N \ind{\left|\widehat{b}_j -  \widehat{b}_i\right| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{E_N^c}\\
&\le \limsup_{N\to\infty}  N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(1-2\delta)N^{-\nu} \le b_j -b_i < (1+2\delta)N^{-\nu}}  =4\delta \mathcal{I}_b.
\end{align*}

Letting $\delta\to 0$ here, we conclude that

\begin{equation}\label{Delta3Nlast}
\lim_{\delta\downarrow 0 }\limsup_{N\to\infty} N^{-(2-\nu)} \EE\sum_{j=1}^N\sum_{i=1}^N \ind{\left|\widehat{b}_j -  \widehat{b}_i\right| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{E_N^c}= 0.
\end{equation}

Finally, for any $\epsilon>0,$

\begin{align*}
&P\left(N^{-(2-\nu)} \sum_{j=1}^N\sum_{i=1}^N \ind{\left|\widehat{b}_j -  \widehat{b}_i\right| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]} > \epsilon\right)\\
&\le P\left(N^{-(2-\nu)} \sum_{j=1}^N\sum_{i=1}^N \ind{\left|\widehat{b}_j -  \widehat{b}_i\right| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{E_N^c} > \epsilon/2\right)+ P(E_N)\\
&\le (\epsilon/2)^{-1} N^{-(2-\nu)} \EE\sum_{j=1}^N\sum_{i=1}^N \ind{\left|\widehat{b}_j -  \widehat{b}_i\right| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{E_N^c} + P(E_N).
\end{align*}

Invoking (<ref>) and $\lim_{N\to\infty} P(E_N)=0$, we complete the proof of (<ref>).

(d) Next let us focus on $\Delta_{4,N}$. We first write
$$\left|\Delta_{4,N}\right| \le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left|\Phi\left(\frac{\widehat{r}_N(i,j)}{\sigma_N}\right)- \Phi\left(\frac{r_N(i,j)}{\sigma_N}\right)\right|.$$

Now we break the last summation into three parts: (i) $(i,j)$ such that $|r_N(i,j)| \le \delta N^{-\nu},$ i.e., $(i,j)\in \mathcal{S}_{N,\delta};$ (ii) $(i,j)$ such that $|\widehat{r}_N(i,j)| \le \delta N^{-\nu};$ and (iii) remaining $(i,j)$'s, for which $|r_N(i,j)| \wedge |\widehat{r}_N(i,j)| > \delta N^{-\nu}$. For indices $(i,j)$ in the cases (i) and (ii), we can use the crude bound $\left|\Phi(x)- \Phi(y)\right|\le 2$, since  equations (<ref>) and (<ref>) tell us that these contributions will be asymptotically negligible. For the case (iii), we use the following bound: for any $x,y\in\mathbb{R},$
$$\left|\Phi(x) - \Phi(y)\right| \le |x-y| \sup_{z\in [x\wedge y, x\vee y]} \phi(z) \le |x-y| \exp\left(-\frac{x^2\wedge y^2}{2}\right).$$
Thus, if $\mathcal{T}_{N,\delta}$ denote the (random) set of indices in case (iii), we have

\begin{align*}
& N^{-(2-\nu)} \sum_{(i,j)\in \mathcal{T}_{N,\delta}} \left|\Phi\left(\frac{\widehat{r}_N(i,j)}{\sigma_N}\right)- \Phi\left(\frac{r_N(i,j)}{\sigma_N}\right)\right|\\
&\le \sigma_N^{-1} N^{-(2-\nu)} \sum_{(i,j)\in \mathcal{T}_{N,\delta}}\left|\widehat{r}_N(i,j) - r_N(i,j)\right| \exp\left(-\frac{r_N(i,j)^2\wedge \widehat{r}_N(i,j)^2}{2\sigma_N^{2} }\right) \\
&\le \sigma_N^{-1} N^{-(2-\nu)} \sum_{(i,j)\in \mathcal{T}_{N,\delta}}\left|\widehat{r}_N(i,j) - r_N(i,j)\right| \exp\left(-\frac{\delta^2 N^{-2\nu}}{2\sigma_N^{2} }\right) \\
&\le  \sigma_N^{-1} N^{-(2-\nu)}\exp\left(-\frac{\delta^2 N^{-2\nu}}{2\sigma_N^{2} }\right) \sum_{j=1}^N \sum_{i=1}^N\left|(\widehat{b}_j - \widehat{b}_i)-(b_j - b_i)\right|\\
&= \sigma_N^{-1} N^{-(2-\nu)} \exp\left(-\frac{\delta^2}{2}(\log N)^2\right)\sum_{j=1}^N \sum_{i=1}^N\left|(\widehat{\tau}_N -\tau_0) (Z_j - Z_i)\right|\\
&\le \sigma_N^{-1} N^{\nu} \left|\widehat{\tau}_N -\tau_0\right|\exp\left(-\frac{\delta^2}{2}(\log N)^2\right)\\
&=  N^{2\nu-1/2} \log N \cdot \sqrt{N} \left|\widehat{\tau}_N -\tau_0\right|\exp\left(-\frac{\delta^2}{2}(\log N)^2\right).
\end{align*}

Since $\widehat{\tau}_N -\tau_0=O_P(N^{-1/2})$, we get the desired conclusion that $\Delta_{4,N}\Pto 0$ as $N\to\infty$.

Combining the above steps, the proof is now complete.

§.§ Proof of Theorem 4.2

Recall the notations from <ref>. In this proof, we replace $\rsna$ by $\widehat{\tau}_N$, where $\widehat{\tau}_N$ is any $\sqrt{N}$-consistent estimator of $\tau_0$. For brevity, we shall skip the index $N$ for $b_{N,i}$, $Z_{N,i}$, $\vec{X}_N$, and $\vec{p}_{N,i}$ in this proof.
To start with, we define
$$W_N := N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{0\le \widetilde{b}_j -  \widetilde{b}_i < N^{-\nu}},$$

and note that $W_N\to \mathcal{J}_b,$ by <ref>. We are to show that $\widehat{W}_N - W_N \Pto 0$.
Let $I$ and $J$ be two random indices chosen with replacement from $\{1,2,\dots,N\}$.  We replace the event $E_N = \{\left|\widehat{\tau}_N - \tau_0 \right| > N^{-\nu'}\}$ in <ref> with  the following event:

$$\widetilde{E}_{N,K} = \{\left|\widehat{\tau}_N - \tau_0 \right| > N^{-\nu'}\} \cup \{\sqrt{N}\|\vec{p}_J -  \vec{p}_I\| > K\},$$

where $\nu<\nu'<1/2$, and $K>0$ is a fixed positive real number. Observe that

\begin{align*}
P(\sqrt{N}\|\vec{p}_J -  \vec{p}_I\| > K)
&\le K^{-2} N\cdot \EE_{J,I} \|\vec{p}_J -  \vec{p}_I\|^2 \\
&= K^{-2} N^{-1} \sum_{j=1}^N \sum_{i=1}^N \|\vec{p}_j -  \vec{p}_i\|^2 \\
&= 2(\rank(\vec{X})-1) K^{-2},
\end{align*}

where the last step follows from the fact that $\vec{p}_j$'s are columns of an idempotent matrix (see (<ref>) for a proof). Thus,

$$P(\widetilde{E}_{N,K}) \leq P(\sqrt{N}\|\vec{p}_J -  \vec{p}_I\| > K) \lesssim 2(p-1)K^{-2},$$

where $p$ is the number of covariates (i.e., number of columns of $\vec{X}$).
Also note that,

$$\widehat{\widetilde{b}}_j  =  Y_j - \widehat{\tau}_N Z_j -  \vec{p}_j^\top(\vec{Y} - \widehat{\tau}_N \vec{Z})=\widetilde{b}_j - (\widehat{\tau}_N - \tau_0) \left( Z_j - \vec{p}_j^\top \vec{Z}\right).$$

Thus $\widehat{\widetilde{b}}_j - \widehat{\widetilde{b}}_i = \widetilde{b}_j - \widetilde{b}_i -  (\widehat{\tau}_N - \tau_0)u_N(i,j)$, where
$u_N(i,j):= Z_j -  Z_i- (\vec{p}_j - \vec{p}_i)^\top \vec{Z}.$
Now write
\begin{align*}
\widehat{W}_N - W_N &= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\Big( \ind{0\le \widehat{\widetilde{b}}_j - \widehat{\widetilde{b}}_i} - \ind{0\le \widetilde{b}_j - \widetilde{b}_i}\Big)\\
&\quad\quad - N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\Big( \ind{N^{-\nu}\le \widehat{\widetilde{b}}_j - \widehat{\widetilde{b}}_i} - \ind{N^{-\nu}\le \widetilde{b}_j - \widetilde{b}_i}\Big) .\end{align*}

For the first part, we imitate the proof of $\Delta_{1,N} \Pto 0, $  as follows.
\begin{align*}
\widetilde{\Delta}_{1,N} &= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\Big( \ind{0\le \widehat{\widetilde{b}}_j - \widehat{\widetilde{b}}_i} - \ind{0\le \widetilde{b}_j - \widetilde{b}_i}\Big)\\
&= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\Big( \ind{(\widehat{\tau}_N -\tau_0) u_N(i,j)\le \widetilde{b}_j - \widetilde{b}_i} - \ind{0\le \widetilde{b}_j - \widetilde{b}_i}\Big)\\
&= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{(\widehat{\tau}_N -\tau_0) u_N(i,j)\le \widetilde{b}_j - \widetilde{b}_i < 0} - \ind{0\le \widetilde{b}_j - \widetilde{b}_i < (\widehat{\tau}_N -\tau_0) u_N(i,j)}\right).
\end{align*}

Now fix any $\epsilon>0$ and note that on  $\widetilde{E}_{N,K}^c$ we have $\left|\widehat{\tau}_N -\tau_0\right|\le N^{-\nu'}$,  and

\begin{align*}
\left|u_N(i,j)\right| &\le  \left|Z_j -  Z_i\right| + \left|(\vec{p}_j - \vec{p}_i)^\top \vec{Z}\right| \le 1 + \|\vec{p}_j - \vec{p}_i\| \cdot \|\vec{Z}\| \le 1 + \sqrt{N} \|\vec{p}_j - \vec{p}_i\|\le 1+K.
\end{align*}

\begin{align*}
&N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(\widehat{\tau}_N -\tau_0) u_N(i,j)\le \widetilde{b}_j - \widetilde{b}_i < 0}\inds{\widetilde{E}_{N,K}^c} \\
&\le N^{\nu} \cdot N^{-2} \sum_{j=1}^N \sum_{i=1}^N \ind{-N^{-\nu'}(1 + K) \le \widetilde{b}_j - \widetilde{b}_i   < 0}\inds{\widetilde{E}_{N,K}^c} \\
&\le N^{-(\nu'-\nu)} \left(N^{-(2-\nu')} \sum_{j=1}^N \sum_{i=1}^N \ind{-N^{-\nu'}(1+K) \le \widetilde{b}_j - \widetilde{b}_i  < 0}\right).
\end{align*}

Now <ref> tells us that the term in the above parentheses converges to $(1+K)\mathcal{J}_b$. Since $\nu'>\nu,$ we conclude that
$$N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(\widehat{\tau}_N -\tau_0) u_N(i,j)\le \widetilde{b}_j - \widetilde{b}_i< 0}\inds{\widetilde{E}_{N,K}^c}\Pto 0.$$

$$N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{0\le \widetilde{b}_j - \widetilde{b}_i< (\widehat{\tau}_N -\tau_0) u_N(i,j)}\inds{\widetilde{E}_{N,K}^c}\Pto 0.$$

Thus $\widetilde{\Delta}_{1,N} \inds{\widetilde{E}_{N,K}^c}\Pto 0$. Hence

\begin{align*}
\limsup_{N\to\infty} P\left(\Big|\widetilde{\Delta}_{1,N} \Big| > \epsilon\right) &\le \limsup_{N\to\infty} P\left(\Big|\widetilde{\Delta}_{1,N} \inds{\widetilde{E}_{N,K}} \Big|> \epsilon/2\right)\\
&\le \limsup_{N\to\infty} P\left(\inds{\widetilde{E}_{N,K}}=1\right) \\
&= \limsup_{N\to\infty} P(\widetilde{E}_{N,K}) \le 2(p-1)K^{-2}.\end{align*}

Letting $K\to\infty$ here, we conclude that
$\widetilde{\Delta}_{1,N} \Pto 0,\text{ as }N\to\infty$.
Let us next focus on the second part of $\widehat{W}_N - W_N$, namely,
$$ N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{N^{-\nu}\le \widehat{\widetilde{b}}_j - \widehat{\widetilde{b}}_i} - \ind{N^{-\nu}\le \widetilde{b}_j - \widetilde{b}_i}\right) .$$

Once again we approximate the indicators in the above display using the CDF of $\mathcal{N}(0,\sigma_N^2)$ where  $\sigma_N :=N^{-\nu}(\log N)^{-1}$.
$$\widetilde{r}_N(i,j) := \widetilde{b}_j - \widetilde{b}_i - N^{-\nu},\quad\text{and}\quad \widehat{\widetilde{r}}_N(i,j) := \widehat{\widetilde{b}}_j - \widehat{\widetilde{b}}_i - N^{-\nu}.$$

The rest of the proof is essentially same as the proof of <ref>. We write
$$N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{N^{-\nu}\le \widehat{\widetilde{b}}_j - \widehat{\widetilde{b}}_i} - \ind{N^{-\nu}\le \widetilde{b}_j - \widetilde{b}_i}\right)  = \widetilde{\Delta}_{3,N} - \widetilde{\Delta}_{2,N} + \widetilde{\Delta}_{4,N} + \widetilde{\Delta}_{5,N},$$

$$\widetilde{\Delta}_{2,N} =
N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{\widetilde{r}_N(i,j)>0 }- \Phi\left(\frac{\widetilde{r}_N(i,j)}{\sigma_N}\right)\right),$$

$$\widetilde{\Delta}_{3,N} =
N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left( \ind{\widehat{\widetilde{r}}_N(i,j)>0 }- \Phi\left(\frac{\widehat{\widetilde{r}}_N(i,j)}{\sigma_N}\right)\right),$$

$$ \widetilde{\Delta}_{4,N} = N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left(\Phi\left(\frac{\widehat{\widetilde{r}}_N(i,j)}{\sigma_N}\right)- \Phi\left(\frac{\widetilde{r}_N(i,j)}{\sigma_N}\right)\right),$$

$$ \widetilde{\Delta}_{5,N} = N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N\left(\ind{\widehat{\widetilde{r}}_N(i,j)=0}- \ind{\widetilde{r}_N(i,j)=0}\right).$$

The proof of $\widetilde{\Delta}_{2,N}\to 0$ is exactly same as the proof of $\Delta_{2,N}\to 0$ given in <ref>, hence omitted.

Next, in order to prove $\widetilde{\Delta}_{3,N}\Pto 0,$ we first argue that for any fixed $\delta>0,$
$$N^{-(2-\nu)} \sum_{(i,j): \left|\widehat{\widetilde{r}}_N(i,j)\right| > \delta N^{-\nu}} \left|\ind{\widehat{\widetilde{r}}_N(i,j)>0 }- \Phi\left(\frac{\widehat{\widetilde{r}}_N(i,j)}{\sigma_N}\right)\right| \Pto 0,\text{ as }N\to\infty.$$

Proof of the above display is omitted, for being completely analogous to the proof of part (b) in the proof of <ref>. For the other part of $\widetilde{\Delta}_{3,N}$, it suffices to show that for any $\epsilon>0,$

\begin{equation}\label{plug-in.Jb.last}
\lim_{\delta\downarrow 0 }\limsup_{N\to\infty} P\left(N^{-(2-\nu)} \sum_{j=1}^N\sum_{i=1}^N \ind{\big|\widehat{\widetilde{b}}_j -  \widehat{\widetilde{b}}_i\big| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]} > \epsilon\right) = 0\end{equation}

because the above implies that
$$\lim_{\delta\downarrow 0 }\limsup_{N\to\infty} P\left(N^{-(2-\nu)} \left|\{(i,j): \left|\widehat{\widetilde{r}}_N(i,j)\right| \le \delta N^{-\nu}\}\right| > \epsilon\right) = 0,$$

which further implies that
$$\lim_{\delta\downarrow 0 }\limsup_{N\to\infty} P\left(\left|\widetilde{\Delta}_{3,N}\right| > \epsilon\right) = 0.$$

In order to prove (<ref>), we once again use the event $\widetilde{E}_{N,K}$ and the trick with $I$ and $J$. For brevity, we use the notation
$$\kappa_{j,i}:=(1+\sqrt{N}\|\vec{p}_j - \vec{p}_i\|) \left|\widehat{\tau}_N - \tau_0\right|.$$
Observe that,

\begin{align*}
& N^{-(2-\nu)} \sum_{j=1}^N\sum_{i=1}^N \ind{\big|\widehat{\widetilde{b}}_j -  \widehat{\widetilde{b}}_i\big| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{\widetilde{E}_{N,K}^c}\\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(1-\delta)N^{-\nu} \le \widehat{\widetilde{b}}_j - \widehat{\widetilde{b}}_i< (1+\delta)N^{-\nu}}\inds{\widetilde{E}_{N,K}^c} \\
&= N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(1-\delta)N^{-\nu} \le \widetilde{b}_j-\widetilde{b}_i - (\widehat{\tau}_N -\tau_0) u_N(i,j)< (1+\delta)N^{-\nu}}\inds{\widetilde{E}_{N,K}^c} \\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{-\kappa_{j,i} +(1-\delta)N^{-\nu} \le \widetilde{b}_j-\widetilde{b}_i< (1+\delta)N^{-\nu}+\kappa_{j,i} }\inds{\widetilde{E}_{N,K}^c} \\
&= N^{\nu}\cdot \EE_{J,I} \left[\ind{-\kappa_{J,I} +(1-\delta)N^{-\nu} \le \widetilde{b}_J -\widetilde{b}_I < (1+\delta)N^{-\nu}+\kappa_{J,I} }\inds{\widetilde{E}_{N,K}^c}\right]\\
\begin{split} &\le N^{\nu}\cdot \EE_{J,I} \left[\mathbf{1}\Big\{-(1+K)\left|\widehat{\tau}_N -\tau_0\right| +(1-\delta)N^{-\nu} \le \widetilde{b}_J -\widetilde{b}_I  \right.  \\
&\left. \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad < (1+\delta)N^{-\nu}+(1+K)\left|\widehat{\tau}_N -\tau_0\right| \Big\}\inds{\widetilde{E}_{N,K}^c}\right]
\end{split}\\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \mathbf{1}\Big\{-(1+K)\left|\widehat{\tau}_N -\tau_0\right| +(1-\delta)N^{-\nu} \le \widetilde{b}_j-\widetilde{b}_i  \\
&\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad < (1+\delta)N^{-\nu}+(1+K)\left|\widehat{\tau}_N -\tau_0\right| \Big\} \inds{\widetilde{E}_{N,K}^c}\\
%&\le N^{\nu}\cdot \EE_{J,I} \left[\ind{-(1+K)\left|\widehat{\tau}_N -\tau_0\right| +(1-\delta)N^{-\nu} \le \widetilde{b}_J -\widetilde{b}_I  < (1+\delta)N^{-\nu}+(1+K)\left|\widehat{\tau}_N -\tau_0\right| }\inds{\widetilde{E}_{N,K}^c}\right] \\
%&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{-(1+K)\left|\widehat{\tau}_N -\tau_0\right| +(1-\delta)N^{-\nu} \le \widetilde{b}_j-\widetilde{b}_i< (1+\delta)N^{-\nu}+(1+K)\left|\widehat{\tau}_N -\tau_0\right| }\inds{\widetilde{E}_{N,K}^c} \\
&\le N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{-(1+K)N^{-\nu'} +(1-\delta)N^{-\nu} \le \widetilde{b}_j-\widetilde{b}_i< (1+\delta)N^{-\nu}+(1+K)N^{-\nu'}}.
\end{align*}

Since $\nu'>\nu,$ it holds for all sufficiently large $N$ that $(1+K)N^{-\nu'} \le \delta N^{-\nu}$, and consequently

\begin{align*}
& \limsup_{N\to\infty} N^{-(2-\nu)} \EE\left(\sum_{j=1}^N\sum_{i=1}^N \ind{\big|\widehat{\widetilde{b}}_j -  \widehat{\widetilde{b}}_i\big| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{\widetilde{E}_{N,K}^c}\right)\\
&\le \limsup_{N\to\infty} N^{-(2-\nu)} \sum_{j=1}^N \sum_{i=1}^N \ind{(1-2\delta)N^{-\nu} \le \widetilde{b}_j-\widetilde{b}_i< (1+2\delta)N^{-\nu}} = 4\delta \mathcal{J}_b.
\end{align*}

Letting $\delta\to 0$ here, we conclude that

\begin{equation}\label{tildeDelta3Nlast}
\lim_{\delta\downarrow 0 }\limsup_{N\to\infty} N^{-(2-\nu)} \EE\left(\sum_{j=1}^N\sum_{i=1}^N \ind{\big|\widehat{\widetilde{b}}_j -  \widehat{\widetilde{b}}_i\big| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{\widetilde{E}_{N,K}^c}\right)= 0.
\end{equation}

Finally, for any $\epsilon>0,$

\begin{align*}
&P\left(N^{-(2-\nu)} \sum_{j=1}^N\sum_{i=1}^N \ind{\big|\widehat{\widetilde{b}}_j -  \widehat{\widetilde{b}}_i\big| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]} > \epsilon\right)\\
&\le P\left(N^{-(2-\nu)} \sum_{j=1}^N\sum_{i=1}^N \ind{\big|\widehat{\widetilde{b}}_j -  \widehat{\widetilde{b}}_i\big| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{\widetilde{E}_{N,K}^c} > \epsilon/2\right)+ P(\widetilde{E}_{N,K})\\
&\le (\epsilon/2)^{-1} N^{-(2-\nu)} \EE\left(\sum_{j=1}^N\sum_{i=1}^N \ind{\big|\widehat{\widetilde{b}}_j -  \widehat{\widetilde{b}}_i\big| \in \left[(1-\delta)N^{-\nu},(1+\delta)N^{-\nu}\right]}\inds{\widetilde{E}_{N,K}^c}\right) + P(\widetilde{E}_{N,K}).
\end{align*}

Invoking (<ref>) and using  $\lim_{K\to\infty}\limsup_{N\to\infty} P(\widetilde{E}_{N,K})=0$, we complete the proof of (<ref>), which, in turn, proves that $\widetilde{\Delta}_{3,N}\Pto 0$.

For $k=4$ or $5,$ the proof of $\widetilde{\Delta}_{k,N}\Pto 0$ follows by making similar changes in the proof of  $\Delta_{k,N}\Pto 0$ in <ref>, just as we did for $k=1$ or $3$.

§.§ Proof of Proposition B.1

The statistic $t_N$ is defined as
$$t_N = \widehat{\vec{q}}_N^\top \vec{Z}_N,\quad \widehat{q}_N(j) = \sum_{i=1}^N \ind{Y_{N,i} - \tau_0 Z_{N,i} \le Y_{N,j} - \tau_0 Z_{N,j}},\ 1\le j\le N.$$
Note, the distribution of $t_N$ under $\tau=\tau_N$ depends on $\tau_N$ only through the vector $\widehat{\vec{q}}_N$. Under $\tau=\tau_N$ we can write
$$(Y_{N,1} - \tau_0 Z_{N,1}, \dots, Y_{N,N} - \tau_0 Z_{N,N}) \dd (b_{N,1} + (\tau_N - \tau_0)Z_{N,1}, \dots, b_{N,N} + (\tau_N - \tau_0)Z_{N,N})$$
and hence the distribution of $\widehat{\vec{q}}_N^\top \vec{Z}_N$ under $\tau=\tau_N$ is same as the randomization distribution of $\vec{q}_N^\top \vec{Z}_N$ where
$$q_{N,j}=\sum_{i=1}^N \ind{b_{N,i} + (\tau_N -\tau_0) Z_{N,i} \le b_{N,j}+ (\tau_N -\tau_0) Z_{N,j}},\ 1\le j\le N.$$

In order words, we have  $t_N \dd t^*_N$ under $\tau=\tau_N,$ where

\begin{align*}
t^*_N  &= \sum_{j=1}^N Z_{N,j} \sum_{i=1}^N \ind{b_{N,i} + (\tau_N -\tau_0) Z_{N,i} \le b_{N,j}+ (\tau_N -\tau_0)Z_{N,j}}\\
&= \sum_{j=1}^N Z_{N,j} \sum_{i=1}^N \left(Z_{N,i}\ind{b_{N,i}  \le b_{N,j}} + (1-Z_{N,i})\ind{hN^{-1/2} \le b_{N,j} - b_{N,i}} \right) \\
&=\sum_{j=1}^N Z_{N,j} + \sum_{j=1}^N \sum_{i=1, i\neq j}^N Z_{N,j} Z_{N,i}\ind{b_{N,i}  \le b_{N,j}} \\
&\qquad\qquad\qquad+  \sum_{j=1}^N \sum_{i=1, i\neq j}^N Z_{N,j} (1-Z_{N,i})\ind{hN^{-1/2} \le b_{N,j} - b_{N,i}}.
\end{align*}

Now when $h\ge 0,$
$$\ind{hN^{-1/2} \le b_{N,j} - b_{N,i}} = \ind{0 \le b_{N,j} - b_{N,i}} - \ind{0\le b_{N,j} - b_{N,i}<hN^{-1/2}}$$
and thus

\[t^*_N = m +  \sum_{j=1}^N \sum_{i=1, i\neq j}^N Z_{N,j}\ind{b_{N,i}  \le b_{N,j}} -  \sum_{j=1}^N \sum_{i=1, i\neq j}^N(1-Z_{N,i})Z_{N,j}\ind{0 \le b_{N,j} - b_{N,i} < hN^{-1/2}} .\]

Similarly, for $h < 0,$
$$\ind{hN^{-1/2} \le b_{N,j} - b_{N,i}} = \ind{0 \le b_{N,j} - b_{N,i}} + \ind{hN^{-1/2}\le b_{N,j} - b_{N,i}<0}$$
which gives us the desired expression.

As a corollary of <ref>, we have the following result on the bias of $t_N$.

Let $t_N$ be the Wilcoxon rank-sum statistic where the treatment assignment is based on a SRSWOR sample of size $m=m(N)$ from $\{1,2,\dots,N\}$. Fix $h\in\mathbb{R}$ and let $\tau_N = \tau_0 - hN^{-1/2}$. Define $I_{h,N}$ as in (<ref>) of the main paper. Then
\begin{equation*}\EE_{\tau_N} \left(t_N\right)  - \EE_{\tau_0} \left(t_N\right) = - \frac{m}{N}\frac{N-m}{N-1}\sum_{j=1}^N\sum_{i=1, i\neq j}^N I_{h,N} (b_{N,j} - b_{N,i}).\end{equation*}

We have

\begin{align*}
\EE_{\tau_N} \left(t_N\right) &= \EE\left(m +  \sum_{j=1}^N \sum_{i=1, i\neq j}^N Z_{N,j}\ind{b_{N,i}  \le b_{N,j}} -  \sum_{j=1}^N \sum_{i=1, i\neq j}^N(1-Z_{N,i})Z_{N,j} I_{h,N} (b_{N,j} - b_{N,i})\right)\\
& = \frac{m}{N}\sum_{j=1}^N \sum_{i=1}^N \ind{b_{N,i}  \le b_{N,j}} -  \sum_{j=1}^N \sum_{i=1, i\neq j}^N P(Z_{N,j} = 1, Z_{N,i} = 0) I_{h,N} (b_{N,j} - b_{N,i})\\
&= \frac{m}{N}\sum_{j=1}^N  \sum_{i=1}^N \ind{b_{N,i} \le b_{N,j}} - \frac{m}{N}\sum_{j=1}^N  \sum_{i=1, i\neq j}^N \left(1-\frac{m-1}{N-1}\right) I_{h,N} (b_{N,j} - b_{N,i}).
\end{align*}

Observe that the first term above is nothing but $\EE_{\tau_0} \left(t_N\right)$. This finishes the proof.

§ SOME TECHNICAL LEMMAS

Let $t(\vec{Z}, \vec{Y}-\tau_0\vec{Z})$ be a test statistic for testing $H_0:\tau=\tau_0$ and $\widehat{\tau}^{\mathrm{R}}$ be the estimator of $\tau$ based on $t(\cdot,\cdot)$, as defined in (<ref>) of the main paper. Assume that for  all values of $\vec{y}$ and $\vec{z}$, $t(\vec{z}, \vec{y} -\tau \vec{z})$ is a non-increasing function of $\tau$.
Let $\{c_N\}_{N\ge 1}$ and $\{d_N\}_{N\ge 1}$ be sequences of positive real numbers and $\mu_N$ be the mean of $t_N = t(\vec{Z}_N, \vec{Y}_N - \tau_0 \vec{Z}_N)$ under $\tau=\tau_0$.  Fix $h\in\mathbb{R}$ and define $\tau_N := \tau_0 - h/c_N$. Suppose that

\begin{equation} \label{psa0}
\lim_{N\to\infty} \mathbb{P}_{\tau_N} \left(d_N (t_N - \mu_N) \le x\right) = G((x+hB)/A)
\end{equation}

holds for every $x\in\mathbb{R}$, where $G$ is a  distribution function of a continuous random variable with mean $0$ and variance $1$, and $A, B>0$ are constants. Then it holds that

\begin{equation} \label{CLT0}
\lim_{N\to\infty} \mathbb{P}_{\tau_0} \left(c_N (\widehat{\tau}^{\mathrm{R}} - \tau_0) \le h\right) = G(hB/A).
\end{equation}

Denote $\tau'_N = \tau_0 + h/c_N$. We use <ref> to write the following:

\begin{equation}\label{sand}
\begin{split}
\mathbb{P}_{\tau_0}\left(t_N(\vec{Z}, \vec{Y} - \tau'_N \vec{Z}) < \mu_N\right) &\le \mathbb{P}_{\tau_0}\left(\widehat{\tau}^* \leq \tau'_N\right) \\
& \le \mathbb{P}_{\tau_0}\left(\widehat{\tau}^{\mathrm{R}} \leq \tau'_N\right) \\
& \le \mathbb{P}_{\tau_0}\left(\widehat{\tau}^{**} \leq \tau'_N\right)\le \mathbb{P}_{\tau_0}\left(t_N(\vec{Z}, \vec{Y} -\tau'_N \vec{Z}) \le \mu_N\right).
\end{split}
\end{equation}

In view of <ref>, the distribution of $t_N(\vec{Z}, \vec{Y} - \tau'_N \vec{Z})$ under $\tau=\tau_0$ is same as the distribution of $t_N = t_N(\vec{Z}, \vec{Y} - \tau_0 \vec{Z})$ under $\tau=\tau_N$, which we denote by $G_N$. Then equation (<ref>) tells us that $G_N(x/d_N + \mu_N) \to G((x+hB)/A)$ as $n\to\infty,$ for every $x\in\mathbb{R}$. In particular, for $x=0$ we can say that $G_N(\mu_N) \to G(hB/A)$ and that $G_N(\mu_N-)\to G(hB/A - )$ which is also equal to $G(hB/A)$ since $G$ is continuous. Therefore both the extreme sides of  (<ref>) converge to $G(hB/A)$ and thus by sandwich principle, equation (<ref>) holds.

Let $t(\cdot, \cdot)$ be a test statistic such that for all values of $\vec{y}$ and $\vec{z}$, $t(\vec{z}, \vec{y} -\tau \vec{z})$ is a non-increasing function of $\tau$. Then for any $h\in\mathbb{R},$

\begin{equation*}
\begin{split}
\mathbb{P}_\tau\left(t(\vec{Z}, \vec{Y} -a \vec{Z}) < \mu\right) \le \mathbb{P}_\tau\left(\widehat{\tau}^* \leq a\right)
& \le \mathbb{P}_\tau\left(\widehat{\tau}^{\mathrm{R}} \leq a\right) \\
& \le \mathbb{P}_\tau\left(\widehat{\tau}^{**} \leq a\right)\le \mathbb{P}_\tau\left(t(\vec{Z}, \vec{Y} -a \vec{Z}) \le \mu\right).
\end{split}
\end{equation*}

The proof is straightforward from the definitions of $\widehat{\tau}^*$ and $\widehat{\tau}^{**}$. First observe that $\tau^*\le \widehat{\tau}^{\mathrm{R}}\le \tau^{**}$ holds almost surely. Now, if $a$ is such that $ t(\vec{Z}, \vec{Y} -a \vec{Z}) < \mu,$ then
$$h \ge \sup \{\tau : t(\vec{Z}, \vec{Y} - \tau \vec{Z}) < \mu\} = \widehat{\tau}^{**} \implies h \ge \widehat{\tau}^*,$$
so the left-most inequality  follows. Next,
$$\widehat{\tau}^*  \leq a \implies \widehat{\tau}^{\mathrm{R}} \leq a \implies \widehat{\tau}^{**}\leq a.$$
Finally, suppose that $a$ is such that $ t(\vec{Z}, \vec{Y} -a \vec{Z}) > \mu$. We split it into two cases:
(a) when $\widehat{\tau}^{*} < \widehat{\tau}^{**},$  we have
$$t(\vec{Z}, \vec{Y} -a \vec{Z}) > \mu \implies a \le \sup \{\tau : t(\vec{Z}, \vec{Y} - \tau \vec{Z}) > \mu \} = \widehat{\tau}^{*} < \widehat{\tau}^{**}.$$

(b) When $\widehat{\tau}^{*} = \widehat{\tau}^{**},$ we have
$$t(\vec{Z}, \vec{Y} -a \vec{Z}) > \mu \implies h< \sup \{\tau : t(\vec{Z}, \vec{Y} - \tau \vec{Z}) > \mu \} = \widehat{\tau}^{*} = \widehat{\tau}^{**}.$$

This finishes the proof.

The distribution of $t(\vec{Z}, \vec{Y} - (\tau + \delta)\vec{Z})$ under $\tau=\tau_0$ is identical to the distribution of $t(\vec{Z}, \vec{Y} - \tau \vec{Z})$ under $\tau=\tau_0 - \delta$.

For any $x\in\mathbb{R},$

\begin{align*}
\mathbb{P}_{\tau_0} \left(t(\vec{Z}, \vec{Y} - (\tau + \delta)\vec{Z})\le x\right)
&= \mathbb{P}_{\tau_0} \left(t(\vec{Z}, \tau_0 \vec{Z} + \vec{b} - (\tau + \delta)\vec{Z})\le x\right) \\
&= P\left(t(\vec{Z}, (\tau_0  - \delta)\vec{Z} + \vec{b} - \tau\vec{Z})\le x\right) \\
&= \mathbb{P}_{\tau_0-\delta} \left(t(\vec{Z}, \vec{Y} - \tau\vec{Z})\le x\right),
\end{align*}

where the second step is due to the fact that the randomization distribution of $\vec{Z}$ is free of  $\tau$.

If $\{b_{N,j}: 1\le j\le N\}$ be i.i.d. from a distribution with density $f_b(\cdot)$ satisfying $\int_{\mathbb{R}} f_b^2(x)\,dx <\infty$, and $I_{h,N}$ be as in (<ref>) of the main paper, then

\begin{equation*} N^{-3/2}\sum_{j=1}^N\sum_{i=1}^N I_{h,N} (b_{N,j} - b_{N,i})  \asto h\int_{\mathbb{R}} f_{b}^{2} (x)\, dx.\end{equation*}

Let us denote $S_N = S_N(b_{N,1},\dots,b_{N,N}) = \sum_{j=1}^N \sum_{i=1}^N I_{h,N} (b_{N,j} - b_{N,i})$.
Observe that for any fixed $i\neq j,$ and $h > 0,$
$$\EE\left(I_{h,N} (b_{N,j} - b_{N,i})\right) = P\left(0\le b_{N,2} - b_{N,1} < hN^{-1/2}\right) = g(hN^{-1/2}) - g(0)$$

$$g(x) = P(b_{N,2} - b_{N,1} \le x) = \int_{-\infty}^{x} \int_{\mathbb{R}}  f_b(u+t) f_b(u)\,du\,dt, \ x\in\mathbb{R}.$$

Using the DCT for integrals, we argue that $g'(x) = \int_{\mathbb{R}} f_b(u+x) f_b(u)du$.

\begin{align*}  \lim_{N\to\infty} N^{-3/2} \EE(S_N) &= \lim_{N\to\infty}  N^{-3/2} N^2 (g(hN^{-1/2}) - g(0))\\
&= \lim_{N\to\infty}  h\cdot\frac{g(hN^{-1/2}) - g(0)}{hN^{-1/2}} \\
&= hg'(0) \\
&= h\int_{\mathbb{R}} f_b(u)^2du.\numberthis\label{Glim}
\end{align*}

Now we bound $\EE(S_N - \EE S_N)^2$ using the Efron-Stein inequality [13]. For each $1\le k \le N,$ let $b_{N,k}'$ be an i.i.d. copy of $b_{N,k},$ independent of everything else, and define
$$S_N^{(k)} = S_N(b_{N,1},\dots,b_{N,k-1},b_{N,k}',b_{N,k+1},\dots,b_{N,N}), \ 1\le k\le N.$$

Note that

\begin{align*}
S_N - S_N^{(k)}
&=  \sum_{j=1}^N \left(I_{h,N} (b_{N,j} - b_{N,k}) -  I_{h,N} (b_{N,j} - b_{N,k}')\right)\\
&\quad \quad+\sum_{j=1}^N \left(I_{h,N} (b_{N,k} - b_{N,j}) -  I_{h,N} (b_{N,k}' - b_{N,j})\right).
\end{align*}

An application of the Cauchy-Schwarz inequality yields the following.

\begin{align*}
&\EE\left[ \bigg(\sum_{j=1}^N I_{h,N} (b_{N,j} - b_{N,k}) -  I_{h,N} (b_{N,j} - b_{N,k}')\bigg)^2 \ \Big|\ b_{N,1},\dots,b_{N,N}\right] \\
&\leq N\EE\left[ \sum_{j=1}^N \left(I_{h,N} (b_{N,j} - b_{N,k}) -  I_{h,N} (b_{N,j} - b_{N,k}')\right)^2 \ \Big|\ b_{N,1},\dots,b_{N,N}\right] \\
&\leq 2N\EE\left[ \sum_{j=1}^N \left(I_{h,N} (b_{N,j} - b_{N,k}) + I_{h,N} (b_{N,j} - b_{N,k}')\right) \ \Big|\ b_{N,1},\dots,b_{N,N}\right] \\
%&= 2N \sum_{j=1}^N \left(I_{h,N} (b_{N,j} - b_{N,k}) +\EE\left[I_{h,N} (b_{N,j} - b_{N,k}')\mid b_{N,j}\right]\right)\\
&= 2N \sum_{j=1}^N \left(I_{h,N} (b_{N,j} - b_{N,k}) +\EE\left[I_{h,N} (b_{N,j} - b_{N,k})\mid b_{N,j}\right]\right).
\end{align*}

Applying the same argument to the second part yields

\begin{align*}
&\EE\left[ \bigg(\sum_{j=1}^N I_{h,N} (b_{N,k} - b_{N,j}) -  I_{h,N} (b_{N,k}' - b_{N,j})\bigg)^2 \ \Big|\ b_{N,1},\dots,b_{N,N}\right]\\
&\le 2N \sum_{j=1}^N \left(I_{h,N} (b_{N,k} - b_{N,j}) +\EE\left[I_{h,N} (b_{N,k} - b_{N,j})\mid b_{N,j}\right]\right).
\end{align*}

Using the above bounds and a generalized Efron-Stein inequality (see <ref>),

\begin{align*}
& \EE(N^{-3/2}(S_N - \EE S_N))^{6} \\
N^{-9} \EE \left[\sum_{k=1}^N \EE\left[(S_N - S_N^{(k)})^2 \ \big|\ b_{N,1},\dots,b_{N,N}\right] \right]^3\\
&\lesssim N^{-6} \EE \left[\sum_{k=1}^N \sum_{j=1}^N \left(I_{h,N} (b_{N,j} - b_{N,k}) +\EE\left[I_{h,N} (b_{N,j} - b_{N,k})\mid b_{N,j}\right]\right)\right]^3\\
&\quad + N^{-6} \EE \left[\sum_{k=1}^N \sum_{j=1}^N \left( I_{h,N} (b_{N,k} - b_{N,j}) +\EE\left[I_{h,N} (b_{N,k} - b_{N,j})\mid b_{N,j}\right]\right)\right]^3\\
&\lesssim N^{-6} \EE \left[\sum_{k=1}^N \sum_{j=1}^N I_{h,N} (b_{N,j} - b_{N,k})\right]^3 + N^{-6}\EE \left[\sum_{k=1}^N \sum_{j=1}^N \EE\left[I_{h,N} (b_{N,j} - b_{N,k})\mid b_{N,j}\right]\right]^3\\
&\quad + N^{-6}\EE \left[\sum_{k=1}^N \sum_{j=1}^N \EE\left[I_{h,N} (b_{N,k} - b_{N,j})\mid b_{N,j}\right]\right]^3.
\end{align*}

We now show that the contribution of each of last three sums is at most of the order of $N^{-3/2},$ which would complete the proof, with the aid of Borel-Cantelli lemma. We start with

\begin{align*}
&N^{-6} \EE \left[\sum_{k=1}^N \sum_{j=1}^N I_{h,N} (b_{N,j} - b_{N,k})\right]^3 \\
&= N^{-6}\sum_{1\le i_1,j_1,i_2,j_2,i_3,j_3\le N} \EE\left[I_{h,N} (b_{N,j_1} - b_{N,i_1})I_{h,N} (b_{N,j_2} - b_{N,i_2})I_{h,N} (b_{N,j_3} - b_{N,i_3})\right]
\end{align*}

When $|\{i_1,j_1,i_2,j_2,i_3,j_3\}|\le 4$, the number of ways to choose such a set of indices would be $O(N^4),$ and the summands being bounded above by $1,$ the contributions from these terms is $O(N^{-2})$. If $|\{i_1,j_1,i_2,j_2,i_3,j_3\}|=6,$ i.e., the indices are all distinct, we use the independence of the $b_{N,i}$'s to split the joint probability as the product of marginal probabilities, and thus the contribution from such terms becomes

\begin{align*}
& N^{-6}\sum_{i_1,j_1,i_2,j_2,i_3,j_3 \text{ distinct}} \EE I_{h,N} (b_{N,j_1} - b_{N,i_1}) \EE I_{h,N} (b_{N,j_2} - b_{N,i_2}) \EE I_{h,N} (b_{N,j_3} - b_{N,i_3}) \\
&\le N^{-6}\left(\sum_{1\le i, j\le N} \EE I_{h,N} (b_{N,j} - b_{N,i})\right)^3 = N^{-3/2} \left(\EE N^{-3/2} S_N\right)^3 = O(N^{-3/2}).
\end{align*}

Finally, consider the case where $|\{i_1,j_1,i_2,j_2,i_3,j_3\}|=5,$ i.e., exactly one index is repeated. Then at least two of the sets $\{i_1,j_1\},\{i_2,j_2\},\{i_3,j_3\}$ will make four distinct indices altogether. If the set left-out is $\{i_3,j_3\}$, we can just upper bound $I_{h,N}(b_{N,j_3} -b_{N,i_3})$ by $1$. Also, the number of ways of choosing the indices $\{i_3,j_3\}$ will be $O(N),$ since one of them is repeated within $\{i_1,j_1,i_2,j_2\}$. Using this idea,

\begin{align*}
& N^{-6}\sum_{|i_1,j_1,i_2,j_2,i_3,j_3|=5} \EE\left[ I_{h,N} (b_{N,j_1} - b_{N,i_1})  I_{h,N} (b_{N,j_2} - b_{N,i_2})  I_{h,N} (b_{N,j_3} - b_{N,i_3})\right] \\
&\lesssim N^{-5}\sum_{i_1,j_1,i_2,j_2 \text{ distinct}} \EE I_{h,N} (b_{N,j_1} - b_{N,i_1})\EE I_{h,N} (b_{N,j_2} - b_{N,i_2}) \\
&\le N^{-5}\left(\sum_{1\le i, j\le N} \EE I_{h,N} (b_{N,j} - b_{N,i})\right)^2 = N^{-2} \left(\EE N^{-3/2} S_N\right)^2 = O(N^{-2}).
\end{align*}

Combining the above cases we conclude that $N^{-6} \EE [\sum_{k=1}^N \sum_{j=1}^N I_{h,N} (b_{N,j} - b_{N,k})]^3 = O(N^{-3/2})$.
We next look at

\begin{align*}
& N^{-6}\EE \left[\sum_{k=1}^N \sum_{j=1}^N \EE\left[I_{h,N} (b_{N,j} - b_{N,k})\mid b_{N,j}\right]\right]^3\\
&= N^{-6}\sum_{1\le i_1,j_1,i_2,j_2,i_3,j_3\le N} \EE\left[I^*(b_{N,j_1}, b_{N,i_1})I^*(b_{N,j_2}, b_{N,i_2})I^*(b_{N,j_3}, b_{N,i_3})\right]
\end{align*}

where $I^*(b_{N,j}, b_{N,i}) := \EE \left[I_{h,N} (b_{N,j} - b_{N,i}) \mid b_{N,j}\right]$, which is really a function of $b_{N,j}$. Thus, when all the $6$ indices are distinct, the joint probability is split into marginals, and once again we can see that the contribution of these terms is $O(N^{-3/2})$. When $|\{i_1,j_1,i_2,j_2,i_3,j_3\}|\le 4$, the same argument applies as we gave earlier, and tells us that contribution from these terms  would be $O(N^{-2})$. Finally, when $|\{i_1,j_1,i_2,j_2,i_3,j_3\}|= 5$ we play the same trick applied in the previous case to conclude that contribution from these terms is

\begin{align*}
& N^{-6}\sum_{|i_1,j_1,i_2,j_2,i_3,j_3|=5} \EE\left[I^*(b_{N,j_1}, b_{N,i_1})I^*(b_{N,j_2}, b_{N,i_2})I^*(b_{N,j_3}, b_{N,i_3})\right]\\
&\lesssim N^{-5}\sum_{i_1,j_1,i_2,j_2 \text{ distinct}} \EE\left[I^*(b_{N,j_1}, b_{N,i_1})I^*(b_{N,j_2}, b_{N,i_2})\right] \\
&= N^{-5}\sum_{i_1,j_1,i_2,j_2 \text{ distinct}} \EE\left[I_{h,N} (b_{N,j_1} - b_{N,i_1}) \right]\EE\left[I_{h,N} (b_{N,j_2} - b_{N,i_2}) \right] \\
&\le N^{-5}\left(\sum_{1\le i, j\le N} \EE I_{h,N} (b_{N,j} - b_{N,i})\right)^2 = N^{-2} \left(\EE N^{-3/2} S_N\right)^2 = O(N^{-2}).
\end{align*}

Thus, $N^{-6}\EE \left[\sum_{k=1}^N \sum_{j=1}^N \EE\left[I_{h,N} (b_{N,j} - b_{N,k})\mid b_{N,j}\right]\right]^3=O(N^{-3/2})$. In a similar manner one can show that $N^{-6}\EE \left[\sum_{k=1}^N \sum_{j=1}^N \EE\left[I_{h,N} (b_{N,k} - b_{N,j})\mid b_{N,j}\right]\right]^3=O(N^{-3/2})$. Hence the proof.

Suppose that the potential control outcomes $\{b_{N,j} \}_{1\le j\le N}$ satisfy <ref>. Define
$$q_{N,j}=\sum_{i=1}^N \ind{b_{N,i}\le b_{N,j}},\quad 1\le j\le N.$$

Then, as $N\to\infty$,

\begin{equation*}
\overline{q}_N := \frac{1}{N}\sum_{j=1}^N q_{N,j} = \frac{N+1}{2} + o(N^{1/2}),\quad\text{ and }\quad
\frac{1}{N}\sum_{j=1}^N \left(q_{N,j} - \overline{q}_N\right)^2 = \frac{N^2-1}{12}+o(N^2).
\end{equation*}

We first break the ties in an arbitrary manner, and obtain $b_{N(1)}\le b_{N(2)} \le \dots \le b_{N(N)}$. Define $r_{N,j} = \sum_{i=1}^N \ind{b_{N,i}\le b_{N(j)}}$. Note that for each $1\le j\le N,$

\begin{equation*}\left|r_{N,j} - j\right| \leq \sum_{i=1}^N \ind{b_{N,i} = b_{N(j)}}.\end{equation*}

The last equation in conjunction with <ref> yields the following bounds.

\begin{align*}\sum_{j=1}^N \left|r_{N,j} - j\right| &\leq \sum_{j=1}^N \sum_{i=1}^N \ind{b_{N,i} = b_{N,j}} \\
&\leq  \sum_{j=1}^N \sum_{i=1}^N \ind{0\le b_{N,j} - b_{N,i}< N^{-1/2}}
\lesssim N^{3/2}, \end{align*}

\begin{align*}\sum_{j=1}^N \left(r_{N,j} - j\right)^2 &\leq \sum_{j=1}^N N \sum_{i=1}^N \ind{b_{N,i} = b_{N,j}} \\
&\leq  N\sum_{j=1}^N \sum_{i=1}^N \ind{0\le b_{N,j} - b_{N,i}< N^{-1/2}}\lesssim N^{5/2}.\end{align*}

\begin{align*}
\left|\sum_{i=1}^N r_{N,i}^2 - \sum_{i=1}^N i^2 \right| &= \sum_{i=1}^N (r_{N,i} - i)^2 + \left|\sum_{i=1}^N 2i(r_{N,i} - i)\right|\\
&\le\sum_{i=1}^N (r_{N,i} - i)^2 + 2\left(\sum_{i=1}^N i^2 \sum_{i=1}^N (r_{N,i} - i)^2\right)^{1/2}\\
&\lesssim N^{5/2} + N^{11/4}= o(N^3).
\end{align*}

On the other hand,

\begin{align*}
N\left|\overline{r}_N^2 - ((N+1)/2)^2\right| &= \frac{1}{N}\left|\sum_{i=1}^N (r_{N,i} - i)\sum_{i=1}^N (r_{N,i} + i)\right|\\
&\le\frac{1}{N}\sum_{i=1}^N |r_{N,i} - i|\sum_{i=1}^N (|r_{N,i} - i| + 2i)\\
&\lesssim N^{-1} N^{3/2} \left(N^{3/2} + N^2\right)= o(N^3).
\end{align*}

Combining the above with the fact that $\{r_{N,1},\dots,r_{N,N}\}$ is same as $\{q_{N,1},\dots,q_{N,N}\}$,

\begin{equation*}\sum_{i=1}^N \left(q_{N,i} - \bar{q}_N\right)^2 = \sum_{i=1}^N r_{N,i}^2 - N \bar{r}_N^2 = \sum_{i=1}^N \left(i - \frac{N+1}{2}\right)^2 + o(N^3) = \frac{N(N^2-1)}{12} + o(N^3).\end{equation*}

This finishes the proof of the second assertion. To prove the first assertion, we fix any $\delta>0$ and note that

\begin{align*}
\left|\sum_{j=1}^N q_{N,j} - \frac{N(N+1)}{2}\right| &= \left|\sum_{j=1}^N (r_{N,j} - j)\right| \\
&\le \sum_{j=1}^N \left|r_{N,j} - j\right| \\
&\leq \sum_{j=1}^N \sum_{i=1}^N \ind{b_{N,i} = b_{N,j}} \\
&\leq  \sum_{j=1}^N \sum_{i=1}^N \ind{0\le b_{N,j} - b_{N,i}< \delta N^{-1/2}}.
\end{align*}

Invoking <ref> we can say that

$$\limsup_{N\to\infty}\left|\sum_{j=1}^N q_{N,j} - \frac{N(N+1)}{2}\right|\le \delta \mathcal{I}_b.$$

Now letting $\delta\to 0$ completes the argument.

Suppose that ranks $\{q_{N,j}\}$ satisfy
$\sum_{j=1}^N \left(q_{N,j} - \overline{q}_N\right)^2 = \frac{N(N^2-1)}{12}+o(N^3)$ as $N\to\infty$.
Let $t_N$ be the Wilcoxon rank-sum statistic when the treatments are assigned by an $m$-out-of-$N$ SRSWOR sample where $m/{N}\to \lambda\in (0,1)$ as $N\to\infty$.  Then, under $\tau=\tau_0$,
$$\var \left(t_N\right) \sim\frac{ \lambda(1-\lambda)}{12}N^3\text{ as $N\to \infty$.}$$

Recall from (<ref>) that under $\tau=\tau_0,$ we can write $t_N \dd \sum_{j=1}^N  q_{N,j}Z_{N,j},$ where $q_{N,j}=\sum_{i=1}^N \ind{b_{N,i} \le b_{N,j}}$.
Note that each $Z_{N,j}$ is a Bernoulli($m/N$) random variable, and for $i\neq j$ we have
\begin{align*}\text{Cov}(Z_{N,i}, Z_{N,j}) &= P(Z_{N,i}=1,Z_{N,j}=1) - P(Z_{N,i}=1)P(Z_{N,j}=1)\\
&= \frac{m(m-1)}{N(N-1)} - \left(\frac{m}{N}\right)^2 =-\frac{1}{N-1} \cdot\frac{m}{N} \left(1-\frac{m}{N}\right).\end{align*}
Hence we deduce that, under $\tau=\tau_0$,
\begin{align*}
\var\left(t_N\right) &= \sum_{j=1}^N\text{Var}\left(q_{N,j} Z_{N,j}\right) +2\sum_{1\le i<j\le N}\text{Cov}\left(q_{N,i} Z_{N,i}, q_{N,j} Z_{N,j}\right) \\
&= \sum_{j=1}^N q_{N,j}^2 \frac{m}{N}\left(1-\frac{m}{N}\right) -2\sum_{1\le i<j\le N} q_{N,i}q_{N,j} \frac{m}{N} \left(1-\frac{m}{N}\right)\frac{1}{N-1} \\
&=  \frac{m}{N}\left(1-\frac{m}{N}\right)\frac{N}{N-1} \sum_{j=1}^N \left(q_{N,j} - \overline{q}_N\right)^2.
\end{align*}

In light of the given condition on the ranks, the above implies that

\begin{align*}
\var\left(t_N\right) &=  \frac{m}{N}\left(1-\frac{m}{N}\right)\frac{N}{N-1}\left( \frac{N(N^2-1)}{12} + o(N^3)\right)\sim \lambda(1-\lambda)\frac{N^3}{12},
\end{align*}

which completes the proof.

Let $\vec{Z}_N$ be the vector of treatment indicators when the treatments are assigned by $m$-out-of-$N$ SRSWOR where ${m(N)}/{N}\to \lambda\in (0,1)$ as $N\to\infty$. Define
$$S_N = \sum_{j=1}^N  \sum_{i=1, i\neq j}^N  (1 -Z_{N,i}) Z_{N,j} I_{h,N} (b_{N,j} - b_{N,i})$$
where  $I_{h,N}$ is defined in (<ref>) of the main paper.  Then under <ref> it holds that
$$N^{-3/2} S_N\Pto h\lambda(1-\lambda)\mathcal{I}_b.$$

We imitate the proof of <ref>. The first step is to note that
$$N^{-3/2} \EE S_N = \frac{m}{N} \left(1-\frac{m-1}{N-1}\right) N^{-3/2}\sum_{j=1}^N  \sum_{i=1, i\neq j}^N I_{h,N} (b_{N,j} - b_{N,i})
\to h\lambda(1-\lambda)\mathcal{I}_b.$$
It therefore remains to show that $N^{-3}\text{Var}\left(S_N\right) \to 0$.
For brevity, let us abuse the notation $I_{h,N} (b_{N,j}-b_{N,i})$ and write $I_{h,N} (i, j)$ instead. We have
$$\text{Var}\left(S_N\right) =% \sum_{j=1}^N  \sum_{i=1, i\neq j}^N I_{h,N} (b_{N,j} - b_{N,i}) +
\sum_{i=1}^N  \sum_{j=1, j\neq i}^N \sum_{k=1}^N  \sum_{l=1, l\neq k}^N  \text{Cov}\left((1 -Z_{N,i}) Z_{N,j},(1 -Z_{N,k}) Z_{N,l}\right) I_{h,N} (i, j)I_{h,N} (k, l).$$

Note, $2\le |\{i, j, k, l\}| \le 4$. Consider the following cases.

(a) $|\{i, j, k, l\}|=2,$ i.e., $(i, j) = (k, l)$. Note that $\text{Var}((1 -Z_{N,i}) Z_{N,j}) = p_N(1-p_N)$ where $p_N = P(Z_{N,i} = 0, Z_{N,j}=1) = \frac{m}{N}\frac{N-m}{N-1} \sim \lambda (1-\lambda)$. Hence the contribution of these terms in $\text{Var}(S_N)$ is given by
$$\sum_{i=1}^N  \sum_{j=1, j\neq i}^N p_N(1-p_N)I^2_{h,N} (i,j) \lesssim   \lambda(1-\lambda) \sum_{i=1}^N  \sum_{j=1, j\neq i}^N I_{h,N} (i,j)  \lesssim N^{3/2}.$$

(b) $|\{i, j, k, l\}|=4,$ i.e., all $4$ indices are distinct. Note that in this case

\begin{align*} &\text{Cov}\left((1 -Z_{N,i}) Z_{N,j},(1 -Z_{N,k}) Z_{N,l}\right)\\
&= P(Z_{N,i}=0, Z_{N,j}=1, Z_{N,k} = 0, Z_{N,l} =1) - p_N^2\\
& = \frac{\binom{N-4}{m-2}}{\binom{N}{m}} - \left(\frac{m}{N}\frac{N-m}{N-1} \right)^2\\
& = \frac{m}{N}\frac{N-m}{N-1} \left(\frac{(m-1)(N-m-1)}{(N-2)(N-3)} - \frac{m}{N}\frac{N-m}{N-1} \right)\\
&= \frac{m}{N}\frac{N-m}{N-1} \frac{(4 mN^2 - 4 m^2 N  - N^3 + 6 m^2  - 6 m N + 2 N^2 - N)}{N(N-1)(N-2)(N-3)}\\
&\sim -\lambda(1-\lambda)(1-2\lambda)^2 N^{-1}.
\end{align*}

Hence the contribution $u_N$ of these terms in $\text{Var}(S_N)$ satisfies the following.
$$u_N \lesssim N^{-1} \sum_{i=1}^N  \sum_{j=1, j\neq i}^N \sum_{k=1}^N  \sum_{l=1, l\neq k}^N I_{h,N} (i,j)I_{h,N} (k,l)  \lesssim N^{-1+3/2+3/2} =N^{2}.$$

(c) $|\{i, j, k, l\}|=3$. Here we have 4 sub-cases:

sub-case     $\EE(1 -Z_{N,i}) Z_{N,j}(1 -Z_{N,k}) Z_{N,l}$     $\text{Cov}\left((1 -Z_{N,i}) Z_{N,j},(1 -Z_{N,k}) Z_{N,l}\right)$

$i = k, j\neq l$     $P(Z_{N,i} = 0, Z_{N,j} =1, Z_{N,l}=1)$      $\frac{m(m-1)(N-m)}{N(N-1)(N-2)}   - p_N^2\sim \lambda^3(1-\lambda) $

$i \neq k, j = l$     $P(Z_{N,i} = 0, Z_{N,j}=1, Z_{N,k} =0)$      $\frac{m(N-m)(N-m-1)}{N(N-1)(N-2)} - p_N^2\sim\lambda(1-\lambda)^3 $

$i = l, j \neq k$     $0$      $- p_N^2 \sim - \lambda^2(1-\lambda)^2$

$i \neq l, j = k$     $0$     $-p_N^2 \sim - \lambda^2(1-\lambda)^2$

Hence, if $v_n$ be the contribution these terms in $\text{Var}(S_N)$, then

\begin{align*}
v_N  & \lesssim  \sum_{i, j, l \text{ distinct}}  I_{h,N} (i,j)I_{h,N} (i,l)  + \sum_{i, j, k \text{ distinct}}  I_{h,N} (i,j)I_{h,N} (k,j)  \\
&\quad + \sum_{i, j, k \text{ distinct}}  I_{h,N} (i,j)I_{h,N} (k,i)  + \sum_{i, j, l \text{ distinct}} I_{h,N} (i,j)I_{h,N} (j,l) \\
&\le 4N\sum_{i, j\neq i}  I_{h,N} (i,j) \lesssim N^{1+3/2} =N^{5/2}.
\end{align*}

Combining the three cases, we can say that $N^{-3} \text{Var}(S_N) \lesssim N^{-3} (N^{3/2} + N^2 + N^{5/2}) = o(1)$.

Consider the setup of <ref>. It holds under $\tau=\tau_N$ that

$$N^{-3/2}\left(t_N - \EE_{\tau_N} \left(t_N\right)\right)  \dto \mathcal{N}\left(0, \frac{\lambda(1-\lambda)}{12}\right).$$

Immediate from <ref> and <ref>.

Suppose that $\vec{b}_N = \vec{X}_N\vec{\beta}_N +\vec{\eps}_N$, where $\eps_{N,1},\dots,\eps_{N,N}$ are i.i.d$.$ from $\mathcal{N}(0,\sigma^2)$. Define, for any fixed $h$,

\begin{equation}
J_N := N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N I_{h,N} (\widetilde{b}_{N,j} - \widetilde{b}_{N,i}),
\end{equation}

where $\widetilde{b}_{N,j}$ is defined in (<ref>), and $I_{h,N}$ is defined in (<ref>) of the main paper.
Then $\EE J_N\to h(2\sqrt{\pi}\sigma)^{-1}$, and $\var(J_N)\to 0$, implying that <ref> holds in probability, with $\mathcal{J}_b=(2\sqrt{\pi}\sigma)^{-1}$.

We do the proof for $h>0$, the other case will be similar. For simplicity in notation, we omit the index $N$ in $\widetilde{b}_{N,j}, Z_{N,j}, \vec{p}_{N,j}$, etc. throughout this proof. Observe that under the linear model, we have $\vec{\widetilde{b}} = (\vec{I} - \vec{P}_{\vec{X}})\vec{b} = (\vec{I} - \vec{P}_{\vec{X}})\vec{\eps}$. Hence for any pair $(i,j)$ of distinct indices, $\widetilde{b}_{j} - \widetilde{b}_i \sim \mathcal{N}(0, \sigma_{ij}^2)$, where $\sigma_{ij}^2 :=  \sigma^2(2-\|\vec{p}_j - \vec{p}_i\|^2)$ (this follows from the fact that $\vec{P}_{\vec{X}}$ is a projection matrix).

\begin{align*}
\EE J_N &= N^{-3/2} \sum_{j=1}^N \sum_{i=1}^N P\left(0\le  \widetilde{b}_{j}-\widetilde{b}_{i} < hN^{-1/2}\right)= N^{-3/2} \sum_{j=1}^N \sum_{i=1}^N \left(\Phi\left(\sigma_{i,j}^{-1}hN^{-1/2}\right) - \Phi(0)\right).
\end{align*}

For any $\delta>0$ and $N\in\mathbb{N}$, define
\begin{equation}\label{SNd}
S_{N,\delta} := \{(i,j) : 1\le i,j\le N, \|\vec{p}_j - \vec{p}_i\| \le \delta\}.
\end{equation}

Invoking <ref>, we get

$$|S_{N,\delta}^c|=|\{(i,j) : 1\le i,j\le N, \|\vec{p}_j - \vec{p}_i\| > \delta\}|\le \delta^{-2} \sum_{j=1}^N\sum_{i=1}^N \|\vec{p}_j - \vec{p}_i\|^2 = O(N).$$

$$N^{-3/2} \sum_{(i,j)\in S_{N,\delta}^c} \left(\Phi\left(\sigma_{i,j}^{-1}hN^{-1/2}\right) - \Phi(0)\right) = O(N^{-1/2}).$$

For $(i,j)\in S_{N,\delta}$ we apply the Taylor theorem to conclude that there exists $\psi_{i,j}\in (0, \sigma_{i,j}^{-1}hN^{-1/2})$ such that

\begin{align*}
\Phi\left(\sigma_{i,j}^{-1}hN^{-1/2}\right) - \Phi(0)
&=  \sigma_{i,j}^{-1}hN^{-1/2}\phi\left(0\right) +  \sigma_{i,j}^{-2}h^2 N^{-1} \phi'(\psi_{i,j}).
\end{align*}

Since $\phi'$ is  bounded on $\mathbb{R},$ we can say that

\begin{align*}
\Delta_N := \left|\EE J_N - N^{-3/2} \sum_{(i,j)\in S_{N,\delta}} \sigma_{i,j}^{-1}hN^{-1/2}\phi\left(0\right) \right|
&\lesssim N^{-1/2} + N^{-3/2} \sum_{(i,j)\in S_{N,\delta}} \sigma_{i,j}^{-2}h^2 N^{-1} \\
&\lesssim N^{-1/2} + N^{-5/2} \sum_{(i,j)\in S_{N,\delta}} (2- \|\vec{p}_j - \vec{p}_i\|^2)^{-1}\\
&\lesssim N^{-1/2} + N^{-5/2} \sum_{(i,j)\in S_{N,\delta}} (2- \delta^2)^{-1} \lesssim N^{-1/2}.
\end{align*}

Hence $\Delta_N\to 0$ as $N\to\infty$, and thus

\begin{equation*}
\limsup_{N\to\infty} \EE J_N = \limsup_{N\to\infty} N^{-3/2} \sum_{(i,j)\in S_{N,\delta}} \sigma_{i,j}^{-1}hN^{-1/2}\phi\left(0\right) \le h\sigma^{-1}\phi(0)(2-\delta^2)^{-1/2}.
\end{equation*}

Since the above holds for every $\delta>0$, we can say that $\limsup_{N\to\infty} \EE J_N\le  \frac{h}{2\sqrt{\pi}\sigma}.$
On the other hand, the fact that $\Delta_{N}\to 0$ also yields the following:

\begin{align*}
\liminf_{N\to\infty} \EE J_N &= \liminf_{N\to\infty} N^{-3/2} \sum_{(i,j)\in S_{N,\delta}} (2-\|\vec{p}_j-\vec{p}_i\|)^{-1/2}h\sigma^{-1} N^{-1/2}\phi\left(0\right)\\
&\ge \liminf_{N\to\infty} N^{-2} |S_{N,\delta}| \cdot h\sigma^{-1}\phi(0)\cdot 2^{-1/2}=h\sigma^{-1}\phi(0)\cdot 2^{-1/2},
\end{align*}

where in the last step we again used the fact that $|S_{N, \delta}^c| = O(N)$. We thus conclude that
$$\lim_{N\to\infty} \EE J_N =  \frac{h}{2\sqrt{\pi}\sigma}.$$

Next we show that $\var(J_N)\to 0$ as $N\to\infty$. First,

$$\EE J_N^2 = N^{-3}\EE \sum_{i,j,k,l} \ind{0\le  \widetilde{b}_{j}-\widetilde{b}_{i} < hN^{-1/2}, 0\le  \widetilde{b}_{l}-\widetilde{b}_{k} < hN^{-1/2}}.$$

Now, as in the proof of <ref>, observe that the contribution of the terms with repeated indices in the above summation is negligible (since <ref> holds and we already have shown that $\EE J_N$ converges). To analyze the terms with distinct indices, note that  for any $4$ distinct indices $i,j,k,l$,

\begin{equation*}
\begin{pmatrix}
\widetilde{b}_{j}-\widetilde{b}_{i} \\ \widetilde{b}_{l} - \widetilde{b}_{k}
\end{pmatrix} \sim \mathcal{N}_2\left(\begin{pmatrix}
0\\ 0
\end{pmatrix}, \sigma^2\begin{pmatrix}
2-\|\vec{p}_j - \vec{p}_i\|^2 & - (\vec{p}_j - \vec{p}_i)^\top(\vec{p}_l - \vec{p}_k) \\
- (\vec{p}_j - \vec{p}_i)^\top(\vec{p}_l - \vec{p}_k)  & 2-\|\vec{p}_l - \vec{p}_k\|^2
\end{pmatrix}\right).
\end{equation*}

Let $\rho_{i,j,k,l}:=\text{corr}(\widetilde{b}_{j}-\widetilde{b}_{i},\widetilde{b}_{l} - \widetilde{b}_{k})$.
Now we again play the trick of splitting the sum into two groups, such that in one group $|\rho_{i,j,k,l}|$ is small, whereas for the other group the number of summands is small. Fix any $\delta\in(0,1)$, and consider the set $S_{N,\delta}$ defined in (<ref>). If $(i,j)$ or $(k,l)$ does not belong to $S_{N,\delta}$, then that brings down the count for such summands. To be precise,

\begin{align*}
& N^{-3}\sum_{(i,j)\in S_{N,\delta}^c \text{ or } (k,l) \in S_{N,\delta}^c} P(0\le   \widetilde{b}_{j}-\widetilde{b}_{i} \le hN^{-1/2}, 0\le   \widetilde{b}_{l}-\widetilde{b}_{k} \le hN^{-1/2})\\
&\le 2N^{-3}\sum_{1\le j,i\le N}\sum_{(k,l) \in S_{N,\delta}^c} P(0\le   \widetilde{b}_{j}-\widetilde{b}_{i} \le hN^{-1/2})\\
&\lesssim N^{-2}\sum_{1\le j,i\le N} P(0\le   \widetilde{b}_{j}-\widetilde{b}_{i} \le hN^{-1/2}) = N^{-1/2} \EE J_N.
\end{align*}

Since $\EE J_N$ converges, the above shows that the contribution from such indices are also negligible. Finally, for $(i,j),(k,l)\in S_{N,\delta}$, we have
$$|\rho_{i,j,k,l}|=\frac{\left|(\vec{p}_j - \vec{p}_i)^\top(\vec{p}_l - \vec{p}_k)\right|}{\sqrt{2-\|\vec{p}_j - \vec{p}_i\|^2 }\sqrt{2-\|\vec{p}_l - \vec{p}_k\|^2}} \leq \frac{\delta}{2-\delta^2}\le \delta,$$

and hence <ref> tells us that

\begin{align*}
&\big|P(0\le   \widetilde{b}_{j}-\widetilde{b}_{i} \le hN^{-1/2}, 0\le   \widetilde{b}_{l}-\widetilde{b}_{k} \le hN^{-1/2}) \\
&\qquad \qquad -
P(0\le   \widetilde{b}_{j}-\widetilde{b}_{i} \le hN^{-1/2})P(0\le   \widetilde{b}_{l}-\widetilde{b}_{k} \le hN^{-1/2})\big|\\
&\le |\rho_{i,j,k,l}|\left((1-\rho_{i,j,k,l}^2)^{-1/2} + (1-|\rho_{i,j,k,l}|)^{-2} \right) h^2 N^{-2} \sigma_{i,j}^{-1}\sigma_{k,l}^{-1}\\
&\le h^2 N^{-2} \sigma^{-2} \delta \left((1-\delta^2)^{-1/2}+(1-\delta)^{-2}\right).
\end{align*}

Thus we have shown that

\begin{equation*}
\begin{split}
\left|\EE J_N^2 - \left(N^{-3/2}\sum_{(i,j)\in S_{N,\delta}} P\left(0\le \widetilde{b}_{j}-\widetilde{b}_{i} \le hN^{-1/2}\right)\right)^2\right|\\
\leq h^2\sigma^{-2} \delta \left((1-\delta^2)^{-1/2}+(1-\delta)^{-2}\right)+O(N^{-1/2}).
\end{split}
\end{equation*}

Now for every $\delta\in (0,1)$, we have $|S_{N,\delta}^c|=O(N)$, so it follows that
$$\limsup_{N\to\infty}\var(J_N) \leq h^2\sigma^{-2} \delta \left((1-\delta^2)^{-1/2}+(1-\delta)^{-2}\right).$$
Since $\delta\in(0,1)$ is arbitrary here, letting $\delta\to 0$ completes the proof.

Suppose that <ref> holds. Then for any $h\ge \delta>0,$

\begin{equation*}
\lim_{N\to\infty} N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{\big|\widetilde{b}_{N,j}- \widetilde{b}_{N,i}\big| \in \left[(h-\delta)N^{-1/2},(h+\delta)N^{-1/2}\right]} = 4\delta\mathcal{J}_b
\end{equation*}

where $\mathcal{J}_b$ is defined in <ref> of the main paper.

First we show that for any $h\in\mathbb{R},$

\begin{equation}\label{equal.a}
\lim_{N\to\infty} N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{\widetilde{b}_{N,j}- \widetilde{b}_{N,i} =hN^{-1/2}} =0.\end{equation}

To show this, fix $h\geq 0$. Note that for any $\delta>0,$

\begin{align*}
0 &\le N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{\widetilde{b}_{N,j}- \widetilde{b}_{N,i} =hN^{-1/2}} \le N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{hN^{-1/2}\le \widetilde{b}_{N,j}- \widetilde{b}_{N,i} < \frac{h+\delta}{\sqrt{N}}} \\
&\le N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{0\le \widetilde{b}_{N,j}- \widetilde{b}_{N,i} < \frac{h+\delta}{\sqrt{N}}} - N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{0\le \widetilde{b}_{N,j}- \widetilde{b}_{N,i} < hN^{-1/2}}.
\end{align*}

As $N\to\infty,$ the above RHS converges to $\delta \mathcal{J}_b$. Then letting $\delta\to 0$ we finish the proof of (<ref>) for $h\geq 0$. The case $h < 0$ is similar.

Next, fix any $h\ge \delta>0$. We write

\begin{align*}
&N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{\left|\widetilde{b}_{N,j}- \widetilde{b}_{N,i}\right| \in \left[\frac{h-\delta}{\sqrt{N}},\frac{h+\delta}{\sqrt{N}}\right]} \\
&= N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \left(\ind{\left|\widetilde{b}_{N,j}- \widetilde{b}_{N,i}\right| \le\frac{h+\delta}{\sqrt{N}}} - \ind{\left|\widetilde{b}_{N,j}- \widetilde{b}_{N,i}\right| \le\frac{h-\delta}{\sqrt{N}}} \right)\\
&= N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \left(\ind{0\le \widetilde{b}_{N,j}- \widetilde{b}_{N,i} < \frac{h+\delta}{\sqrt{N}}}  + \ind{- \frac{h+\delta}{\sqrt{N}}\le \widetilde{b}_{N,j}- \widetilde{b}_{N,i} <0}
\right)\\
&\quad -  N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \left(\ind{0\le \widetilde{b}_{N,j}- \widetilde{b}_{N,i} < \frac{h-\delta}{\sqrt{N}}}  + \ind{- \frac{h-\delta}{\sqrt{N}}\le \widetilde{b}_{N,j}- \widetilde{b}_{N,i} <0}  \right)\\
&\quad + N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \left(\ind{\widetilde{b}_{N,j}- \widetilde{b}_{N,i} = \frac{h+\delta}{\sqrt{N}}} - \ind{\widetilde{b}_{N,j}- \widetilde{b}_{N,i} = \frac{h-\delta}{\sqrt{N}}}\right).
\end{align*}

Appealing to <ref> and (<ref>), we conclude that as $N\to\infty$, the above display converges to $2(h+\delta)\mathcal{J}_b - 2(h-\delta)\mathcal{J}_b = 4\delta\mathcal{J}_b$.

<ref> can be relaxed by assuming only that

\begin{equation*}
\lim_{\delta\downarrow 0}\limsup_{N\to\infty} N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{\left|\widetilde{b}_{N,j} - \widetilde{b}_{N,i}\right| \in \left[\frac{h-\delta}{\sqrt{N}},\frac{h+\delta}{\sqrt{N}}\right]} = 0.
\end{equation*}

<ref> can also be relaxed in the same manner.

Suppose that <ref> holds. Then for any $h\ge \delta>0,$

\begin{equation*}
\lim_{N\to\infty} N^{-3/2}\sum_{j=1}^N \sum_{i=1}^N \ind{\left|b_{N,j}- b_{N,i}\right| \in \left[\frac{h-\delta}{\sqrt{N}},\frac{h+\delta}{\sqrt{N}}\right]} = 4\delta\mathcal{I}_C
\end{equation*}

where $\mathcal{I}_C$ is defined in <ref> of the main paper.

The proof is essentially same as the proof of <ref>, hence omitted.

Define $D_N$ as in (<ref>), and let

\begin{equation}\label{theta_ij_defn}
\theta_{N,i,j} := \EE \left[|\xi_{N,i,j} - \widetilde{\xi}_{N,i,j}| \ \Big|\  Z_{N,j} =1\right].
\end{equation}

Then the following holds:

\begin{equation*}
\sqrt{\EE(N^{-3/2} D_N^2)}  \leq N^{-3/2} \sum_{j=1}^N  \sum_{i=1}^N\sqrt{\theta_{N,i,j}}.
\end{equation*}

Recall the notations $\mathbf{I}_N$ and $\widetilde{\mathbf{I}}_N$ from (<ref>) and (<ref>), respectively.
We use the simple result $\sqrt{\EE (\sum_{j=1}^N V_j)^2} \leq  \sum_{j=1}^N \sqrt{\EE(V_j^2)}$ to derive the following.

\begin{align*}
\sqrt{\EE(  D_N)^2} &=    \sqrt{\EE\left(\mathbf{I}_N - \widetilde{\mathbf{I}}_N\right)^2}\\
&=  \left[\EE\bigg( \sum_{j=1}^N Z_{N,j}  \sum_{i=1}^N (\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2 \right]^{1/2}\\
&\le   \sum_{j=1}^N  \left[\EE\bigg( Z_{N,j} \sum_{i=1}^N (\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2\right]^{1/2}\\
&=   \sum_{j=1}^N  \Bigg[\EE\left(Z_{N,j} \EE\left(\bigg(\sum_{i=1}^N (\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2\ \Big|\ Z_{N,j}\right)\right)\Bigg]^{1/2}\\
&=   \sum_{j=1}^N  \Bigg[\EE\left(Z_{N,j} \EE\left(\bigg(\sum_{i=1}^N (\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2\ \Big|\ Z_{N,j}=1\right)\right)\Bigg]^{1/2}\\
&=   \sum_{j=1}^N  \sqrt{\EE(Z_{N,j})} \Bigg[\EE\left(\bigg(\sum_{i=1}^N (\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2\ \Big|\ Z_{N,j}=1\right)\Bigg]^{1/2}\\
&\le   \sum_{j=1}^N  \sqrt{\EE(Z_{N,j})} \sum_{i=1}^N \left[\EE\left((\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})^2\ \Big|\ Z_{N,j}=1\right)\right]^{1/2}\\
&=   \sum_{j=1}^N  \sqrt{\EE(Z_{N,j})} \sum_{i=1}^N \left[\EE\left(|\xi_{N,i,j} - \widetilde{\xi}_{N,i,j}|\ \Big|\ Z_{N,j}=1\right)\right]^{1/2}\\
&\le   \sum_{j=1}^N  \sum_{i=1}^N \sqrt{\theta_{N,i,j}}.
\end{align*}

This completes the proof.

Define $Q_N$ as in (<ref>), and let

\begin{equation}\label{gamma_ij_defn}
\gamma_{N,i,j} := \EE \left[|\xi_{N,i,j} - \widetilde{\xi}_{N,i,j}| \ \Big|\  Z_{N,i} =1,Z_{N,j} =1\right]
\end{equation}

Then it holds that,

\begin{equation*}
\sqrt{\EE(N^{-3/2} Q_N)^2}  \leq N^{-3/2} \sum_{j=1}^N  \sum_{i=1}^N\sqrt{\gamma_{N,i,j}}.
\end{equation*}

This proof mimics the proof of <ref>. Recall the notations $\mathbf{II}_N$ and $\widetilde{\mathbf{II}}_N$ from (<ref>) and (<ref>), respectively. Note that,

\begin{align*}
\sqrt{\EE( Q_N^2)} &=    \sqrt{\EE\left(\mathbf{II}_N - \widetilde{\mathbf{II}}_N\right)^2}\\
&=  \left[\EE\bigg( \sum_{j=1}^N Z_{N,j}  \sum_{i=1}^N Z_{N,i}(\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2 \right]^{1/2}\\
&\le   \sum_{j=1}^N  \left[\EE\bigg( Z_{N,j} \sum_{i=1}^N Z_{N,i}(\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2\right]^{1/2}\\
&=   \sum_{j=1}^N  \Bigg[\EE\left(Z_{N,j} \EE\left(\bigg(\sum_{i=1}^N Z_{N,i}(\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2\ \Big|\ Z_{N,j}\right)\right)\Bigg]^{1/2}\\
&=   \sum_{j=1}^N  \Bigg[\EE\left(Z_{N,j} \EE\left(\bigg(\sum_{i=1}^N Z_{N,i}(\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2\ \Big|\ Z_{N,j}=1\right)\right)\Bigg]^{1/2}\\
&=   \sum_{j=1}^N  \sqrt{\EE(Z_{N,j})} \Bigg[\EE\left(\bigg(\sum_{i=1}^N Z_{N,i}(\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})\bigg)^2\ \Big|\ Z_{N,j}=1\right)\Bigg]^{1/2}\\
&\le   \sum_{j=1}^N  \sqrt{\EE(Z_{N,j})} \sum_{i=1}^N \left[\EE\left(Z_{N,i}(\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})^2\ \Big|\ Z_{N,j}=1\right)\right]^{1/2}\\
&= \sum_{j=1}^N  \sqrt{\EE(Z_{N,j})} \sum_{i=1}^N \left[\EE\left(Z_{N,i}\EE\left((\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})^2\ \Big|\ Z_{N,i}, Z_{N,j}=1\right)  \Big|\ Z_{N,j}=1\right)\right]^{1/2}\\
&= \sum_{j=1}^N  \sqrt{\EE(Z_{N,j})} \sum_{i=1}^N \left[\EE\left(Z_{N,i}\EE\left((\xi_{N,i,j} - \widetilde{\xi}_{N,i,j})^2\ \Big|\ Z_{N,i}=1, Z_{N,j}=1\right)  \Big|\ Z_{N,j}=1\right)\right]^{1/2}\\
&=   \sum_{j=1}^N  \sqrt{\EE(Z_{N,j})} \sum_{i=1}^N \sqrt{\EE(Z_{N,i} \mid Z_{N,j}=1)}  \left[\EE\left(|\xi_{N,i,j} - \widetilde{\xi}_{N,i,j}|\ \Big|\ Z_{N,i}=1,Z_{N,j}=1\right)\right]^{1/2}\\
&\le   \sum_{j=1}^N   \sum_{i=1}^N  \left[\EE\left(|\xi_{N,i,j} - \widetilde{\xi}_{N,i,j}|\ \Big|\ Z_{N,i}=1,Z_{N,j}=1\right)\right]^{1/2}\\
&=  \sum_{j=1}^N  \sum_{i=1}^N \sqrt{\gamma_{N,i,j}}.
\end{align*}

This completes the proof.

Define $D_N$ and $Q_N$ as in (<ref>). It holds under <ref> that $N^{-3/2} D_N=o_P(1)$ and $N^{-3/2} Q_N=o_P(1)$ as $N\to\infty$.

We first focus on $D_N$. In view of <ref>, it suffices to show that

\begin{equation*}
\lim_{N\to\infty} N^{-3/2} \sum_{j=1}^N  \sum_{i=1}^N\sqrt{\theta_{N,i,j}} =0,
\end{equation*}

where $\theta_{N,i,j}$ is defined in (<ref>).
Fix $h$ for the moment, and introduce the notation
$$r_{N} (i,j) := \widetilde{b}_{N,j} - \widetilde{b}_{N,i} - hN^{-1/2}, \ 1\le i,j\le N.$$

\begin{align*}
\xi_{N,i,j} - \widetilde{\xi}_{N,i,j} &= \ind{hN^{-1/2} (\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N \leq  r_{N} (i,j) } -  \ind{0 \leq  r_{N} (i,j)}\\
&= \ind{hN^{-1/2} (\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N \leq  r_{N} (i,j)  <  0 } \\
&\qquad\qquad -  \ind{hN^{-1/2} (\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N >  r_{N} (i,j)  \ge  0 }\\
&= \ind{hN^{-1/2} \left|(\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N\right|  \ge  \left|r_{N} (i,j)\right|}\left(\ind{ r_{N} (i,j)  <  0 } -  \ind{r_{N} (i,j)  \ge  0}\right).
\end{align*}

Now applying the Markov inequality, we get

\begin{align*}
\sqrt{\theta_{N,i,j}}  &= \EE^{1/2} \left[|\xi_{N,i,j} - \widetilde{\xi}_{N,i,j}| \ \Big|\  Z_{N,j} =1\right]\\
&= \left[P\left(hN^{-1/2} \left|(\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N\right| \ \ge \ \left|r_{N} (i,j)\right| \ \Big|\ Z_{N,j}=1\right)\right]^{1/2}\\
%&= \left[P\left( \left|(\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N\right|^4  \ \ge \  a^{-4} N^2 \left|r_{N} (i,j)\right|^4\ \Big|\ Z_{N,j}=1\right)\right]^{1/2}\\
&\leq   h^2 N^{-1}  r_{N} (i,j)^{-2}\EE^{1/2}\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^4 \ \Big|\ Z_{N,j}=1\right].%\numberthis\label{theta_ij_Markov}
\end{align*}

To upper bound the above RHS, we use <ref>.
The key idea is to use this bound only for those $i,j$ for which $r_{N} (i,j)$ is at least as large as $\delta N^{-1/2}$. Towards that, fix $\delta>0$ and define

$$\mathcal{S}_{N,\delta}  = \{(i, j) : \left| r_{N} (i,j) \right| \le \delta N^{-1/2}, 1\le i,j\le N\}.$$

\begin{align*}
%&\implies \left| r_{N} (i,j) \right| >  \frac{\delta}{\sqrt{N}}\\
%&\implies   a^2 N^{-1}  r_{N} (i,j)^{-2}\leq a^2 \delta^{-2}\\
\implies \sqrt{\theta_{N,i,j}} \leq a^2 \delta^{-2}\EE^{1/2}\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^4 \ \Big|\ Z_{N,j}=1\right].
\end{align*}

\begin{align*}
& N^{-3/2} \sum_{j=1}^N  \sum_{i=1}^N\sqrt{\theta_{N,i,j}}  \\
&\leq N^{-3/2} \sum_{(i,j)\in \mathcal{S}_{N,\delta} } \sqrt{\theta_{N,i,j}}  + N^{-3/2}  \sum_{(i,j)\not\in \mathcal{S}_{N,\delta} }^N\sqrt{\theta_{N,i,j}}  \\
&\leq N^{-3/2} \sum_{(i,j)\in \mathcal{S}_{N,\delta} } 1 + N^{-3/2}  \sum_{(i,j)\not\in \mathcal{S}_{N,\delta} }^N a^2 \delta^{-2}\EE^{1/2}\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^4 \ \Big|\ Z_{N,j}=1\right] \\
&\leq N^{-3/2} \left|\mathcal{S}_{N,\delta}  \right| + a^2 \delta^{-2} N^{-3/2}  \sum_{j=1}^N\sum_{i=1}^N \EE^{1/2}\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^4 \ \Big|\ Z_{N,j}=1\right]\\
&= N^{-3/2} \left|\mathcal{S}_{N,\delta}  \right| + a^2 \delta^{-2} (\rank(\vec{X}_N)-1)\cdot O(N^{-1/2}).
\end{align*}

In the last step we used <ref>. Letting $N\to\infty$ and then $\delta\downarrow 0$, it follows that
$$\limsup_{N\to\infty}N^{-3/2} \sum_{j=1}^N  \sum_{i=1}^N\sqrt{\theta_{N,i,j}} \leq \lim_{\delta\downarrow 0}\limsup_{N\to\infty} N^{-3/2} \left|\mathcal{S}_{N,\delta}\right|.$$

\begin{align*}
(i,j)\in\mathcal{S}_{N,\delta}  &\implies \frac{\delta}{\sqrt{N}} \ge \left| r_{N} (i,j) \right| \ge \left|\left|(b_{N,j} -\vec{p}_{N,j}^\top \vec{b}_N)- (b_{N,i}-\vec{p}_{N,i}^\top \vec{b}_N)\right| - \frac{|a|}{\sqrt{N}}\right| \\
&\implies \left|(b_{N,j} -\vec{p}_{N,j}^\top \vec{b}_N)- (b_{N,i}-\vec{p}_{N,i}^\top \vec{b}_N)\right| \in\left[\frac{|a|-\delta}{\sqrt{N}},\frac{|a|+\delta}{\sqrt{N}}\right].
\end{align*}

We now invoke <ref> to arrive at

\begin{equation*}
\lim_{\delta\downarrow 0}\limsup_{N\to\infty} N^{-3/2} \left|\mathcal{S}_{N,\delta} \right| = 0,
\end{equation*}

which finishes the proof for $D_N$.
The proof for $Q_N$ can be done in the same manner, using <ref>, Markov inequality, and <ref>.

Suppose that <ref> holds. Then for any $h\ge \delta>0,$

\begin{equation*}
\lim_{N\to\infty} N^{-(2-\nu)}\sum_{j=1}^N \sum_{i=1}^N \ind{\left|b_{N,j}- b_{N,i}\right| \in \left[\frac{h-\delta}{N^\nu},\frac{h+\delta}{N^\nu}\right]} = 4\delta\mathcal{I}_b
\end{equation*}

where $\mathcal{I}_b$ is defined in <ref> of the main paper.

The proof is analogous to those of <ref>, and hence omitted.

Suppose that <ref> holds. Then for any $h\ge \delta>0,$

\begin{equation*}
\lim_{N\to\infty} N^{-(2-\nu)}\sum_{j=1}^N \sum_{i=1}^N \ind{\left|\widetilde{b}_{N,j}- \widetilde{b}_{N,i}\right| \in \left[\frac{h-\delta}{N^\nu},\frac{h+\delta}{N^\nu}\right]} = 4\delta\mathcal{J}_b
\end{equation*}

where $\mathcal{J}_b$ is defined in <ref> of the main paper.

The proof is analogous to those of <ref>, and hence omitted.

For each $N\ge 1,$ let $b_{N,1},\dots,b_{N,N}$ be i.i.d. from an unknown distribution $F_b$ with density $f_b(\cdot)$, and $I_{h,N,\nu}$ be defined in (<ref>) of the main paper,  then for any $0<\nu\le 1/2,$

\begin{equation*} N^{-(2-\nu)}\sum_{j=1}^N\sum_{i=1}^N I_{h,N,\nu} (b_{N,j} - b_{N,i})  \Pto h\int_{\mathbb{R}} f_{b}^{2} (x) dx.\end{equation*}

We proved the above for $\nu=1/2$ in <ref>, so assume now that $\nu\in (0,1/2)$. Define
$$S_N := S_N(b_{N,1},\dots,b_{N,N}) := \sum_{j=1}^N \sum_{i=1}^N I_{h,N,\nu} (b_{N,j} - b_{N,i}).$$

Observe that for any fixed $i\neq j,$ and $h > 0,$
$$\EE\left(I_{h,N,\nu} (b_{N,j} - b_{N,i})\right) = P\left(0\le b_{N,2} - b_{N,1} < hN^{-\nu}\right) = g(hN^{-\nu}) - g(0)$$

$$g(x) = P(b_{N,2} - b_{N,1} \le x) =\int_{-\infty}^x \int_{\mathbb{R}} f_b(u + t) f_b(u)\,du\,dt, \ x\in\mathbb{R}.$$

Using the DCT for integrals, we argue that
$$g'(x) = \int_{\mathbb{R}} f_b(u+x) f_b(u)du.$$

\begin{align*} \numberthis\label{Glim2} \lim_{N\to\infty} N^{-(2-\nu)} \EE(S_N) &= \lim_{N\to\infty}  N^{-(2-\nu)} N^2 (g(hN^{-\nu}) - g(0))\\
&= \lim_{N\to\infty}  h\cdot\frac{g(hN^{-\nu}) - g(0)}{hN^{-\nu}} \\
&= hg'(0)\\
&= h\int_{\mathbb{R}} f_b(u)^2du.
\end{align*}

The case $h < 0$ can be handled similarly, and the case $h = 0$ is straight-forward.
Next we bound $\EE(S_N - \EE S_N)^2$ using the Efron-Stein inequality [13]. For each $1\le k \le N,$ let $b_{N,k}'$ be an i.i.d. copy of $b_{N,k},$ independent of everything else, and define
$$S_N^{(k)} = S_N(b_{N,1},\dots,b_{N,k-1},b_{N,k}',b_{N,k+1},\dots,b_{N,N}), \ 1\le k\le N.$$

\begin{align*}
S_N - S_N^{(k)}
&=  \sum_{j=1}^N \left(I_{h,N,\nu} (b_{N,j} - b_{N,k}) -  I_{h,N,\nu} (b_{N,j} - b_{N,k}')\right)\\
&\quad \quad+\sum_{j=1}^N \left(I_{h,N,\nu} (b_{N,k} - b_{N,j}) -  I_{h,N,\nu} (b_{N,k}' - b_{N,j})\right).
\end{align*}

Hence $\big| S_N - S_N^{(k)}\big| \leq 4N$ almost surely. The Efron-Stein inequality tells us that

\begin{align*}
\EE(N^{-(2-\nu)}(S_N - \EE S_N))^2
N^{-(4-2\nu)} \EE \left[\sum_{k=1}^N \EE\left[(S_N - S_N^{(k)})^2 \ \big|\ b_{N,1},\dots,b_{N,N}\right] \right]\\
&\le N^{-(4-2\nu)}\cdot 16 N^3= 16N^{-(1-2\nu)}.
\end{align*}

Since $\nu<1/2,$ we can now invoke (<ref>) to get the desired conclusion.

§ AUXILIARY RESULTS

As $N\to\infty,$ the following results hold, for $r=1,2$.

\begin{align}
\label{PiPjMu}\sum_{j=1}^N \sum_{i=1}^N \EE^{1/r}\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^{2r} \right]  &= (\rank(\vec{X}_N)-1)\cdot O(N),\\
% \label{PiPjM2}\sum_{j=1}^N \sum_{i=1}^N \EE\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right]  &= (\rank(\vec{X}_N)-1)\cdot O(N)\\
\label{PiPjM}\sum_{j=1}^N \sum_{i=1}^N \EE^{1/r}\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^{2r} \ \Big|\ Z_{N,j}=1\right]  &= (\rank(\vec{X}_N)-1)\cdot O(N),\\
% \label{PiPjM2dc}\sum_{j=1}^N \sum_{i=1}^N \EE\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,i}=1,Z_{N,j}=1\right]  &= (\rank(\vec{X}_N)-1)\cdot O(N),\\
\label{PiPjMdc}\sum_{j=1}^N \sum_{i=1}^N \EE^{1/r}\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^{2r} \ \Big|\ Z_{N,i}=1,Z_{N,j}=1\right]  &= (\rank(\vec{X}_N)-1)\cdot O(N).
\end{align}

Using the fact that $\vec{P}_{\vec{X}_N}$ is idempotent, we derive the following identity.

\begin{align*}\sum_{j=1}^N \sum_{i=1}^N  \|\vec{p}_{N,i} - \vec{p}_{N,j}\|^2
&= \sum_{j=1}^N \sum_{i=1}^N \left(\vec{P}_{\vec{X}_N}(i,i)+\vec{P}_{\vec{X}_N}(j,j)-2\vec{P}_{\vec{X}_N}(i,j)\right)\\
&= 2N\sum_{i=1}^N  \vec{P}_{\vec{X}_N}(i,i)-2\sum_{i=1}^N \vec{p}_{N,i}^\top \vec{1}\\
&= 2N \left(\Tr\left(\vec{P}_{\vec{X}_N}\right)-1\right) = 2N \left(\rank(\vec{X}_N)-1\right).\numberthis\label{norm}
\end{align*}

Now $\vec{1}$ belongs to the column space of $\vec{X}_N,$ so  $\EE\left[(\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N\right]=0$ for each $i,j$. Also note that $\var(\vec{Z}_N)$ is of the form $\alpha\vec{I} + \beta\vec{1}\vec{1}^\top$, where $\alpha=\frac{m}{N}(1-\frac{m}{N})$.

\begin{align*}
\var\left[(\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N \right] &= (\vec{p}_{N,i} - \vec{p}_{N,j})^\top \left(\alpha\vec{I} + \beta\vec{1}\vec{1}^\top\right)(\vec{p}_{N,i} - \vec{p}_{N,j})= \frac{m}{N}\left(1-\frac{m}{N}\right) \|\vec{p}_{N,i} - \vec{p}_{N,j}\|^2.
\end{align*}

\begin{align*}
\sum_{j=1}^N\sum_{i=1}^N \EE\left[\left((\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N\right)^2 \right] \le \sum_{j=1}^N\sum_{i=1}^N \|\vec{p}_{N,i} - \vec{p}_{N,j}\|^2.
\end{align*}

Thus, (<ref>) follows for $r=1$.

To prove it for $r=2,$  fix $i$ and $j$ for the moment and write $\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N = \sum_{k=1}^N v_k Z_k$. Then

\begin{align*}
\EE \bigg( \sum_{k=1}^N v_k Z_k \bigg)^4
&= \sum_{k_1=1}^N v_{k_1}^4 \EE Z_{1} + \sum_{k_1,k_2 \text{ distinct}} ( 3v_{k_1}^2 v_{k_2}^2+4v_{k_1}^3 v_{k_2}) \EE Z_{1}Z_{2} \\
&\quad+ \sum_{k_1,k_2,k_3 \text{ distinct}} 6v_{k_1}^2 v_{k_2}v_{k_3} \EE Z_{1}Z_{2} Z_{3}+ \sum_{k_1,k_2,k_3,k_4  \text{ distinct}} v_{k_1} v_{k_2}v_{k_3}v_{k_4} \EE Z_{1}Z_{2} Z_{3}Z_{4}.
\end{align*}

Now $\sum_{k=1}^N v_k = (\vec{p}_{N,i} - \vec{p}_{N,j})^\top \vec{1}=0,$ so we obtain

\begin{align*}
\sum_{k_1,k_2,k_3,k_4  \text{ distinct}} v_{k_1} v_{k_2}v_{k_3}v_{k_4} &= \sum_{k_1,k_2,k_3 \text{ distinct}} v_{k_1} v_{k_2}v_{k_3}(-v_{k_1}-v_{k_2}-v_{k_3})=\sum_{k_1,k_2,k_3 \text{ distinct}}  - 3v_{k_1}^2 v_{k_2}v_{k_3},\\
\sum_{k_1,k_2,k_3 \text{ distinct}} v_{k_1}^2 v_{k_2}v_{k_3} &= \sum_{k_1,k_2 \text{ distinct}} v_{k_1}^2 v_{k_2}(-v_{k_1}-v_{k_2})= \sum_{k_1,k_2 \text{ distinct}} -(v_{k_1}^3 v_{k_2} +v_{k_1}^2 v_{k_2}^2),\\
\sum_{k_1,k_2 \text{ distinct}} v_{k_1}^3 v_{k_2} &= \sum_{k_1=1}^N v_{k_1}^3 (-v_{k_1}) = - \sum_{k_1=1}^N v_{k_1}^4.
\end{align*}

Since $\EE \left|Z_1\cdots Z_v\right|\le 1$ for $1\le v\le 4$, it follows from the above identities that

\begin{align*}
\EE^{1/2}\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^4 &\le \sqrt{D'}  \left( \sum_{k=1}^N v_k^4 + \sum_{k\neq l} v_k^2 v_l^2\right)^{1/2} \\
&\le \sqrt{2D'} \sum_{k=1}^N v_k^2= \sqrt{2D'} \|\vec{p}_{N,i} - \vec{p}_{N,j}\|^2
\end{align*}

for some constant $D'>0$ (which is free of $i,j$ and $N$). The rest follows again from (<ref>).

Next, we deal with the identities where we condition upon $Z_{N,j}=1$. Observe that

\begin{align*}
\EE\left[\left((\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right]
%&= \var\left[(\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z} \ \Big|\ Z_{N,j}=1\right]\\
&= (\vec{p}_{N,i} - \vec{p}_{N,j})^\top \var\left(\vec{Z}_N \ \big|\ Z_{N,j}=1\right) (\vec{p}_{N,i} - \vec{p}_{N,j}).
\end{align*}

For any $k\neq l,$ $\var(Z_{N,k} \mid Z_{N,j} =1) =  (\alpha_1-\alpha_1^2)\ind{k\neq j},$ and $\cov(Z_{N,k},Z_{N,l} \mid Z_{N,j} =1) = (\alpha_2-\alpha_1^2)\ind{k\neq j},$ where $\alpha_1=\frac{m-1}{N-1},\  \alpha_2=\frac{m-1}{N-1}\cdot\frac{m-2}{N-2}$.

We thus obtain

\begin{multline*}
\EE\left[\left((\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right] = \Big[\alpha_1(1-\alpha_1) \|\vec{p}_{N,i} - \vec{p}_{N,j}\|^2 \\ - (\alpha_1-2\alpha_2+\alpha_1^2)(\vec{P}_{\vec{X}_N}(i,j)-\vec{P}_{\vec{X}_N}(j,j))^2\Big].
\end{multline*}

But $(\vec{P}_{\vec{X}_N}(i,j)-\vec{P}_{\vec{X}_N}(j,j))^2\le  \|\vec{p}_{N,i} - \vec{p}_{N,j}\|^2$. So it follows that
$$\EE\left[\left((\vec{p}_{N,i} - \vec{p}_{N,j})^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right] \leq D  \|\vec{p}_{N,i} - \vec{p}_{N,j}\|^2$$
for some $D>0$ which is free of $i,j$ and $N$. Invoking (<ref>) again, we finish the proof of (<ref>) for $r=1$.
To prove (<ref>) for $r=2,$ note the following.

\begin{align*}
&\sqrt{\EE\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^4 \ \Big|\ Z_{N,j}=1\right] } \\
&\leq \sqrt{\var\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right] } + \EE\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right] \\
&\leq \sqrt{\frac{N}{m}}\sqrt{\EE\left[\var\left(\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}\right)\right] } + \EE\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right] \\
&\leq \sqrt{\frac{N}{m}}\sqrt{\var\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2\right] } + \EE\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right] \\
&\leq \sqrt{\frac{N}{m}}\sqrt{\EE\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^4\right] } + \EE\left[\left(\left(\vec{p}_{N,i} - \vec{p}_{N,j}\right)^\top  \vec{Z}_N\right)^2 \ \Big|\ Z_{N,j}=1\right].
\end{align*}

Since $m/N\to\lambda\in (0,1),$ the desired conclusion follows from (<ref>) (with $r=2$) and (<ref>) (with $r=1$).
The proof of (<ref>) is completely analogous to the proofs of (<ref>)  and (<ref>), hence omitted.

For $x\neq 0$ it holds that $\left|\Phi(x/\sigma) - \ind{x\ge 0}\right| \le \sigma \left|x\right|^{-1} \exp(-x^2/2\sigma^2),$
where $\Phi$ is the standard Normal CDF.

Let $\phi$ be the density of standard Normal. For $x>0$, we have
$$\left|\Phi(x/\sigma) - \ind{x\ge 0}\right| = 1 - \Phi(x/\sigma) \le \sigma \cdot x^{-1} \phi(x/\sigma),$$
using a standard inequality. For $x<0$, we can write
$$\left|\Phi(x/\sigma) - \ind{x\ge 0}\right| =  \Phi(x/\sigma) = 1 - \Phi(-x/\sigma) \le \sigma \cdot (-x)^{-1} \phi(-x/\sigma).$$
Hence the result.

Suppose that $(X,Y)$ follows the bivariate Normal distribution with $\EE X = \EE Y = 0$,  $\var(X) = \var(Y) = 1$, and $\text{corr}(X,Y) = \rho\in (-1,1)$. Then for any $h_1,h_2\in (0,1)$, the following bound holds:

\begin{equation*}
\left|P(0\le X \le h_1, 0\le Y \le h_2) - P(0\le X \le h_1)P(0\le Y \le h_2)\right|\le C_\rho h_1h_2,
\end{equation*}

where $C_\rho =  |\rho|\left((1-\rho^2)^{-1/2} + (1-|\rho|)^{-2} \right)$.

$$g_{x,y}(\rho):= \exp\left(-\frac{1}{2(1-\rho^2)}(x^2+y^2-2\rho xy)\right).$$

Note that for any fixed $x,y\in [0,1]$,

\begin{align*}
\left|\frac{\partial g_{x,y}(\rho)}{\partial \rho}\right| = g_{x,y}(\rho) \left|\frac{xy}{1-\rho^2} - \frac{\rho}{1-\rho^2} \frac{x^2+y^2-2\rho xy}{1-\rho^2}\right|\le  \frac{1}{(1-|\rho|)^2}.
\end{align*}

\begin{align*}
&\left|P(0\le X \le h_1, 0\le Y \le h_2) - P(0\le X \le h_1)P(0\le Y \le h_2)\right|\\
&=\left|\int_{[0,\ h_1]\times[0,\ h_2]} \left((2\pi\sqrt{1-\rho^2})^{-1} g_{x,y}(\rho) -(2\pi)^{-1} g_{x,y}(0)\right)~dx~dy\right|\\
&\le(2\pi)^{-1}\left|(1-\rho^2)^{-1/2}-1\right|\int_{[0,\ h_1]\times[0,\ h_2]} g_{x,y}(\rho)~dx~dy \\
&\hspace{5cm}+ (2\pi)^{-1}\int_{[0,\ h_1]\times[0,\ h_2]} \left|g_{x,y}(\rho) - g_{x,y}(0)\right|~dx~dy\\
&\le \rho^2 (1-\rho^2)^{-1/2} h_1h_2 + \int_{[0,\ h_1]\times[0,\ h_2]} \left|\rho\right|\int_0^1 \left|\frac{\partial g_{x,y}(t\rho)}{\partial \rho} \right|dt~dx~dy\\
&\le  |\rho|\left((1-\rho^2)^{-1/2} + (1-|\rho|)^{-2} \right) h_1h_2.
\end{align*}

This completes the proof.

Given a sequence of independent real-valued random variables $W_{1}, W_{2}, \ldots, W_{n}$ and $F: \mathbb{R}^{n} \rightarrow \mathbb{R}$ be a measurable function. For each $1\le i\le n,$ let $W'_{i}$ be an independent copy of $W_{i}$, independent of the other $W_j$'s. Define $S:=F\left(W_{1}, \ldots, W_{n}\right)$ and $S_{i}:=F\left(W_{1}, \ldots, W_{i-1}, W'_{i}, W_{i+1}, \ldots, W_{n}\right)$. Then for all integers $q \geq 2$, there exists a constant $c_{q}$ (depending only on $q$) such that

\EE\left|S-\mathbb{E}S\right|^q \leq c_{q}\EE\left|\mathbb{E}\left[\sum_{i=1}^{n}\left(S-S_{i}\right)^{2} \mid\left(W_{1}, W_{2}, \ldots, W_{n}\right)\right]\right|^{q/2}.

See <cit.> for a proof.

The special case $q=2$ yields the Efron-Stein inequality (see 13).

§ AVERAGE RANKS

In the main paper, we used up-ranks to break ties in the responses (see (<ref>) in the main paper for a definition). We discuss in this section the analogous results when ties are broken using average ranks. Suppose that while sorting $\left\{b_{N,j}:1\le j\le N\right\}$ in ascending order, the first $t_{1}$ many are equal, then the next $t_{2}$ many are equal, and so on. Assume that we get $k$ such blocks of sizes $t_{1}, \dots, t_{k}$, where the $t_{i}$'s can equal to 1 as well. Set $s_{0}=0$ and $s_{j}=\sum_{i=1}^{j} t_{i}$. Then for each $1 \leq j \leq k$,  define

q_{N}^{\mathrm{avg}}\left(s_{j-1}+1\right)=q_{N}^{\mathrm{avg}}\left(s_{j-1}+2\right)=\cdots=q_{N}^{\mathrm{avg}}\left(s_{j}\right):=\frac{s_{j-1}+1+s_{j}}{2} = s_{j-1} + \frac{1+t_j}{2}

where the last quantity is nothing but the average of the ranks $\left\{s_{j-1}+1, \ldots, s_{j-1}+t_j\right\}$. With the above notion of average ranks, we define the Wilcoxon rank-sum statistic as
$$t_N^{\mathrm{avg}} := \sum_{j=1}^N q_N^{\mathrm{avg}}(j)Z_{N,j}.$$

We make the following assumption on the block-sizes, which essentially tells us that the blocks formed by the ties are not too large.

Let $t_1,\dots,t_k$ denote the block sizes, as defined above. Then assume that
$\max _{1 \leq i \leq k} t_{i}=o\left(N\right)$, as $N \to \infty$.

The following lemma shows that if <ref> holds, then the set of the average ranks do not differ much from $\{1,2,\dots,N\}$. This implies, in view of <ref>, that $t_N^{\mathrm{avg}}$ has the same asymptotic null distribution as the statistic $t_N$ that we studied in <ref> of the main paper.

It holds under <ref> that

\sum_{i=1}^{N}\left(q_{N}(i)-\bar{q}_{N}\right)^{2}=\frac{N\left(N^{2}-1\right)}{12}+o\left(N^{3}\right),

as $N \rightarrow \infty$, where $\bar{q}_{N}=N^{-1} \sum_{i=1}^{N} q_{N}(i)$.

Since for each $j, \sum_{i=s_{j-1}+1}^{s_{j}}\left(q_{N}(i)-i\right)=0$, and thus $\bar{q}_{N}=N^{-1} \sum_{i=1}^{N} i=(N+1) / 2$ we obtain the following.

\begin{aligned}
\sum_{i=s_{j-1}+1}^{s_{j}}\left(\left(q_{N}(i)-\bar{q}_{N}\right)^{2}-\left(i-\bar{q}_{N}\right)^{2}\right) &=\sum_{i=s_{j-1}+1}^{s_{j}}\left(q_{N}(i)^{2}-2 \bar{q}_{N}\left(q_{N}(i)-i\right)-i^{2}\right) \\
&=-\sum_{i=s_{j-1}+1}^{s_{j}}\left(i^{2}-\left(\frac{s_{j-1}+1+s_{j}}{2}\right)^{2}\right) \\
&=-\sum_{i=s_{j-1}+1}^{s_{j}}\left(i-\frac{s_{j-1}+1+s_{j}}{2}\right)^{2} \\
\end{aligned}

\begin{align*}
\sum_{i=1}^{N}\left(q_{N}(i)-\bar{q}_{N}\right)^{2} &=\sum_{i=1}^{N}\left(i-\bar{q}_{N}\right)^{2}-\sum_{j=1}^{k} \frac{t_{j}\left(t_{j}^{2}-1\right)}{12}=\frac{N(N^2-1)}{12}-\sum_{j=1}^{k} \frac{t_{j}\left(t_{j}^{2}-1\right)}{12}.
\end{align*}

Notice that

0 \leq \sum_{j=1}^{k} \frac{t_{j}\left(t_{j}^{2}-1\right)}{12} \leq \frac{\sum_{i=1}^{k} t_{i}}{12} \max _{1 \leq i \leq k} t_{i}^{2}=\frac{N}{12} \max _{1 \leq i \leq k} t_{i}^{2}.

Hence <ref> completes the proof.

Our next lemma extends the last result, by showing that if <ref> is satisfied, then the statistic $t_N^{\mathrm{avg}}$ has the same asymptotic distribution as the statistic $t_N$, for any value of the parameter $\tau$. In particular, this implies that <ref> also holds if we replace $t_N$ by $t_N^{\mathrm{avg}}$. Consequently, Rosenbaum's estimator for $\tau$ constructed using $t_N^{\mathrm{avg}}$ instead of $t_N$ must also satisfy <ref>.

It holds under <ref> that $N^{-3/2}(t_N^{\mathrm{avg}} - t_N) = o_P(1)$ as $N\to\infty$. Consequently, $t_N^{\mathrm{avg}}$ has the same asymptotic distribution as $t_N$.

Recall that $t_N = \sum_{j=1}^N q_N(j) Z_{N,j}$ where $q_N(j) = \sum_{i=1}^N \ind{b_{N,i}\le b_{N,j}}.$ Observe that when $s_{j-1}< j \le s_j,$
$$0\le q_N(j) - q_N^{\mathrm{avg}}(j)  \le t_j - \frac{t_j+1}{2}= \frac{t_j-1}{2}.$$

Hence $t_N\ge t_N^{\mathrm{avg}}$ a.s., and therefore it suffices to show that  the following converges to $0$, as $N\to\infty$.

\begin{align*}
\EE N^{-3/2} (t_N - t_N^{\mathrm{avg}})
= \frac{m}{N} N^{-3/2}\sum_{j=1}^N (q_N(j)-q_N^{\mathrm{avg}}(j)) = \frac{m}{N} N^{-3/2}\sum_{i=1}^k \frac{t_i(t_i-1)}{2}.
\end{align*}

We split the above sum into two parts, as follows. Fix any $\epsilon>0$ and define $\mathcal{S}_\epsilon = \{1\le j\le k: t_j - 1\ge \epsilon N^{1/2}\}$. Then

$$\frac{m}{N} N^{-3/2}\sum_{i\not\in \mathcal{S}_\epsilon} \frac{t_i(t_i-1)}{2}
\le \epsilon N^{-1}\sum_{i\not\in \mathcal{S}_\epsilon} t_i \le \epsilon.$$

On the other hand, for $i\in \mathcal{S}_\epsilon$, and $s_{i-1}<j\le s_j$ we have $q_N(j) - q_N^{\mathrm{avg}}(j) = t_i(t_i-1)/2 \ge \epsilon^2 N/2.$
Hence, if $J$ be an index chosen uniformly at random from $\{1,2,\dots,N\}$ (independent of everything else), then

\begin{align*}
N^{-3/2}\sum_{i\in \mathcal{S}_\epsilon} \frac{t_i(t_i-1)}{2} &=N^{-3/2}\sum_{i\in \mathcal{S}_\epsilon} \sum_{j=s_{i-1}+1}^{s_i} (q_N(j)-q_N^{\mathrm{avg}}(j))\\
&= N^{-1/2} P(q_N(J) - q_N^{\mathrm{avg}}(J) \ge \epsilon^2 N/2)\\
&\le (\epsilon^2/2)^{-2} N^{-1/2} N^{-2} \EE(q_N(J) - q_N^{\mathrm{avg}}(J))^2\\
&= (\epsilon^2/2)^{-2} N^{-7/2} \sum_{j=1}^N (q_N(j) - q_N^{\mathrm{avg}}(j))^2.
\end{align*}

Therefore it suffices to show that as $N\to\infty$,

\begin{equation}\label{avglast}
\sum_{j=1}^{N}\left(q_{N}^{\mathrm{avg}}(j)-{q}_{N}(j)\right)^{2}=O\left(N^{3}\right).
\end{equation}

Note that for each $1\le j\le k$, $\sum_{i=s_{j-1}+1}^{s_{j}}\left(q_{N}^{\mathrm{avg}}(i)-i\right)=0$. Thus $\bar{q}_{N}^{\mathrm{avg}}=N^{-1} \sum_{i=1}^{N} i=(N+1) / 2$, and we obtain the following.

\begin{aligned}
\sum_{i=s_{j-1}+1}^{s_{j}}\left(\left(q_{N}^{\mathrm{avg}}(i)-\bar{q}_{N}^{\mathrm{avg}}\right)^{2}-\left(i-\bar{q}_{N}^{\mathrm{avg}}\right)^{2}\right) &=\sum_{i=s_{j-1}+1}^{s_{j}}\left(q_{N}^{\mathrm{avg}}(i)^{2}-2 \bar{q}_{N}^{\mathrm{avg}}\left(q_{N}^{\mathrm{avg}}(i)-i\right)-i^{2}\right) \\
&=-\sum_{i=s_{j-1}+1}^{s_{j}}\left(i^{2}-\left(\frac{s_{j-1}+1+s_{j}}{2}\right)^{2}\right) \\
&=-\sum_{i=s_{j-1}+1}^{s_{j}}\left(i-\frac{s_{j-1}+1+s_{j}}{2}\right)^{2} \\
\end{aligned}

\sum_{i=1}^{N}\left(q_{N}^{\mathrm{avg}}(i)-\bar{q}_{N}^{\mathrm{avg}}\right)^{2}=\sum_{i=1}^{N}\left(i-\bar{q}_{N}^{\mathrm{avg}}\right)^{2}-\frac{1}{12}\sum_{j=1}^{k} t_{j}\left(t_{j}^{2}-1\right)

Notice that

0 \leq \frac{1}{12}\sum_{j=1}^{k} t_{j}\left(t_{j}^{2}-1\right) \leq \frac{1}{12}\left(\sum_{i=1}^{k} t_{i}\right) \max _{1 \leq i \leq k} t_{i}^{2}=\frac{N}{12} \max _{1 \leq i \leq k} t_{i}^{2}

and therefore <ref> tells us that

On the other hand, it follows from the proof of <ref> that

Combining these and doing some algebraic manipulations, (<ref>) follows. Hence the proof.