expression.complement

Create an expression which denotes the complement of this expression.

See also:

Examples


In [1]:
import vcsn
e = vcsn.B.expression('a*b')
e.complement()


Out[1]:
$\left({a}^{*} \, b\right)^{c}$

In [2]:
e.complement().automaton()


Out[2]:
%3 I0 0 0 I0->0 F0 F2 0->F0 0->0 a 1 1 0->1 b 2 2 1->2 a, b 2->F2 2->2 a, b

In [3]:
e.automaton().complete().complement()


Out[3]:
%3 I0 0 0 I0->0 F0 F2 0->F0 0->0 a 1 1 0->1 b 2 2 1->2 a, b 2->F2 2->2 a, b