ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 06 May 2016 22:37:12 -0500Confused about FreeAlgebra quotientshttps://ask.sagemath.org/question/32178/confused-about-freealgebra-quotients/I think I'm misunderstanding how quotients of free algebras work. I tried to make a free algebra on two generators x, y and mod out by xy = yx, so you get a polynomial algebra -- but that's not what happened.
<pre><code>sage: R.<x,y> = FreeAlgebra(QQ)
sage: I = R*[x*y-y*x]*R
sage: Q.<a,b> = R.quo(I)
sage: a*b is b*a
False
sage: Q.is_commutative()
False</code></pre>
Relatedly, the documentation for free_module_quotient gives an example (constructing the quaternions as a free quotient):
<pre><code>sage: n = 2
sage: A = FreeAlgebra(QQ,n,'x')
sage: F = A.monoid()
sage: i, j = F.gens()
sage: mons = [ F(1), i, j, i*j ]
sage: r = len(mons)
sage: M = MatrixSpace(QQ,r)
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]) ]
sage: H2.<i,j> = A.quotient(mons,mats)
</code></pre>
but I'm confused exactly how the matrices in the penultimate line describe the (multiplication) action? I.e. if I have some relation, say x^2 = 0, that I want to mod out by, how do I accomplish that using matrices?Tue, 12 Jan 2016 17:03:58 -0600https://ask.sagemath.org/question/32178/confused-about-freealgebra-quotients/Comment by vdelecroix for <p>I think I'm misunderstanding how quotients of free algebras work. I tried to make a free algebra on two generators x, y and mod out by xy = yx, so you get a polynomial algebra -- but that's not what happened.</p>
<pre><code>sage: R.<x,y> = FreeAlgebra(QQ)
sage: I = R*[x*y-y*x]*R
sage: Q.<a,b> = R.quo(I)
sage: a*b is b*a
False
sage: Q.is_commutative()
False</code></pre>
<p>Relatedly, the documentation for free_module_quotient gives an example (constructing the quaternions as a free quotient):</p>
<pre><code>sage: n = 2
sage: A = FreeAlgebra(QQ,n,'x')
sage: F = A.monoid()
sage: i, j = F.gens()
sage: mons = [ F(1), i, j, i*j ]
sage: r = len(mons)
sage: M = MatrixSpace(QQ,r)
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]) ]
sage: H2.<i,j> = A.quotient(mons,mats)
</code></pre>
<p>but I'm confused exactly how the matrices in the penultimate line describe the (multiplication) action? I.e. if I have some relation, say x^2 = 0, that I want to mod out by, how do I accomplish that using matrices?</p>
https://ask.sagemath.org/question/32178/confused-about-freealgebra-quotients/?comment=32179#post-id-32179small remark: you should not use "is" for testing equality as it does something else
sage: (3*2) is (3*2)
FalseTue, 12 Jan 2016 19:30:13 -0600https://ask.sagemath.org/question/32178/confused-about-freealgebra-quotients/?comment=32179#post-id-32179Answer by vdelecroix for <p>I think I'm misunderstanding how quotients of free algebras work. I tried to make a free algebra on two generators x, y and mod out by xy = yx, so you get a polynomial algebra -- but that's not what happened.</p>
<pre><code>sage: R.<x,y> = FreeAlgebra(QQ)
sage: I = R*[x*y-y*x]*R
sage: Q.<a,b> = R.quo(I)
sage: a*b is b*a
False
sage: Q.is_commutative()
False</code></pre>
<p>Relatedly, the documentation for free_module_quotient gives an example (constructing the quaternions as a free quotient):</p>
<pre><code>sage: n = 2
sage: A = FreeAlgebra(QQ,n,'x')
sage: F = A.monoid()
sage: i, j = F.gens()
sage: mons = [ F(1), i, j, i*j ]
sage: r = len(mons)
sage: M = MatrixSpace(QQ,r)
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]) ]
sage: H2.<i,j> = A.quotient(mons,mats)
</code></pre>
<p>but I'm confused exactly how the matrices in the penultimate line describe the (multiplication) action? I.e. if I have some relation, say x^2 = 0, that I want to mod out by, how do I accomplish that using matrices?</p>
https://ask.sagemath.org/question/32178/confused-about-freealgebra-quotients/?answer=32180#post-id-32180It looks like a bug to me. However it seems to work as follows (the example in the documentation uses it)
sage: R.<x,y> = FreeAlgebra(QQ, implementation='letterplace')
sage: I = R*[x*y-y*x]*R
sage: Q.<a,b> = R.quo(I)
sage: a*b
b*a
sage: a*a*b == a*b*a == b*a*a
True
sage: Q.is_commutative()
TrueTue, 12 Jan 2016 19:32:07 -0600https://ask.sagemath.org/question/32178/confused-about-freealgebra-quotients/?answer=32180#post-id-32180Comment by Waldeck for <p>It looks like a bug to me. However it seems to work as follows (the example in the documentation uses it)</p>
<pre><code>sage: R.<x,y> = FreeAlgebra(QQ, implementation='letterplace')
sage: I = R*[x*y-y*x]*R
sage: Q.<a,b> = R.quo(I)
sage: a*b
b*a
sage: a*a*b == a*b*a == b*a*a
True
sage: Q.is_commutative()
True
</code></pre>
https://ask.sagemath.org/question/32178/confused-about-freealgebra-quotients/?comment=33338#post-id-33338letterplace is a completely different implementation of FreeAlgebras which emulates noncommutative homogeneous polynomials as commutative polynomials using Singular. It sure works well, but it has some limitations, for instance the elements of the FreeAlgebra aren't callable and hence substitutions won't work. On the other hand, if the described behaviour of the non letterplace implementation is not a bug, then one might ast what are such quotients good for? In any case, it is desirable that both implementations maintained a good compatibility level with each other.Fri, 06 May 2016 22:37:12 -0500https://ask.sagemath.org/question/32178/confused-about-freealgebra-quotients/?comment=33338#post-id-33338