automaton.is_letterized¶

Whethere the automaton is letterized, i.e. each transition is labeled by a single letter. It's always true when labels are letters, for example.

Examples¶

In [1]:
import vcsn
In [2]:
a1 = vcsn.b.expression("ab+c*").standard()
a1
Out[2]:
In [3]:
a1.is_letterized()
Out[3]:
True

Here, no computation is done, the result is implied by the labelset.

In [4]:
ctx = vcsn.context("law_char, b")
a2 = ctx.expression("a+bc*").standard()
a2
Out[4]:
In [5]:
a2.is_letterized()
Out[5]:
True

Here, as labels can be words, each transition's label is checked to see that it is a letter (or the empty word).

In [6]:
a3 = ctx.expression("abc").standard()
a3
Out[6]:
In [7]:
a3.is_letterized()
Out[7]:
False