Spectral Geometry of Golay Codes,
Leech-Lattice Interpolation, and Coded PWM

Moment Cancellation, Harmonic Nulls, Noise Shaping, and Nyquist Constraints
SRFP311T1 Collaboration
August 2026
Download paper (PDF)
Abstract

We distinguish two spectral-design mechanisms that connect finite-field coding theory, radial Fourier analysis, lattice sphere packing, and waveform engineering: low-frequency flatness caused by moment cancellation, and nonzero-frequency nulls imposed by interpolation or harmonic constraints. For the extended binary Golay code \(\mathcal{G}_{24}\) we verify exact agreement with the binomial reference through weight moment \(7\) and discrepancy \(\Delta\mu_8=489\,646\,080\), yielding \(\mathcal{O}(k^{16})\) radial Fourier flatness. The extended ternary Golay code \(\mathcal{G}_{12}\) agrees through moment \(5\) and has \(\Delta\mu_6=190\,080\), yielding \(\mathcal{O}(k^{12})\) flatness. We give a \(q\)-ary moment identity and distinguish the 12-dimensional real-valued embedding of \(\mathcal{G}_{12}\) from its natural 24-dimensional cyclotomic embedding.

We explain how Golay distance and Leech congruence conditions jointly exclude norm-\(2\) lattice vectors, and account for the \(196\,560\) shortest Leech vectors. In the optimal dimension-24 Cohn–Elkies function, the spatial zero at radius \(2\) is simple, the Fourier zero there is double, and both functions have double zeros at all higher shell radii \(\sqrt{2m}\), \(m\geq3\).

Finally, we compare these proven statements with \(\Sigma\Delta\) noise shaping, selective harmonic elimination PWM (SHE-PWM), and complementary sequences. A rationally certified \(N=3\) SHE-PWM example has exactly two ordered solutions. These signal-processing connections are design analogies rather than theorems guaranteeing physical ripple cancellation, and we spell out the additional waveform, converter, and sampling constraints needed for engineering validation.

1. Introduction

Coding theory, sphere packing, Fourier analysis, and power-electronic waveform design are traditionally studied as separate disciplines. Nevertheless, each confronts a common mathematical problem:

Given a constrained discrete or piecewise-constant object, how can its Fourier spectrum be shaped so that unwanted oscillations are suppressed in protected bands and eliminated at forbidden frequencies?

Across these settings, there are two fundamentally different mathematical mechanisms:

\[ \begin{aligned} \textbf{Spectral shaping:}\quad &\text{moment cancellation}\ \Longrightarrow\ \text{high-order flatness at }\omega=0,\\[2mm] \textbf{Spectral interpolation:}\quad &\text{root placement}\ \Longrightarrow\ \text{exact nulls at }\omega_j>0. \end{aligned} \tag{1.1} \]

The extended binary Golay code \(\mathcal{G}_{24}\) and the extended ternary Golay code \(\mathcal{G}_{12}\) are canonical examples of Mechanism 1. Their large dual distances enforce exact agreement between low-order discrete weight moments and smooth binomial/multinomial reference distributions, producing high-order flat points at the origin of their radial Fourier transforms.

The Leech lattice \(\Lambda_{24}\) combines both mechanisms. Its absence of norm-\(2\) vectors requires both the minimum distance \(d(\mathcal{G}_{24})=8\) and coordinate congruence restrictions. The optimal dimension-24 auxiliary function [2] has a simple spatial zero at the first populated shell \(r=2\) (and a double zero of its Fourier transform there), while higher populated shells are double zeros of both functions. This boundary behavior must be distinguished from a double-zero condition at every shell.

The same bifurcation governs digital modulation and power conversion. An \(L\)th-order \(\Sigma\Delta\) modulator suppresses quantization noise near baseband via the high-order zero of \((1-z^{-1})^L\) at \(z=1\) [9], whereas Selective Harmonic Elimination PWM (SHE-PWM) solves a coupled trigonometric system to place exact spectral zeros at specified odd harmonics [10].

This paper develops this framework rigorously, separating proved coding-theoretic and harmonic-analytic theorems from structural analogies and falsifiable engineering design principles.

2. Discrete Spectral Flatness from the Binary Golay Code

2.1 Weight enumerator and MacWilliams sum-of-squares decomposition

The extended binary Golay code \(\mathcal{G}_{24}\subset\mathbb{F}_2^{24}\) is a self-dual \([24,12,8]_2\) linear code (\(\mathcal{G}_{24}=\mathcal{G}_{24}^\perp\)) of cardinality \(|\mathcal{G}_{24}|=2^{12}=4096\). Its weight enumerator is

\[ W_{\mathcal{G}_{24}}(x,y) = \sum_{w=0}^{24} A_w x^{24-w}y^w = x^{24}+759x^{16}y^8+2576x^{12}y^{12}+759x^8y^{16}+y^{24}. \tag{2.1} \]

Since \(\mathcal{G}_{24}\) is self-dual, its dual distance equals its minimum distance:

\[ d(\mathcal{G}_{24})=d^\perp(\mathcal{G}_{24})=8. \tag{2.2} \]

For the uniform Bernoulli reference measure on \(\mathbb{F}_2^{24}\) normalized to total mass \(4096\), the reference weight distribution is \(B_w=4096\cdot 2^{-24}\binom{24}{w}=\frac{1}{4096}\binom{24}{w}\), with generating polynomial \(W_{\mathrm{ref}}(1,z)=\frac{1}{4096}(1+z)^{24}\).

Theorem 2.1 (MacWilliams factorization and strict positivity of \(P_{16}(z)\))

The binary weight-enumerator discrepancy \(\Delta W_{\mathrm{bin}}(z)\coloneqq W_{\mathcal{G}_{24}}(1,z)-\frac{1}{4096}(1+z)^{24}\) admits the exact algebraic factorization

\[ \Delta W_{\mathrm{bin}}(z) = \frac{1}{4096}(z-1)^8 P_{16}(z), \tag{2.3} \]

where the degree-\(16\) residual polynomial \(P_{16}(z)\) is given explicitly by the MacWilliams sum of even powers:

\[ P_{16}(z) = 759(1+z)^{16} + 2576(1+z)^{12}(z-1)^4 + 759(1+z)^8(z-1)^8 + (z-1)^{16}. \tag{2.4} \]

In particular, \(P_{16}(z)>0\) for all \(z\in\mathbb{R}\), so \(z=1\) is the unique real root of \(\Delta W_{\mathrm{bin}}(z)\), with multiplicity exactly \(8\).

Proof. By the MacWilliams identity for the self-dual code \(\mathcal{G}_{24}=\mathcal{G}_{24}^\perp\),

\[ W_{\mathcal{G}_{24}}(1,z) = \frac{1}{|\mathcal{G}_{24}|}\sum_{j=0}^{24} A_j(1+z)^{24-j}(1-z)^j. \tag{2.5} \]

