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, 25 Jul 2017 00:26:12 +0200Group action in sagehttps://ask.sagemath.org/question/38363/group-action-in-sage/I want to define a group action in sage. The group is a direct product of two general linear groups. The set under action is of matrices and the action is $(A,B) (M)=A^{-1}MB$. Assume all matrices have compatible sizes in order for multiplication.
I might need a stabelizer later so I was thinking doing it in GAP but could not figure out how. Any suggestions?Sat, 22 Jul 2017 20:33:12 +0200https://ask.sagemath.org/question/38363/group-action-in-sage/Comment by dan_fulea for <p>I want to define a group action in sage. The group is a direct product of two general linear groups. The set under action is of matrices and the action is $(A,B) (M)=A^{-1}MB$. Assume all matrices have compatible sizes in order for multiplication.
I might need a stabelizer later so I was thinking doing it in GAP but could not figure out how. Any suggestions?</p>
https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38369#post-id-38369The group $G_A$ of all "$A$-matices" is commuting (elementwise) with the corresponding $G_B$? Is $G_A$ commutative?
Since we expect (for a left action):
$$(A_1A_2)^{-1}(B_1B2)\ M =(A_1A_2,B_1B_2)\ M=((A_1,B_1)(A_2,B_2))\ M$$
$$\qquad =(A_1,B_1)\ ((A_2,B_2)M)=(A_1,B_1)\ A_2^{-1}B_2M =A_1^{-1}B_1\ A_2^{-1}B_2M $$
Is it ok to get the $G_A$-stabilizer of the $G_B$-stabilizer of the relevant set $X_M$ of considered "$M$-matrices" ?Sun, 23 Jul 2017 18:01:05 +0200https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38369#post-id-38369Comment by upendra.kapshikar for <p>I want to define a group action in sage. The group is a direct product of two general linear groups. The set under action is of matrices and the action is $(A,B) (M)=A^{-1}MB$. Assume all matrices have compatible sizes in order for multiplication.
I might need a stabelizer later so I was thinking doing it in GAP but could not figure out how. Any suggestions?</p>
https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38370#post-id-38370@dan_fulea $G_{A}$ is not commutative . Sorry I made a mistake while posting. The definition of action is now corrected. I have defined a function *action* of the direct product group on space of matrices which produces the required output. Now if you can guide how to get that stabilizer that would be great.Sun, 23 Jul 2017 19:15:46 +0200https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38370#post-id-38370Comment by dan_fulea for <p>I want to define a group action in sage. The group is a direct product of two general linear groups. The set under action is of matrices and the action is $(A,B) (M)=A^{-1}MB$. Assume all matrices have compatible sizes in order for multiplication.
I might need a stabelizer later so I was thinking doing it in GAP but could not figure out how. Any suggestions?</p>
https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38374#post-id-38374Please explain again which is the frame and the point of the question:
(1) Which are exactly the matrix spaces? All matrices $A,B,M$ are of the shape $n\times n$? Or $M$ is of shape $k\times n$ and $A,B$ *square* matrices of type $k\times k$ and $n\times n$?
(2) Mathematical issue: Is the action a left action? (Using usual matrix multiplications, not the "opposite ones".)
(3) We *fix* $A,B$ and look for all matrices $M$ satisfying
$$ A^{-1}MB=M\ ?$$
If yes, do we really need the group action, as the question was mainly stated?
(4) The above stabilizing condition is equivalent to $MB=AM$. This is a linear equation that we may solve in `sage`, but maybe $A,B$ should be given explicitly. Is this the question, the only one (i imagine) we can attack using `sage`.Mon, 24 Jul 2017 13:09:07 +0200https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38374#post-id-38374Comment by upendra.kapshikar for <p>I want to define a group action in sage. The group is a direct product of two general linear groups. The set under action is of matrices and the action is $(A,B) (M)=A^{-1}MB$. Assume all matrices have compatible sizes in order for multiplication.
I might need a stabelizer later so I was thinking doing it in GAP but could not figure out how. Any suggestions?</p>
https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38375#post-id-38375@dan_fulea M is of shape k×n and A,B square matrices of type k×k and n×n. The group is $GL(k,F_{q})$ direct product with $GL(n,F_{q})$ which acts on space of k×n matrices as defined above. I need a stabelizer i.e all the pairs $(A,B) \in GL(k,F_{q}) \times GL(n,F_{q})$ for a fixed M. I think what you stated with points 3 and 4 gives different thing than this.Mon, 24 Jul 2017 14:21:02 +0200https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38375#post-id-38375Comment by dan_fulea for <p>I want to define a group action in sage. The group is a direct product of two general linear groups. The set under action is of matrices and the action is $(A,B) (M)=A^{-1}MB$. Assume all matrices have compatible sizes in order for multiplication.
I might need a stabelizer later so I was thinking doing it in GAP but could not figure out how. Any suggestions?</p>
https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38385#post-id-38385Thanks, this is a statement we can live with! WLOG $k\le n$. Then we reduce $M$, of rank $r\le k\le n$ to a block matrix $X=X(r)$ of the shape $(r+(k-r))\times(r+(k-r)+(n-k))$
I 0 0
0 0 0
because for some invertible matrices $S,T$ we have $M=SXT$, so that $AM=MB$ becomes $ASXT=SXTB$, i.e. $$\underbrace{S^{-1}AS}_{A'}\ X=X\ \underbrace{TBT^{-1}}_{B'}$$and we replace $(A,B)$ by $(A',B')$, getting a controlled conjugated group. So let $M=X$. Then we write $A,B$ in blocks such that we can multiply
[ A11 A12 ] [ I 0 0 ]
[ A21 A22 ] [ 0 0 0 ]
and
[ I 0 0 ] [ B11 B12 B13 ]
[ 0 0 0 ] [ B21 B22 B23 ]
[ 0 0 0 ] [ B31 B32 B33 ]
... so $A_{11}=B_{11}$, $A_{21}=0$, $B_{12}=0$, $B_{13}=0$. The parabolic groups
* * and * 0 0
0 * * * *
* * *Mon, 24 Jul 2017 21:02:22 +0200https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38385#post-id-38385Comment by dan_fulea for <p>I want to define a group action in sage. The group is a direct product of two general linear groups. The set under action is of matrices and the action is $(A,B) (M)=A^{-1}MB$. Assume all matrices have compatible sizes in order for multiplication.
I might need a stabelizer later so I was thinking doing it in GAP but could not figure out how. Any suggestions?</p>
https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38394#post-id-38394... are then the groups for the $A$-matrices and the $B$-matrices.
One can write code for this over finite fields to check the shape, or at least the cardinality.
We expect in the case:
p, k, n = 3, 2, 3
F = GF(p)
GA = GL(k,F)
GB = GL(n,F)
X = matrix( F, 2,3, [ 1,0,0, 0,0,0 ] )
count = sum( [ 1
for A in GA
for B in GB
if A.matrix() * X == X * B.matrix() ] )
print count
a count of
$$\frac 1{p-1}\cdot (p-1)p(p-1)\cdot (p-1)p^2(p^2-1)(p^2-p)\ .$$
The denominator $p-1$ stays for the doubly counted elements $A_{11}$ and $B_{11}$.
And indeed, the `count` above is the same as the theoretical value:
sage: count
5184
sage: (p-1)*p*(p-1) * (p-1)*p^2*(p^2-1)*(p^2-p) / (p-1)
5184Tue, 25 Jul 2017 00:26:12 +0200https://ask.sagemath.org/question/38363/group-action-in-sage/?comment=38394#post-id-38394