#13644: Error when creating ideal from unhashable elements
--------------------------------+-------------------------------------------
       Reporter:  saraedum      |         Owner:  robertwb
           Type:  defect        |        Status:  new     
       Priority:  minor         |     Milestone:  sage-5.5
      Component:  coercion      |    Resolution:          
       Keywords:                |   Work issues:          
Report Upstream:  N/A           |     Reviewers:          
        Authors:  Julian Rueth  |     Merged in:          
   Dependencies:                |      Stopgaps:          
--------------------------------+-------------------------------------------
Description changed by saraedum:

Old description:

> Currently, the following does not work because some padic extension
> elements do not define a hash function (see #11895 for why they do not
> define a hash function):
> {{{
> sage: K = Qp(3)
> sage: R.<a> = K[]
> sage: L.<a> = K.extension(a^2-3)
> sage: L.ideal(a)
> TypeError: unhashable type:
> 'sage.rings.padics.padic_ZZ_pX_CR_element.pAdicZZpXCRElement'
> }}}
>
> The problem is that {{{has_coerce_map_from}}} is looking for a coercion
> from {{{a}}} to {{{L}}}. There is none, since {{{a}}} is not a parent.
> The attached patch fixes this.

New description:

 Currently, the following does not work because some padic extension
 elements do not define a hash function (see #11895 for why they do not
 define a hash function):
 {{{
 sage: K = Qp(3)
 sage: R.<a> = K[]
 sage: L.<a> = K.extension(a^2-3)
 sage: L.ideal(a)
 TypeError: unhashable type:
 'sage.rings.padics.padic_ZZ_pX_CR_element.pAdicZZpXCRElement'
 }}}

 The problem is that {{{sage.rings.ring.Ring}}} is looking for a coercion
 from {{{a}}} to {{{L}}}. There is none, since {{{a}}} is not a parent. The
 attached patch fixes this.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13644#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to