Opened 18 months ago
Closed 18 months ago
#31551 closed defect (fixed)
Incorrect conversion from ℚ[i] to SR
Reported by:  Marc Mezzarobba  Owned by:  

Priority:  blocker  Milestone:  sage9.3 
Component:  symbolics  Keywords:  
Cc:  Vincent Delecroix  Merged in:  
Authors:  Marc Mezzarobba  Reviewers:  Vincent Delecroix 
Report Upstream:  N/A  Work issues:  
Branch:  fddaa2c (Commits, GitHub, GitLab)  Commit:  fddaa2c0b55dffaa4d3b1c616d291da18c583d98 
Dependencies:  Stopgaps: 
Description (last modified by )
This should return I
, not I
:
sage: K.<j> = QuadraticField(1, embedding=CC(0,1)) sage: SR(j) I
Works under Sage 9.2, so maybe related to #18036?
Change History (11)
comment:1 Changed 18 months ago by
Description:  modified (diff) 

comment:2 Changed 18 months ago by
comment:3 Changed 18 months ago by
Indeed, the following method on gaussian integers looks bad
def _symbolic_(self, SR): r""" EXAMPLES:: sage: SR(1 + 2*i) 2*I + 1 """ from sage.symbolic.constants import I return self[1]*I + self[0]
comment:4 Changed 18 months ago by
Hmm, if I remember right, the GaussianInteger
class was intended for ℚ[i] with its standard embedding, so I think there is something else.
comment:5 Changed 18 months ago by
Authors:  → Marc Mezzarobba 

Branch:  → u/mmezzarobba/ticket/31151 
Commit:  → fddaa2c0b55dffaa4d3b1c616d291da18c583d98 
Status:  new → needs_review 
...but I see no reason not to extend it to support both embeddings.
New commits:
fddaa2c  #31151 support both embeddings in NumberFieldElement_gaussian

comment:6 Changed 18 months ago by
Reviewers:  → Vincent Delecroix 

looks good... waiting for patchbot.
comment:7 Changed 18 months ago by
Status:  needs_review → positive_review 

comment:9 Changed 18 months ago by
Priority:  major → critical 

Raising the priority to critical to stress that the fix really should go in Sage 9.3.
comment:10 Changed 18 months ago by
Priority:  critical → blocker 

Setting priority to blocker to bring this ticket to the attention of the release bot.
comment:11 Changed 18 months ago by
Branch:  u/mmezzarobba/ticket/31151 → fddaa2c0b55dffaa4d3b1c616d291da18c583d98 

Resolution:  → fixed 
Status:  positive_review → closed 
Note: See
TracTickets for help on using
tickets.
Possibly related: