Opened 4 years ago
Closed 4 years ago
#20184 closed defect (fixed)
Comparison of number field elements embedded into RIF fails
Reported by:  mkoeppe  Owned by:  

Priority:  major  Milestone:  sage7.2 
Component:  number fields  Keywords:  
Cc:  tmonteil, jj, sstarosta, gagern, mkoeppe, vdelecroix  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  Dima Pasechnik 
Report Upstream:  N/A  Work issues:  
Branch:  259afd9 (Commits)  Commit:  259afd9503782367bfd611584f1ca675e4839717 
Dependencies:  Stopgaps: 
Description
This is a followup on #17830, which made this possible:
sage: x = polygen(ZZ) sage: K.<cbrt2> = NumberField(x^3  2, embedding=AA.polynomial_root(x^32, RIF(0,3))) sage: 6064/4813 < cbrt2 < 90325/71691 True
However, if I embed into a RIF instead, the same test fails.
sage: x = polygen(ZZ) sage: K.<cbrt2> = NumberField(x^3  2, embedding=RIF(AA.polynomial_root(x^32, RIF(0,3)))) sage: 6064/4813 < cbrt2 < 90325/71691 False
Change History (6)
comment:1 Changed 4 years ago by
comment:2 Changed 4 years ago by
 Milestone changed from sage7.1 to sageduplicate/invalid/wontfix
 Status changed from new to needs_review
I tend to agree with Vincent.
comment:3 Changed 4 years ago by
 Branch set to u/mkoeppe/comparison_of_number_field_elements_embedded_into_rif_fails
comment:4 Changed 4 years ago by
 Commit set to 259afd9503782367bfd611584f1ca675e4839717
 Milestone changed from sageduplicate/invalid/wontfix to sage7.2
Thanks for the discussion; I agree that it's a plausible restriction.
I have added a patch that adds this detail to the documentation of NumberField
.
New commits:
259afd9  Document implementation restriction of comparison of real number field elements

comment:5 Changed 4 years ago by
 Reviewers set to Dima Pasechnik
 Status changed from needs_review to positive_review
a bit of extra doc never hurts.
comment:6 Changed 4 years ago by
 Branch changed from u/mkoeppe/comparison_of_number_field_elements_embedded_into_rif_fails to 259afd9503782367bfd611584f1ca675e4839717
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
I do not think this is a bug.
The (respective to the embedding) comparison code is used only if there is a coercion embedding for which the codomain allows to have arbitrary precision real intervals (right now, only
AA
/QQbar
but could be extend toRLF
/CLF
). I do not mean that it is not feasible to find the corresponding exact embedding from a one intoRIF
one. But I would be against using it.What is the problem with the behavior in the ticket description?