#16934: Fix factory keys for finite fields to avoid repeated construction
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: finite rings | Resolution:
Keywords: | Merged in:
Authors: Peter Bruin | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/pbruin/16934-FiniteField_factory_key|
c33a718235e86d268b025a01561a2f14b7dc5937
Dependencies: #16930 | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Peter Bruin', 'oldvalue': ''}):
* status: new => needs_review
* author: => Peter Bruin
* component: coercion => finite rings
* dependencies: => #16930
* branch: => u/pbruin/16934-FiniteField_factory_key
* commit: => c33a718235e86d268b025a01561a2f14b7dc5937
Old description:
> The following sequence of commands somehow breaks the coercion framework.
> This is on vanilla Sage 6.4.beta1. The problem only occurs if
> {{{impl="pari_ffelt"}}} is explicitly given, even though that is the
> default:
> {{{
> sage: k1.<a> = GF(17^14, impl="pari_ffelt")
> sage: _ = PolynomialRing(k1, 'x')(a/2)
> sage: k2.<a> = GF(17^14, impl="pari_ffelt")
> sage: _ = PolynomialRing(k2, 'x')(a/2)
> Traceback (most recent call last):
> ...
> TypeError: no coercion defined
> }}}
>
> The underlying reason is:
> {{{
> sage: k1 is k2
> False
> }}}
>
> Related: #16855
New description:
The following sequence of commands somehow breaks the coercion framework.
This is on vanilla Sage 6.4.beta1. The problem only occurs if
{{{impl="pari_ffelt"}}} is explicitly given, even though that is the
default:
{{{
sage: k1.<a> = GF(17^14, impl="pari_ffelt")
sage: _ = PolynomialRing(k1, 'x')(a/2)
sage: k2.<a> = GF(17^14, impl="pari_ffelt")
sage: _ = PolynomialRing(k2, 'x')(a/2)
Traceback (most recent call last):
...
TypeError: no coercion defined
}}}
The underlying reason is:
{{{
sage: k1 is k2
False
}}}
This double construction of the same finite field is caused by slightly
different `UniqueFactory` keys arising during the construction of a common
parent (for the computation of `a/2`) by the coercion system.
Related: #16855
--
Comment:
This branch depends on #16930 to avoid merge conflicts. It merges with,
and works independently of, #16855.
--
Ticket URL: <http://trac.sagemath.org/ticket/16934#comment:17>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.