Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exact reals do not know when they might be algebraic #172

Open
Tracked by #220
saraedum opened this issue May 5, 2023 · 2 comments
Open
Tracked by #220

exact reals do not know when they might be algebraic #172

saraedum opened this issue May 5, 2023 · 2 comments
Labels
bug Something isn't working python sage

Comments

@saraedum
Copy link
Member

saraedum commented May 5, 2023

Currently, containment in number fields does not always work correctly:

sage: ExactReals().one() in QQ
True
sage: ExactReals().one() in AA
False :(

The underlying issue is that ExactReals().one() and AA(ExactReals().one()) cannot be coerced into a common parent.

@saraedum saraedum added bug Something isn't working python sage labels May 5, 2023
@saraedum
Copy link
Member Author

saraedum commented May 5, 2023

I looked into overriding __richcmp__. However, this only works for the comparison ExactReals().one() == AA(1) and not for AA(1) == ExactReals().one().

Setting the Parent_richcmp_element_without_coercion flag also won't help since it disable all coercion. Even when comparing ExactReals().one() == QQ(1).

@saraedum
Copy link
Member Author

saraedum commented May 5, 2023

The proper solution would be to support ExactReals(AA) so there is a common parent we can coerce into. However, the elements of this ring would then not be contained in a single exactreal::Module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python sage
Development

No branches or pull requests

1 participant