The \(j=0\) term (\(A_0=1\)) equals \(\frac{1}{4096}(1+z)^{24}=W_{\mathrm{ref}}(1,z)\). Subtracting this term and noting that \((1-z)^j=(z-1)^j\) for all even weights \(j\in\{8,12,16,24\}\) yields

\[ \begin{aligned} \Delta W_{\mathrm{bin}}(z) &=\frac{1}{4096}\bigl[ 759(1+z)^{16}(z-1)^8 +2576(1+z)^{12}(z-1)^{12}\\ &\qquad+759(1+z)^8(z-1)^{16} +(z-1)^{24}\bigr]\\ &=\frac{1}{4096}(z-1)^8 P_{16}(z). \end{aligned} \]

For every \(z\in\mathbb{R}\), each of the four summands in (2.4) is nonnegative; for \(z\neq -1\) the first term is strictly positive, while for \(z=-1\) the fourth term is \((-2)^{16}=65\,536>0\). Thus \(P_{16}(z)>0\) for all \(z\in\mathbb{R}\).

2.2 Moment matching and exact eighth-moment discrepancy

Define the \(m\)-th discrete weight moment of \(\mathcal{G}_{24}\) and its binomial reference by

\[ \mu_m(\mathcal{G}_{24})\coloneqq\sum_{w=0}^{24}A_w w^m, \qquad \mu_m^{\mathrm{ref}}\coloneqq\frac{1}{4096}\sum_{w=0}^{24}\binom{24}{w}w^m. \tag{2.6} \]
Corollary 2.2 (Seven-moment cancellation and exact eighth discrepancy)

The discrete moments of \(\mathcal{G}_{24}\) satisfy

\[ \mu_m(\mathcal{G}_{24})=\mu_m^{\mathrm{ref}} \qquad \text{for all }m\in\{0,1,2,3,4,5,6,7\}, \tag{2.7} \]

while at degree \(m=8\) the exact discrepancy is

\[ \Delta\mu_8(\mathcal{G}_{24}) \coloneqq \mu_8(\mathcal{G}_{24})-\mu_8^{\mathrm{ref}} = 8!\cdot\frac{P_{16}(1)}{4096} = 8!\cdot 759\cdot 16 = 489\,646\,080. \tag{2.8} \]

Proof. The ordinary moments \(\mu_m\) are linear combinations of the factorial moments \(\sum A_w w^{\underline j}=\left.\frac{d^j}{dz^j}W(1,z)\right|_{z=1}\) for \(0\leq j\leq m\). By Theorem 2.1, \(\Delta W_{\mathrm{bin}}(z)\) vanishes to order \(8\) at \(z=1\), so all derivatives of order \(j\leq 7\) vanish at \(z=1\), forcing \(\mu_m(\mathcal{G}_{24})=\mu_m^{\mathrm{ref}}\) for \(m\leq 7\). Consequently,

\[ \begin{aligned} \Delta\mu_8(\mathcal{G}_{24}) &=\sum_{w=0}^{24}(A_w-B_w)w^{\underline 8} =\left.\frac{d^8}{dz^8}\Delta W_{\mathrm{bin}}(z)\right|_{z=1}\\ &=\frac{8!}{4096}P_{16}(1) =\frac{40\,320\cdot 759\cdot 2^{16}}{4096} =489\,646\,080. \end{aligned} \]
Table 2.1: Exact discrete weight moments \(\mu_m(\mathcal{G}_{24})\) versus the binomial reference \(\mu_m^{\mathrm{ref}}\) for \(0\leq m\leq 8\).
Order \(m\) \(\mu_m(\mathcal{G}_{24})\) \(\mu_m^{\mathrm{ref}}\) Discrepancy \(\Delta\mu_m\)
\(0\)\(4\,096\)\(4\,096\)\(0\)
\(1\)\(49\,152\)\(49\,152\)\(0\)
\(2\)\(614\,400\)\(614\,400\)\(0\)
\(3\)\(7\,962\,624\)\(7\,962\,624\)\(0\)
\(4\)\(106\,758\,144\)\(106\,758\,144\)\(0\)
\(5\)\(1\,476\,395\,008\)\(1\,476\,395\,008\)\(0\)
\(6\)\(21\,036\,515\,328\)\(21\,036\,515\,328\)\(0\)
\(7\)\(308\,163\,936\,256\)\(308\,163\,936\,256\)\(0\)
\(8\)\(4\,644\,387\,684\,352\)\(4\,643\,898\,038\,272\)\(\mathbf{+489\,646\,080}\)

2.3 Radial Fourier–Bessel transform in \(\mathbb{R}^{24}\)

Embed \(\mathbb{F}_2^{24}\) into \(\mathbb{R}^{24}\) via \(c\mapsto x=((-1)^{c_1},\ldots,(-1)^{c_{24}})\). The Euclidean distance from \(x_0=(1,\ldots,1)\) to a codeword of weight \(w\) is \(r_w=\sqrt{4w}=2\sqrt{w}\). In \(\mathbb{R}^{24}\), the normalized radial Fourier–Bessel kernel is

\[ \Omega_{24}(t) \coloneqq \Gamma(12)\left(\frac{2}{t}\right)^{11}J_{11}(t) = \Gamma(12)\sum_{m=0}^{\infty} \frac{(-1)^m}{m!\,\Gamma(m+12)}\left(\frac{t}{2}\right)^{2m}. \tag{2.9} \]
Theorem 2.3 (Sixteenth-order radial Fourier flatness of \(\mathcal{G}_{24}\))

Define the radial Fourier transform of the binary Golay weight distribution by

\[ \widehat{\mu}_{\mathcal{G}_{24}}(k)\coloneqq\sum_{w=0}^{24}A_w\Omega_{24}(2\pi k r_w) =\sum_{w=0}^{24}A_w\Omega_{24}(4\pi k\sqrt{w}). \]

Then as \(k\to 0\),

\[ \widehat{\mu}_{\mathcal{G}_{24}}(k)-\widehat{\mu}_{\mathrm{ref}}(k) = \frac{\Gamma(12)\,\Delta\mu_8(\mathcal{G}_{24})}{8!\,\Gamma(20)}(2\pi k)^{16} +\mathcal{O}(k^{18}) = \frac{253}{63\,488\,880}(2\pi k)^{16} +\mathcal{O}(k^{18}). \tag{2.10} \]

Proof. Substituting \(t=4\pi k\sqrt{w}\) into the Taylor series of \(\Omega_{24}(t)\) gives \((t/2)^{2m}=(2\pi k)^{2m}w^m\). Summing over \(w\) and subtracting \(\widehat{\mu}_{\mathrm{ref}}(k)\) yields

\[ \widehat{\mu}_{\mathcal{G}_{24}}(k)-\widehat{\mu}_{\mathrm{ref}}(k) = \sum_{m=0}^{\infty} \frac{(-1)^m\Gamma(12)}{m!\,\Gamma(m+12)}(2\pi k)^{2m} \bigl(\mu_m(\mathcal{G}_{24})-\mu_m^{\mathrm{ref}}\bigr). \]

