Re: sage code question

1 view
Skip to first unread message

William Stein

unread,
Dec 3, 2007, 1:22:37 AM12/3/07
to Luke Wolcott, Dan Shumow, uw-...@groups.google.com
On Dec 2, 2007 10:09 PM, Luke Wolcott <terek...@gmail.com> wrote:
> Hi William,
>
> Dan Shumow and I were trying to use the following sage code to generate
> orders and look at their generators. I'd like to be able to treat an order
> like a ring, so I can make ideals. Apparently this code used to work in
> 2.8.5, but doesn't work now. I'm using sagenb.com. It seems that either
> the ZZ[a,b,c] command doesn't work, or the O.ring_generators() command.
>
> K.<g> = NumberField(x^5 + x^4 - 60*x^3 - 12*x^2 + 784*x + 128);
> OK = K.ring_of_integers()
> OK_gens = OK.ring_generators();
> O = ZZ[2*OK_gens[0], OK_gens[1], OK_gens[2]]
> O_gens = O.ring_generators()
>
> Thanks for any tips,

I think this is what you want to do:

sage: K.<g> = NumberField(x^5 + x^4 - 60*x^3 - 12*x^2 + 784*x + 128);
sage: OK = K.ring_of_integers()
sage: OK_gens = OK.ring_generators();
sage: OK_gens
[5/16*g^4 + 1/16*g^3 + 1/4*g, 1/32*g^4 + 3/32*g^3 + 1/16*g^2, 1/8*g^4 + 1/8*g^3]
sage: K.order([2*OK_gens[0], OK_gens[1], OK_gens[2]])
Order in Number Field in g with defining polynomial x^5 + x^4 - 60*x^3
- 12*x^2 + 784*x + 128
sage: O = K.order([2*OK_gens[0], OK_gens[1], OK_gens[2]])
sage: O.ring_generators()
[21/16*g^4 + 1/16*g^3 + 1/4*g, 1/32*g^4 + 3/32*g^3 + 1/16*g^2, 1/8*g^4
+ 1/8*g^3]

-- William

William Stein

unread,
Dec 3, 2007, 2:14:22 AM12/3/07
to Luke Wolcott, uw-...@groups.google.com
On Dec 2, 2007 11:07 PM, Luke Wolcott <terek...@gmail.com> wrote:
> Yes, now that seems to work. But suppose I wanted to create an ideal in the
> order O. The command O.ideal(2*O_gens[0], O_gens[1], O_gens[2]) doesn't
> work, because sage won't make ideals of non-maximal orders. Is there a way
> to convince sage that the order is just a regular ring in which it can make
> ideals? That's what I was hoping with the ZZ[a,b,c] command, and it seems
> like that worked back with 2.8.5...

Unfortunately, there is no support in Sage right now for creating
ideals in orders of
rings of integers.

-- William

Reply all
Reply to author
Forward
0 new messages