xpn//expansion¶

An expansion which denotes the left quotient of both expansions. Beware that the notation lhs // rhs is somewhat misleading, and corresponds to lhs \ rhs, i.e. lhs is the divisor, and rhs the dividend.

Precondition:

• the labelset features a one (empty word)

Examples¶

In [1]:
import vcsn
ctx = vcsn.context('lan, q')
def exp(e):
return ctx.expression(e)
def xpn(e):
return exp(e).expansion()
xpn('ab') // xpn('abc')

Out[1]:
$\varepsilon \odot \left[b \backslash b \, c\right]$

The support for the left-quotient operator in expansion relies on the left quotient of the expansions. Contrast the following result with the previous one.

In [2]:
xpn('ab {\} abc')

Out[2]:
$\varepsilon \odot \left[b \backslash b \, c\right]$

And with a more complex expression:

In [3]:
xpn('[ab]* {\} (ab)*')

Out[3]:
$\left\langle 1\right\rangle \oplus \varepsilon \odot \left[a \, b \, \left(a \, b\right)^{*} \oplus a \, \left(a + b\right)^{*} \backslash \varepsilon \oplus b \, \left(a + b\right)^{*} \backslash \varepsilon \oplus \left(a + b\right)^{*} \backslash b \, \left(a \, b\right)^{*}\right]$
In [4]:
xpn('[ab]*') // xpn('(ab)*')

Out[4]:
$\left\langle 1\right\rangle \oplus \varepsilon \odot \left[a \, b \, \left(a \, b\right)^{*} \oplus a \, \left(a + b\right)^{*} \backslash \varepsilon \oplus b \, \left(a + b\right)^{*} \backslash \varepsilon \oplus \left(a + b\right)^{*} \backslash b \, \left(a \, b\right)^{*}\right]$

And the corresponding derived-term automaton:

In [5]:
exp('[ab]* {\} (ab)*').derived_term()

Out[5]: