On 5 September 2012 02:56, Cindy <[email protected]> wrote:
> Hi,
>
> Let K be a number field and O_k denote its ring of integers. For an ideal, J
> of O_k, we can have an ideal lattice (I,b_\alpha), where
>
> b_\alpha: J\times J \to Z, b_\alpha(x,y)=Tr(\alpha xy), \forall x,y \in J
>
> and \alpha is a totally positive element of K\{0}.
>
> Suppose now I know J and \alpha, how can I get the generator matrix for the
> ideal lattice (J,\alpha) using sage?
>
> Thanks a lot.
>
> Cindy

The first thing I tried was this, and it seems to work fine:

sage: K.<z> = NumberField(x^3 - x + 17)
sage: I = K.primes_above(17)[1]
sage: alpha = 13*z + 4
sage: matrix([[(u*v*alpha).trace() for u in I.basis()] for v in I.basis()])
[  3468    646 -11339]
[   646   -591   -871]
[-11339   -871    225]

David

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to