Changes between Initial Version and Version 1 of Ticket #28770


Ignore:
Timestamp:
11/19/19 11:39:38 (3 years ago)
Author:
gh-kliem
Comment:

New commits:

a272cfdfix coercion of polyhedra with number fields

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28770

    • Property Status changed from new to needs_review
    • Property Commit changed from to a272cfdb26a536eeb804ca2c66bf6660c27a79b5
    • Property Branch changed from to public/28770
  • Ticket #28770 – Description

    initial v1  
    1616}}}
    1717
    18 The problem is that `_coerce_base_ring` of `Polyhedra` just takes the base ring of `K`, which are the rationals.
     18The underlying error:
     19
     20{{{
     21sage: z = QQ['z'].0                                         
     22sage: K = NumberField(z^2 - 2,'s')
     23sage: parent = polytopes.simplex().parent()
     24sage: parent._coerce_base_ring(K)
     25Rational Field
     26}}}
     27
     28But it should be `K`.
     29
     30The problem is that `_coerce_base_ring` of `Polyhedra_base` just takes the base ring of `K`, which are the rationals.
    1931
    2032We fix this, by not taking the base ring, if the object is already a ring.