# expansion.project(tape)¶

An expansion that keeps only the selected tape of the original expansion.

Preconditions:

• the original expression is multitape.
• the tape number is smaller than the number of tapes.

## Examples¶

In :
import vcsn
ctx = vcsn.context("lat<lan_char(ab), lan_char(cd), lan_char(ef)>, q")

In :
e = ctx.expression("a*|c|[ef]")
x = e.expansion()
x

Out:
$\varepsilon|c|e \odot \left[\varepsilon\right] \oplus \varepsilon|c|f \odot \left[\varepsilon\right] \oplus a|c|e \odot \left[ \left. {a}^{*} \middle| \varepsilon \middle| \varepsilon \right. \right] \oplus a|c|f \odot \left[ \left. {a}^{*} \middle| \varepsilon \middle| \varepsilon \right. \right]$
In :
x.project(0)

Out:
$\left\langle 2\right\rangle \oplus a \odot \left[\left\langle 2\right\rangle {a}^{*}\right]$
In :
x.project(1)

Out:
$c \odot \left[\left\langle 4\right\rangle \varepsilon\right]$
In :
x.project(2)

Out:
$e \odot \left[\left\langle 2\right\rangle \varepsilon\right] \oplus f \odot \left[\left\langle 2\right\rangle \varepsilon\right]$

Beware that, because of possible redundancy on other tapes, the projection of an expansion is not necessarily the expansions of the projection.

In :
e.project(0).expansion()

Out:
$\left\langle 1\right\rangle \oplus a \odot \left[{a}^{*}\right]$
In :
e.project(1).expansion()

Out:
$c \odot \left[\varepsilon\right]$
In :
e.project(2).expansion()

Out:
$e \odot \left[\varepsilon\right] \oplus f \odot \left[\varepsilon\right]$