By Corollary 2.2, the terms \(0\leq m\leq 7\) vanish and the \(m=8\) term has coefficient \(\frac{11!\cdot 8!\cdot 759\cdot 16}{8!\cdot 19!} =\frac{759\cdot 16}{19\cdot 18\cdots 12}=\frac{253}{63\,488\,880}\).

2.4 Directional Fourier flatness and the orthogonal-array property

Proposition 2.4 (Directional flatness of the binary Golay code)

Let \(x(c)=((-1)^{c_1},\ldots,(-1)^{c_{24}})\) and put \(\nu_{\mathcal{G}_{24}}=\sum_{c\in\mathcal{G}_{24}}\delta_{x(c)}\), while \(\nu_{\mathrm{cube}}=2^{-12}\sum_{x\in\{\pm1\}^{24}}\delta_x\). Then, as \(\boldsymbol{k}\to0\),

\[ \widehat{\nu}_{\mathcal{G}_{24}}(\boldsymbol{k})-\widehat{\nu}_{\mathrm{cube}}(\boldsymbol{k}) =4096(2\pi)^8\sum_{O\in\mathcal{O}_{759}} \prod_{j\in O}k_j+\mathcal{O}(\|\boldsymbol{k}\|^{10}), \tag{2.11} \]

where \(\mathcal{O}_{759}\) is the set of \(759\) octad supports.

Proof. Dual distance \(8\) implies that all character averages of degree below \(8\) agree with those of the uniform cube: \(\mathcal{G}_{24}\) is an orthogonal array of strength \(7\) [5]. Crucially, this does not say that all low-degree monomial sums vanish: even powers need not have zero average. At total degree \(8\), the only new parity-supports are the \(759\) weight-\(8\) words of \(\mathcal{G}_{24}^\perp=\mathcal{G}_{24}\); each contributes \(4096(2\pi)^8\prod_{j\in O}k_j\). Both measures are centrally symmetric, eliminating odd total degrees and leaving remainder \(\mathcal{O}(\|\boldsymbol{k}\|^{10})\).

Remark 2.5 (From eighth-order directional flatness to sixteenth-order radial flatness)

There is no conflict between the order \(\mathcal{O}(\|\boldsymbol{k}\|^8)\) of Proposition 2.4 and the order \(\mathcal{O}(k^{16})\) of Theorem 2.3. Use the Fourier convention \(\widehat{\nu}(\boldsymbol{k})=\int e^{-2\pi i\langle\boldsymbol{k},x\rangle}\,d\nu(x)\). Translation from \(x(c)\) to the displacement \(x(c)-\boldsymbol{1}\) multiplies the full Fourier discrepancy by \(e^{2\pi i\langle\boldsymbol{k},\boldsymbol{1}\rangle}\). Each nonzero dual-codeword support has size at least eight; for its contribution to have a nonzero spherical average, every coordinate in that support must occur with even total exponent. The shift factor must therefore contribute at least one additional power in each of those coordinates. The first possible radial term has degree \(16\), coming from the \(759\) octads:

\[ 4096(2\pi k)^{16}\sum_{O\in\mathcal{O}_{759}} \int_{S^{23}}\prod_{j\in O}u_j^2\,d\sigma(u), \qquad \sigma(S^{23})=1. \tag{2.12} \]

Using the Dirichlet law of squared coordinates on the unit sphere,

\[ \int_{S^{23}}\prod_{j\in O}u_j^2\,d\sigma(u) =\frac{\Gamma(12)\Gamma(3/2)^8} {\Gamma(20)\Gamma(1/2)^8} =\frac{11!}{2^8\,19!}, \tag{2.13} \]

so the leading coefficient is exactly

\[ 4096\cdot759\cdot\frac{11!}{2^8\,19!} =\frac{253}{63\,488\,880}, \tag{2.14} \]

in independent agreement with (2.10). The numerical calculation is performed using exact integer and Fraction arithmetic in Appendix A.

3. The Extended Ternary Golay Code

3.1 A general \(q\)-ary moment identity

Theorem 3.1 (Moment cancellation from dual distance)

Let \(\mathcal{C}\) be an \([n,k,d]_q\) linear code over \(\mathbb{F}_q\), with dual minimum distance \(d^\perp\) and dual weight enumerator coefficients \(A_j^\perp\). Relative to the reference enumerator \(W_{\mathrm{ref}}(1,z)=q^{k-n}(1+(q-1)z)^n\),

\[ \Delta W_{\mathcal{C}}(z)=q^{k-n} \sum_{j=d^\perp}^{n} A_j^\perp (1+(q-1)z)^{n-j}(1-z)^j. \tag{3.1} \]

Therefore the ordinary weight moments agree for \(0\leq m<d^\perp\), and the first discrepancy is

\[ \Delta\mu_{d^\perp}(\mathcal{C})= (-1)^{d^\perp}(d^\perp)!\,q^{k-d^\perp}A_{d^\perp}^\perp. \tag{3.2} \]

Proof. The \(q\)-ary MacWilliams identity [7] gives the displayed discrepancy after subtracting the zero-weight term of the dual enumerator. Every surviving term has a factor \((1-z)^{d^\perp}\), and the term with \(j=d^\perp\) is the only one contributing to the derivative of that order at \(z=1\). Ordinary moments are linear combinations of factorial moments, and all lower factorial discrepancies vanish. Evaluating the surviving derivative yields the claimed coefficient.

3.2 The ternary Golay discrepancy and real roots

The extended ternary Golay code \(\mathcal{G}_{12}\subset\mathbb{F}_3^{12}\) is self-dual, has parameters \([12,6,6]_3\), size \(729\), and weight distribution

\[ A_0=1,\qquad A_6=264,\qquad A_9=440,\qquad A_{12}=24. \tag{3.3} \]

Its discrepancy relative to the normalized multinomial reference is

\[ \Delta W_{\mathrm{ter}}(z)=\frac{(z-1)^6}{729}Q_6(z),\qquad Q_6(z)=264(1+2z)^6-440(1+2z)^3(z-1)^3+24(z-1)^6. \tag{3.4} \]

An exact expansion gives

\[ \begin{split} Q_6(z)={}&13\,400z^6+55\,824z^5+66\,360z^4 +36\,920z^3\\ &+14\,880z^2+4\,344z+728, \end{split} \tag{3.5} \]

which is strictly positive for \(z\geq0\). In contrast to the binary residual \(P_{16}\), \(Q_6\) has two negative real zeros, approximately \(-2.62357948\) and \(-0.85600645\). In particular, \(z=1\) is the unique nonnegative real zero of \(\Delta W_{\mathrm{ter}}\), of multiplicity six. By Theorem 3.1, the first nonzero moment discrepancy is

\[ \Delta\mu_6(\mathcal{G}_{12})=6!\,264=190\,080. \tag{3.6} \]

