Skip to content

Fix is_identity of WordMorphism to handle non standard alphabet #8618

@videlec

Description

@videlec

It seems that some functions that use morphisms of words do not work for not standard alphabet. This ticket follows the bug found in the fixed_point method (#8595).

pseudo palindrome

sage: t = WordMorphism({'a1':['a2'], 'a2':['a1']})
sage: W = Words(['a1','a2'])
sage: W(['a1','a2']).is_palindrome(t)
AttributeError Traceback (most recent call last)
...
KeyError: 'a'

CC: @sagetrac-sage-combinat

Component: combinatorics

Keywords: word, substitution

Author: Sébastien Labbé

Reviewer: Vincent Delecroix

Merged: sage-4.4.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/8618

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions