2021-05-02 23:27:51 +0100 received badge ● Notable Question (source) 2021-05-02 23:27:51 +0100 received badge ● Popular Question (source) 2020-10-12 18:00:15 +0100 received badge ● Notable Question (source) 2020-05-30 06:35:59 +0100 received badge ● Popular Question (source) 2018-01-15 18:06:19 +0100 commented answer Eigenvalues of hecke operators @dan_fulea, I have one more issue actually, the above method doesn't seem to work for all matrices. For example, the matrix $T_2$ for $N=41$ is $\begin{pmatrix} -1 & -1 & 0 \ 0 & 2 & 2 \ 2& 1/2& -2 \end{pmatrix}$, and if I take a number field over it's minimum polynomial, and I change the basis of the matrix (exactly as earlier) I get an error when I ask for the eigenvalues : 'need a real or complex embedding to convert a non rational element of a number field into an algebraic number'. I am afraid there is a deeper mathematical problem here, but maybe you know what is happening here. 2018-01-15 14:19:41 +0100 commented answer Eigenvalues of hecke operators Ah I didn't see your comment before. But still, change_ring() doesn't always seems to work. But the other solution is also ok. Thanks a lot! 2018-01-15 14:11:38 +0100 received badge ● Scholar (source) 2018-01-15 14:00:44 +0100 commented answer Eigenvalues of hecke operators Ok, I guess I solved it by just saying matrix(K,2,2,[T2[i] for i in srange(2)]) 2018-01-15 13:48:45 +0100 commented answer Eigenvalues of hecke operators Yes this is what I need. Only thing is that my matrices come out of some algorithm, so I would like to transform them into matrices over $K$, instead of construct them as above. So given some matrix, how do I change the ring. change_ring doesn't seem to do the trick. I could just put the entries into matrix() one by one again, but is there a more direct way? 2018-01-15 11:35:04 +0100 commented answer Eigenvalues of hecke operators And what I am also wondering, if I have any matrix, (for instance T2) could I make the Jordan Form in terms of 'a'. You did this here, but it only works because you are working with CuspForms. But could we do this more generally? 2018-01-15 11:21:33 +0100 received badge ● Supporter (source) 2018-01-15 11:21:23 +0100 commented answer Eigenvalues of hecke operators Thank you for the long answer! I am afraid it does not completely solve my problem, but it is still interesting. The thing is that my matrices don't come from Sage, but from my own code that computes a basis of the homology and it's hecke operators (which is the purpose of my project), which corresponds to a basis of the cusp forms. So I am trying to make something independent of the command CuspForms. The slightly cryptical sentence I have edited now, hopefully it makes more sense. 2018-01-14 11:22:02 +0100 received badge ● Student (source) 2018-01-13 15:08:44 +0100 received badge ● Organizer (source) 2018-01-13 11:34:15 +0100 received badge ● Editor (source) 2018-01-13 11:32:29 +0100 asked a question Eigenvalues of hecke operators For a project I am trying to build a program that computes a basis for cusp forms of weight 2 over $\Gamma_0(N)$. At one point, I want to represent eigenvalues of multiple Hecke operators. For example, (for $N=23$) I have found the following matrices for the Hecke operators: $T_2=\begin{pmatrix} -2 & -1/2 ; 2 & 1 \end{pmatrix}, T_3=\begin{pmatrix} 3 & 1 ; -4 & -3 \end{pmatrix} \quad T_5=\begin{pmatrix} -2 & -1/2 ; 2 & 1 \end{pmatrix} \quad$ so we have the following characteristic polynomials $f_2=x^2+x-1$, $f_3=x^2-5$, $f_5=x^2 +2x-4$. Suppose we denote the solution of $f_2$ (eigenvalues of $T_2$) by $a$ and it's conjugate. Then we can denote the solution of $f_3$ by $2a+1$ and of $f_5$ by $2a$. I am trying to figure out how I can 'make' Sage represent these eigenvalues in this way. Say I have found these matrices above, I can create k.< a >=NumberField(x^2+x-1), then $a$ represents the root of the polynomial. So the question for me is, how can I make Sage give me the eigenvalues of $T_3$ and $T_5$ in terms of $a$? Furthermore, I am wondering how to get the jordan normal form of $T_2$, or eigenmatrix in terms of $a$. If I ask for jordan_form, I get an error, and if I ask for eigenmatrix_right, I only get a numerical expression. Remark: A little context, the goal for this project is to represent newforms in a similar way as Sage does, when you ask for example Newforms(23,2,names='a'). We need the eigenvalues of the hecke operators since they correspond with the coefficients of the Fourier series. 2017-11-06 17:56:01 +0100 commented question How can I get back an expression for free variables in solve function. Great, thank you for your help! 2017-11-06 16:36:26 +0100 commented question How can I get back an expression for free variables in solve function. Yes that sounds nice. Any idea how to get rid of the many zeros? 2017-11-06 14:38:21 +0100 commented question How can I get back an expression for free variables in solve function. Yes, I can see that. And I would just like to have one of these solutions, but probably this is not possible. The reason I am looking for this is that I have a C-vectorspace defined over some symbols (in this case, just a random example, the symbols A,B,C,D,E,F,G) and I want to quotient this space by a space spanned by some linear combinations of these symbols (in this case A+B==0, etc). When I did this by hand, I used the solved function, and could then see that a basis for my quotient space would be . To implement this process, I thought of also using the solve function, but it needs to give me an expression for the free variables. But probably this is not really the right approach :) 2017-11-06 12:50:21 +0100 asked a question How can I get back an expression for free variables in solve function. I have a number of linear equations on some symbols A,B,C,D,E,F,G. When I solve them in Sagemath, I get some free variables in the solution. $A,B,C,D,E,F,G=var('A,B,C,D,E,F,G')$ $eqns=[A+B==0,C+D+E==0,F+G==0,A+E-F==0]$ $solution=solve(eqns,A,B,C,D,E,F,G)$ Sage gives the following solution: $[[A == r1, B == -r1, C == r1 - r2 - r3, D == r3, E == -r1 + r2, F == r2, G == -r2]]$ Now I can ask Sage to give me an expression of any combination of the symbols, for example: $(A+C).subs(solution)$, then I get $2*r1 - r2 - r3$. For my purpose I would now like to have an expression for any of the free variables. If I assign $r1=var('r1')$ and ask Sage $s1.subs(solution)$ I get back $r1$ again. But I would lik to get back an expression in terms of $A,B,C,D,E,F,G$. Any suggestions on how to do this?