Whether the automaton is a partial identity, i.e. each (accepted) input is transduced to itself.
Precondition:
See also:
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 -> $
This transducer is a partial identity.
a.is_partial_identity()
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 -> $
a.is_partial_identity()