Loading [MathJax]/jax/output/HTML-CSS/jax.js

label.ldivide(l)

label//l

The left-quotient of l by label, i.e., the removal of a prefix. Written label \ l, or sometimes (label)1. 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]:
abcd
In [2]:
label('a').ldivide(label('abcd'))
Out[2]:
bcd
In [3]:
label('a') // label('abcd')
Out[3]:
bcd
In [4]:
label('abcd') // label('abcd')
Out[4]:
ε
In [5]:
try:
    label('d') // label('abcd')
except Exception as e:
    print(e, file=sys.stderr)
{abcd}*: ldivide: invalid arguments: d, abcd