expansion | xpn

Build a tuple of expansions, ie the $k$-tape expansion which is the Cartesian product of the input expansions.

See also:

References:

Examples

In [1]:
import vcsn
def xpn(e):
    return vcsn.context('lan, q').expression(e).expansion()
x1 = xpn('abc')
x1
Out[1]:
$a \odot \left[b \, c\right]$
In [2]:
x2 = xpn('(<2>x)*')
x2
Out[2]:
$\left\langle 1\right\rangle \oplus x \odot \left[\left\langle 2\right\rangle \left( \left\langle 2 \right\rangle \,x\right)^{*}\right]$
In [3]:
x1 | x2
Out[3]:
$a|\varepsilon \odot \left[ \left. b \, c \middle| \varepsilon \right. \right] \oplus a|x \odot \left[\left\langle 2\right\rangle \left. b \, c \middle| \left( \left\langle 2 \right\rangle \,x\right)^{*} \right. \right]$