Using Sagemath to check if a ring is integrally closed

100 Views Asked by At

I was playing around in Sage earlier today, and I can't seem to figure out how to check whether the localization of an order in a number field is integrally closed. I'm fairly new to Sage, so I'm a little confused as to what the issue is. My code is below:

K.<i> = NumberField(x^2 + 1)
O = K.order(2*i)
Op = O.localization(2 + 2*i)
Op.is_integrally_closed()

This gives me a NotImplementedError saying that IntegerModRing_generic_with_category object has no attribute is_integrally_closed. I can see, however, that the object Op has type sage.rings.localization.Localization_with_category. I can't find the class sage.rings.localization.Localization_with_category in the documentation, but in sage.rings.localization, the base is listed as sage.rings.ring.IntegralDomain, which has a method is_integrally_closed() listed.

I know how to check the math here - I'm just trying to figure out how to get Sage to check this for me, and better understand how Sage categories, parents, classes, etc. work.

P.S. I am running Sage 9.5

1

There are 1 best solutions below

1
On BEST ANSWER

The method is_integrally_closed for integral domains is what is raising this error: see https://doc.sagemath.org/html/en/reference/rings/sage/rings/ring.html#sage.rings.ring.IntegralDomain.is_integrally_closed. Note that if you instead do O.is_integrally_closed(), it returns False: it can apparently check orders, but not rings in this generality.