Ouch. Julian points out that base 2, digits 1^({0,1,2}/3) covers only ⅔ of the plane! I was inadvertently patching holes with illegal digits 1^({1,3,5}/6) . Switching the base to -2 saves the day, with the patch of pure fractions <http://gosper.org/base-2d.png> simply-connected, but by an infinitude of single points! The rest of this message explores how to convert between "Eisenstein rationals" (A + i √3 B) and strings of "digits" from {0, 1^(1/3), 1^(2/3), 1}, using Julians'a amazing piecewiserecursivefractal function. In fact, for this system, the complex plane is dense with triply representable points, analogously to the real line being dense with points with terminating positional expansions: .yyy000... = .yyx999... Two triply represented points are circled in this lo-res illustration <http://gosper.org/base-2c.png>. Julian designed two functions, basem2 and unbasem2, to convert back and forth between complex rationals and base 4 strings, the latter encoding the sequence of successive "quadrants" as you zoom in on the point in the complex plane. E.g., instead of .10000.., we can write 1/4 in base 4 as .03333...: In[33]:= FromDigits[{{0,{3}},0},4] Out[33]= 1/4 In[35]:= BaseForm[1/4-4^-9,4] Out[35]//BaseForm= Subscript[33333333, 4]/Subscript[1000000000, 4] base2m[1/4] converts this into two quadrant sequences, In[80]:= basem2[1/4] Out[80]= {1/6, 1/4 (1 - I √3)} corresponding to .0333... and.1000... . Are there any other ways to represent these two quantities? In[81]:= unbasem2 /@ % Out[81]= {{1/4, 7/20, 13/20}, {1/4}} Yes, this says that In[20]:= RealDigits[7/20, 4] Out[20]= {{1, {1, 2}}, 0} In[45]:= RealDigits[13/20, 4] Out[45]= {{2, {2, 1}}, 0} Here, the digits 1 and 2 represent 1^(1/3) and 1^(2/3) in the base -2 picture: In[43]:= FromDigits[{I^{4/3, {4/3, 8/3}}, 0}, -2] Out[43]= 1/2 (-(-1)^(2/3) + 1/3 ((-1)^(1/3) + 2 (-1)^(2/3))) In[44]:= Simplify@% Out[44]= 1/6 In[45]:= RealDigits[13/20, 4] Out[45]= {{2, {2, 1}}, 0} In[48]:= FromDigits[{I^(4 {2, {2, 1}}/3), 0}, -2] Out[48]= 1/2 ((-1)^(1/3) + 1/3 (-2 (-1)^(1/3) - (-1)^(2/3))) In[49]:= Simplify@% Out[49]= 1/6 This being a triple point proves that the "neck" at 1/6 +0i is only one point thick. The lower circle designates the triple point -i/2/√3. But mapping back, In[62]:= unbasem2[-I/2/√3] Out[62]= {13/84, 31/84} gives only two preimages, because the third preimage is not a pure fraction. "Zooming in" one complex base 4 digit zooms the preimages by two digits: In[84]:= 16 unbasem2[-I/2/√3/4] Out[84]= {13/84, 31/84, 229/84} Check: In[86]:= 4 basem2 /@ (%84/16) // Simplify Out[86]= {{-(I/(2 Sqrt[3]))}, {-(I/(2 Sqrt[3]))}, {-(I/(2 Sqrt[3]))}} Please feel encouraged to ask questions! Except about piecewiserecursivefractal. For that, ask Julian. He'll patiently explain it. It won't help. Here are basem2 and unbasem2: basem2[t_] := piecewiserecursivefractal[t, Identity, Piecewise[{{{1}, 0 <= # < 1/4}, {{1, 2}, # == 1/4}, {{2}, 1/4 < # < 1/2}, {{2, 3}, # == 1/2}, {{3}, 1/2 < # < 3/4}, {{3, 4}, # == 3/4}, {{4}, 3/4 < # <= 1}}] &, {4*# &, 4*# - 1 &, 4*# - 2 &, 4*# - 3 &}, {-1/2*# &, (1 - Sqrt[-3])/4 - 1/2*# &, (1 + Sqrt[-3])/4 - 1/2*# &, -1/2*# - 1/2 &}] unbasem2[z_] := piecewiserecursivefractal[z, Identity, ##] & @@ MapAt[(ComplexExpand@*Together@*# &) /@ # &, invertfractal[{4*# &, 4*# - 1 &, 4*# - 2 &, 4*# - 3 &}, {-1/2*# &, (1 - Sqrt[-3])/4 - 1/2*# &, (1 + Sqrt[-3])/4 - 1/2*# &, -1/2*# - 1/2 &}, {{-5/6, 2/3}, {-Sqrt[3]/2, Sqrt[3]/2}}], 2] ClearAll[invertfractal]; invertfractal[iters_List, fns_List, bounder_Function, inverter_: InverseFunction] /; Length[iters] == Length[fns] && (And @@ (Head[#] == Function & /@ iters)) && (And @@ (Head[#] == Function & /@ fns)) := Block[{cond, val}, {If[cond, val, {}] & /. {cond -> bounder[#], val -> Range[Length[iters]]}, inverter /@ fns, inverter /@ iters}] (*Inverts a fractal satisfying a bounding condition*) invertfractal[iters_List, fns_List, boundingbox_List, inverter_: InverseFunction] := Block[{b11, b12, b21, b22}, invertfractal[iters, fns, (b11 <= Re[#] <= b12) && (b21 <= Im[#] <= b22) & /. {b11 -> boundingbox[[1, 1]], b12 -> boundingbox[[1, 2]], b21 -> boundingbox[[2, 1]], b22 -> boundingbox[[2, 2]]}, inverter]] (*Invert using a bounding box for a 2D fractal*) And here is Julian's total magic: piecewiserecursivefractal[x_, f_, which_, iters_, fns_] := piecewiserecursivefractal[x, g_, which, iters, fns] = ((piecewiserecursivefractal[x, h_, which, iters, fns] := Block[{y}, y /. Solve[f[y] == h[y], y]]); Union @@ ((fns[[#]] /@piecewiserecursivefractal[iters[[#]][x], Composition[f, fns[[#]]], which, iters, fns]) & /@which[x])); This function is dangerous to quit out of. Ask me or Julian for his bulletproof version. --rwg On Sat, Apr 21, 2018 at 10:25 PM Bill Gosper <billgosper@gmail.com> wrote:
When the digits are 0 and 1 and the other two cuberoots of 1. See gosper.org/gaskettalk.pdf pp 11 and 13. E.g., i/√3 = red.cyangreencyangreencyangreen... = cyan.greenmagentagreenmagentagreen... . Presumably we can expect a lot of these multiple representations when the unit patch has a fractal boundary. PUZZLE: Here of dimension what? We need |base|² digits to cover a positive area in the complex plane. The "France fractal" bounds the unit patch of the base 2+i^(2/3) with digits zero and the 6th roots of 1. |2+i^(2/3)| = √7. Base 2+i^(2/3) with three digits moved outward gosper.org/base2+w.bmp has a unit patch with a boundary of large dimension. (PUZZLE: D=?) --rwg