Ask Your Question
0

"divides" in ring of integers

asked 2014-07-20 04:57:57 -0500

updated 2015-01-14 03:17:19 -0500

FrédéricC gravatar image

It seems the method for "divides" is inherited to a ring_of_integers, but has undesirable behaviour:

f = CyclotomicField(3)
r = f.ring_of_integers()
gens = r.gens()
x = 1 + gens[1]
r(x).divides(r(gens[1]))

returns "True". Have I overlooked something here?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2014-07-20 05:39:29 -0500

Luca gravatar image

With your input,

( r(gens[1]) / r(x) ).is_integral()

returns True. So, no, I see no problem here. However

sage: f = CyclotomicField(3)
sage: r.<z> = f.ring_of_integers()
sage: r(2).divides(z)
True
sage: (z/2).is_integral()
False

which is fishy.

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: 2014-07-20 04:57:57 -0500

Seen: 188 times

Last updated: Jul 20 '14

Related questions