-
-
Notifications
You must be signed in to change notification settings - Fork 701
Description
Steps To Reproduce
Running
m = WordMorphism('0->01,1->10')
Word('000') in m.language(3,Word('000'))
return False, but it should return True. The problem is that the system with this morphism and this axiom (Word('000')) is not extendable, and the algorithm does not account for this.
Word('010101') in m.language(6,Word('000'))
should also give True, but returns False.
Expected Behavior
The expected behaviour is the one given by the doc of WordMorphism lanuage method:
Given a non-erasing substitution s and a word u the DOL-language generated by s and u is the union of the factors of s^n(u) where n is a nonnegative integer.
Actual Behavior
The implementation fails when the parameter u is chosen such that the D0L language is not extendable: there are elements that fail to be extendable to right or left. In the example given, the Thue-Morse morphism, the cubes are not extendable, but they are introduced by u=Word('000').
Additional Information
No response
Environment
- OS: Linux
- Sage Version: 10.6
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide