# RATES — what a reader pays where a digit's scale varies The object: the continued-fraction numeration of the irrationals, y = [a_0; a_1, a_2, …]. Its depth-n tile, the irrationals sharing the first n quotients, fills the open interval (its interval) between the convergent p_(n−1)/q_(n−1) = [a_0; …, a_(n−1)] and (p_(n−1) + p_(n−2))/(q_(n−1) + q_(n−2)) at n ≥ 1, the depth-0 tile being every irrational; the tiles partition the irrationals and nest. A reader of a monotone map f sees the input's depth-n tile I_n and commits the longest quotient string shared by all the irrationals of f(I_n). e(n) is its length, and the **lag** is n − e(n). Unlike the numerations of READING.md, a tile's scale, ln(1/length), is not a function of its depth: the rate r(y), the limit of scale(I_n)/n where it exists (it does at every quadratic y), is 2 ln φ on the all-ones stream, φ the golden ratio, and no stream's scale grows slower, since |I_n| ≤ 1/q_(n−1)² and q_(n−1) ≥ F_n, the n-th Fibonacci number. So a reader keeps two accounts, one in quotients and one in scale. The scale account settles at every badly approximable output whatever the map: the **deficit**, how much coarser in scale the committed tile is than what the input determines, is bounded there (the commitment bound). Beside it the numeration charges two prices that can grow without bound: walls, at the preimages of the rationals, and the lag n − e(n), the quotients read less the quotients committed. At a quadratic y a rate is, at every point tested, a constant of its field times a unit index over its least period, so inside one field the lag's slope reads unit indices, and a nonconstant integer Möbius map with coprime entries has bounded lag everywhere iff it is unimodular. Which place pays. The walls are the price of READING.md#the-wall-criterion again: the intervals of one depth's tiles are open and disjoint, so they cannot cover the connected line R, and from the depth of its own quotient string's length on a rational lies in none of them. The lag is a different price. At a quadratic y the rate is, at every point tested, 2 i ln ε/ℓ, with ε the field's fundamental unit, ln ε its regulator, i a unit index and ℓ the least period's length (the unit-index law), and ln ε is the logarithm of a unit's real absolute value. Inside one field ln ε cancels and the lag's slope is rational, exponents of ε over periods (unit indices where that law holds), with no logarithm in it, and across fields the ratio of rates is a rational multiple of a ratio of regulators, reached only by a map that leaves the field: integer Möbius maps and y² keep it, and √y keeps it whenever its value is quadratic, while y ↦ √2·y leaves it (√3 goes to √6). So, at quadratic y and f(y), the archimedean absolute value reaches the lag's slope only through the regulator, and only between fields. ``` PRICE PAID WHERE DECIDED BY wall f(y) rational f⁻¹(Q): none for integer Möbius maps, y² at ±√v, v > 0 rational, not a square deficit every irrational output whose at most 3 ln(A + 2) + ln 4 quotients after the first are from the first commitment all at most A lag slope y, f(y) quadratic, f C¹, f′ ≠ 0 1 − r(y)/r(f(y)); rational inside one field ``` ## Walls sit at the preimages of the rationals Tier: criterion. Verifier: proof; rates.py::section_w. Let f be continuous and strictly monotone near an irrational y. The reader of f at y emits without bound iff f(y) is irrational. If f(y) = v is rational, v = [b_0; …, b_k] in its own quotients with b_k ≥ 2 when k ≥ 1, emission freezes at exactly k quotients. So an integer Möbius map has no walls, y ↦ y² walls exactly at ±√v for the positive rationals v that are not squares, and y ↦ √y has none. Proof. y lies inside I_n, so f(y) lies inside f(I_n), which shrinks to f(y). The tiles are open, so an irrational f(y) lies inside its tile at every depth, and a fine enough f(I_n) fits each one. A rational v is a tile endpoint: the irrationals just above and just below it share b_0, …, b_(k−1) and differ at index k, one side continuing b_k and the other b_k − 1, 1. Every f(I_n) holds both sides, so no more than k quotients commit, and exactly k once f(I_n) fits the interval of the depth-k tile about v. Integer Möbius maps and their inverses keep Q, so no irrational maps onto it; y² = v forces y = √v; and √y rational forces y rational. This is the shape of READING.md#the-wall-criterion with its tile endpoints B all of Q, though there the tiles are half-open and here open, holding only irrationals, so no endpoint is ever an input. There, in leading-digit base 10, y ↦ 3y walls at 1/3, a point off Z[1/10] sent onto the endpoint 1; here the endpoints are all of Q, which every integer Möbius map keeps, so none walls. The script prints y² frozen at 0 at √2, √3 and √6, at 1 at √(3/2) and √(7/3), and at 3 at √(17/12), where 17/12 = [1; 2, 2, 2], at input depths 20, 60 and 120. y² at φ emits 18, 58, 118 over the same depths, and √y at 3 + √2 emits 10, 38, 86. ## The commitment bound Tier: theorem. Verifier: proof; rates.py::section_d. Let z be irrational with quotients a_j ≤ A for every j ≥ 1 (a_j, q_m and the convergents p_m/q_m in this section are z's, not those of the stream y of the opening), J an interval that holds z and lies in the interval of some tile of depth at least 1, C_k the interval of the depth-k tile holding z, and C_e the deepest of them holding J. Then the deficit scale(J) − scale(C_e), with scale(J) = ln(1/|J|), lies between 0 and 3 ln(A + 2) + ln 4. The bound does not mention a map: a reader whose output is badly approximable, its quotients bounded by A, is **scale-synced**: from its first commitment on, its committed tile is never more than 3 ln(A + 2) + ln 4 coarser than what the input determines. Proof. C_e ⊇ J gives 0. Every rational p/q has |z − p/q| ≥ 1/((A + 2)q²): at a convergent because |z − p_m/q_m| = 1/(q_m(z_(m+1) q_m + q_(m−1))) with the complete quotient z_(m+1) below A + 1, and elsewhere because Legendre's criterion makes any |z − p/q| < 1/(2q²) a convergent. The depth-m tile has endpoints of denominator at most 2q_(m−1) and length at most 1/q_(m−1)², so z sits at least |C_m|/(4(A + 2)) inside it. J does not fit C_(e+1), so it reaches past that tile's boundary and |J| ≥ |C_(e+1)|/(4(A + 2)). Last, |C_e|/|C_(e+1)| ≤ (A + 1)(A + 2), since q_e ≤ (A + 1)q_(e−1). Over input depths to 240 the script prints deficits up to 2.015 at (2y, φ), 2.199 at (2y, √2), 0.831 at (y², φ) and 5.032 at (7y, φ), against bounds 6.762, 6.762, 4.682 and 9.886 at A = 4, 4, 1, 15. Of 300 intervals about √7 and 7φ, each a bracket of consecutive convergents widened at random on both sides, the 296 that commit a tile obey the bound; the other 4 reach past the depth-1 tile, outside the hypothesis. At the wall (y², √2) the hypothesis fails: nothing commits, and, counting the whole line, depth 0, as scale 0, the deficit is scale(f(I_n)) = n r(y) + O(1) and grows between depths 120 and 240 at slope 1.7627, which is 2 ln(1 + √2), the input's rate. ## Rate forcing Tier: theorem. Verifier: proof; rates.py::section_f, rates.py::section_k. Let y have an eventually periodic tail of period length ℓ, and let its **period matrix** P be the product of [[a, 1], [1, 0]] over one period, with larger eigenvalue η. Then y's rate is r(y) = 2 ln η/ℓ. Let f be C¹ and monotone near y with f′(y) ≠ 0, and let z = f(y) be quadratic. Then e(n) = ρn + O(1) with ρ = r(y)/r(z). The lag is bounded iff the rates match, and otherwise grows linearly with the sign of 1 − ρ. Proof. Along the tail each period multiplies y's positive pair (q_m, q_(m−1)) by P, so ln q_n = n ln η/ℓ + O(1), and scale(I_n) = ln(q_(n−1)(q_(n−1) + q_(n−2))) = n r(y) + O(1). Since |f(I_n)| = |f′(y)||I_n|(1 + o(1)), scale(f(I_n)) = n r(y) + O(1) too. z is quadratic, hence irrational with bounded quotients, and the commitment bound puts the committed tile's scale, e(n) r(z) + O(1) since z's own depth-e tiles have that scale, within a constant of that. The map enters only through |f′(y)| and through which output it picks, so Möbius maps, y² and √y are priced alike. The script runs eleven rows to depth 240, and at each the residual |e(n) − ρn| has the same sup over depths 121 to 240 as over 1 to 120, at most 2. (2y, φ) has ρ = 1/3 and lag 160 at depth 240; (2y, √2) has ρ = 1 and lag 0 there, a map of determinant 2 with bounded lag; √y at 7 + 4√3 (ρ = 2) and y/2 at 2φ (ρ = 3) run ahead, to lags −239 and −479. The lag's sign belongs to the unit of count. Counted in Stern–Brocot steps, a quotient a being a steps, (2y, φ) emits n/3 + O(1) quotients of 4 steps each against n steps read, so 4/3 steps per step, though it lags in quotients; (y/2, 2φ) reads quotients of 4 and emits 3n + O(1) quotients of 1, so 3/4. At depth 240 the script prints 1.3292 and 0.7497. The deficit compares scales, so recounting the committed tile in steps leaves it as it was. ## The unit-index law Tier: pattern (η = ε^i exactly at 130 quadratic points over 15 real quadratic fields, conductors up to 20). Verifier: rates.py::section_c. For quadratic y, the eigenvalue η of the period matrix over the least period equals ε^i, where ε is the field's fundamental unit and i = [O_max^× : O^×] is the unit index of the multiplier ring O of the lattice Z + Zy, the x in Q(y) with x(Z + Zy) ⊆ Z + Zy, O_max being the ring of integers of Q(y) and [O_max : O] the conductor of O. So r(y) = 2 i ln ε/ℓ, and when y and f(y) lie in one field, with z = f(y), ρ = (i_y ℓ_z)/(i_z ℓ_y) is rational, ln ε cancelling. The rationality needs no pattern: η lies in Q(y), P fixing y's periodic tail, and P has integer entries and determinant ±1, so η is a unit of the ring of integers of Q(y) above 1, a power ε^m, and ρ = (m_y ℓ_z)/(m_z ℓ_y); what the pattern adds is m = i. So the lag's slope reads the ratio of the unit indices over periods, and i alone does not fix the conductor: ε = 8 + 3√7 already lies in Z[3√7], so i = 1 at conductor 3 as at 1. The script finds ε by solving X² − dY² = ±4 when d ≡ 1 mod 4 and X² − dY² = ±1 otherwise, d the squarefree integer with Q(y) = Q(√d), and i as the least power of ε lying in O, never from the period, and compares. 2φ = [3; (4)] has η = 2 + √5 = φ³, so (i, ℓ) = (3, 1) against φ's (1, 1), and ρ = 1/3 at (2y, φ). 2√2 = [2; (1, 4)] has η = (1 + √2)², so (i, ℓ) = (2, 2) against √2's (1, 1): the index and the period double together, which is why a map of determinant 2 reads √2 at bounded lag. ## The unit criterion Tier: criterion. Verifier: proof; rates.py::section_u. An integer Möbius map M, y ↦ (αy + β)/(γy + δ) with gcd(α, β, γ, δ) = 1 and det M ≠ 0, has bounded lag at every quadratic stream iff det M = ±1. If det M = ±1 its lag is bounded at every irrational stream; if |det M| ≥ 2 its lag grows linearly at a unimodular image of φ. The entries must be coprime because a common factor g multiplies det M by g² and leaves the map alone: 2y/2 is the identity. Proof. The unimodular Möbius maps are the words in y + 1, −y and 1/y, and each rewrites the quotient string at bounded lookahead: y + 1 raises a_0; 1/y moves the string one place for y > 0, and 1/y = −(1/(−y)) for y < 0; and, writing t = 1/[a_2; a_3, …], −y = (−a_0 − 1) + 1/(1 + 1/(a_1 − 1 + t)), so −[a_0; a_1, a_2, …] is [−a_0 − 1; 1, a_1 − 1, a_2, …] when a_1 ≥ 2 and [−a_0 − 1; a_2 + 1, a_3, …] when a_1 = 1. Lookaheads add along a fixed word, so the lag is bounded above; it is bounded below because M⁻¹ is such a word too, and a depth-n tile, mapped back into a depth-e tile, forces e ≤ n + c, c the lookahead of M⁻¹'s word. And rate forcing, applied to M and to M⁻¹, then says a unimodular map keeps every quadratic stream's rate. Now let |det M| = N ≥ 2. The entries are coprime, so the Smith form is M = U diag(1, N) V, U and V unimodular and diag(1, N) the map y ↦ y/N. At y = V⁻¹φ rate forcing gives ρ = r(φ)/r(φ/N). Every quadratic stream's rate is at least r(φ) = 2 ln φ, with equality only for an all-ones tail: a period matrix dominates the all-ones one entry by entry, strictly unless every quotient is 1, and by Perron–Frobenius its eigenvalue is then strictly larger. An all-ones tail would make φ/N a unimodular image of φ (the easy direction of Serret's theorem: its prefix matrix), which only rescales the lattice and so keeps the multiplier ring Z[φ]. But the lattice of φ/N, rescaled to NZ + Zφ, is not closed under multiplication by φ, since φ² = φ + 1 and 1 ∉ NZ. So ρ < 1, and the lag grows at slope 1 − ρ. The script runs y + 1, y − 1, 1/y, −y, −1/y, (2y + 1)/(y + 1) and (y − 4)/(y − 3) at φ, √2, √3 and a pseudo-random string of quotients 1 to 5; over all inputs, at depths 2 to 120, the lags lie between −2 and 1, and each map keeps (η, ℓ) at φ, √2 and √3. Nφ, which has the rate of φ/N since φ/N = 1/(Nφ − N), runs 2.000 to 9.000 times r(φ) over N = 2..40, so ρ ≤ 1/2 at every such witness. ## The ladder law Tier: theorem. Verifier: proof; rates.py::section_k. At a Stern–Brocot vertex v = p_v/q_v with parents v_L = p_L/q_L and v_R = p_R/q_R, each in lowest terms, the **straddle** S_j(v), j ≥ 1, is the interval between the mediants (p_L + j p_v)/(q_L + j q_v) and (p_R + j p_v)/(q_R + j q_v); it holds v inside, and S_1 of the root 1 is (1/2, 2), the image of (0, ∞) under y ↦ (2y + 1)/(y + 2). An irrational z > 0 in v's Stern–Brocot interval (v_L, v_R) lies in exactly K(v, z) = ⌊1/(q_v²|z − v|) − q_s/q_v⌋ straddles at v, q_s the denominator of the parent on z's side. At a convergent p_m/q_m of z on its Stern–Brocot path, K is z's quotient a_(m+1); at every other vertex of z's Stern–Brocot path, K ≤ 1; at a rational z = v, K is infinite. So adding the straddles to the tiles cures every wall whose value is a positive rational, the vertices of the Stern–Brocot tree, and at an irrational point it adds at each convergent a chain of straddles as long as the next quotient and at most one straddle at every other vertex. Proof. The parents of v are the two Farey neighbours of which v is the mediant, so the straddle's endpoint on z's side lies at distance 1/(q_v(q_s + j q_v)) from v, and z lies in S_j(v) iff j < 1/(q_v²|z − v|) − q_s/q_v, an irrational bound at irrational z. At a convergent, p_(m−1)/q_(m−1) is the parent on z's side (z lies between p_m/q_m and p_(m+1)/q_(m+1), on p_(m−1)/q_(m−1)'s side), and |z − p_m/q_m| = 1/(q_m(z_(m+1) q_m + q_(m−1))), so the bound is the complete quotient z_(m+1) and K = a_(m+1). At any other vertex Legendre's criterion gives |z − v| ≥ 1/(2q_v²), so the bound is at most 2 and K ≤ 1. Every straddle at v holds v and, its endpoints being mediants of v with a parent, lies inside (v_L, v_R). For v ≠ 1, write v = [b_0; …, b_k] in its own quotients, with b_k ≥ 2. Its parents are its convergent [b_0; …, b_(k−1)] (1/0 when k = 0) and the point of complete quotient b_k − 1 ≥ 1 after b_0, …, b_(k−1), so (v_L, v_R) lies inside the interval of the tile of those quotients, where the tile reader froze: the straddles nest under its commitments. At the root v = 1 the reader froze before any tile, on (0, ∞). The script checks the closed form against enumeration at 531 convergents and 1138 other path vertices over nine quadratic points, with K = a_(m+1) at every convergent and K ≤ 1 at every other vertex. At the walls of y² at √2, √3 and √(3/2) the reader of the straddles, which past the frozen tiles commits the largest j with S_j(v) ⊇ f(I_n), never freezes, K being infinite at v: read at depths 60 and 120, its straddle index j grows with ln-slope 1.7627, 1.3170 and 2.2924 per input quotient, the input's rate to four places, so it commits what the tile reader forfeits. This is the cure of walls by redundancy of READING.md#non-redundant-absolute-tiles-wall-only-at-the-archimedean-place, at a numeration whose other price is the quotient count's, not the reader's: whatever a reader commits holds f(I_n), of scale n r(y) + O(1), so a redundant cover changes how the committed tile is named, never how fine it is, and the lag, z's depth against y's at that scale, stays.