Ask Your Question
1

Factoring an integer inside a ring of integers different from $\mathbb{Z}$

asked 2022-02-20 17:53:24 +0200

nomaddd4 gravatar image

I am trying to find divisors of an element in the ring of integers of a Cyclotomic Field. My code is

K=CyclotomicField(23)
L=K.ring_of_integers()
L.factor(2)

It gives an error:

'AbsoluteOrder_with_category' object has no attribute 'factor'

I guess the problem is L is defined as an "order" here instead of a ring. But I need that to be a ring. How can I fix this problem?

edit retag flag offensive close merge delete

Comments

Welcome to Ask Sage! Thank you for your question!

slelievre gravatar imageslelievre ( 2022-02-21 22:48:12 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-02-21 23:05:08 +0200

slelievre gravatar image

updated 2022-02-23 10:35:38 +0200

The ring of integers of the 23rd cyclotomic field is famously not a unique factorisation domain.

Once you have defined the cyclotomic field and its ring of integers,

sage: K = CyclotomicField(23)
sage: L = K.ring_of_integers()

the ring of integers does not have a factor method, as you noticed.

Its elements however do have such a method, but trying to factor L(2) hangs:

sage: L(2).factor()

and you have to interrupt it with Ctrl C.

One thing you can do is factor the ideal generated by 2.

sage: two = L.ideal(2)
sage: two.factor()
(Fractional ideal (2, zeta23^11 + zeta23^9 + zeta23^7 + zeta23^6 + zeta23^5 + zeta23 + 1)) * (Fractional ideal (2, zeta23^11 + zeta23^10 + zeta23^6 + zeta23^5 + zeta23^4 + zeta23^2 + 1))
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: 2022-02-20 17:53:24 +0200

Seen: 51 times

Last updated: Feb 23