The two real zeros of \(Q_6\) can also be derived by setting \(u=(1+2z)^3\) and \(v=(z-1)^3\): \(Q_6=8(33u^2-55uv+3v^2)\). This quadratic has discriminant \(2629>0\); both resulting real values of \(u/v\) are positive and produce the two negative zeros above.

Table 3.1: Exact ternary Golay weight moments and reference moments.
\(m\) \(\mu_m(\mathcal{G}_{12})\) \(\mu_m^{\mathrm{ref}}\) \(\Delta\mu_m\)
\(0\)\(729\)\(729\)\(0\)
\(1\)\(5\,832\)\(5\,832\)\(0\)
\(2\)\(48\,600\)\(48\,600\)\(0\)
\(3\)\(419\,256\)\(419\,256\)\(0\)
\(4\)\(3\,726\,648\)\(3\,726\,648\)\(0\)
\(5\)\(34\,006\,392\)\(34\,006\,392\)\(0\)
\(6\)\(317\,814\,840\)\(317\,624\,760\)\(190\,080\)

3.3 The ambient dimension must match the embedding

Map \(c_j\in\mathbb{F}_3\) to \(e^{2\pi i c_j/3}\in\mathbb{C}\). Relative to the all-ones vector, a codeword of weight \(w\) has radius \(r_w=\sqrt{3w}\). However, \(\mathbb{C}^{12}\cong\mathbb{R}^{24}\), so the corresponding radial kernel is \(\Omega_{24}\), not \(\Omega_{12}\). We obtain the physically dimensional cyclotomic formula

Proposition 3.2 (Ternary cyclotomic radial flatness)

For the cyclotomic embedding and the appropriately normalized reference,

\[ \widehat{\mu}_{\mathcal{G}_{12}}(k)-\widehat{\mu}_{\mathrm{ref}}(k) =\frac{11}{371\,280}(\sqrt{3}\pi k)^{12}+\mathcal{O}(k^{14}). \tag{3.7} \]

Proof. The normalized \(24\)-dimensional kernel is

\[ \Omega_{24}(t)=\Gamma(12)\sum_{m\geq0} \frac{(-1)^m(t/2)^{2m}}{m!\Gamma(m+12)}. \]

With \(t=2\pi k\sqrt{3w}\) the first nonvanishing moment is \(m=6\); its coefficient is \(\Gamma(12)\Delta\mu_6/(6!\Gamma(18))=11/371\,280\).

Remark 3.3 (Alternative real-valued \(12\)-dimensional embedding)

If instead each symbol is mapped to \(0,+\sqrt{3},-\sqrt{3}\in\mathbb{R}\), then the radius about the zero word remains \(\sqrt{3w}\) and the radial kernel is \(\Omega_{12}\). The earlier coefficient \(\frac{1}{1260}(\sqrt{3}\pi k)^{12}\) is correct for this distinct model. This map is not an isometric embedding of ternary Hamming distance for arbitrary pairs of codewords: the two nonzero symbols are separated by \(2\sqrt{3}\), not \(\sqrt{3}\).

4. Leech-Lattice Interpolation and the Root Corridor

4.1 The complete Golay congruence construction

The Leech lattice \(\Lambda_{24}\subset\mathbb{R}^{24}\) is even unimodular, rootless, and has minimum squared norm \(4\). The following integral-coordinate construction [3] explains why \(d_{\min}(\mathcal{G}_{24})=8\) is necessary but not the sole reason for rootlessness. Let \(x=(x_1,\ldots,x_{24})\in\mathbb{Z}^{24}\); set \(\lambda=x/\sqrt{8}\). Require, for some \(m\in\{0,1\}\),

\[ \begin{split} x_i&\equiv m\pmod 2,\\ ((x_i-m)/2\bmod 2)_{i=1}^{24}&\in\mathcal{G}_{24},\\ \sum_{i=1}^{24}x_i&\equiv4m\pmod 8. \end{split} \tag{4.1} \]

The coordinate-congruence condition removes vectors \((\pm4,0^{23})/\sqrt{8}\) of squared norm \(2\), while the Golay minimum distance rules out weight-\(4\) codeword vectors \((\pm2^4,0^{20})/\sqrt{8}\). The odd-coordinate coset cannot contain a norm-\(2\) vector either. Thus rootlessness uses all three parts of (4.1).

The shortest nonzero vectors split into three disjoint shape classes:

\[ \begin{aligned} (\pm2^8,0^{16})/\sqrt{8} &: 759\cdot 2^7=97\,152,\\ (\pm4^2,0^{22})/\sqrt{8} &: \binom{24}{2}\cdot 4=1\,104,\\ (\mp3,\pm1^{23})/\sqrt{8} &: 24\cdot 2^{12}=98\,304,\\ N_4(\Lambda_{24}) &: 196\,560. \end{aligned} \tag{4.2} \]

The first class is supported on Golay octads (with the permitted sign parity), the second on two coordinate positions, and the third on the odd-coordinate coset. The count verifies the minimal shell but does not by itself establish the full lattice construction or unimodularity.

4.2 Sphere-packing auxiliary function and shell multiplicities

The optimal radial Schwartz function \(f\) for the \(24\)-dimensional Cohn–Elkies bound [1, 2] satisfies

\[ f(0)=\widehat{f}(0)>0,\qquad f(r)\leq0\ (r\geq2),\qquad \widehat{f}(r)\geq0\ (r\geq0). \tag{4.3} \]

