Error: 'Object has no attribute 'intersection''
Hi, I am pretty new to SAGE and and am not understanding why my code keeps giving me the error 'RelativeOrder_with_category' object has no attribute 'intersection'. Here is my code:
sage: P1=x^3-x^2-4*x-1
sage: P2=x^3+x^2-2*x-1
sage: K1.<p>=NumberField(P1)
sage: K2.<d>=NumberField(P2)
sage: K.<p,d>=ExtensionField(K1,P2)
sage: O_K=K.ring_of_integers()
sage: A_K1=O_K.intersection(K1)
AttributeError: 'RelativeOrder_with_category' object has no attribute 'intersection'
I have looked at a lot of examples from other questions, but I can't seem to find a solution.
I cannot reproduce your issue with SageMath 8.3 since the step
K.<p,d>=ExtensionField(K1,P2)
leads toWhich version of SageMath are you using?
AFAICT there is no class or factory in any version of Sage called just
ExtensionField
, so it's either user-defined, or a rename of something else built into Sage. It would help to know exactly what that is. That said, it seems you have there aRelativeOrder
which, according to the docs, is the class used for orders in "some relative number field". I don't know what is meant by "relative" in terms of number fields but I'm not an algebra expert. But it seems thatRelativeOrder
does not have anintersection()
method (perhaps it doesn't make sense for it to). However,RelativeOrder
does appear to have an "absolute" order which it is defined relative to. So maybe what you want isO_K.absolute_order().intersection(K1)
.