# The magic of free spheres Companion computations for the manuscript by Codex and Teo. Both programs are described in Section 10. They run with Python 3 and the standard library; no packages need to be installed. Keep the two Python files together. ## Mozart: radial harmonics `mozart.py` computes the radial exponents alpha_k and harmonic attenuation rho**alpha_k from the exact spherical eigenvalues. The boundary normal derivative has eigenvalues alpha_k, characterized by ``` alpha_k * (alpha_k + N - 2) = (N - 1) * lambda_k. ``` The exponent is evaluated using the rationalized quadratic root to avoid subtractive cancellation. These exponents describe decay into the radial ball; the wave pitches are sqrt(lambda_k), as computed by Coltrane. ``` python3 mozart.py python3 mozart.py --dimension 4 --degree 20 --radius 0.8 python3 mozart.py --check python3 mozart.py --tikz ``` The default table lists the exact lambda_k, the numerical alpha_k and attenuation at radius 0.75 for N=3. The constant mode is included. The `--tikz` option prints the source for the degree-eight radial figure (Figure 2), with its fixed manuscript parameters N=3 and k=8. The `--check` option verifies the classical powers and common low degrees, then independently integrates the positive spherical-heat mixture and radial energies using adaptive Simpson quadrature. It checks the endpoint N=2, the mass-one identity for constant boundary data, and the energy increase of explicit perturbations with fixed boundary value. It raises an error if the quadrature tolerance is not reached. These finite numerical checks validate the implementation; the statements and proofs are in Section 6. They do not prove the operator-theoretic assertions. ## Coltrane: spherical spectra and music `coltrane.py` computes the eigenvalues lambda_k of the positive spherical Laplacian L by exact rational arithmetic. The normalization is lambda_1=1. The Markov generator is -L, heat has multipliers exp(-s*lambda_k), and wave pitches are sqrt(lambda_k). The increments are lambda_{k+1}-lambda_k > 0. ``` python3 coltrane.py python3 coltrane.py --dimension 4 --degree 24 python3 coltrane.py --check python3 coltrane.py --records 161 ``` The program reproduces the first four pitches in Figure 1 and the free-sphere major triad at degrees 8, 12 and 17. It also evaluates the quantum-integer benchmark, whose global optimality is proved in the paper. The parameter N counts coordinates, so N=3 means the two-sphere. The `--check` option reconstructs the free coordinate moments through degree 10 from the noncrossing-pairing Gram matrices. It solves the moment equations for each monic orthogonal polynomial, then evaluates its derivative at 1 divided by its value there. For N from 2 to 6 and degrees 1 to 5 the resulting eigenvalues and gaps are compared exactly with the program's spectral table and the hyperbolic increment formula (using its limit at N=2). The `--records D` option searches the half-liberated and free spectra with all three degrees at most D. It reports one representative each time the best maximum absolute error strictly improves. At fixed root and fifth the best third is among the neighbors of the target squared pitch. Squared frequency ratios and their multiplicative errors are compared as fractions. Only the printed errors in cents use floating point. The comparison in Section 10 uses N=3 and D=161. Tuning errors are musical cents: an octave is 1200 cents and an equal-tempered semitone is 100 cents. For frequency ratio x and target y, the signed error is 1200*log2(x/y). An error c cents corresponds to relative error 2**(c/1200)-1 (about 0.22% for 3.837 cents). Both manuscript figures are embedded TikZ drawings. The TeX file needs no external image. Figure 1 shows a Pauli-matrix portrait and the first four intrinsic pitches; Figure 2 shows radial attenuation.