Ask Your Question

Revision history [back]

Hi,

it seems to me that R.module_morphism for R a parent inheriting from CombinatorialFreeModule does not support a definition on_gens (probably some code by Robert Bradshaw do that but I do not remember where it is in Sage...). So the only current way to define your morphism imply to do some math to get a definition on_basis instead on_gens.

For example, this work but is ugly :


sage: S3 = SymmetricGroup(3) sage: QG = GroupAlgebra(S3, QQ) sage: QG.gens() Finite family {(1,2,3): (1,2,3), (1,2): (1,2)} sage: M_3 = MatrixSpace(QQ, 2) sage: ma = M_3([[0,-1],[1,-1]]) sage: mb = M_3([[1,-1],[0,-1]]) sage: def img_of_perm(p, gens_mat): w = p.reduced_word() R = gens_mat[0].parent() return R.prod([gens_mat[i-1] for i in w]) ....: sage: f = QG.module_morphism(on_basis=lambda x: img_of_perm(x, [ma,mb]), codomain=ma.parent(), category=Algebras(QQ)) sage: f(QG.an_element()) [ 2 -5] [ 2 -3]


Another bug : if you replace category=Algebras(QQ) by category=AlgebrasWithBasis(QQ), you get the error : TypeError: Full MatrixSpace of 2 by 2 dense matrices over Rational Field is not in Category of algebras with basis over Rational Field

In a perfect world, the category should be at least FiniteDimensionnalAlgebraWithBasis(QQ) (because the parents should lies in it if I don't say something false)

The other way is trying to find stuff from Robert to define maps between parents on generators... I am not sure but I think it won't work either because it assume that elements of the two parents are not based on RingElement (old category stuff) and your group algebra is a CombinatorialFreeModule in data structure.

I hope that help a little... Cheers, Nicolas B.

Hi,

it seems to me that R.module_morphism for R a parent inheriting from CombinatorialFreeModule does not support a definition on_gens (probably some code by Robert Bradshaw do that but I do not remember where it is in Sage...). So the only current way to define your morphism imply to do some math to get a definition on_basis instead on_gens.

For example, this work but is ugly :


sage: S3 = SymmetricGroup(3) SymmetricGroup(3)

sage: QG = GroupAlgebra(S3, QQ) sage: QG.gens() QQ)

sage: QG.gens()

Finite family {(1,2,3): (1,2,3), (1,2): (1,2)} (1,2)}

sage: M_3 = MatrixSpace(QQ, 2) 2)

sage: ma = M_3([[0,-1],[1,-1]]) M_3([[0,-1],[1,-1]])

sage: mb = M_3([[1,-1],[0,-1]]) M_3([[1,-1],[0,-1]])

sage: def img_of_perm(p, gens_mat): gens_mat):

w = p.reduced_word()
  R = gens_mat[0].parent()
  return R.prod([gens_mat[i-1] for i in w])

....:

sage: f = QG.module_morphism(on_basis=lambda x: img_of_perm(x, [ma,mb]),

codomain=ma.parent(), category=Algebras(QQ)) sage: f(QG.an_element()) category=Algebras(QQ))

sage: f(QG.an_element())

[ 2 -5] -5]

[ 2 -3]


Another bug : if you replace category=Algebras(QQ) by category=AlgebrasWithBasis(QQ), you get the error : TypeError: Full MatrixSpace of 2 by 2 dense matrices over Rational Field is not in Category of algebras with basis over Rational Field

In a perfect world, the category should be at least FiniteDimensionnalAlgebraWithBasis(QQ) (because the parents should lies in it if I don't say something false)

The other way is trying to find stuff from Robert to define maps between parents on generators... I am not sure but I think it won't work either because it assume that elements of the two parents are not based on RingElement (old category stuff) and your group algebra is a CombinatorialFreeModule in data structure.

anyway, generally, define an algebra homomorphism between a group algebra and a matrix space imply there exist an algorithm to decompose each element of the domain in a polynomial over the algebra generators (I am not very sure it is a prerequisite but I think so...). For the symmetric group, we know how to do that with reduced word but a lot of combinatorial free module in Sage have a method algebra_generators() but do not know how to decompose an element along these algebra generators...

I hope that help a little... Cheers, Nicolas B.

PS : sorry, I did not manage to display nicely this message (which is my first on ask)

Hi,

it seems to me that R.module_morphism for R a parent inheriting from CombinatorialFreeModule does not support a definition on_gens (probably some code by Robert Bradshaw do that but I do not remember where it is in Sage...). So the only current way to define your morphism imply to do some math to get a definition on_basis instead on_gens.

For example, this work but is ugly :

sage: S3 = SymmetricGroup(3)

SymmetricGroup(3) sage: QG = GroupAlgebra(S3, QQ)

sage: QG.gens()

QQ) sage: QG.gens() Finite family {(1,2,3): (1,2,3), (1,2): (1,2)}

