automaton.lift(identities="default")

$\newcommand{\eword}{\varepsilon} \newcommand{\lweight}[2]{\bra{#1}{#2}} \newcommand{\rweight}[2]{#1\bra{#2}} \newcommand{\lmulq}[2]{\bra{#1}^?{#2}} \newcommand{\rmulq}[2]{#1\bra{#2}^?} \newcommand{\bra}[1]{\langle#1\rangle} \newcommand{\K}{\mathbb{K}} \newcommand{\zed}{\mathsf{0}} \newcommand{\und}{\mathsf{1}} \newcommand{\zeK}{0_{\K}} \newcommand{\unK}{1_{\K}} \newcommand{\Ed}{\mathsf{E}} \newcommand{\Fd}{\mathsf{F}} \newcommand{\Gd}{\mathsf{G}}$ Turn an automaton into a spontaneous automaton by mapping each transition $\lweight{w}{\ell}$ into $\lweight{\lweight{w}{\ell}}{\varepsilon}$.

Preconditions:

  • None

See also:

Examples

In [1]:
import vcsn
a = vcsn.Q.expression('(<1>a+<2>b+<3>c){2}').automaton()
a
Out[1]:
%3 I0 0 0 I0->0 F2 1 1 0->1 a, ⟨2⟩b, ⟨3⟩c 2 2 1->2 a, ⟨2⟩b, ⟨3⟩c 2->F2
In [2]:
b = a.lift()
b
Out[2]:
%3 I0 0 0 I0->0 F2 1 1 0->1 ⟨a+⟨2⟩b+⟨3⟩c⟩ 2 2 1->2 ⟨a+⟨2⟩b+⟨3⟩c⟩ 2->F2
In [3]:
from IPython.display import display
display(a.context(), b.context())
$\{a, b, c, \ldots\}\to\mathbb{Q}$
$\{\varepsilon\}\to\mathsf{RatE}[\{a, b, c, \ldots\}\to\mathbb{Q}]$

A different set of identities can be chosen.

In [4]:
a.lift().type()
Out[4]:
'mutable_automaton<context<lao, expressionset<context<letterset<char_letters>, q>>>>'
In [5]:
a.lift(identities = 'trivial').type()
Out[5]:
'mutable_automaton<context<lao, expressionset<context<letterset<char_letters>, q>>>>'