Ask Your Question
1

Quotienting a ring of integers

asked 2012-11-21 18:52:30 -0500

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?

edit retag flag offensive close merge delete

Comments

Francis Clarke gravatar imageFrancis Clarke ( 2012-11-22 20:28:08 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-11-22 20:33:36 -0500

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
edit flag offensive delete link more

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 ( 2012-11-23 00:25:06 -0500 )edit
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 ( 2012-11-23 11:29:03 -0500 )edit

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 ( 2012-11-28 20:18:18 -0500 )edit

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: 2012-11-21 18:52:30 -0500

Seen: 216 times

Last updated: Nov 22 '12