Ask Your Question
0

Generating a certain list of non-commuting polynomials with Sage

asked 2023-10-13 00:14:20 +0100

klaaa gravatar image

updated 2023-10-13 00:15:02 +0100

I have a set of variables $x_1,...,x_n$ and $y_1,...,y_m$ for $n,m >=1$.

Now I can build all quadratic monomials of the form $x_i y_j$ and $y_j x_i$ (but we do not have $x_i y_j= y_j x_i$ as we calcualte in the non-commutative polynomial ring). But something like $x_i x_j$ is not allowed as after an $x_i$ there must come an $y_j$ and after an $y_i$ there must come an $x_i$.

Now I want with Sage the list of all possible relations of the form $w_1 \pm w_2 \pm w_3 \cdots$ such that all $w_i$ are different quadratic relations that all start either with a $x_i$ or a $y_j$.

For example for $n=2$ and $m=1$, possible relations are (I hope I did not forget any relation) : $x_1 y_1, x_1 y_1-x_2 y_2, x_1 y_2 + x_2 y_2 , x_2 y_1,y_1 x_1, y_1 x_2, y_1 x_1 - y_1 x_2 , y_1x_1+y_1 x_2$.

I am not sure how to do this in an easy way with Sage, but maybe someone knows a simple trick.

Thanks for any help.

edit retag flag offensive close merge delete

Comments

Please provide a code defining $x_i$ and $y_j$.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-10-13 02:59:15 +0100 )edit

I omitted a formal definition because it is a bit complicated. A formal definition would be to take the connected quiver $Q$ with two points 1 and 2 and arrows $x_i$ from 1 to 2 and arrows $y_i$ from 2 to 1. Then one would have restrictions in the post. One can also work over a non-commutative polynomial ring with the relations $x_i x_j =0$ and $y_i y_j=0$. I am not sure whether there is code to work with quivers like this in sage.

klaaa gravatar imageklaaa ( 2023-10-13 06:43:24 +0100 )edit

For this purpose one could also define $xi$ and $yj$ just as strings probably or formal non-commutative variables in sage to get the needed output. I might use the output mainly to continue to work in GAP, where quivers are available.

klaaa gravatar imageklaaa ( 2023-10-13 06:55:59 +0100 )edit

I understand that you want to work in a ring $R$ where the addition is commutative biut the multiplication is not ; that is :

  • $\forall x,\,y \in R^2,\ x+y=y+x$

  • $\exists x,\,y \in R^2,\ x\cdot y\neq y\cdot x$

Is that right ?

Also : do you consider quadratic monomials such as $x^2,\, x\in R$ ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2023-10-13 10:57:18 +0100 )edit

Your example lists only moinomials and binomials, whereas your definition would also accept trinomials such as $x_1y_1 + x_2y_1 + y_1x_1$ (etc...) and quadrinomials such as $x_1y_1 + x_2y_1 + y_1x_1+ y_1x_2$ (etc).

Could you either :

  • clarify your definition, or

  • complete your example ?

Thanks !

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2023-10-13 12:20:05 +0100 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2023-10-13 20:45:07 +0100

Max Alekseyev gravatar image

Is this what you want?

n=2
m=3
x = [f'x_{i+1}' for i in range(n)]
y = [f'y_{i+1}' for i in range(m)]

xy = [xi+yj for xi in x for yj in y]   # x first, then y

yx = [yj+xi for xi in x for yj in y]    # y first, then x

for t in Tuples((-1..1),len(xy)):
    r = ' '.join([('+' if s>0 else '-')+mon for s,mon in zip(t,xy) if s])
    print(r)

for t in Tuples((-1..1),len(yx)):
    r = ' '.join([('+' if s>0 else '-')+mon for s,mon in zip(t,yx) if s])
    print(r)
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-10-13 00:14:20 +0100

Seen: 119 times

Last updated: Oct 13 '23