RobinHankin / freegroup

The free group in R
https://robinhankin.github.io/freegroup/
0 stars 0 forks source link

bug in is.cyclically.reduced() #2

Closed RobinHankin closed 6 years ago

RobinHankin commented 6 years ago

Function is.cyclically.reduced() does not cope with the identity:

R> is.cyclically.reduced(as.free(0))
Error in o[1, 1] : subscript out of bounds  
R> is.cyclically.reduced2(as.free(0))  
Error in o[1, 1] : subscript out of bounds  
R> 
RobinHankin commented 6 years ago

It is not clear to me whether the identity should be regarded as cyclically reduced or not.

RobinHankin commented 6 years ago

Also:

> is.cyclically.reduced(as.free('x'))
[1] FALSE
> 

oh dear.

RobinHankin commented 6 years ago

Opening this issue again: abca is cyclically reduced; aabcda^{-1} is not. So a is cyclically reduced. This is now correctly coded up following 811212a but there is no testing of it in tests/aaa.R.