Utils.OdometerMixed-radix counter (odometer) for enumerating sequences.
An odometer of length n over a domain of size k represents a base-k number stored as an integer array. next increments it in the usual right-to-left carry-propagation order. sequence domain n produces the lazy Sequence of all length-n lists drawn from domain, in lexicographic order.
Used by the teacher's BFS enumeration of Σ* to generate candidate counterexamples.
next ~radix idx returns the successor index array in base radix, or None if idx is already at the maximum (all digits = radix - 1).
materialise dom idx converts an index array into a list of domain elements.