# radix-designs - Dials the place slot of a design: a word is placed by a base in a ring of the plane rather than by base place value on `Z^dim`, and the classical self-similar curves become codes in that list. - Objects: a ring `R` is `Z[i]` or `Z[omega]` with `omega^2 = -1 - omega`; a base is an element `base` of `R` of norm `N(base) = q >= 2`; the canonical residue system mod `base` is the `q` representatives of least norm with ties broken by argument in `[0, 2 pi)`; a digit code names a subset of that system, one bit per residue in that order; a digit set is one representative per named class; a twist is a unit `u_d` of `R` per digit; the place map is `phi_d(x) = (u_d x + d) / base` and the word `d_1 ... d_level` lands on `phi_(d_1)(... phi_(d_level)(0))`. - A design is the quintuple ring, base, digit code, representative vector, twist vector; a code alone names only the classes, because `phi_(d + base m)(x) = phi_d(x) + m` moves the attractor. - The exact point of a word is carried as an integer of the ring: `base^level` times the point is `sum_(j=1..level) (prod_(i F + F - F` at `120` degrees as a turtle, three segments to a level, and normalising by the endpoint gives base `2+w`, digits `0, 1, 1+w` and twists `1, w, 1`: the `3^level` segment starts match `plane(level)` word for word at level `8` to `7.5e-16`, while the untwisted code `7` misses by `1.06`. The reading is the terdragon's own L-system and is carried by no source here. - `named`: five codes with their ring, base, `q`, the size `|F|` of its digit set `F`, the fill law, the similarity dimension `2 log|F| / log q`, and the distinct-point counts to the largest level under a budget of `200000` points; no name is tested here, only in `compare`. It closes on the twisted glue witness. - The glue witness is `Z[i]`, base `2`, `F = {0, 1}`, twists `1, -1`, whose distinct-point count is `2^(level-1) + 1` at every level, printed and checked to level `16`. Proof: the scaled point of the word whose `1`s sit at positions `j_1 < ... < j_t` is `sum_(k=1..t) (-1)^(k-1) 2^(level - j_k)`, an alternating sum of strictly decreasing powers of two with top exponent at most `level-1`; such a sum is `0` or lies in `[1, 2^(level-1)]`, since the alternating tail is smaller than the leading term; and every integer `n` of `[1, 2^(level-1)]` is reached by exactly one choice, the greedy one, taking `2^a` for the least `a` with `2^a >= n` and recursing on `n - 2^a`, whose modulus is below `2^(a-1)`. So the count is `2^(level-1) + 1` at every level. - `today`: every plane code at the rational bases `m = 2` and `m = 3`, of norm `q = m^2`, at level `2`, the radix word set against the `mrlymath::bang` cells of the same code, through the pixel map bit `r m + c` of the code is the cell at row `r` and column `c`, the column the real part and the row the imaginary part; it prints the count of codes checked and the count of mismatches. The plane code is read in box row-major order and not in the canonical residue order, which differs from it at `m = 3`. - `census`: the classes of digit CODES under the residue action at `Z[i]` bases `2`, `1+i`, `2+i` and `Z[omega]` bases `2`, `2+w`, `3`, `3+w`, by Burnside over the group and by a direct orbit walk over all `2^q` codes, which must agree; it prints the canonical residue system of each base and the twist count at base `3` on `Z[omega]`. - The group of a base is the units acting on residues by multiplication, together with conjugation when the conjugate of the base is an associate of the base. Multiplying every digit by a unit `v` carries the attractor to `v` times the attractor over the same base, since `v phi_d (v^(-1) x) = phi_(v d)(x)`, so the units act; conjugation carries base `base` to base `conj(base)`, which is the same radix system exactly when `conj(base)` is an associate of `base`. That holds at `2` and `1+i` on `Z[i]` and at `2`, `2+w` and `3` on `Z[omega]`, and fails at `2+i` and `3+w`, so the abstract group `R^* semidirect ` has order `2|R^*|` at the first five bases and `|R^*|` at the last two. - That abstract order is not the order of the permutation group it induces. The action on the residues is not faithful: the image has order `2, 1, 4, 6, 2, 12, 6` at the seven bases against the abstract `8, 8, 4, 12, 12, 12, 6`, and at `1+i` every element acts as the identity. Both orders are printed. Burnside over the abstract list stays correct, because the list is the image of one abstract group with each element once. - The census counts digit CODES up to the group and never designs up to similarity or up to conjugacy, and the three quotients are incomparable: `affine` prints all three counts and the witnesses. - `affine`: at every base of the census and every `|F|` from `0` to `q`, the classes of the untwisted canonical digit sets under the similarity group and under the full conjugacy group, in exact arithmetic, printed beside the code orbits of the same cell. Conjugating the place maps by an invertible real affine `h(x) = H x + s` gives `(y + H d + s(base - 1))/base`, again an untwisted place map of the same base exactly when `H` commutes with multiplication by `1/base`, and `s(base - 1)` sweeps the plane because `N(base) >= 2` forces `base != 1`. So the conjugacy group is the centraliser of `1/base` extended by translations, and the similarity classes are the finer quotient in which `H` is restricted to `v` in `Q(i)^*` or `Q(w)^*` joined by the mirror. - At a non-real base the centraliser of `1/base` in the two by two real matrices is `C`, so the conjugacy group IS the similarity group and the two columns agree; at a real base `1/base` is the scalar `(1/base) I`, it commutes with every `H`, and the conjugacy group is the whole real affine group `GL_2` semidirect `R^2`, so the affine column is computed over `GL_2(Q)` semidirect `Q^2` at `2` on `Z[i]` and at `2` and `3` on `Z[omega]`. - The mirror `x -> v conj(x) + t` preserves the untwisted family of the same base exactly when `conj(base) = base`, since a direct conjugacy keeps the derivative `1/base` and a mirror one sends it to `1/conj(base)`; being an associate is not enough. At a real base the mirror is one element of the full affine group and not the only new one, and it is load-bearing for the similarity column alone. - Cost and controls: a similarity test anchors two digits and an affine one anchors three, so a pair of codes of digit count `n` costs `n^4` with a linear membership scan, and the affine column is counted by an exact normal form over `Q` instead, one key per code. The affine key is checked against two explicit conjugacies, `H = [[0, 2], [1, -1]]` carrying code `131` to code `137` and `H = [[1, 1], [0, 1]]` carrying code `7` to code `131`; the similarity classes are asserted to refine the affine classes in every cell; the `f64` rerun of the similarity normal form checks the exact arithmetic and not the group; and the per-`|F|` orbit counts summing to the census class count constrains the CODE column alone. - Domain: all `2^q` codes per base split by `|F|` for `census` and for `affine`, all `16 + 512` plane codes at the two rational bases for `today`, levels `1` to `5` for `koch`, levels `9`, `7`, `14`, `5` and `8` for the gasket, the Koch curve, the twindragon, the norm-seven tile and the terdragon in `compare`, levels `1` to `11`, `17`, `11`, `6`, `8` for the five codes of `named` in the order printed, and levels `1` to `16` for the glue witness. ## RUN ``` bash scripts/cargo.sh cargo run --release -p radix-designs -- koch compare named today census affine ``` - Run from `mrlyprod/`. Verbs may be given in any combination and run in order in one process; no argument runs all six. - `koch`, `compare`, `today` and `census` each run in under `0.01` s, `affine` in `0.08` s and `named` in `0.08` s; the whole study including the build is `1.3` s of wall clock. - `bash scripts/cargo.sh cargo test -p mrlynum radix` pins the residue systems, the Koch levels `1` and `2`, the real-base cell and the fill law inside the crate. ## WITNESSES - [beneath](../../../notes/beneath.md), The radix dial - the closed form `sum_(j=1..level) (prod_(i= 4` where its class holds `-1` of norm `1`; at `m = 3` the canonical system is `0, 1, i, -1, -i, 1+i, -1+i, -1-i, 1-i`: `today`. - [beneath](../../../notes/beneath.md), The radix dial - the twisted glue witness `Z[i]`, `base = 2`, `F = {0, 1}`, twists `1, -1`, where level `2` has fill `4` and `3` distinct points and the distinct count is `2^(level-1) + 1` at every level: `named`. - [beneath](../../../notes/beneath.md), The radix dial - the gasket is code `7` at base `2` on `Z[omega]` up to the printed translation and scaling, the terdragon is code `7` at base `2+w` twisted by `1, w, 1` and not untwisted, and the Koch curve is code `147` at base `3` twisted by `1, 1+w, -w, 1`: `compare`. - [beneath](../../../notes/beneath.md), The radix dial - the class counts `12, 4, 12, 8, 6, 84, 28` over `16, 4, 32, 16, 8, 512, 128` codes at the seven bases, Burnside and orbit walk agreeing at every base, and the acting image orders `2, 1, 4, 6, 2, 12, 6`: `census`. - [beneath](../../../notes/beneath.md), The radix dial - the code census is neither the similarity census nor the conjugacy census, and no two of the three quotients are comparable: over the seven bases the similarity classes total `5, 3, 8, 6, 4, 117, 22` and the affine classes `5, 3, 8, 5, 4, 88, 22` against the code classes `12, 4, 12, 8, 6, 84, 28`, the count of untwisted canonical digit sets exceeding the code count at base `3` on `Z[omega]` under either name, `88` or `117` over `84`; there the `84` three-digit codes fall in `13` orbits, `9` similarity classes and `2` affine classes, codes `131` and `137` splitting an orbit and codes `7` and `42` merging two under similarity, while `131` and `137` are affinely conjugate by `H = [[0, 2], [1, -1]]` and `7` and `131` by `H = [[1, 1], [0, 1]]`: `affine`. ## SOURCES - [Hutchinson 1981](https://doi.org/10.1512/iumj.1981.30.30055), 3.3(2) - the Koch curve is the attractor of four similitudes each carrying `a_1 a_5` to `a_i a_(i+1)` with positive determinant; the vertex positions are read from its Figure 3.2 and not from its text, so this study states the four maps itself. - [Gilbert 1986](https://www.cambridge.org/core/journals/canadian-mathematical-bulletin/article/fractal-dimension-of-sets-derived-from-complex-bases/1E21659EEEECF5215C7486531ACCA9AF) - the radix representation in base `-n + i` tiles the plane. None of the bases here is of that form, so nothing in this study rests on it.