[step:Bound the relative size of a Hamming ball in the layer]We prove the following uniform estimate.
[claim:Constant-weight Hamming balls have exponentially small relative volume]
There exists a universal constant $c_0 > 0$ such that for all integers $d,s \in \mathbb{N}$ with $1 \leq s \leq d/2$ and all $v \in \mathcal{W}$,
\begin{align*}
\frac{|B_H(v,s/2)\cap \mathcal{W}|}{|\mathcal{W}|}
\leq
\exp\bigl(-c_0 s\log(d/s)\bigr).
\end{align*}
[/claim]
[proof]
Let
\begin{align*}
R := d/s.
\end{align*}
Then $R \geq 2$. Let $A \subset \{1,\dots,d\}$ be a fixed set with $|A|=s$, and let $S$ be uniformly distributed over all $s$-element subsets of $\{1,\dots,d\}$. For each subset $E \subset \{1,\dots,d\}$, define its indicator vector $\mathbb{1}_E \in \{0,1\}^d$ by $(\mathbb{1}_E)_i=1$ if $i\in E$ and $(\mathbb{1}_E)_i=0$ if $i\notin E$. The ratio in the claim equals
\begin{align*}
\mathbb{P}\bigl(\#(A\cap S) \geq 3s/4\bigr),
\end{align*}
because $d_H(\mathbb{1}_A,\mathbb{1}_S) \leq s/2$ is equivalent to replacing at most $s/4$ elements of $A$, or equivalently retaining at least $3s/4$ elements of $A$.
First suppose $R \geq 64$. Put
\begin{align*}
m := \lceil 3s/4\rceil.
\end{align*}
If $\#(A\cap S) \geq m$, then some $m$-element subset $T \subset A$ is contained in $S$. For a fixed such $T$,
\begin{align*}
\mathbb{P}(T \subset S)
=
\frac{\binom{d-m}{s-m}}{\binom{d}{s}}
=
\prod_{j=0}^{m-1}\frac{s-j}{d-j}
\leq
\left(\frac{s}{d}\right)^m,
\end{align*}
where the last inequality follows from $s \leq d$. By the union bound and the estimate $\binom{s}{m} \leq (es/m)^m$,
\begin{align*}
\mathbb{P}\bigl(\#(A\cap S) \geq m\bigr)
\leq
\binom{s}{m}\left(\frac{s}{d}\right)^m
\leq
\left(\frac{es}{m}\cdot\frac{s}{d}\right)^m
\leq
\left(\frac{4e}{3R}\right)^{3s/4}.
\end{align*}
Since $R \geq 64$, the last expression is bounded by
\begin{align*}
\exp\bigl(-\tfrac{1}{4}s\log R\bigr).
\end{align*}
It remains to treat $2 \leq R < 64$. We give an explicit bound that avoids any unproved entropy-positivity assertion. Since the event $\#(A\cap S)\geq m$ implies that some $m$-element subset $T\subset A$ is contained in $S$, the same union-bound argument gives
\begin{align*}
\mathbb{P}\bigl(\#(A\cap S) \geq m\bigr)
\leq
\binom{s}{m}\left(\frac{s}{d}\right)^m.
\end{align*}
For every integer $s\geq 1$ and $m=\lceil 3s/4\rceil$, we have $m\geq 3s/4$. The elementary binomial estimate $\binom{s}{m}\leq 2^s$ therefore yields
\begin{align*}
\mathbb{P}\bigl(\#(A\cap S) \geq m\bigr)
\leq
2^s R^{-3s/4}
=
\exp\bigl(s\log 2-\tfrac{3}{4}s\log R\bigr).
\end{align*}
If $R\geq 16$, then $\log R\geq 4\log 2$, and hence
\begin{align*}
s\log 2-\frac{3}{4}s\log R
\leq
-\frac{1}{2}s\log R.
\end{align*}
Thus, for $16\leq R<64$,
\begin{align*}
\frac{|B_H(v,s/2)\cap \mathcal{W}|}{|\mathcal{W}|}
\leq
\exp\bigl(-\tfrac{1}{2}s\log R\bigr).
\end{align*}
It remains only to handle $2\leq R<16$. Since $2\leq R<16$, the hypergeometric [random variable](/page/Random%20Variable) $\#(A\cap S)$ has mean $s/R\leq s/2$, while the event above requires at least $3s/4$ retained elements. We use the following finite-population form of [Hoeffding's Inequality](/theorems/1962): if $Y$ is the sum of $s$ samples drawn without replacement from a population whose entries lie in $[0,1]$ and if $\mathbb{E}[Y]=\mu$, then for every $t>0$,
\begin{align*}
\mathbb{P}(Y-\mu\geq t)
\leq
\exp\left(-\frac{2t^2}{s}\right).
\end{align*}
Apply this with $Y:=\#(A\cap S)$, $\mu:=s/R$, and $t:=3s/4-s/R$. Since $R\geq 2$, we have $t\geq s/4$, and therefore
\begin{align*}
\mathbb{P}\bigl(\#(A\cap S) \geq 3s/4\bigr)
\leq
\exp\left(-\frac{2(s/4)^2}{s}\right)
=
\exp\bigl(-s/8\bigr).
\end{align*}
Because $\log R\leq \log 16$, this implies
\begin{align*}
\frac{|B_H(v,s/2)\cap \mathcal{W}|}{|\mathcal{W}|}
\leq
\exp\left(-\frac{1}{8\log 16}s\log R\right)
\end{align*}
for all pairs with $2\leq R<16$.
Combining the cases, the claim holds with
\begin{align*}
c_0 :=
\min\left\{\frac{1}{4},\frac{1}{2},\frac{1}{8\log 16}\right\} > 0.
\end{align*}
[/proof][/step]