In [1]:
import vcsn
ctx = vcsn.context('lal_char, q')
exp = lambda e: ctx.expression(e)
exp('a*b') + exp('ab*')
Out[1]:
Of course, trivial identities are applied.
In [2]:
exp('<2>a') + exp('<3>a')
Out[2]:
In [3]:
exp('<2>a') + exp('\z')
Out[3]: