A word is reduced if no symbol appears next to its own inverse
and no symbol has zero power. The essence of the package is to reduce
a word into a reduced form. Thus \(a^2b^{-1}ba\) will
transformed into \(a^3\).
In the package, reduction happens automatically at creation, in
function free()
.
Apart from is_proper()
, the functions all take a free
object, but the meat of the function operates on a single two-row
matrix.
Reduction is carried out by repeatedly consolidating adjacent terms of
identical symbol (function consolidate()
), and removing zero
power terms (function remove_zero_power()
) until the word is in
reduced form (function is_reduced()
).
Function is_proper()
checks to see whether a matrix is suitably
formed for passing to reduce()
.
A free
object is cyclically reduced iff every cyclic
permutation of the word is reduced. A reduced word is cyclically
reduced iff the first letter is not the inverse of the last one. A
reduced word is cyclically reduced if the first and last symbol differ
(irrespective of power) or, if identical, have powers of opposite
sign. For example, abac
and abca
are cyclically reduced
but abca^{-1}
is not. Function is.cyclically.reduced()
tests for this, documented at cycred.Rd
.
Whether the identity should be regarded as cyclically reduced is
problematic. On the one hand the identity cannot be shortened by a
combination of cyclic permutation followed by reduction; but on the
other, I cannot exhibit a symbol at the start of the identity which
can be reduced by juxtaposition with a symbol at the end (because
there are no symbols). Currently it returns NA
but I am open
to suggestions.