# automaton.partial_identity¶

Create a transducer which realizes a partial identity for the series recognized by the input automaton. It means that the transducer will accept the same series as the input automaton, and for each input word $w$ the output will be $w$.

Preconditions:

• None

## Examples¶

In [1]:
import vcsn


The following is the input automaton:

In [2]:
a = vcsn.Q.expression("<3>abc*(<2>d)* + ce<5>").automaton()
a

Out[2]:
In [3]:
b = a.partial_identity()
b

Out[3]:
In [4]:
b.context()

Out[4]:
$\{a, b, c, d, e\} \times \{a, b, c, d, e\}\to\mathbb{Q}$
In [5]:
a.eval("abcd")

Out[5]:
$6$
In [6]:
b.lift(1).eval("abcd")

Out[6]:
$\left\langle 6 \right\rangle \,\left(\left(a\right) \, \left(b\right) \, \left(c\right) \, \left(d\right)\right)$