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 Mar 2023 08:19:07 +0100Matrices as MatrixGroupElements - coercion errorhttps://ask.sagemath.org/question/66824/matrices-as-matrixgroupelements-coercion-error/How does one transform a matrix over GF(q^2) into an element of a matrix group? Specifically, how to get access to the base field of SU(3, q), which is GF(q^2)?
Consider the following script:
from sage.all import *
q = 3
f0 = GF(q)
f = GF(q**2, 'x')
x = f('x')
z = f0(0)
e = f0(1)
g = SU(3, q)
y = x**2
print(y==-y**q)
a = matrix([[e, z, y], [z, e, z], [z, z, e]])
print(g(a))
The output is
True
[ 1 0 x + 1]
[ 0 1 0]
[ 0 0 1]
followed by
TypeError: unable to coerce from a finite field other than the prime subfield
with a rather deep stacktrace.
My initial guess was that the problem is that I specialized 'x' as the generator for GF(q^2), but changing this to
f = GF(q**2)
x = f.gens()[0]
produces the same result.
How to get around this?Andrei SmolenskyTue, 07 Mar 2023 08:19:07 +0100https://ask.sagemath.org/question/66824/Group elements in terms of its generatorshttps://ask.sagemath.org/question/57021/group-elements-in-terms-of-its-generators/I created a permutation group with generators [(4,5,6,7,8), (1,2,3)]. The order of this group is shown as 15. **c,f** in Cayley_table() corresponds to these generators. Is there a way to print these 15 elements a,b,c.....m,n,o in terms of these generators c,f? Anoop S K MSat, 08 May 2021 12:52:22 +0200https://ask.sagemath.org/question/57021/