expression.sum(exp)

expression + exp

An expression which denotes the sum (or disjunction) of both series.

Preconditions:

  • None

See also:

Examples


In [1]:
import vcsn
ctx = vcsn.context('lal_char, q')
exp = lambda e: ctx.expression(e)
exp('a*b') + exp('ab*')


Out[1]:
$a \, {b}^{*} + {a}^{*} \, b$

Of course, trivial identities are applied.


In [2]:
exp('<2>a') + exp('<3>a')


Out[2]:
$ \left\langle 5 \right\rangle \,a$

In [3]:
exp('<2>a') + exp('\z')


Out[3]:
$ \left\langle 2 \right\rangle \,a$