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

expansion.add(exp)

expansion + exp

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

Preconditions:

  • Both expansions have the same weightset.

See also:

import vcsn e1 = vcsn.Z.expression('<3>abc+<4>d(a+<3>c)') x1 = e1.expansion() e2 = vcsn.Z.expression('<5>abc+<-2>d(<2>a+c)') x2 = e2.expansion()
x1

a[3bc]d[4a+3c]a \odot \left[\left\langle 3\right\rangle b \, c\right] \oplus d \odot \left[\left\langle 4\right\rangle a + \left\langle 3 \right\rangle \,c\right]

x2

a[5bc]d[22a+c]a \odot \left[\left\langle 5\right\rangle b \, c\right] \oplus d \odot \left[\left\langle -2\right\rangle \left\langle 2 \right\rangle \,a + c\right]

x1 + x2

a[8bc]d[4a+3c22a+c]a \odot \left[\left\langle 8\right\rangle b \, c\right] \oplus d \odot \left[\left\langle 4\right\rangle a + \left\langle 3 \right\rangle \,c \oplus \left\langle -2\right\rangle \left\langle 2 \right\rangle \,a + c\right]

The sum of the expansions is the expansion of the sum.

(e1 + e2).expansion()

a[8bc]d[4a+3c22a+c]a \odot \left[\left\langle 8\right\rangle b \, c\right] \oplus d \odot \left[\left\langle 4\right\rangle a + \left\langle 3 \right\rangle \,c \oplus \left\langle -2\right\rangle \left\langle 2 \right\rangle \,a + c\right]