In [1]:
import vcsn
c = vcsn.context('lal_char(0-9), b')
c.divkbaseb(3, 2)
Out[1]:
In [2]:
c.divkbaseb(2, 4)
Out[2]:
If $k$ and $b$ are coprime, then the result is known to be minimal.
In [3]:
div4base4 = c.divkbaseb(4, 4)
div4base4
Out[3]:
In [4]:
div4base4.minimize()
Out[4]: