Ask Your Question
0

"divides" in ring of integers

asked 2014-07-20 11:57:57 +0100

John Bamberg gravatar image

updated 2015-01-14 10:17:19 +0100

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 12:39:29 +0100

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 11:57:57 +0100

Seen: 420 times

Last updated: Jul 20 '14