# expansion.complement¶

An expansion which denotes the complement of this expansion.

References:

## Examples¶

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

Out:
$a \odot \left[{a}^{*} \, b\right] \oplus b \odot \left[\varepsilon\right]$
In :
e.expansion().complement()

Out:
$\left\langle \top\right\rangle \oplus a \odot \left[\left({a}^{*} \, b\right)^{c}\right] \oplus b \odot \left[{\varepsilon}^{c}\right]$
In :
e.complement().expansion()

Out:
$\left\langle \top\right\rangle \oplus a \odot \left[\left({a}^{*} \, b\right)^{c}\right] \oplus b \odot \left[{\varepsilon}^{c}\right]$
In :
e.complement().derived_term()

Out:

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

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

Out:
$a \odot \left[a \oplus b\right]$
In :
x.complement()

Out:
$\left\langle \top\right\rangle \oplus a \odot \left[\left(a + b\right)^{c}\right] \oplus b \odot \left[{\emptyset}^{c}\right]$
In :
e.derived_term()

Out:
In :
e.complement().derived_term()

Out: