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

expansion.complement

An expansion which denotes the complement of this expansion.

See also:

References:

Examples

import vcsn e = vcsn.B.expression('a*b') e.expansion()

a[ab]b[ε]a \odot \left[{a}^{*} \, b\right] \oplus b \odot \left[\varepsilon\right]

e.expansion().complement()

a[(ab)c]b[εc]\left\langle \top\right\rangle \oplus a \odot \left[\left({a}^{*} \, b\right)^{c}\right] \oplus b \odot \left[{\varepsilon}^{c}\right]

e.complement().expansion()

a[(ab)c]b[εc]\left\langle \top\right\rangle \oplus a \odot \left[\left({a}^{*} \, b\right)^{c}\right] \oplus b \odot \left[{\varepsilon}^{c}\right]

e.complement().derived_term()
Image in a Jupyter notebook

Note that complementing an expansion "determinizes" it: each first is mapped to a monomial. Note in the following example that the label aa maps to a two-term polynomial (aa and bb), but in the complement, it has a single-term polynomial (a+ba+b, observe \oplus vs. ++).

e = vcsn.B.expression('aa+ab') x = e.expansion() x

a[ab]a \odot \left[a \oplus b\right]

x.complement()

a[(a+b)c]b[c]\left\langle \top\right\rangle \oplus a \odot \left[\left(a + b\right)^{c}\right] \oplus b \odot \left[{\emptyset}^{c}\right]

e.derived_term()
Image in a Jupyter notebook
e.complement().derived_term()
Image in a Jupyter notebook