x^^-1 . x . y . x . y
simplifies to
x^^-1 . (x . y)^^2
instead of
y . x . y
But the following work correctly:
x^^-1 . x . y . x . y . y
=> y . x . y^^2
(x^^-1 . x . y) . x . y
=> y . x . y
y . x . y . x . x^^-1
------------------------------------------------
A consequence of the above (this was the original
problem I ran into):
x^^-1 . (x . y)^^2
expand(%) returns it unchanged. OK
expand(%), dotexptsimp:false returns
x^^-1 . x . y . x . y
and now expand(%) gives
x^^-1 . (x . y)^^2
instead of
y . x . y
Hmm. So how do I simplify this to y.x.y?
---------------------------------------------
Compare this to
x^^-1 . (x . y)^^2 . y^^-1
and
(x . y . x^^-1)^^2
and
y . (x . y)^^-1
and
(x . y)^^-1 . x
for all of which the sequence expand/dotexptsimp:false
then expand performs the expected cancellation.
----------------------------------------
The problem is that simpnct simplifies from right to left,
so that by the time it sees x^^-1 . x . y...., that has
already become x^^-1 . (x . y)^^2, which it doesn't
currently simplify.
The quick fix is to special-case this in simpnct, but it's a
bit messy....
Logged In: YES
user_id=588346
For commutative terms, there is a simple canonical form in
Maxima. But there is no canonical form for non-commutative
terms. I wonder if by default the simplifer should canonicalize
them.
Currently, for example, (a.b.a^^-1)^^2 and a.b^^2 .a^^-1
(which are equivalent): both currently simplify to themselves.
But if we canonicalize to the second one (following the rule
that all possible cancellations have been carried out), we lose
the structure shown in the first case.