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

Allow conversion from element of quotient ring to cover ring #39717

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

user202729
Copy link
Contributor

As in the title.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented Mar 16, 2025

Documentation preview for this PR (built with commit cc1e67d; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@user202729
Copy link
Contributor Author

user202729 commented Mar 16, 2025

It's natural that this conversion ought to work (conversion need not be canonical or natural or being a homomorphism or anything).
But we defines

That leads to the following default implementation of element containment testing:

.. NOTE::

    `x \in P` holds if and only if the test ``x==P(x)`` does not
    raise an error and evaluates as true.

and there is a test that says the parent generator is not in the child ring.
E.g. there was a test QQ[x].0 not in QQ[x].quotient(x^2+1).

On the other hand we have 1 in GF(3) returns True just fine. Same for 4 in GF(3).

We cannot change the implementation of __contains__ either, because then sqrt(-1) in QQbar also returns False. (sqrt(-1) has parent SR which wraps the pyobject I (element of quadratic number field), and there's no coercion from SR to QQbar)

Therefore I decide to just modify the tests accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant