Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 45860
Kernel: Python 3

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:

  • the division is valid

See also:

Examples

import sys import vcsn ctx = vcsn.context('law, q') poly = lambda p: ctx.polynomial(p) poly('ab') // poly('abc')

c\mathit{c}

The division must be valid.

try: poly('c') // poly('abc') except RuntimeError as e: print(e, file=sys.stderr)
{abc}*: ldivide: invalid arguments: c, abc
poly('a+b') // poly('aa+ab+ba+bb')

ab\mathit{a} \oplus \mathit{b}

poly('<2>\e') // poly('a+<2>b')

12ab\left\langle \frac{1}{2}\right\rangle \mathit{a} \oplus \mathit{b}