Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #32726: quaternion ideals' .scale() incorrectly copies cached le…
…ft and right orders The method `QuaternionFractionalIdeal_rational.scale()` always copies over the existing left and right orders of `self` to the scaled ideal. This is incorrect when the scaling factor does not lie in the center of the algebra, as demonstrated by this example: {{{#!sage sage: Quat.<i,j,k> = QuaternionAlgebra(-1,-19) sage: a = 1+2*i+3*j+4*k sage: I = Quat.maximal_order().unit_ideal() sage: I.right_order() Order of Quaternion Algebra (-1, -19) with base ring Rational Field with basis (1/2 + 1/2*j, 1/2*i + 1/2*k, j, k) sage: I.scale(a).right_order() Order of Quaternion Algebra (-1, -19) with base ring Rational Field with basis (1/2 + 1/2*j, 1/2*i + 1/2*k, j, k) sage: J = Quat.ideal(I.scale(a).basis(), check=False) sage: J == I.scale(a) True sage: J.right_order() Order of Quaternion Algebra (-1, -19) with base ring Rational Field with basis (1/2 + 1/10*j + 109/5*k, 1/48*i + 1/120*j + 8411/240*k, 1/5*j + 218/5*k, 120*k) }}} The patch fixes this by only copying over the cached orders when scaling on the other side, or when scaling by an element of `QQ`. URL: https://trac.sagemath.org/32726 Reported by: lorenz Ticket author(s): Lorenz Panny Reviewer(s): Michael Orlitzky
- Loading branch information