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

expression.project(tape)

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

Preconditions:

  • the original expression is multitape.

  • the tape number is smaller than the number of tapes.

Postconditions:

  • the identities are preserved

Examples

import vcsn ctx = vcsn.context("lat<lal_char(ab), lan_char(cd), lal_char(ef)>, q")
e = ctx.expression("(a*|<-1>c*|f)(a|\e|f) + (b|c|e)*") e

(bce)+(a|1c|f)(aεf)\left(b|c|e\right)^{*} + \left( \left. {a}^{*} \middle| \left\langle -1 \right\rangle \,{c}^{*} \middle| f \right. \right) \, \left(a|\varepsilon|f\right)

e.project(0)

b+aa{b}^{*} + {a}^{*} \, a

e.project(1)

\emptyset

e.project(2)

e+ff{e}^{*} + f \, f