Processing math: 100%
Ask Your Question
0

How do I show in sage that an ideal is contained in another?

asked 4 years ago

Moondoggy gravatar image

For example I have

       sage: K.<a> = QuadraticField(5)
       OK = K. ring_of_integers ()
       sage: J=ideal(1+7*(1+sqrt(5))/2)
             J.issubset(OK)

but this does not work.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 4 years ago

dan_fulea gravatar image

The following dialog worked for me...

sage: K.<a> = QuadraticField(5)                                                                                               
sage: OK = K.ring_of_integers()                                                                                               
sage: OK.gens()                                                                                                               
(1/2*a + 1/2, a)
sage: g = 1 + 7*(1+a)/2    # can be obviously expressed in terms of OK.gens()                                                 
sage: g in OK                                                                                                                 
True
sage: J = OK.ideal(g)    # works                                                                                              
sage: J                                                                                                                       
Fractional ideal (7/2*a + 9/2)

It was possible to initialize J, since its generator(s) OK. But if we try "the same" with some h which is not integral...

sage: h = a/3                                                                                                                 
sage: h in OK                                                                                                                 
False
sage: H = OK.ideal(h)                                                                                                         
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Preview: (hide)
link

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: 4 years ago

Seen: 279 times

Last updated: Jun 12 '20