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

automaton.is_partial_identity

Whether the automaton is a partial identity, i.e. each (accepted) input is transduced to itself.

Precondition:

  • The automaton is transducer.

  • The two tapes have the same labelset.

See also:

Examples

import vcsn
%%automaton --strip a context = "lat<law_char(abc),law_char(abc)>, b" $ -> 0 0 -> 1 a|aa 1 -> 1 a|a 1 -> 2 aa|a 2 -> $
Image in a Jupyter notebook

This transducer is a partial identity.

a.is_partial_identity()
True

However, the following transducer is not a partial identity, as it maps aaa to aaaa.

%%automaton --strip a context = "lat<law_char(a),law_char(a)>, b" $ -> 0 0 -> 1 a|aa 0 -> 2 aa|a 1 -> 3 aa|aa 2 -> 3 aa|aa 3 -> $
Image in a Jupyter notebook
a.is_partial_identity()
False