Opened 14 months ago

Closed 6 months ago

#32364 closed defect (fixed)

every quaternion lies in every quaternion order

Reported by: Lorenz Panny Owned by:
Priority: major Milestone: sage-9.6
Component: algebra Keywords: quaternion orders, elements, membership
Cc: Peter Bruin Merged in:
Authors: Lorenz Panny Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: a1d445b (Commits, GitHub, GitLab) Commit: a1d445b5ccb63edbad0032708b662a42b35153f2
Dependencies: Stopgaps: mathematically_wrong

Status badges

Description (last modified by Lorenz Panny)

This is wrong:

sage: Q.<i,j,k> = QuaternionAlgebra(-1,-19)
sage: O = Q.quaternion_order([1,i,j,k])
sage: 1/5 in O
True
sage: (i+j)/123 in O
True

To fix this, we add an _element_constructor_ to QuaternionOrders that actually checks whether the given element is contained in the order. (This in turn makes the default implementation of __contains__ work properly.)

Change History (15)

comment:1 Changed 14 months ago by Lorenz Panny

Authors: Lorenz Panny
Branch: public/fix_quaternion_order_element_constructor
Cc: Peter Bruin added
Commit: e647fad5cec5b00a05c644f86959dfb83a044a55
Description: modified (diff)
Status: newneeds_review

comment:2 Changed 14 months ago by Frédéric Chapoton

Here

+        TESTS::
+
+        Test for :trac:`32364`:

there should be a single colon on top line and a double colon on bottom lines. Double colons are signaling an indented block.

comment:3 Changed 14 months ago by git

Commit: e647fad5cec5b00a05c644f86959dfb83a044a5581b93c16db82c3c4146d614aa0a14bbe2ef92062

Branch pushed to git repo; I updated commit sha1. New commits:

81b93c1fix doctest formatting

comment:4 in reply to:  2 Changed 14 months ago by Lorenz Panny

Replying to chapoton:

there should be a single colon on top line and a double colon on bottom lines. Double colons are signaling an indented block.

Oops! Thanks, fixed.

comment:5 Changed 13 months ago by Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:6 Changed 13 months ago by Lorenz Panny

Stopgaps: mathematically_wrong

comment:7 Changed 11 months ago by Lorenz Panny

Priority: minormajor

Bumping priority since this bug can lead to mathematical errors.

comment:8 Changed 9 months ago by Matthias Köppe

Milestone: sage-9.5sage-9.6

Stalled in needs_review or needs_info; likely won't make it into Sage 9.5.

comment:10 Changed 6 months ago by git

Commit: 81b93c16db82c3c4146d614aa0a14bbe2ef92062ff7ad9d0d331ec08a462523d0c9616b62840b83c

Branch pushed to git repo; I updated commit sha1. New commits:

ff7ad9dMerge tag '9.6.beta5' into public/fix_quaternion_order_element_constructor

comment:11 Changed 6 months ago by Frédéric Chapoton

please break the very long line in doctests

comment:12 Changed 6 months ago by git

Commit: ff7ad9d0d331ec08a462523d0c9616b62840b83ca1d445b5ccb63edbad0032708b662a42b35153f2

Branch pushed to git repo; I updated commit sha1. New commits:

a1d445bbreak long line

comment:13 Changed 6 months ago by Lorenz Panny

Done & patchbot is green.

comment:14 Changed 6 months ago by Frédéric Chapoton

Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

ok, then

comment:15 Changed 6 months ago by Volker Braun

Branch: public/fix_quaternion_order_element_constructora1d445b5ccb63edbad0032708b662a42b35153f2
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.