Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-37098: Fixed random_element() for fractional ideals in rat…
…ional quaternion algebras 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 sagemath#3680. #sd123 URL: sagemath#37098 Reported by: Sebastian Spindler Reviewer(s): Peter Bruin
- Loading branch information