README.md
11.0 kB · markdown
question-mark
- The Stern-Brocot tree and Minkowski's
?read in the three-slot language of beneath,## The question mark: a base-2 design whose value is a2 x 2matrix product, the map that swaps the continued fraction place slot for the dyadic one, and the two dimensions of every run-length rule of the memory dial atdim 1, widths2to4. carrychecksv(2n + b) = v(n) M_bonv(n) = (s(n), s(n+1)),sthe Stern diatomic sequence,M_0 = [[1,1],[0,1]],M_1 = [[1,0],[1,1]], and the closed formv(n) = (0,1) M_(d_1) ... M_(d_L)over the digits ofnmost significant first, both exhaustively below2^span; readssagainst the terms A002487 lists, fetched from the public OEIS mirror on GitHub and skipped when offline; printsM_0 M_1andM_1 M_0; finds the least pair of words of equal length and weight with differents, once on the digits ofnwithout a leading zero and once on all2^Lwords of a length, and prints the level-2 cells; and checks the Stern-Brocot row against the Calkin-Wilf rows(n)/s(n+1)under bit reversal of the position, depths0..depth.questioncomputes?on every node of the Farey subtree of[0,1]to depthdepthby the mediant recursion?((p+p')/(q+q')) = (?(p/q) + ?(p'/q'))/2and checks, exactly in rationals, the Denjoy formula?([0; a_1, a_2, ...]) = sum_i (-1)^(i+1) 2^(1 - a_1 - ... - a_i), the tent conjugacy?(F(x)) = T(?(x)), the branch law?(1/(a + x)) = 2^(-a)(2 - ?(x)), and the address law?(node i of row d) = (2i + 1)/2^(d + 1). It then takes every run-length alphabetAat widths2..4, builds its code, and compares the accepted words of lengthlevelwith the length-levelprefixes of the binary words0^(a_1 - 1) 1^(a_2) 0^(a_3) ...overA, printing the leading runs of the surplus.tablefirst runs the controls and stops on failure: the pressure zero ofA = {1,2}against0.5312805062772051416, the same at24, 32, 48, 56modes,A = Nagainst1, andA = N\{1}at four tail cuts. Then, per run-length code, it prints the alphabet, the polynomialP_A,rhofrom the transfer matrix of the code under the note's own convention,log_2 rho, the pressure zerodim_CF, and the Holder flooralpha log_2 rhowithalpha = log 2 / (2 log phi), asserting on every row thatrhois the largest root ofP_A, thatP_Adivides the exact characteristic polynomial of the transfer matrix, and thatdim_CF >= alpha log_2 rho.P_Aisx^m - sum_(a in A) x^(m - a)for finiteAwithm = max A, andx^(f+1) - 2x^f + (x - 1) sum_(j in F) x^(f - j)forA = N \ Fwithf = max F, the polynomial cleared fromsum_(a in A) rho^(-a) = 1.dim_CFis the zero ofs -> log lambda(s),lambda(s)the leading eigenvalue ofL_(A,s) f(x) = sum_(a in A) (a + x)^(-2s) f(1/(a + x)), collocated onmodesChebyshev-Lobatto points of[0,1]through barycentric interpolation and found by bisection on[0, 1]for finiteAand on[0.51, 1.1]for cofiniteA. A one-letter alphabet haslambda(0) = 1exactly and prints0without bisection. For cofiniteAthe sum runs explicitly toa = cutand the taila > cutissum_(j <= taylor) f^(j)(0)/j! zeta(2s + j, cut + 1 + x),taylor + 1terms, Hurwitz zeta on the Taylor coefficients of the interpolant at0.obstructioncounts, per width, the run-length codes, the codes fixed by both the digit flip and reversal, those among them with no alphabet, and how many of those carryrho > 1, listing every orphan at widths2and3and the least live one at width4.graphbuilds, for anydim 1code, the graph-directed continued fraction form of beneath,### Every rule is a graph-directed continued fraction set: states the2^(k-1)words ofk - 1digits, an edgeu -a-> vwhenacopies of the digit opposite to the last digit ofuclose only allowed windows and leave statev, the labelsa >= kfolded into one cofinite edge tob^(k-1). It keeps the recurrent states, the states on a cycle, and finds the pressure zero of the matrix operator(L_s F)_u(x) = sum_(u -a-> v) (a + x)^(-2s) F_v(1/(a + x))by bisection on the log of its largest real eigenvalue, on[0, 1]when every cofinite edge is transient and on[0.51, 1.1]otherwise; a graph whose recurrent states each carry one label prints0. First it recovers the pressure zero of all18run-length codes from the graph form and stops if any gap reaches1e-12; then it compares the accepted words of code11892at lengthlevelwith the prefixes of the run words over{1,2}without the pair22, prints that code's recurrent graph, and prints the19width-4orphans withrho > 1, code11892first, and the four named codes7,23,54,127as parity-constrained continued fraction sets, assertingdim_CF >= alpha log_2 rhoon every row.subleadingcontinuesL_(A,s)to complexsatA = {1,2},(a + x)^(-2s) = exp(-2s log(a + x))on the same collocation, and locates the zeros ofdet(1 - L_s)off the real axis: a scan ofabs(det)on a grid of the box, Newton with a central-difference derivative from every local minimum, duplicates dropped, and the winding number ofdetaround the box asserted equal to the number found. The zeros_1 = sigma + i tauof largest real part in0 <= sigma <= 0.53,0.2 <= tau <= 14atmodesmodes is refined at60,100and140modes, the box is widened totau <= 80at100modes, and the verb prints the periodpi/(tau log 2)in octaves and the amplitude ratio per octave2^(2(sigma - delta_2))that a termQ^(2 s_1)of theE_2count contributes, with the alias2 tau log 2 - 3 pithat integer-octave sampling sees. It then importscensus_walkfromlab/py/ford-horocycle, walks theE_2circles to2^jmax, samplesN_2(Q)/Q^(2 delta_2)atperpoints per octave from2^jlo, fits a constant alone and a constant plus the wave ofs_1with only the constant, amplitude and phase free, prints both residuals, the observed octave exponents minus2 delta_2beside the fitted wave's at every octave, asserting agreement within4e-3, and a free fit ofsigmaandtauon the same points; last it runs the controlA = {1,2,3}in0 <= sigma <= 0.71,0.2 <= tau <= 80at100modes, the winding number asserted, against them = 3walk to2^18.- The transfer matrix is the note's: state
sthe lastk - 1digits, edges -> (2s + c) mod 2^(k-1)when bit2s + cof the code is set, pinned on the four named codes7,23,54,127before any row prints.
RUN
uv run python mrlyprod/research/lab/py/question-mark/question.py carry,0.2seconds.uv run python mrlyprod/research/lab/py/question-mark/question.py question,1.8seconds.uv run python mrlyprod/research/lab/py/question-mark/question.py table,29seconds, almost all of it the six cofinite rows and their tail controls.uv run python mrlyprod/research/lab/py/question-mark/question.py obstruction,0.4seconds.uv run python mrlyprod/research/lab/py/question-mark/question.py graph,32seconds, half of it the six cofinite rows of the control.uv run python mrlyprod/research/lab/py/question-mark/question.py subleading,59seconds,20of them theE_2walk to2^24and15the control's scan.uv run python mrlyprod/research/lab/py/question-mark/question.py all,122seconds.--span 16,--depth 12,--level 14,--modes 40,--cut 2000,--taylor 4,--jmax 24,--jlo 12and--per 16are the dials.- Prints only, writes nothing, touches the network once, for the A002487 terms, and reads one sibling,
lab/py/ford-horocycle/ford_horocycle.py, for the census walk.
WITNESSES
- The lines of beneath,
## The question mark, and the subleading paragraph of apollonian,## The horocycle. 0mismatches onv(2n + b) = v(n) M_band on the digit product below2^16; the92listed terms of A002487 agree;M_0 M_1 = [[2,1],[1,1]]andM_1 M_0 = [[1,1],[1,2]];s(5) = 3ands(6) = 2on the words101and110, the least pair without leading zeros, ands(3) = 2againsts(5) = 3on011and101with them; level2reads0, 1, 1, 2;0mismatches between the Stern-Brocot row and the bit-reversed Calkin-Wilf row through depth12.0mismatches on8193Farey nodes to depth12for the Denjoy formula, the tent conjugacy, the branch law ata = 1..5and the address law.- At width
3, code126,A = {1,2}, level14:1220accepted words,987prefixes of?(E_A),0missing,233surplus, every one with leading run00; at code219,A = N\{1}:1220,610,0,610, the surplus exactly the words opening on1. - The
A = {1,2}control reads0.5312805062772050against0.5312805062772051416, gap1.1e-16, and moves by at most8.9e-16between24and56modes;A = Nreads1.0000000000000000;A = N\{1}reads0.84088458641455at every cut from500to4000. - The table:
18codes on11alphabets, every row passing the three assertions, the same alphabet at two widths printing the samedim_CF. - Orphans:
2of4symmetric codes at width2,3of8at width3,53of64at width4, of which19carryrho > 1, the least being code11892,A = {1,2}with the pair22forbidden, at the supergoldenrho. - Graph: the graph form recovers the
18run-length pressure zeros with a largest gap of8.9e-16; code11892at level14has378accepted words,277prefixes of?(M)forM = {1,2}without22,0missing,101extra with leading runs0and00, and a recurrent graph of6states and10edges with no cofinite edge; the19orphan rows and the4named rows of the note,11892at0.416817764433,48765at0.531280506277,54699at0.785953471982, code7at0.798858366966, every row above its Holder floor. - Subleading: one zero of
det(1 - L_s)atA = {1,2}in0 <= sigma <= 0.53,0.2 <= tau <= 14,s_1 = 0.457015235231 + 6.958882679527 i, moving by at most8.9e-16from40to140modes, the eigenvalue nearest1there1.000000000000;33zeros in the box totau = 80, the winding number agreeing, the next two0.428067039 + 78.156951119 iand0.412635450 + 71.206868515 i;delta_2 - sigma_1 = 0.074265, period0.6513octaves, ratio0.9022per octave, phase advance3 pi + 0.2223per octave; on193points ofN_2(Q)/Q^(2 delta_2)from2^12to2^24the constant fit leaves rms1.64e-02and the wave ofs_1leaves7.67e-04, max4.05e-03, amplitude0.131210; the twelve octave deviations fromj = 12to23are reproduced within0.0034,+0.0475against+0.0472atj = 15and+0.0124against+0.0127atj = 23; the free fit readssigma = 0.4556,tau = 6.9598; the controlA = {1,2,3}has67zeros in0 <= sigma <= 0.71,0.2 <= tau <= 80, the winding number agreeing, the largest real part at0.489705291051 + 45.352143150104 i,0.2160belowdelta_3, factor0.7413per octave, and its census leaves rms3.85e-04to a constant,3.83e-04with the wave.