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:  sage9.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 
Description (last modified by )
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 QuaternionOrder
s 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
Authors:  → Lorenz Panny 

Branch:  → public/fix_quaternion_order_element_constructor 
Cc:  Peter Bruin added 
Commit:  → e647fad5cec5b00a05c644f86959dfb83a044a55 
Description:  modified (diff) 
Status:  new → needs_review 
comment:2 followup: 4 Changed 14 months ago by
comment:3 Changed 14 months ago by
Commit:  e647fad5cec5b00a05c644f86959dfb83a044a55 → 81b93c16db82c3c4146d614aa0a14bbe2ef92062 

Branch pushed to git repo; I updated commit sha1. New commits:
81b93c1  fix doctest formatting

comment:4 Changed 14 months ago by
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
Milestone:  sage9.4 → sage9.5 

comment:6 Changed 13 months ago by
Stopgaps:  → mathematically_wrong 

comment:7 Changed 11 months ago by
Priority:  minor → major 

Bumping priority since this bug can lead to mathematical errors.
comment:8 Changed 9 months ago by
Milestone:  sage9.5 → sage9.6 

Stalled in needs_review
or needs_info
; likely won't make it into Sage 9.5.
comment:10 Changed 6 months ago by
Commit:  81b93c16db82c3c4146d614aa0a14bbe2ef92062 → ff7ad9d0d331ec08a462523d0c9616b62840b83c 

Branch pushed to git repo; I updated commit sha1. New commits:
ff7ad9d  Merge tag '9.6.beta5' into public/fix_quaternion_order_element_constructor

comment:12 Changed 6 months ago by
Commit:  ff7ad9d0d331ec08a462523d0c9616b62840b83c → a1d445b5ccb63edbad0032708b662a42b35153f2 

Branch pushed to git repo; I updated commit sha1. New commits:
a1d445b  break long line

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

Status:  needs_review → positive_review 
ok, then
comment:15 Changed 6 months ago by
Branch:  public/fix_quaternion_order_element_constructor → a1d445b5ccb63edbad0032708b662a42b35153f2 

Resolution:  → fixed 
Status:  positive_review → closed 
Here
there should be a single colon on top line and a double colon on bottom lines. Double colons are signaling an indented block.