# 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 :
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:
$\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 :
xpn('ab {\} abc')

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

And with a more complex expression:

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

Out:
$\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 :
xpn('[ab]*') // xpn('(ab)*')

Out:
$\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 :
exp('[ab]* {\} (ab)*').derived_term()

Out: