# Exact nearest-neighbour thresholds for the mala embeddings

Independent analysis, 24 September 2026. The proposal to explore the mala in twelve dimensions is credited to Anirban Bandyopadhyay, following the kickoff's attribution. This analysis concerns the script's real-coordinate embeddings, not dodecanion multiplication.

## Result

Here r is tube radius divided by RMS ring radius. The threshold is the equality boundary where an outside-station bead first ties a square edge; just above it, an outside bead is strictly closer. Decimals below approximate the exact expressions given later.

| Embedding | Continuous threshold r* | First failure on the script's grid |
|---|---:|---:|
| 3D, first loss among any beads | 0.141026429900780 | 0.16 |
| 4D | 0.164180173651316 | 0.20 |
| 12D-u | 0.810006217775294 | 1.00 |
| 12D-n | 0.524221267831789 | 0.70 |
| 12D-* | 0.886499403578317 | 1.00 |
| 12D-rnd | No radius-dependent transition | 0.02, already fails |

The script's `first_r_where_square_not_nearest` is a grid detection, not an exact geometric threshold. At exact equality, its `argmin` tie-breaking and floating-point errors can affect the reported fraction. The threshold is defined by distance equality, independently of that tie-breaking.

## Exact formulas and why they apply

For a flat embedding with ring multiplier set M of size L, define the squared ring gap for station difference s:

    G_M(s) = (4/L) sum_{m in M} sin²(pi*m*s/27),    s = 1,...,26.

Every station has all four tube phases: 27 and 4 are coprime. Consequently, for each bead and every other station, a bead with the same tube phase exists. Its squared distance is G_M(s), with no tube contribution. Other phases add a nonnegative contribution. The square edge has squared length 2r². Thus the exact threshold is

    r*(M) = sqrt( min_{1<=s<=26} G_M(s) / 2 ).

All beads share this threshold in a flat embedding. Below it the square edge neighbours are strictly closer than every outside-station bead; above it they are not.

Let F(A) = sqrt((2/5) sum_{a in A} sin²(pi*a/27)). The minima reduce to:

| Embedding | Minimizing station steps | Exact threshold |
|---|---|---|
| 4D, M={1} | 1, 26 | sqrt(2) sin(pi/27) |
| 12D-u, M={1,5,7,11,13} | 4, 23 | F({1,2,4,7,10}) |
| 12D-n, M={1,2,3,4,5} | 1, 26 | F({1,2,3,4,5}) |
| 12D-*, M={8,9,11,12,13} selected in this run | 7, 20 | F({2,3,4,9,10}) |

These are exact trigonometric expressions. Their finite minimizations were checked numerically with 65-digit Decimal arithmetic. Those computations support the displayed precision; they are not formal interval-arithmetic certificates.

## 3D has three transitions

Put c = sqrt(2) sin(pi/27). The 108 beads split into 27 inner beads, 54 vertical beads and 27 outer beads. Their cylindrical ring radii are 1-r, 1 and 1+r, respectively. Their closest same-phase outside-station distances are 2(1-r)sin(pi/27), 2sin(pi/27), and 2(1+r)sin(pi/27). Equating each with sqrt(2)r gives:

| Bead class | Exact threshold | Approximation | Fraction retaining square nearest neighbours just above |
|---|---|---:|---:|
| Inner | c/(1+c) | 0.141026429900780 | 3/4 |
| Vertical | c | 0.164180173651316 | 1/4 |
| Outer | c/(1-c) | 0.196430101889954 | 0 |

These statements describe the transitions within 0<r<1. The within-station edge lengths are all sqrt(2)r. For different tube phases, the squared distance is the tube-plane chord squared plus 2R_i R_j(1-cos(delta)), where R_i,R_j>0 in this interval. Adjacent-phase tube chords already equal the square edge; opposite-phase tube chords are longer. Thus no different-phase outsider causes an earlier loss, and the same-phase competitors above determine the thresholds.

The 4D threshold matches the 3D vertical beads, not the first 3D loss.

## The optimizer is not unique

All 1,287 five-element subsets of {1,...,13} were enumerated. Nine sets tie for the maximum minimum gap:

    {1,2,5,9,12}    {1,3,5,9,11}    {1,6,9,11,13}
    {2,3,4,9,10}    {2,5,6,9,10}    {3,7,8,9,13}
    {4,6,7,8,9}     {4,7,9,10,12}   {8,9,11,12,13}

They are related by multiplication by units modulo 27, with signs removed because squared sine is sign-invariant. This permutes station differences and preserves the gap spectrum. The original NumPy search selected {8,9,11,12,13}; tiny floating-point differences can select another tied set. The optimal minimum squared gap is approximately 1.571762385089423, separated from the next distinct candidate value by approximately 0.046045109505049.

This optimum applies only to the script's specified equal-radius, five-multiplier family. It does not establish an optimum over arbitrary 12D embeddings or unequal radii.

## Random control

`random12(r)` resets its seed and multiplies the same 108 unit vectors by sqrt(1+r²). All nearest-neighbour identities are therefore independent of r. The measured fraction is 1/108 throughout the grid, so 0.02 is merely the first sampled radius.

The implementation counts offsets 27 and 81, excluding the opposite corner at 54. For exchangeable random points, the expected fraction under that implemented test is 2/107, not the kickoff's 3/107. This is a distinction between the two edge partners and all three other nominal square members.

## What the threshold evidence changes

- P1 fails as written: the 3D first-loss and 4D thresholds are not exactly equal.
- P2's geometric clause holds: 12D-u exceeds 0.5. Transfer survival was not tested in this threshold audit.
- P3's numerical ordering holds: 12D-n has a smaller threshold than 12D-u. This does not establish a general rule that non-unit multipliers are detrimental; the optimal sets include non-units, including 9. The full minimum-gap spectrum determines the result.
- P4 concerns dynamics and was not tested here.
- P5 has no radius-dependent threshold in this implementation; its stated random nearest-neighbour baseline also differs from the implemented test. Transfer was not tested here.

These are results of the specified mathematical model, not physical measurements.

## Verification and limitations

The source script was imported unchanged. The original embeddings and `nearest_fraction` function reproduced all T1 grid values. Checks at each continuous threshold times (1-1e-7) and (1+1e-7) passed, including all three 3D transitions. The flat minima and exhaustive multiplier search were independently evaluated using Python Decimal; coordinates and boundary fractions were checked using the source NumPy functions.

SHA-256:

    0747da40871a4135ee0e29507609d09edf8b5737722c690514ac9a63576813f6

It matches the expected prefix. Runtime: Python 3.12.14, NumPy 2.3.5, macOS 26.6.2 arm64. Audit computation took approximately 0.177 seconds, excluding interpreter startup/imports. The bundled Python contains NumPy but lacks Matplotlib; the default Python lacks NumPy. Nothing was installed. No full dynamics run or plot was attempted, since this request concerns exact thresholds. No model or API calls were changed. No reference directory was present, and no reference comparison was performed.

The accompanying `threshold-audit.py` and `threshold-audit.json` contain the reproducible checks and numeric results. Source path:

    knot12d.py
