ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 07 Dec 2010 21:34:22 +0100Noncommuting variableshttps://ask.sagemath.org/question/7784/noncommuting-variables/I am extremely new to Sage, and even newer to this site, so I apologize if anything is not up to standards.
I am dealing with a multivariable polynomial ring over $\mathbb{Z}$ with noncommuting variables. Is there a way to implement this with Sage? The closest thing I have found is FreeAlgebra, where the variables are noncommutative, but I have not found any way to impose relations that I want.
As stated before, I am extremely new to all of this so don't assume that I know anything, and don't hesitate to give any and all suggestions.Mon, 06 Dec 2010 21:53:32 +0100https://ask.sagemath.org/question/7784/noncommuting-variables/Answer by niles for <p>I am extremely new to Sage, and even newer to this site, so I apologize if anything is not up to standards. </p>
<p>I am dealing with a multivariable polynomial ring over $\mathbb{Z}$ with noncommuting variables. Is there a way to implement this with Sage? The closest thing I have found is FreeAlgebra, where the variables are noncommutative, but I have not found any way to impose relations that I want.</p>
<p>As stated before, I am extremely new to all of this so don't assume that I know anything, and don't hesitate to give any and all suggestions.</p>
https://ask.sagemath.org/question/7784/noncommuting-variables/?answer=11824#post-id-11824Perhaps `FreeAlgebraQuotient` will be useful? Here's the first part of the docstring:
sage: FreeAlgebraQuotient?
Type: type
Base Class: <type 'type'>
String Form: <class 'sage.algebras.free_algebra_quotient.FreeAlgebraQuotient'>
Namespace: Interactive
File: /Applications/sage/local/lib/python2.6/site-packages/sage/algebras/free_algebra_quotient.py
Definition: FreeAlgebraQuotient(self, x)
Docstring:
Returns a quotient algebra defined via the action of a free algebra
A on a (finitely generated) free module. The input for the quotient
algebra is a list of monomials (in the underlying monoid for A)
which form a free basis for the module of A, and a list of
matrices, which give the action of the free generators of A on this
monomial basis.
EXAMPLES:
Quaternion algebra defined in terms of three generators:
sage: n = 3
sage: A = FreeAlgebra(QQ,n,'i')
sage: F = A.monoid()
sage: i, j, k = F.gens()
sage: mons = [ F(1), i, j, k ]
sage: M = MatrixSpace(QQ,4)
sage: mats = [M([0,1,0,0, -1,0,0,0, 0,0,0,-1, 0,0,1,0]), M([0,0,1,0, 0,0,0,1, -1,0,0,0, 0,-1,0,0]), M([0,0,0,1, 0,0,-1,0, 0,1,0,0, -1,0,0,0]) ]
sage: H3.<i,j,k> = FreeAlgebraQuotient(A,mons,mats)
sage: x = 1 + i + j + k
sage: x
1 + i + j + k
sage: x**128
-170141183460469231731687303715884105728 + 170141183460469231731687303715884105728*i + 170141183460469231731687303715884105728*j + 170141183460469231731687303715884105728*k
Mon, 06 Dec 2010 22:30:47 +0100https://ask.sagemath.org/question/7784/noncommuting-variables/?answer=11824#post-id-11824Comment by Eric A Bunch for <p>Perhaps <code>FreeAlgebraQuotient</code> will be useful? Here's the first part of the docstring:</p>
<pre><code>sage: FreeAlgebraQuotient?
Type: type
Base Class: <type 'type'>
String Form: <class 'sage.algebras.free_algebra_quotient.FreeAlgebraQuotient'>
Namespace: Interactive
File: /Applications/sage/local/lib/python2.6/site-packages/sage/algebras/free_algebra_quotient.py
Definition: FreeAlgebraQuotient(self, x)
Docstring:
Returns a quotient algebra defined via the action of a free algebra
A on a (finitely generated) free module. The input for the quotient
algebra is a list of monomials (in the underlying monoid for A)
which form a free basis for the module of A, and a list of
matrices, which give the action of the free generators of A on this
monomial basis.
EXAMPLES:
Quaternion algebra defined in terms of three generators:
sage: n = 3
sage: A = FreeAlgebra(QQ,n,'i')
sage: F = A.monoid()
sage: i, j, k = F.gens()
sage: mons = [ F(1), i, j, k ]
sage: M = MatrixSpace(QQ,4)
sage: mats = [M([0,1,0,0, -1,0,0,0, 0,0,0,-1, 0,0,1,0]), M([0,0,1,0, 0,0,0,1, -1,0,0,0, 0,-1,0,0]), M([0,0,0,1, 0,0,-1,0, 0,1,0,0, -1,0,0,0]) ]
sage: H3.<i,j,k> = FreeAlgebraQuotient(A,mons,mats)
sage: x = 1 + i + j + k
sage: x
1 + i + j + k
sage: x**128
-170141183460469231731687303715884105728 + 170141183460469231731687303715884105728*i + 170141183460469231731687303715884105728*j + 170141183460469231731687303715884105728*k
</code></pre>
https://ask.sagemath.org/question/7784/noncommuting-variables/?comment=22438#post-id-22438Thanks! This is just the thingTue, 07 Dec 2010 21:34:22 +0100https://ask.sagemath.org/question/7784/noncommuting-variables/?comment=22438#post-id-22438