(1,2)} sage: M_3 = MatrixSpace(QQ, 2)

2) sage: ma = M_3([[0,-1],[1,-1]])

M_3([[0,-1],[1,-1]]) sage: mb = M_3([[1,-1],[0,-1]])

M_3([[1,-1],[0,-1]]) sage: def img_of_perm(p, gens_mat):

gens_mat):
    w = p.reduced_word()
  R = gens_mat[0].parent()
  return R.prod([gens_mat[i-1] for i in w])

....:

sage: f = QG.module_morphism(on_basis=lambda x: img_of_perm(x, [ma,mb]),

codomain=ma.parent(), category=Algebras(QQ))

sage: f(QG.an_element())

category=Algebras(QQ)) sage: f(QG.an_element()) [ 2 -5]

-5] [ 2 -3]

-3]

Another bug : if you replace category=Algebras(QQ) by category=AlgebrasWithBasis(QQ), you get the error : TypeError: Full MatrixSpace of 2 by 2 dense matrices over Rational Field is not in Category of algebras with basis over Rational Field

In a perfect world, the category should be at least FiniteDimensionnalAlgebraWithBasis(QQ) (because the parents should lies in it if I don't say something false)

The other way is trying to find stuff from Robert to define maps between parents on generators... I am not sure but I think it won't work either because it assume that elements of the two parents are not based on RingElement (old category stuff) and your group algebra is a CombinatorialFreeModule in data structure.

anyway, generally, define an algebra homomorphism between a group algebra and a matrix space imply there exist an algorithm to decompose each element of the domain in a polynomial over the algebra generators (I am not very sure it is a prerequisite but I think so...). For the symmetric group, we know how to do that with reduced word but a lot of combinatorial free module in Sage have a method algebra_generators() but do not know how to decompose an element along these algebra generators...

I hope that help a little... Cheers, little...

Cheers,

Nicolas B.

PS : sorry, I did not manage to display nicely this message (which is my first on ask)

Hi,

it seems to me that R.module_morphism for R a parent inheriting from CombinatorialFreeModule does not support a definition on_gens (probably some code by Robert Bradshaw do that but I do not remember where it is in Sage...). So the only current way to define your morphism imply to do some math to get a definition on_basis instead on_gens.

For example, this work but is ugly :

sage: S3 = SymmetricGroup(3)
sage: QG = GroupAlgebra(S3, QQ)
sage: QG.gens()
Finite family {(1,2,3): (1,2,3), (1,2): (1,2)}
sage: M_3 = MatrixSpace(QQ, 2)
sage: ma = M_3([[0,-1],[1,-1]])
sage: mb = M_3([[1,-1],[0,-1]])
sage: def img_of_perm(p, gens_mat):
    w = p.reduced_word()
    R = gens_mat[0].parent()
    return R.prod([gens_mat[i-1] for i in w])
....: 
sage: f = QG.module_morphism(on_basis=lambda x: img_of_perm(x, [ma,mb]), 
codomain=ma.parent(), category=Algebras(QQ))
sage: f(QG.an_element())    
[ 2 -5]
[ 2 -3]

Another bug : if you replace category=Algebras(QQ) by category=AlgebrasWithBasis(QQ), you get the error : TypeError: Full MatrixSpace of 2 by 2 dense matrices over Rational Field is not in Category of algebras with basis over Rational Field

In a perfect world, the category should be at least FiniteDimensionnalAlgebraWithBasis(QQ) (because the parents should lies in it if I don't say something false)

The other way is trying to find stuff from Robert to define maps between parents on generators... I am not sure but I think it won't work either because it assume that elements of the two parents are not based on RingElement (old category stuff) and your group algebra is a CombinatorialFreeModule in data structure.

anyway, generally, define an algebra homomorphism between a group algebra and a matrix space imply implies there exist an algorithm to decompose each element of the domain in a polynomial over the algebra generators (I am not very sure it is a prerequisite but I think so...). For the symmetric group, we know how to do that with reduced word but a lot of combinatorial free module in Sage have a method algebra_generators() but do not know how to decompose an element along these algebra generators...

GAP do probably that very well but I also never tried (GAP knows how to decompose a group element along group generators...).

I hope that help a little...

Cheers,

Nicolas B.