Iterator for a free inverse semigroup is broken #536
Labels
bug
Label for issues or PR which report or fix bugs
resolved-pending-release
A label for issues that are resolved pending a release.
It seems that the iterator for free inverse semigroup only returns products of generators that correspond to reduced products in the free group (minus the identity element). In particular, the iterator produces no words in which a generator is adjacent to its inverse, such as a a^-1. See the first 25 elements produced:
Ideally, the iterator should iterate over reduced words ordered by ascending length. I'm not sure what the feasibility of this is, but in any case, it seems like the current iterator will not actually iterate over all reduced words. Yes, the semigroup is infinite, but I would expect that for any particular word, given sufficient time, the word will appear in the iterator. The current behaviour doesn't seem a whole lot more useful than the iterator producing "a, a^2, a^3, ..." as the list of elements.
Furthermore, the code doesn't seem to be doing what is intended. The iterator has record components
seq
,words
, anditer_list
, but these seem to remain unchanged after iterations:Something is clearly not right here.
Furthermore, there is the issue mentioned before, where the code accesses undocumented record components of an iterator of a free group that are not guaranteed to be there. There is a fix for this: we change the
!.word
access to aExtRepOfObj
call for the element that we are interested in. But I think it's more important to get the iterator working correctly in a mathematical sense before changing this.The text was updated successfully, but these errors were encountered: