Ask Your Question
0

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

asked 2020-06-07 13:35:39 +0100

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-06-12 15:37:46 +0100

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) $\in \mathcal O_K$. 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)
edit flag offensive delete link more

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: 2020-06-07 13:35:39 +0100

Seen: 254 times

Last updated: Jun 12 '20