README.md
13.3 kB · markdown
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
RisZ[i]orZ[omega]withomega^2 = -1 - omega; a base is an elementbaseofRof normN(base) = q >= 2; the canonical residue system modbaseis theqrepresentatives 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 unitu_dofRper digit; the place map isphi_d(x) = (u_d x + d) / baseand the wordd_1 ... d_levellands onphi_(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) + mmoves the attractor. - The exact point of a word is carried as an integer of the ring:
base^leveltimes the point issum_(j=1..level) (prod_(i<j) u_(d_i)) d_j base^(level-j), so every count below is exact and the plane is entered once, at printing. - The generator is
mrlynum::radix:Basewithresidues,class,mirroredandgroup;Radixwithwords,plane,distinct,fill,dimension,codeandcanonical; and the designskoch,gasket,twindragon,terdragon,flowsnakeandtile. koch: the design base3onZ[omega]with digits0, 1, 2+w, 2and twists1, 1+w, -w, 1at levels1to5, printing the point count, the fill, the distinct-point count and the largest plane distance to a float evaluation of the four mapsz/3,e^(i pi/3) z/3 + 1/3,e^(-i pi/3) z/3 + 1/2 + i sqrt(3)/6,z/3 + 2/3.- Those four maps are
phi_dcoefficient for coefficient, becausee^(i pi/3) = 1 + w,e^(-i pi/3) = -wand(2 + w)/3 = 1/2 + i sqrt(3)/6, so(u_d x + d)/3at(d, u) = (0, 1), (1, 1+w), (2+w, -w), (2, 1)is that list in order. The identity is exact and needs no run; the printed1.241e-16is the float self-check of the crate's ring arithmetic and measures nothing else. compare: each object against an independent iterated function system written inf64from the maps the page states, iterated on the seed0, word for word againstRadix::planeat the same level, printing the largest distance and the motion allowed.- The gasket is compared against the three similarities of ratio
1/2fixing the vertices of an equilateral triangle, placed at(1, 1),(3, 1),(2, 1 + sqrt 3), which fixes the gasket only up to similarity, so a translation and a positive scaling are allowed: they are pinned by the two corresponding words0^leveland2^leveland then measured at every word, and the turn residual printed beside them is the check that no rotation was needed. The fitted translation is(1, 1)(1 - 2^(-level))and not(1, 1), because both systems are seeded at0and0is not the image of0under the motion; it converges to(1, 1). - The Koch curve, the twindragon and the norm-seven tile are compared with no motion allowed, and each is a float self-check rather than an independent identification:
z/(1+i)and(z+1)/(1+i)are the radix maps of base1+ion its two residues by definition, the seven maps(z + d)/(3+w)over the canonical residues are the radix maps of that base by definition, and the four Koch maps arephi_dby the identity above. comparealso settles the terdragon. Reading the L-systemF -> F + F - Fat120degrees as a turtle, three segments to a level, and normalising by the endpoint gives base2+w, digits0, 1, 1+wand twists1, w, 1: the3^levelsegment starts matchplane(level)word for word at level8to7.5e-16, while the untwisted code7misses by1.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 setF, the fill law, the similarity dimension2 log|F| / log q, and the distinct-point counts to the largest level under a budget of200000points; no name is tested here, only incompare. It closes on the twisted glue witness.- The glue witness is
Z[i], base2,F = {0, 1}, twists1, -1, whose distinct-point count is2^(level-1) + 1at every level, printed and checked to level16. Proof: the scaled point of the word whose1s sit at positionsj_1 < ... < j_tissum_(k=1..t) (-1)^(k-1) 2^(level - j_k), an alternating sum of strictly decreasing powers of two with top exponent at mostlevel-1; such a sum is0or lies in[1, 2^(level-1)], since the alternating tail is smaller than the leading term; and every integernof[1, 2^(level-1)]is reached by exactly one choice, the greedy one, taking2^afor the leastawith2^a >= nand recursing onn - 2^a, whose modulus is below2^(a-1). So the count is2^(level-1) + 1at every level. today: every plane code at the rational basesm = 2andm = 3, of normq = m^2, at level2, the radix word set against themrlymath::bangcells of the same code, through the pixel map bitr m + cof the code is the cell at rowrand columnc, 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 atm = 3.census: the classes of digit CODES under the residue action atZ[i]bases2,1+i,2+iandZ[omega]bases2,2+w,3,3+w, by Burnside over the group and by a direct orbit walk over all2^qcodes, which must agree; it prints the canonical residue system of each base and the twist count at base3onZ[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
vcarries the attractor tovtimes the attractor over the same base, sincev phi_d (v^(-1) x) = phi_(v d)(x), so the units act; conjugation carries basebaseto baseconj(base), which is the same radix system exactly whenconj(base)is an associate ofbase. That holds at2and1+ionZ[i]and at2,2+wand3onZ[omega], and fails at2+iand3+w, so the abstract groupR^* semidirect <conj>has order2|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, 6at the seven bases against the abstract8, 8, 4, 12, 12, 12, 6, and at1+ievery 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:
affineprints all three counts and the witnesses. affine: at every base of the census and every|F|from0toq, 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 affineh(x) = H x + sgives(y + H d + s(base - 1))/base, again an untwisted place map of the same base exactly whenHcommutes with multiplication by1/base, ands(base - 1)sweeps the plane becauseN(base) >= 2forcesbase != 1. So the conjugacy group is the centraliser of1/baseextended by translations, and the similarity classes are the finer quotient in whichHis restricted tovinQ(i)^*orQ(w)^*joined by the mirror.- At a non-real base the centraliser of
1/basein the two by two real matrices isC, so the conjugacy group IS the similarity group and the two columns agree; at a real base1/baseis the scalar(1/base) I, it commutes with everyH, and the conjugacy group is the whole real affine groupGL_2semidirectR^2, so the affine column is computed overGL_2(Q)semidirectQ^2at2onZ[i]and at2and3onZ[omega]. - The mirror
x -> v conj(x) + tpreserves the untwisted family of the same base exactly whenconj(base) = base, since a direct conjugacy keeps the derivative1/baseand a mirror one sends it to1/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
ncostsn^4with a linear membership scan, and the affine column is counted by an exact normal form overQinstead, one key per code. The affine key is checked against two explicit conjugacies,H = [[0, 2], [1, -1]]carrying code131to code137andH = [[1, 1], [0, 1]]carrying code7to code131; the similarity classes are asserted to refine the affine classes in every cell; thef64rerun 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^qcodes per base split by|F|forcensusand foraffine, all16 + 512plane codes at the two rational bases fortoday, levels1to5forkoch, levels9,7,14,5and8for the gasket, the Koch curve, the twindragon, the norm-seven tile and the terdragon incompare, levels1to11,17,11,6,8for the five codes ofnamedin the order printed, and levels1to16for 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,todayandcensuseach run in under0.01s,affinein0.08s andnamedin0.08s; the whole study including the build is1.3s of wall clock.bash scripts/cargo.sh cargo test -p mrlynum radixpins the residue systems, the Koch levels1and2, the real-base cell and the fill law inside the crate.
WITNESSES
- beneath, The radix dial - the closed form
sum_(j=1..level) (prod_(i<j) u_(d_i)) d_j b^(-j)and the fill law|F|^level:kochandnamed. - beneath, The radix dial - today's designs as the untwisted real-base row,
528plane codes atm = 2, 3and level2with0mismatches, the code read in box row-major order:today. - beneath, The radix dial - the canonical residue system of a real base
mis the box{x + y i : 0 <= x, y < m}atm = 2and at no largerm, since the box holdsm-1of norm(m-1)^2 >= 4where its class holds-1of norm1; atm = 3the canonical system is0, 1, i, -1, -i, 1+i, -1+i, -1-i, 1-i:today. - beneath, The radix dial - the twisted glue witness
Z[i],base = 2,F = {0, 1}, twists1, -1, where level2has fill4and3distinct points and the distinct count is2^(level-1) + 1at every level:named. - beneath, The radix dial - the gasket is code
7at base2onZ[omega]up to the printed translation and scaling, the terdragon is code7at base2+wtwisted by1, w, 1and not untwisted, and the Koch curve is code147at base3twisted by1, 1+w, -w, 1:compare. - beneath, The radix dial - the class counts
12, 4, 12, 8, 6, 84, 28over16, 4, 32, 16, 8, 512, 128codes at the seven bases, Burnside and orbit walk agreeing at every base, and the acting image orders2, 1, 4, 6, 2, 12, 6:census. - beneath, 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, 22and the affine classes5, 3, 8, 5, 4, 88, 22against the code classes12, 4, 12, 8, 6, 84, 28, the count of untwisted canonical digit sets exceeding the code count at base3onZ[omega]under either name,88or117over84; there the84three-digit codes fall in13orbits,9similarity classes and2affine classes, codes131and137splitting an orbit and codes7and42merging two under similarity, while131and137are affinely conjugate byH = [[0, 2], [1, -1]]and7and131byH = [[1, 1], [0, 1]]:affine.
SOURCES
- Hutchinson 1981, 3.3(2) - the Koch curve is the attractor of four similitudes each carrying
a_1 a_5toa_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 - the radix representation in base
-n + itiles the plane. None of the bases here is of that form, so nothing in this study rests on it.