RobinHankin / freegroup

The free group in R
0 stars 0 forks source link

backwards() is an involution #36

Closed RobinHankin closed 8 months ago

RobinHankin commented 1 year ago
library("freegroup")
#> Loading required package: magrittr
#> Loading required package: plyr
#> 
#> Attaching package: 'freegroup'
#> The following object is masked from 'package:plyr':
#> 
#>     id
(x <- rfree())
#> [1] c^-6.b^-1          d^4.b^-1.d         c^3.a^-1.b^-1.a^2  a^-3.d^-2.c^3.b^3 
#> [5] b^-3.d^6.c^3       c^-3.b^-1.c^2.a^-1 d^4.a^2.c^-2
all(backwards(backwards(x)) == x)
#> [1] TRUE

. . . and it would be nice to mention this in the docs somewhere (the clifford package has a manpage for involutions)