extracting the coefficients of a linear combination
Let me just say that I'm quite new to sage (although I'm making a progress!)
I wish to input a number field (in my case real quadratic field), a basis w1,w2 over Q and an element v of this number field and get the coefficient of v as a linear combination of w1 and w2. I.e., if v=aw1+bw2 I wish to get (a,b).
I tried doing this with just solving equations in matrices but I didn't find a way to make it solve the equations over the base field Q.
Thanks a lot for helping! Menny