# DUAL — the leading end of base b, read against the trailing end The object: base b read top first. A positive integer n has e + 1 digits, e = e(n) = ⌊log_b n⌋, and its depth-t **leading tile** is the set of integers with the same digit count and the same t leading digits. Like a window of SIZE.md, this is a reading at a set of places, here the archimedean place alone: size, read to t digits. So a floating-point number names a leading tile. The trailing end reads the same integer bottom first, and its depth-t tile is n mod b^t. A map f of the positive integers is read at lookahead c when at every depth t the depth-t tile of f(n) is a function of the depth-(t + c) tile of n, over the n with f(n) ≥ 1, since zero has no leading tile; a map of two integers reads the pair of their tiles, and a map valued in {0, 1} or {−1, 0, 1}, as [x = y] or the sign of x − y, is read at lookahead c when at every depth t its value is a function of the inputs' depth-(t + c) tiles. This page shows that the two ends of base b exchange what they read: the places p | b that the trailing end reads exactly, the leading end hides exactly, and at a quadratic base β the exchange runs one way, the leading end hiding an ideal of Z[β] by the time the trailing end reads it, sometimes sooner or alone, and at a base of any degree span j hides an ideal when a chain of the powers of β generates its quotient, and only then when its index is q^j; the difference map (x, y) ↦ x − y, which the trailing end reads digit by digit, is read at no finite lookahead at the leading end; multiplication reads by every factor at the trailing end and division by every divisor at the leading end. It decides which nondecreasing maps within bounded distance of a line λn (λ > 0) the leading end reads, bounds their least lookahead, exactly in the cases the least-lookahead law names, and shows that it reads maps outside that class. Then it gives the leading end redundant signed digits {−a, …, a}, 2a + 1 > b: the overlapping cover they buy reads every Lipschitz map of their range, or its powers, into that range, and the purchase costs order, a lower bound on size before a division, and, unless p ∣ 2a + 1, the exact hiding of the places p ∣ b, degraded to a bias. Last come the leading end's densities, whose own measure is log-uniform, the Haar measure of the scale circle. Which end pays for what. Each end reads, by every operand, the operation whose carries run away from it. A product's low digits depend only on the factors' low digits, so the trailing end multiplies at lookahead 0 and divides only where the divisor's primes divide b. Long division emits the quotient from the top with a bounded remainder, so the leading end divides by anything and multiplies only where the multiplier's primes divide b. Where READING.md reads a leading numeration on R, a scaling y ↦ uy with u > 0 reads iff 1/u ∈ Z[1/b]. On the integers a map is a floor, and a floor adds one condition, that its jumps fall on tile boundaries. Redundant digits blur size inside the archimedean window itself, and order stays walled (read at no finite lookahead), and wider. ``` TRAILING END LEADING END tile, j digits n mod b^j, a coset b^j consecutive integers the places p | b read exactly hidden exactly ideals of Z[β] read once β^j ∈ I hidden by then, sometimes sooner or alone x − y read at 0 walled at every depth x = y only mod b^t walled at every depth n ↦ un read at 0 read iff rad(u) ∣ rad(b) ⌊n/v⌋ read iff rad(v) ∣ rad(b) read; at digits_b(v) when v ≥ 2, b ∤ v redundant digits buy nothing an overlapping cover ``` rad(u) is the product of the primes dividing u; walled, read at no finite lookahead. ## The leading-tile lemma Tier: property. Verifier: proof; dual.py::section_t. If e + 1 ≤ t the depth-t leading tile of n is {n}. Otherwise it is [P b^j, (P + 1) b^j) with j = e + 1 − t and P the t-digit prefix: b^j consecutive integers, sign-definite. Its span is j, the digits it hides, and it is deep when j ≥ 1. A tile of span j is therefore a complete residue system mod b^j, and for m ≥ 2, n mod m is constant on no tile of length at least 2. The predicate [m ∣ n] is weaker and is answered by length, not depth: a tile shorter than m that holds no multiple of m decides it false. At base 2 the depth-2 tile of 4 is [4, 6), deep, and decides [7 ∣ n]. Proof. The integers with e + 1 digits and prefix P are exactly those with ⌊n/b^j⌋ = P. The script groups every n below 2^12, 3^7 and 10^4 by its tile at depths 1 to 4, and every group is the stated interval. ## The two-ends law Tier: criterion. Verifier: proof; dual.py::section_h. For m ≥ 2 and j ≥ 0, n mod m is a function of the last j digits iff m ∣ b^j, and every residue mod m has the same count on every leading tile of span j iff m ∣ b^j. So one condition decides both ends: depth j of the trailing end reads m exactly where span j at the leading end hides it exactly. A prime p is read by some trailing depth and hidden on every deep leading tile iff p ∣ b, and for p ∤ b, n mod p is a function of no trailing depth and hidden on no deep leading tile. Proof. The first half is the suffix read (COORDINATES.md#the-suffix-and-floor-reads). For the second, a span-j tile is b^j consecutive integers. Each residue appears b^j/m times when m ∣ b^j, and otherwise ⌊b^j/m⌋ or ⌊b^j/m⌋ + 1 times, both counts occurring, on every such tile. When rad(m) ∣ rad(b), m is hidden from span max_p ⌈v_p(m)/v_p(b)⌉ on, v_p the p-adic valuation, the depth at which the trailing end first reads it. The finite mirror is SIZE.md#the-hiding-lemma: a window of a residue ring hides the sign bit exactly iff the ring's size over the window's is even, as a leading tile hides m exactly iff m ∣ b^j. The script reads all 1595 triples b = 2..12, m = 2..30, j = 0..4, the leading half on every tile with a one- or two-digit prefix; the trailing half is the suffix read. ## The two ends of a quadratic base Tier: criterion. Verifier: proof; dualquad.py::main, dual2i.py::section_controls, dual2i.py::section_ideals, dual2i_split.py::main, dualdeg.py::section_witness, dualdeg.py::section_cubic. Let O = Z[x]/(x² + px + q) = Z + Zβ, β the class of x, q ≥ 2, and digits D = {0, …, q − 1}. A leading tile of span j is a translate of T_j = {Σ_(k