The Leech lattice is self-dual. Sharpness and Poisson summation impose \(f(\sqrt{2m})=\widehat{f}(\sqrt{2m})=0\) on each populated nonzero shell \(m\geq2\). For \(m\geq3\) these are interior zeros of fixed-sign functions; hence both are zeros of order at least two. At the boundary \(r=2\), however, the condition \(f(r)\leq0\) applies only for \(r\geq2\) and does not force \(f'(2)=0\). In fact, the explicitly constructed sphere-packing auxiliary function has a simple spatial zero there. Its Fourier transform has a double zero because it is nonnegative on both sides of \(r=2\):

\[ \begin{aligned} f(2)=0,&\quad f'(2)\ne0,\\ \widehat{f}(2)=0,&\quad \widehat{f}'(2)=0,\\ f(\sqrt{2m})=f'(\sqrt{2m})=0,&\quad \widehat{f}(\sqrt{2m})=\widehat{f}'(\sqrt{2m})=0\quad(m\geq3). \end{aligned} \tag{4.4} \]

The first unpopulated even-lattice shell has radius \(\sqrt{2}\), and \(f(\sqrt{2})>0\). A Niemeier lattice with roots [8] therefore cannot attain equality in the same sharp bound. The modular-form interpolation mechanism is not supplied by the Golay weight polynomial: Theorem 2.1 proves that polynomial has no additional real roots beyond \(z=1\).

4.3 The dimension-\(8\) sister case: \(E_8\) and the Hamming code

The extended binary Hamming code \(\mathcal{H}_8\) has parameters \([8,4,4]_2\), enumerator \(1+14z^4+z^8\), and

\[ \Delta W_{\mathcal{H}_8}(z)=\frac{(z-1)^4}{16} \left[14(1+z)^4+(z-1)^4\right],\qquad \Delta\mu_4(\mathcal{H}_8)=336. \tag{4.5} \]

The corresponding \(\mathbb{R}^8\) radial discrepancy starts as \((2\pi k)^8/60+\mathcal{O}(k^{10})\) under the binary hypercube embedding. Construction A gives \(E_8=\{x/\sqrt{2}:x\in\mathbb{Z}^8,\ x\bmod2\in\mathcal{H}_8\}\). Its norm-\(2\) roots are exactly the \(14\cdot2^4=224\) vectors with four \(\pm1\) entries supported on a weight-\(4\) codeword, plus the \(16\) coordinate roots with a single \(\pm2\) entry:

\[ N_2(E_8)=224+16=240. \tag{4.6} \]

These roots are admissible for the dimension-\(8\) packing function, which has its first spatial zero at \(r=\sqrt{2}\) [12]. By contrast, the dimension-\(24\) function is positive at \(\sqrt{2}\), so a rootless lattice is required for sharpness.

4.4 Leech shell designs

Every nonempty Leech shell is a spherical \(11\)-design [11]. Thus the shell Fourier transform has no nonconstant spherical harmonic components of degrees \(1\) through \(11\), with possible directional anisotropy first occurring at degree \(12\). This is a separate isotropy statement, not a claim that shell radii are hardware switching frequencies.

5. Signal Processing and Coded PWM Mechanisms

5.1 \(\Sigma\Delta\) noise shaping as a spectral-order analogy

An idealized \(L\)th-order linearized \(\Sigma\Delta\) modulator has noise-transfer function \(\operatorname{NTF}(z)=(1-z^{-1})^L\) [9]. If \(z=e^{i\omega T_s}\), then

\[ |\operatorname{NTF}(e^{i\omega T_s})|^2= [2\sin(\omega T_s/2)]^{2L} =(\omega T_s)^{2L}+\mathcal{O}(\omega^{2L+2}). \tag{5.1} \]

Thus for \(L=8\) the noise power transfer function has sixteenth-order baseband vanishing, the same power-law order as the binary Golay radial Fourier discrepancy. They are different physical and mathematical objects; their equal exponents alone do not construct an eighth-order converter or establish its stability.

5.2 Selective harmonic elimination and Chebyshev reduction

For a quarter-wave symmetric two-level switching waveform with ordered angles \(0<\alpha_1<\cdots<\alpha_N<\pi/2\) under a fixed polarity convention [10], the odd-harmonic coefficients are

\[ V_n=\frac{4V_{\mathrm{dc}}}{n\pi} \left[1+2\sum_{j=1}^{N}(-1)^j\cos(n\alpha_j)\right], \qquad n=1,3,5,\ldots. \tag{5.2} \]

Because a sign convention affects \(V_1\), impose the magnitude constraint \(|V_1|=MV_{\mathrm{dc}}\) along with \(V_n=0\) for selected \(n\in\mathcal{H}\):

\[ \left|1+2\sum_{j=1}^N(-1)^j\cos\alpha_j\right|=\frac{\pi M}{4}, \quad 1+2\sum_{j=1}^N(-1)^j\cos(n\alpha_j)=0. \tag{5.3} \]

With \(x_j=\cos\alpha_j\) and \(T_n(x)=\cos(n\arccos x)\), these equations become polynomial constraints \(1>x_1>x_2>\cdots>x_N>0\) involving \(T_n(x_j)\). This algebraic nonzero-frequency root placement is structurally analogous to, but not derived from, Leech shell interpolation.

Proposition 5.1 (Symmetric three-angle reduction and exact solution count)

For \(N=3\), let

\[ (y_1,y_2,y_3)=(\cos\alpha_1,-\cos\alpha_2,\cos\alpha_3), \qquad (a,b,c)=(e_1,e_2,e_3) \]

where \(e_i\) are the elementary symmetric polynomials in the \(y_j\). Physical quarter-wave ordering is precisely \(1>y_1>-y_2>y_3>0\). With \(p_n=\sum_j y_j^n\), the fifth- and seventh-harmonic equations are

\[ 16p_5-20p_3+5p_1=\tfrac{1}{2},\qquad 64p_7-112p_5+56p_3-7p_1=\tfrac{1}{2}. \tag{5.4} \]

Here \(p_1=a\), \(p_2=a^2-2b\), \(p_3=a^3-3ab+3c\) and \(p_n=ap_{n-1}-bp_{n-2}+cp_{n-3}\) for \(n\ge4\). For \(D=4a^2-4b-3\ne0\), the fifth-harmonic equation gives

\[ c=-\frac{32a^5-160a^3b-40a^3+160ab^2+120ab+10a-1} {40(4a^2-4b-3)}. \tag{5.5} \]

Substitution into the seventh-harmonic equation yields a polynomial \(P_a(b)=0\) of degree at most three in \(b\); the explicit integer coefficient form and a symbolic identity check are supplied in Appendix A. At \(M=4/5\), across both fundamental-polarity branches, exactly two solutions satisfy the physical angle ordering.

Proof. The fundamental-magnitude constraint becomes \(1-2a=\pm\pi M/4\), so that for \(M=4/5\),

\[ a=\tfrac{1}{2}\pm\frac{\pi}{10}. \tag{5.6} \]

For \(D\ne0\), direct substitution of (5.5) gives

\[ 64p_7-112p_5+56p_3-7p_1-\tfrac{1}{2} =-\frac{(2a-1)P_a(b)}{50D^2}, \qquad \deg_b P_a=3. \]

The singular case \(D=0\) is excluded: the residual fifth-harmonic condition becomes \(\frac{1}{2}(2a-1)(16a^4+8a^3-16a^2-8a+1)=0\), which is nonzero for both values in (5.6).

For an exact completeness certificate, enclose \(\pi\) between the rational numbers \(3.14159265358979\) and \(3.14159265358980\), using Machin's arctangent identity and alternating series bounds. Exact rational interval evaluation gives the following three disjoint sign-changing \(b\)-brackets for each fundamental branch:

Table 5.1: Exact rational isolation of all six algebraic \(b=e_2\) roots at \(M=4/5\). Decimal endpoints denote exact rational numbers.
\(a\) Certified \(e_2\) bracket Physical ordering
\(\tfrac{1}{2}+\tfrac{\pi}{10}\) \([-0.657659304,-0.657659303]\) Admissible
\([-0.225724156,-0.225724155]\) Admissible
\([\phantom{-}0.105814092,\phantom{-}0.105814094]\) Wrong angle order
\(\tfrac{1}{2}-\tfrac{\pi}{10}\) \([-0.754080354,-0.754080351]\) Wrong angle order
\([-0.698777062,-0.698777057]\) \(e_3>0\), inadmissible
\([\phantom{-}0.381862775,\phantom{-}0.381862779]\) \(e_3>0\), inadmissible

The cubic degree bound and three disjoint sign changes establish that these lists exhaust the real \(b\)-roots. For each bracket, recover \(c\) from (5.5) and isolate the real roots of \(y^3-ay^2+by-c\). The exact rational sign brackets in Appendix A show that precisely the first two rows have \(1>y_1>-y_2>y_3>0\). On the other four rows either this ordering fails or \(c>0\), whereas the desired \((+,-,+)\) sign pattern requires \(c<0\). All interval assertions use integer and Fraction arithmetic, not a floating-point solver.

Remark 5.2 (Angle values and a distinct rational example)

The two ordered solutions at \(M=0.80\) are, in degrees,

\[ \begin{aligned} (\alpha_1,\alpha_2,\alpha_3)&\approx (18.34636^\circ,37.03147^\circ,48.44850^\circ),\\ (\alpha_1,\alpha_2,\alpha_3)&\approx (7.10779^\circ,70.87944^\circ,81.40778^\circ). \end{aligned} \tag{5.7} \]

The exact rational specialization \(a=e_1=13/16\) is useful for separate polynomial root checks, but it corresponds to \(M=5/(2\pi)\ne0.80\) on the negative-fundamental branch. No claim about minimum hardware pulse duration or device dead time follows from the algebraic root count alone.

5.3 Golay complementary pairs, spectral sums, and Reed–Muller codes

A bipolar complementary pair \(a,b\in\{\pm1\}^L\) [6] has aperiodic correlations \(R_a[k]+R_b[k]=2L\delta_{k,0}\), and hence

\[ |A(e^{i\omega})|^2+|B(e^{i\omega})|^2=2L. \tag{5.8} \]

In particular \(|A(e^{i\omega})|^2\leq2L\), which gives the purely spectral bound

\[ \frac{\sup_\omega|A(e^{i\omega})|^2}{L}\leq2 \qquad(10\log_{10}2\approx3.01\ \mathrm{dB}). \tag{5.9} \]

For a standard OFDM multicarrier envelope, this is the familiar PMEPR bound; Davis and Jedwab [4] relate a large family of such length-\(2^m\) sequences to quadratic cosets of \(\mathrm{RM}(1,m)\) in \(\mathrm{RM}(2,m)\). This is a link to Reed–Muller coding, not an identity between the \([24,12,8]\) Golay block code and Golay complementary pairs.

A critical physical qualification is that adding converter leg signals produces

\[ |A+B|^2=|A|^2+|B|^2+2\Re(A\overline{B}), \tag{5.10} \]

which includes a cross-spectrum absent from the complementary power identity. Nonidentical analog transfer functions, duty-cycle mapping, and load dynamics also matter. Complementarity therefore does not guarantee zero output current or voltage ripple.

5.4 Sampling, aliasing, and implementation constraints

With the Fourier convention of Section 2, ideal sampling at \(f_s=1/T_s\) gives replicated spectra

\[ X_s(f)=\frac{1}{T_s}\sum_{k\in\mathbb{Z}}X(f-k f_s). \tag{5.11} \]

The Nyquist frequency is \(f_s/2\) for reconstruction of an appropriately bandlimited signal. Quantization-noise shaping, finite switching transitions, pulse timing, reconstruction, and subsequent sampling must be modeled to determine practical aliasing and EMI. The self-duality \(\Lambda_{24}^*=\Lambda_{24}\) is an instructive Poisson-summation analogy, not proof of alias-free electrical switching.

6. Unified Variational Formulation and Dictionary

Let \(\mathcal{S}\) be an explicitly specified set of feasible switching waveforms, and \(S(\omega)\) their measured or simulated spectra. One possible, not yet optimized, multiobjective design criterion is

\[ \mathcal{J}(S)= \int_0^{\omega_B}|S(\omega)-S_{\mathrm{target}}(\omega)|^2d\omega +\lambda\sum_{n\in\mathcal{H}}|S(n\omega_0)|^2. \tag{6.1} \]

The admissible set must incorporate device-level minimum on/off time, finite resolution, switching-loss budgets, modulation range, filter transfer functions, and sampling constraints; \(\omega_B<\pi/T_s\) by itself does not ensure alias-free operation.

Table 6.1: A carefully qualified dictionary between coding/lattice mathematics and waveform design.
Mathematical structure Waveform analogy Scope of comparison
Binary Golay \(d^\perp=8\) Eighth-order \(\Sigma\Delta\) Both exhibit order-\(16\) vanishing, for different spectral objects.
Ternary Golay \(d^\perp=6\) Sixth-order \(\Sigma\Delta\) Both exhibit order-\(12\) vanishing, not a circuit equivalence.
Golay complementary pair Multiphase power converter Flat sum of powers; the physical output has cross terms.
Leech has no norm-\(2\) vectors Switching pulse feasibility A useful feasibility analogy; no direct parameter identification.
Optimal auxiliary-function shell zeros SHE-PWM Both impose isolated zeros; the first shell has a boundary zero.
Lattice duality / Poisson summation Sampling replicas Fourier duality does not itself remove aliasing.

7. Conclusion

The rigorous coding-theoretic core consists of MacWilliams moment identities, exact first moment discrepancies, and the resulting radial and directional Fourier flatness. The Leech-lattice connection requires both Golay distance and coordinate congruence conditions to remove norm-\(2\) vectors; the root structure of the dimension-\(24\) optimal packing function further distinguishes the simple spatial zero at \(r=2\) from double zeros at higher shells. The \(E_8\) sister case shows why the availability of roots at the lowest shell is compatible with dimension-\(8\) sharpness.

In waveform engineering, \(\Sigma\Delta\) modulation and SHE-PWM implement distinct baseband-shaping and isolated-harmonic-elimination strategies, respectively. Complementary sequences yield an exact spectral-power identity, but converter ripple, stability, loss, and aliasing require separate modeling. The concrete next step is to specify a converter topology and objective, simulate feasible coded switching sequences under device constraints, and compare ripple and EMI measurements with conventional PWM and SHE-PWM baselines.


Appendix A. Exact Python Verification Suite

Listing A.1: Executable verification: exact Golay moments and Bessel coefficients, the spherical-average identity, and rigorous Fraction interval certificates for both SHE-PWM polarities. SciPy is used only to display approximate angles.
"""Exact moment, Fourier and algebraic SHE-PWM certificates.

Requires SymPy for polynomial identities. NumPy/SciPy are only used in the
last, explicitly numerical demonstration; rational root certificates do
not depend on floating-point solvers.
"""
from fractions import Fraction as F
from dataclasses import dataclass
import math
import sympy as sp

# 1. Binary Golay moments and MacWilliams factorization.
A_bin = {0: 1, 8: 759, 12: 2576, 16: 759, 24: 1}
B_bin = {w: F(math.comb(24, w), 4096) for w in range(25)}
for m in range(8):
    assert sum(A*w**m for w,A in A_bin.items()) == sum(B*w**m for w,B in B_bin.items())
delta_mu8 = (sum(A*w**8 for w,A in A_bin.items())
             - sum(B*w**8 for w,B in B_bin.items()))
assert delta_mu8 == 489646080
z = sp.Symbol('z')
P16 = (759*(1+z)**16 + 2576*(1+z)**12*(z-1)**4
       + 759*(1+z)**8*(z-1)**8 + (z-1)**16)
W_bin = 1 + 759*z**8 + 2576*z**12 + 759*z**16 + z**24
assert sp.expand(4096*W_bin - (1+z)**24 - (z-1)**8*P16) == 0

# 2. Ternary Golay moments, ternary roots, and exact Bessel coefficients.
A_ter = {0: 1, 6: 264, 9: 440, 12: 24}
B_ter = {w: F(math.comb(12,w)*2**w, 729) for w in range(13)}
for m in range(6):
    assert sum(A*w**m for w,A in A_ter.items()) == sum(B*w**m for w,B in B_ter.items())
delta_mu6 = (sum(A*w**6 for w,A in A_ter.items())
             - sum(B*w**6 for w,B in B_ter.items()))
assert delta_mu6 == 190080

def Q6_frac(t):
    return 264*(1+2*t)**6 - 440*(1+2*t)**3*(t-1)**3 + 24*(t-1)**6

assert all(c>0 for c in sp.Poly(Q6_frac(z), z).all_coeffs())
for l,r in [(F('-2.62358'),F('-2.62357')), (F('-0.85601'),F('-0.85600'))]:
    assert Q6_frac(l)*Q6_frac(r)<0

coeff_bin = F(math.factorial(11)*delta_mu8,
              math.factorial(8)*math.factorial(19))
coeff_ter24 = F(math.factorial(11)*delta_mu6,
                math.factorial(6)*math.factorial(17))
coeff_ter12 = F(math.factorial(5)*delta_mu6,
                math.factorial(6)*math.factorial(11))
assert coeff_bin == F(253,63488880)
assert coeff_ter24 == F(11,371280)
assert coeff_ter12 == F(1,1260)

# 3. Exact spherical average: 759 octads, eight distinct squared coordinates.
sphere_octad = F(4096*759*math.factorial(11), 2**8*math.factorial(19))
assert sphere_octad == coeff_bin

# 4. E8 sister case and Leech minimal vectors.
A_ham = {0:1,4:14,8:1}
B_ham = {w:F(math.comb(8,w),16) for w in range(9)}
for m in range(4):
    assert sum(A*w**m for w,A in A_ham.items()) == sum(B*w**m for w,B in B_ham.items())
delta_mu4_ham = (sum(A*w**4 for w,A in A_ham.items())
                 -sum(B*w**4 for w,B in B_ham.items()))
assert delta_mu4_ham == 336
assert F(math.factorial(3)*delta_mu4_ham,
         math.factorial(4)*math.factorial(7)) == F(1,60)
assert 14*16+16 == 240
assert 759*2**7 + math.comb(24,2)*4 + 24*2**12 == 196560

# 5. Complementary pair check.
a_seq = [1,1,1,-1,1,1,-1,1]
b_seq = [1,1,1,-1,-1,-1,1,-1]
L = len(a_seq)
for k in range(L):
    Ra = sum(a_seq[j]*a_seq[j+k] for j in range(L-k))
    Rb = sum(b_seq[j]*b_seq[j+k] for j in range(L-k))
    assert Ra+Rb == (2*L if k==0 else 0)

# 6. Pure Fraction certificate for symmetric three-angle SHE-PWM.
# Intervals are inclusive, closed, and evaluated with exact rationals.
@dataclass(frozen=True)
class I:
    lo: F
    hi: F
    def __init__(self,lo,hi=None):
        lo=F(lo); hi=lo if hi is None else F(hi)
        assert lo<=hi
        object.__setattr__(self,'lo',lo)
        object.__setattr__(self,'hi',hi)
    def __add__(self,o):
        o=as_I(o); return I(self.lo+o.lo,self.hi+o.hi)
    __radd__=__add__
    def __neg__(self): return I(-self.hi,-self.lo)
    def __sub__(self,o): return self+(-as_I(o))
    def __rsub__(self,o): return as_I(o)-self
    def __mul__(self,o):
        o=as_I(o); p=[u*v for u in (self.lo,self.hi)
                        for v in (o.lo,o.hi)]
        return I(min(p),max(p))
    __rmul__=__mul__
    def __truediv__(self,o):
        o=as_I(o)
        assert o.lo>0 or o.hi<0, 'denominator interval includes zero'
        return self*I(1/o.hi,1/o.lo)
    def __pow__(self,n):
        assert isinstance(n,int) and n>=0
        if n==0: return I(1)
        if n%2: return I(self.lo**n,self.hi**n)
        if self.lo<=0<=self.hi: return I(0,max(self.lo**n,self.hi**n))
        return I(min(self.lo**n,self.hi**n),max(self.lo**n,self.hi**n))
    def sign(self):
        return 1 if self.lo>0 else -1 if self.hi<0 else 0

def as_I(v): return v if isinstance(v,I) else I(v)

def cubic_P(a,b):
    """Numerator of the seventh-harmonic equation after eliminating e3."""
    c3 = -35840*a**4-17920*a**3+35840*a**2+17920*a-2240
    c2 = (46080*a**6+23040*a**5-104960*a**4-52480*a**3
          +63360*a**2+29440*a-4880)
    c1 = (-20480*a**8-10240*a**7+72960*a**6+36480*a**5
          -84800*a**4-40160*a**3+35920*a**2+13920*a-3540)
    c0 = (3072*a**10+1536*a**9-14592*a**8-7296*a**7+24512*a**6
          +11584*a**5-18288*a**4-7264*a**3+6168*a**2+1454*a-855)
    return ((c3*b+c2)*b+c1)*b+c0

def e3_from_e1_e2(a,b):
    num = (32*a**5-160*a**3*b-40*a**3+160*a*b**2
           +120*a*b+10*a-1)
    return -num/(40*(4*a**2-4*b-3))

def y_poly(y,a,b,c):
    return ((y-a)*y+b)*y-c

# Verify elimination symbolically; the interval root checks below use F only.
sa,sb,sc=sp.symbols('sa sb sc')
p={1:sa, 2:sa**2-2*sb, 3:sa**3-3*sa*sb+3*sc}
for j in range(4,8):
    p[j]=sp.expand(sa*p[j-1]-sb*p[j-2]+sc*p[j-3])
eq5=16*p[5]-20*p[3]+5*p[1]-sp.Rational(1,2)
eq7=64*p[7]-112*p[5]+56*p[3]-7*p[1]-sp.Rational(1,2)
cs=e3_from_e1_e2(sa,sb)
assert sp.factor(eq5.subs(sc,cs))==0
assert sp.factor(eq7.subs(sc,cs) + (2*sa-1)*cubic_P(sa,sb)
                 /(50*(4*sa**2-4*sb-3)**2))==0

# Exact rational enclosure for pi from Machin's identity:
# pi=16 atan(1/5)-4 atan(1/239), alternating Taylor bounds.
def atan_interval(q,n):
    partial=sum((F((-1)**j,(2*j+1)*q**(2*j+1))
                 for j in range(n)),F(0))
    next_term=F((-1)**n,(2*n+1)*q**(2*n+1))
    return I(min(partial,partial+next_term),
             max(partial,partial+next_term))
pi_tight = 16*atan_interval(5,15)-4*atan_interval(239,5)
pi_box = I(F('3.14159265358979'),F('3.14159265358980'))
assert pi_box.lo < pi_tight.lo <= pi_tight.hi < pi_box.hi

# M=4/5: both V1 polarities must be checked.
# Their exact e1 values are 1/2 +/- pi/10, respectively.
negative_fundamental=I(F(1,2))+pi_box/10
positive_fundamental=I(F(1,2))-pi_box/10

# Every bracket below is EXACT rational (a decimal string passed to F).
# Three disjoint sign changes of a cubic certify exactly three real e2 roots.
branches = [
  (negative_fundamental, [
    (('-0.657659304','-0.657659303'),
     [('-0.801','-0.796'),('0.660','0.666'),('0.946','0.952')], True),
    (('-0.225724156','-0.225724155'),
     [('-0.331','-0.324'),('0.146','0.153'),('0.989','0.995')], True),
    (('0.105814092','0.105814094'),
     [('-0.070','-0.063'),('0.265','0.272'),('0.608','0.616')], False),
  ]),
  (positive_fundamental, [
    (('-0.754080354','-0.754080351'),
     [('-0.922','-0.915'),('0.338','0.343'),('0.762','0.766')], False),
    (('-0.698777062','-0.698777057'), [], False),
    (('0.381862775','0.381862779'), [], False),
  ]),
]

valid_count=0
for branch_no,(a,sets) in enumerate(branches):
    # At a pole of the e3 formula the fifth-harmonic equation has
    # the nonzero residual shown here. Therefore no solutions are lost.
    pole_residual=(2*a-1)*(16*a**4+8*a**3-16*a**2-8*a+1)
    assert pole_residual.sign()!=0
    for case_no,(b_bounds,y_bounds,is_valid) in enumerate(sets):
        bl,br=map(F,b_bounds)
        assert cubic_P(a,I(bl)).sign()*cubic_P(a,I(br)).sign()<0
        b=I(bl,br)
        c=e3_from_e1_e2(a,b)
        if y_bounds:
            for yl,yr in y_bounds:
                assert y_poly(I(F(yl)),a,b,c).sign()*y_poly(I(F(yr)),a,b,c).sign()<0
        else:
            assert c.sign()==1  # physical y=(+,-,+) would require e3<0
        if is_valid:
            # Bounds imply y_large > -y_negative > y_small > 0.
            neg,small,large=y_bounds
            assert F(large[0]) > -F(neg[0]) and -F(neg[1]) > F(small[1]) > 0
            assert F(large[1]) < 1
            valid_count+=1
        elif y_bounds:
            # Invalid because -y_negative < y_small, or y_large < -y_negative.
            neg,small,large=y_bounds
            assert (-F(neg[0]) < F(small[0]) or F(large[1]) < -F(neg[1]))
    print('Certified three distinct e2 roots in fundamental branch',branch_no+1)
assert valid_count == 2
print('Exact rational SHE root isolation: exactly two ordered M=0.80 solutions.')

# Separate rational e1 benchmark: e1=13/16 means M=5/(2*pi), NOT 0.80.
a_rational=F(13,16)
for l,r in [('-0.658232','-0.658231'),
            ('-0.227412','-0.227411'),('0.104931','0.104932')]:
    assert cubic_P(a_rational,F(l))*cubic_P(a_rational,F(r))<0

# 7. Independent floating-point angle display, not needed for certification.
try:
    import numpy as np
    from scipy.optimize import root
    def she_constraints(alpha):
        return np.array([1+2*sum((-1)**j*np.cos(n*alpha[j-1])
                    for j in range(1,4)) for n in (1,5,7)])
    target=np.array([-0.8*np.pi/4,0.,0.])
    for seed in ([.32,.65,.85],[.12,1.24,1.42]):
        sol=root(lambda x:she_constraints(x)-target, seed, tol=1e-12)
        assert np.linalg.norm(she_constraints(sol.x)-target)<1e-10
        assert 0<sol.x[0]<sol.x[1]<sol.x[2]<np.pi/2
        print('SHE angles (degrees; numerical only):',
              np.round(np.degrees(sol.x),6))
except ImportError:
    print('SciPy unavailable; exact Fraction certificates still passed.')

print('All exact Golay, Leech, Bessel and SHE-PWM certificates passed.')

References

  1. H. Cohn and N. Elkies, New upper bounds on sphere packings I, Ann. of Math. (2) 157 (2003), no. 2, 689–714.
  2. H. Cohn, A. Kumar, S. D. Miller, D. Radchenko, and M. Viazovska, The sphere packing problem in dimension 24, Ann. of Math. (2) 185 (2017), no. 3, 1017–1033.
  3. J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, 3rd ed., Grundlehren der mathematischen Wissenschaften, vol. 290, Springer-Verlag, New York, 1999.
  4. J. A. Davis and J. Jedwab, Peak-to-mean power control in OFDM, Golay complementary sequences, and Reed–Muller codes, IEEE Trans. Inform. Theory 45 (1999), no. 7, 2397–2417.
  5. P. Delsarte, An algebraic approach to the association schemes of coding theory, Philips Res. Rep. Suppl. 10 (1973), 1–97.
  6. M. J. E. Golay, Complementary series, IRE Trans. Inform. Theory 7 (1961), no. 2, 82–87.
  7. F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, North-Holland Mathematical Library, vol. 16, North-Holland Publishing Co., Amsterdam, 1977.
  8. H.-V. Niemeier, Definite quadratische Formen der Dimension 24 und Diskriminante 1, J. Number Theory 5 (1973), 142–178.
  9. S. R. Norsworthy, R. Schreier, and G. C. Temes (eds.), Delta-Sigma Data Converters: Theory, Design, and Simulation, IEEE Press, New York, 1997.
  10. H. S. Patel and R. G. Hoft, Generalized techniques of harmonic elimination and executive control in thyristor inverters: Part I—Harmonic elimination, IEEE Trans. Ind. Appl. IA-9 (1973), no. 3, 310–317.
  11. B. B. Venkov, Even unimodular extremal lattices, Trudy Mat. Inst. Steklov. 165 (1984), 43–48.
  12. M. S. Viazovska, The sphere packing problem in dimension 8, Ann. of Math. (2) 185 (2017), no. 3, 991–1015.