First time here? Check out the FAQ!

Ask Your Question
0

How to simplify non-commutative expressions

asked 1 year ago

babyturtle gravatar image

updated 1 year ago

Max Alekseyev gravatar image

So I want to somehow simplify terms like y(y+1)y^-1. These symbols are not commutative so this is a special case where when you expand the y and y^-1 cancel and you are left with (y+1). How do I do this kind of simplification for much larger and uglier expressions. Specifically, I'm trying to simplify stuff from the map x,y,z to xyx^-1, yzy^-1, yz(y+1) repeated over and over again.

Preview: (hide)

3 Answers

Sort by » oldest newest most voted
1

answered 1 year ago

Max Alekseyev gravatar image

Here a possible approach via an algebra over the free group:

F.<yy> = FreeGroup()
A = F.algebra(QQ)
y = A(yy)
yinv = A(yy^-1)
print( y*(y+1)*yinv )
Preview: (hide)
link
0

answered 1 year ago

rburing gravatar image

Here is one tedious way, where we have to homogenize to use the letterplace implementation:

sage: F.<Y,YINV,ONE1,ONE2> = FreeAlgebra(QQ, implementation='letterplace', degrees=[1,1,1,2])
sage: R.<y,yinv,one1,one2> = F.quotient(F*[Y*YINV - ONE2, YINV*Y - ONE2, ONE1*ONE1 - ONE2, Y*ONE1 - ONE1*Y, ONE1*YINV - YINV*ONE1]*F)
sage: y*(y+one1)*yinv
one2*y + one2*one1

If you squint, this is y + 1.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 1 year ago

Seen: 227 times

Last updated: Mar 20 '24