Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 45903
Kernel: Python 3

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 ww the output will be ww.

Preconditions:

  • None

See also:

Examples

import vcsn

The following is the input automaton:

a = vcsn.Q.expression("<3>abc*(<2>d)* + ce<5>").automaton() a
Image in a Jupyter notebook
b = a.partial_identity() b
Image in a Jupyter notebook
b.context()

{a,b,c,d,e}×{a,b,c,d,e}Q\{a, b, c, d, e\} \times \{a, b, c, d, e\}\to\mathbb{Q}

a.evaluate("abcd")

66

b.lift(1).evaluate("abcd")

6((a)(b)(c)(d)) \left\langle 6 \right\rangle \,\left(\left(a\right) \, \left(b\right) \, \left(c\right) \, \left(d\right)\right)