polynomial.ldivide(poly)¶polynomial//poly¶A polynomial which denotes the left-quotient of both polynomials. Makes more sense when the labels can be words. Beware that the notation lhs // rhs is somewhat misleading, and corresponds to lhs \ rhs, i.e. lhs is the divisor, and rhs the dividend.
Preconditions:
See also:
import sys
import vcsn
ctx = vcsn.context('law, q')
poly = lambda p: ctx.polynomial(p)
poly('ab') // poly('abc')
The division must be valid.
try:
poly('c') // poly('abc')
except RuntimeError as e:
print(e, file=sys.stderr)
poly('a+b') // poly('aa+ab+ba+bb')
poly('<2>\e') // poly('a+<2>b')