"""dualquad.py -- where do the two ends of a quadratic base part? QUESTION. beta a root of x^2 + px + q, -1 <= p <= q, q >= 2, digits 0, ..., n - 1, n = q = |N(beta)|, which writes every element of O = Z[beta] once (Katai and Kovacs for irreducible f; the run checks T_J distinct and T_j complete mod beta^j O). In the coordinates (x, y) = x + y beta, beta acts by (x, y) -> (-qy, x - py) and beta-bar = -p - beta. The span-j leading tile is a translate of T_j = {sum_(k