Ask Your Question
2

Matrix Group over Symbolic Ring

asked 2018-02-05 05:31:14 +0100

dimahphone gravatar image

updated 2023-05-19 14:29:56 +0100

FrédéricC gravatar image

I have problem on generate matrix group over symbolic ring.

First, I define

eta=I;
eta2=(1+I)*sqrt(2)/2;

Then, define a generator matrix

T=matrix(SR,4,[eta**(i*j)*eta2/2 for i in range(4) for j in range(4)]);

I try to make a matrix group by

G=MatrixGroup(T);

What I get is only very long computation that does not give any result. Can somebody help me? Thank you very much.

I have checked the order of T, I got 8 since T**8=I where I is identity matrix.

edit retag flag offensive close merge delete

Comments

I've tried instead:

sage: K.<a> = QuadraticField( -1 )
sage: R.<X> = K[]
sage: L.<b> =K.extension( X^2 - 2 )
sage: eta = a
sage: eta2 = (1+a)*b/2
sage: T = matrix(L, 4, [eta**(k*kk)*eta2/2 for k in range(4) for kk in range(4)])
sage: T^8
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
sage: G = MatrixGroup(T)

running into NotImplementedError: Currently, only simple algebraic extensions are implemented in gap. Well... Perhaps gap cannot digest the input in both cases.

Which is the "real need"? Depending on it, the "other way to get the result" may be simpler or more complicated. In the above case one can use block matrices representing $\sqrt{-1}$ and $\sqrt 2$ as commuting $2\times 2$ matrices. If such cases are enough, i will write the code.

dan_fulea gravatar imagedan_fulea ( 2018-02-05 12:23:28 +0100 )edit

Do you mean "real need" is what I need on that code? Sorry if I am wrong understanding your comment.

dimahphone gravatar imagedimahphone ( 2018-03-07 02:12:59 +0100 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2018-04-09 06:26:45 +0100

dimahphone gravatar image

Case closed, I finally use CyclotomicField(8) and it works.

edit flag offensive delete link more

Comments

2

@dimahphone -- You can accept your answer by clicking on the accept (tick mark) button, so that this will appear as the accepted answer, and the question will appear as solved in the list of questions.

slelievre gravatar imageslelievre ( 2018-04-09 09:25:14 +0100 )edit
1

answered 2018-02-05 22:09:37 +0100

slelievre gravatar image

Whenever possible, avoid working with Sage's symbolic ring.

Here, you can use the symbolic ring as an intermediate step but move to QQbar.

This will make your code work. So you could start as you did:

sage: eta = I
sage: eta2 = (1+I)*sqrt(2)/2

then instead of defining

sage: T = matrix(SR, 4, [eta**(i*j)*eta2/2 for i in range(4) for j in range(4)])

you could define

sage: T = matrix(QQbar, 4, [eta**(i*j)*eta2/2 for i in range(4) for j in range(4)])

And then things work.

sage: G = MatrixGroup(T)
sage: G
Matrix group over Algebraic Field with 1 generators (
[ 0.3535533905932738? + 0.3535533905932738?*I  0.3535533905932738? + 0.3535533905932738?*I  0.3535533905932738? + 0.3535533905932738?*I  0.3535533905932738? + 0.3535533905932738?*I]
[ 0.3535533905932738? + 0.3535533905932738?*I -0.3535533905932738? + 0.3535533905932738?*I -0.3535533905932738? - 0.3535533905932738?*I  0.3535533905932738? - 0.3535533905932738?*I]
[ 0.3535533905932738? + 0.3535533905932738?*I -0.3535533905932738? - 0.3535533905932738?*I  0.3535533905932738? + 0.3535533905932738?*I -0.3535533905932738? - 0.3535533905932738?*I]
[ 0.3535533905932738? + 0.3535533905932738?*I  0.3535533905932738? - 0.3535533905932738?*I -0.3535533905932738? - 0.3535533905932738?*I -0.3535533905932738? + 0.3535533905932738?*I]
)

Calculations in QQbar are exact and efficient.

If you need to see the radical expression of an element in QQbar (if it has one), use .radical_expression().

For example:

sage: T[0,0].radical_expression()
1/2*(-1)^(1/4)
edit flag offensive delete link more

Comments

Thank you for the suggestion. It works. But, I still have problem when I use QQbar. I can not do anything for groups I get. For example, I can not know the element order of the group. By hand, I get that the order is 8. Do you have any suggestion? Thank you very much. Sorry if it disturbs your time.

dimahphone gravatar imagedimahphone ( 2018-02-06 07:55:16 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-02-05 05:31:14 +0100

Seen: 678 times

Last updated: May 30 '18