research/lab/py/ford-horocycle
0 directories and 2 files in research/lab/py/ford-horocycle.
ford-horocycle
- The Ford circles read as horocycles of the modular surface, the closed horocycle
Im z = hagainst the Farey stack, the unfolding that turns a horocycle integral into the stack's smoothed novelty, and the census of the Ford circles whose tangency point has every partial quotient at mostm, for apollonian,## The horocycle. crossingstakes every reduceda/bin[0, 1)withb <= bound, completes(a, b)to a matrix ofSL(2, Z)with bottom row(b, d), maps five points of the lineIm z = 1by it in exact rationals, one of them-d/b + i, and asserts that every image lies on the circle of centre(a/b, 1/(2 b^2))and radius1/(2 b^2)at height at most1/b^2, with equality atx = -d/b. It then counts, at the heightsh = Q^(-2), the Ford circles whose closed disc the lineIm z = hmeets,0 <= h <= 1/b^2, and asserts the count issum_(b <= Q) phi(b); the open-disc count is asserted to besum_(b < Q) phi(b), and the closed-disc count ath = 1/(2 Q^2)to besum_(b <= floor(Q sqrt 2)) phi(b).bridgetakes a test functionfsupported on[1, 2], theC^infinitybumpexp(4 - 1/((u-1)(2-u)))and theC^2bump64 (u-1)^3 (2-u)^3oflab/py/smoothed-novelty, forms the incomplete Eisenstein seriespsi_f(z) = sum f(Im(gamma z))over the cosetsGamma_infinity \ SL(2, Z), and integrates it over the closed horocyclex + ih,0 <= x < 1, term by term: each coset with bottom row(c, d)contributes onabs(x + d/c) <= sqrt(h - c^2 h^2)/c, split at the inner hole whereIm(gamma z) > 2, by Gauss-Legendre on each piece. It compares the sum withh sum_(c <= h^(-1/2)) phi(c) g(c h^(1/2)),g(t) = int_R f(1/(t^2 (1 + v^2))) dvby the same quadrature on the interval where the integrand is nonzero, and prints both, their gap, the main term(3/pi) int f(w) w^(-2) dw, the errorEandE/h^(3/4), ath = 4^(-k),k = 2..kmax.censuswalks the Stern-Brocot tree of(0, 1)from1/2, each node carrying its two neighbours, the direction of its last step and the length of its last run, and keeps a child only when its denominator is at most2^jmaxand its run length at mostm; the countN_m(Q)of nodes of denominator at mostQ, the node0/1added, is read off a histogram. It first walks with no run bound to2^jcontroland assertsN(2^j) = sum_(b <= 2^j) phi(b)at everyj; then, atm = 2andm = 3to2^jcheck, asserts that the walk, the test "one of the two continued fraction expansions ofa/bhas every quotient at mostm", and the rule "a_1, ..., a_(n-1) <= manda_n <= m + 1on the expansion witha_n >= 2" pick the same fractions, and at every node that the mediant with its younger neighbour stays in the family while the mediant with its older neighbour stays exactly whena_n <= m. Then it prints, per octaveQ = 2^j,N_m(Q),Q^(2 delta_m), their ratio, the octave exponentlog2(N(2Q)/N(Q)), that exponent minus2 delta_m, the two-octave exponentlog4(N(4Q)/N(Q)), and the least and greatest ratio on the quarter octaves of[j, j + 1), withdelta_2 = 0.5312805062772051416anddelta_3 = 0.705660908028the pressure zeros of beneath,### The two dimensions of a run-length rule.- The totients are sieved in numpy; the walk and the quotient tests are exact integers; the horocycle images are exact rationals.
RUN
uv run python mrlyprod/research/lab/py/ford-horocycle/ford_horocycle.py crossings,0.1seconds.uv run python mrlyprod/research/lab/py/ford-horocycle/ford_horocycle.py bridge,21seconds,16of them the twok = 10rows.uv run python mrlyprod/research/lab/py/ford-horocycle/ford_horocycle.py census,28seconds,19of them them = 2walk to2^24.uv run python mrlyprod/research/lab/py/ford-horocycle/ford_horocycle.py all,49seconds.--bound 60,--kmax 10,--nodes 200,--jmax2 24,--jmax3 18,--jcontrol 10and--jcheck 9are the dials.- Prints only, writes nothing, touches no network.
WITNESSES
- The lines of apollonian,
## The horocycle. crossings:5510exact image points on the1102Ford circles ofb <= 60, every one on the Ford circle overa/bwith top point1/b^2atx = -d/b; closed-disc counts1, 2, 4, 32, 324, 542atQ = 1, 2, 3, 10, 32, 42againstsum_(b <= Q) phi(b), open-disc counts0, 1, 2, 28, 308, 530againstsum_(b < Q) phi(b), and1, 2, 6, 64, 628, 1086ath = 1/(2 Q^2)againstsum_(b <= floor(Q sqrt 2)) phi(b).bridge: the horocycle integral andh sum phi(c) g(c h^(1/2))agree to7.7e-14or better at everyh = 4^(-k),k = 2..10, on both bumps,318453cosets contributing atk = 10; the main terms are0.167199591457466and0.201589480296982;E/h^(3/4)stays between-0.27and+0.46on the smooth bump and between-0.23and+0.41on theC^2bump.census: the unbounded walk readssum_(b <= Q) phi(b)at everyQ = 2^jto2^10,318964at the top; atb <= 2^9the three membership tests agree on961fractions atm = 2and5118atm = 3, the mediant with the younger neighbour stays in every case,960and5117, and the mediant with the older neighbour stays in584and4026, exactly the nodes witha_n <= m.census,m = 2:N_2(2^24) = 59104562,N_2/Q^(2 delta_2)between1.2272and1.2504on the quarter octaves of[22, 23)and between1.2301and1.2521on[23, 24); octave exponents1.0431and1.0750atj = 22, 23, octave exponent minus2 delta_2reading+0.0475, -0.0480, +0.0477, -0.0453, +0.0405, -0.0336, +0.0265, -0.0194, +0.0124atj = 15to23, two-octave exponents between1.0590and1.0661fromj = 15toj = 22, against2 delta_2 = 1.0625610125544.census,m = 3:N_3(2^18) = 34078973,N_3/Q^(2 delta_3)between0.76762and0.76775on the quarter octaves of[17, 18), octave exponents1.4113, 1.4114, 1.4112atj = 15, 16, 17, two-octave exponents1.4114, 1.4113atj = 15, 16, against2 delta_3 = 1.4113218160560.
- ford_horocycle.py10.4 kB
- README.md6.0 kB