label.ldivide(l)

label//l

The left-quotient of l by label, i.e., the removal of a prefix. Written label \ l, or sometimes $(\mathit{label})^{-1}\ell$. Beware that the notation lhs // rhs is somewhat misleading, and corresponds to lhs \ rhs, i.e. lhs is the divisor, and rhs the dividend.

See also:

Examples

In [1]:
import sys
import vcsn
label = vcsn.context('law_char, q').label
label('').ldivide(label('abcd'))
Out[1]:
$\mathit{abcd}$
In [2]:
label('a').ldivide(label('abcd'))
Out[2]:
$\mathit{bcd}$
In [3]:
label('a') // label('abcd')
Out[3]:
$\mathit{bcd}$
In [4]:
label('abcd') // label('abcd')
Out[4]:
$\varepsilon$
In [5]:
try:
    label('d') // label('abcd')
except Exception as e:
    print(e, file=sys.stderr)
{abcd}*: ldivide: invalid arguments: d, abcd