Ask Your Question
1

Quotienting a ring of integers

asked 12 years ago

Snark gravatar image

I was trying to play within the ring of integers of a number field, when I decided to quotient by an ideal. It raised an "IndexError: the number of names must equal the number of generators" exception, which was quite unexpected ; here is an example:

K=NumberField(x**2+1,x)
O=K.ring_of_integers()
O.quo(O.ideal(3))

as you see, I'm using the same ring to define the ideal I want to quotient with, so there is mathematically no problem... so I think either I found a bug or something needs to be documented better. How does one work in a quotient of a ring of integers?

Preview: (hide)

Comments

Francis Clarke gravatar imageFrancis Clarke ( 12 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

Francis Clarke gravatar image

Does this do what you want?

sage: K.<i> = QuadraticField(-1)
sage: F.<j> = K.residue_field(3)
sage: F.order()
9
sage: j.charpoly()
x^2 + 1
Preview: (hide)
link

Comments

Ah, this "residue_field" method is a nice catch, I hadn't seen it -- but the problem is that for the examples I have in mind, the number field might not be quadratic, and the ideals might not be prime ; the first isn't a problem with residue_field, while the second point is a no-go. I like your answer but it doesn't solve what I want. :-(

Snark gravatar imageSnark ( 12 years ago )
1

For quotients by non-prime ideals, the problem with what you had (using quo or its synonyms quotient and quotient_ring) was that you didn't give a name to the generator of the quotient ring. Thus R = O.quo(O.ideal(3), 'a') and R = O.quo(O.ideal(5), 'a') both work. But at present Sage cannot do much with these rings. For example, R.is_finite() gives rise to a NotImplementedError()

Francis Clarke gravatar imageFrancis Clarke ( 12 years ago )

Ah, yes! That definitely helps! If you edit your answer to include that, I'll gladly accept it as a valid answer. Thanks!

Snark gravatar imageSnark ( 12 years ago )

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 12 years ago

Seen: 840 times

Last updated: Nov 23 '12