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

Fixed .random_element() for fractional ideals in rational quaternion algebras #37098

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

S17A05
Copy link
Member

@S17A05 S17A05 commented Jan 18, 2024

Added QuaternionFractionalIdeal_rational.random_element() to fix random sampling in fractional ideals of quaternion algebras.

The method .random_element() of the ideal class refers to the ring over which the ideal is defined, but for fractional ideals Sage often (incorrectly) gives the base field of the algebra as a base ring. To work around this, we implement a new function QuaternionFractionalIdeal_rational.random_element() that hardcodes $\mathbb{Z}$ to return a random $\mathbb{Z}$-linear combination of the (lattice) generators of the fractional ideal.

Note: The deeper issue of separating ideals and fractional ideals still remains - see #3680.

#sd123

Added QuaternionFractionalIdeal_rational.random_element() to overwrite the ideal.random_element()-method, which doesn't work for fractional ideals; fixed whitespace detected by Lint checks.
@S17A05
Copy link
Member Author

S17A05 commented Jan 19, 2024

Removed the whitespaces in blank lines detected by Lint.

Copy link

Documentation preview for this PR (built with commit 22f63e0; changes) is ready! 🎉

@pjbruin pjbruin self-requested a review January 19, 2024 16:28
Copy link
Contributor

@pjbruin pjbruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@vbraun vbraun merged commit 507c389 into sagemath:develop Jan 22, 2024
20 checks passed
@S17A05 S17A05 deleted the random_element branch January 22, 2024 10:16
@S17A05 S17A05 changed the title Fixed random_element() for fractional ideals in rational quaternion algebras Fixed .random_element() for fractional ideals in rational quaternion algebras Jan 25, 2024
@mkoeppe mkoeppe added this to the sage-10.3 milestone Mar 7, 2024
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.

5 participants