In [1]:
import vcsn
ctx = vcsn.context("lat<lal_char(ab), lan_char(cd), lal_char(ef)>, q")
In [2]:
a = ctx.expression("(a|c|f)(a|\e|f)+(b|c|e)*").automaton()
a
Out[2]:
In [3]:
a.project(0)
Out[3]:
In [4]:
a.project(1)
Out[4]:
In [5]:
a.project(2)
Out[5]:
If after the projection two transitions are equivalent, they are fused into one using the weightset's addition.
In [6]:
a = ctx.expression("a|c|e + a|c|f").automaton()
a
Out[6]:
In [7]:
a.project(0)
Out[7]:
In [8]:
a.project(1)
Out[8]:
In [9]:
a.project(2)
Out[9]: