#12969: Coercion failures in symmetric functions
-------------------------------------------------+--------------------------
       Reporter:  aschilling                     |         Owner:  sage-combinat
           Type:  defect                         |        Status:  needs_review 
       Priority:  major                          |     Milestone:  sage-5.3     
      Component:  combinatorics                  |    Resolution:               
       Keywords:  symmetric functions, coercion  |   Work issues:               
Report Upstream:  N/A                            |     Reviewers:               
        Authors:  Simon King                     |     Merged in:               
   Dependencies:                                 |      Stopgaps:               
-------------------------------------------------+--------------------------
Changes (by {'newvalue': u'Simon King', 'oldvalue': ''}):

  * status:  new => needs_review
  * author:  => Simon King


Comment:

 The attached patch seems to fix the problem.

 Questions:

 __Is there a speed regression? __

 With my patch, the absence of a coercion from X to Y is ''only'' cached,
 if no coercion path from X to Z (with Z different from Y) is temporarily
 disabled. But if there ''really'' is no coercion from X to Y, then the fix
 might involve a speed regression. Potential solution: If the old buggy
 depth first algorithm would cache the absence of a coercion from X to Y,
 while the new fixed version wouldn't, then we might investigate the paths
 from X to Y again, right after re-enabling the other paths starting from
 X.

 __What about #5457__

 I did not run the tests, yet. But the new test in my patch would fail
 because of the deprecation warnings introduced by #5457. So, we must
 decide whether making #5457 depend on this ticket or the other way around?

 For the record: Without #5457, I now get
 {{{
 sage: H = MacdonaldPolynomialsH(QQ)
 sage: P = MacdonaldPolynomialsP(QQ)
 sage: m = SFAMonomial(P.base_ring())
 sage: Ht = MacdonaldPolynomialsHt(QQ)
 sage: m(P.one())
 m[]
 sage: Ht(P.one())
 McdHt[]
 }}}
 and
 {{{
 sage: Ht.coerce_map_from(P)
 Composite map:
   From: Macdonald polynomials in the P basis over Fraction Field of
 Multivariate Polynomial Ring in q, t over Rational Field
   To:   Macdonald polynomials in the Ht basis over Fraction Field of
 Multivariate Polynomial Ring in q, t over Rational Field
   Defn:   Composite map:
           From: Macdonald polynomials in the P basis over Fraction Field
 of Multivariate Polynomial Ring in q, t over Rational Field
           To:   Symmetric Function Algebra over Fraction Field of
 Multivariate Polynomial Ring in q, t over Rational Field, Schur symmetric
 functions as basis
           Defn:   Generic morphism:
                   From: Macdonald polynomials in the P basis over Fraction
 Field of Multivariate Polynomial Ring in q, t over Rational Field
                   To:   Macdonald polynomials in the J basis over Fraction
 Field of Multivariate Polynomial Ring in q, t over Rational Field
                 then
                   Generic morphism:
                   From: Macdonald polynomials in the J basis over Fraction
 Field of Multivariate Polynomial Ring in q, t over Rational Field
                   To:   Symmetric Function Algebra over Fraction Field of
 Multivariate Polynomial Ring in q, t over Rational Field, Schur symmetric
 functions as basis
         then
           Generic morphism:
           From: Symmetric Function Algebra over Fraction Field of
 Multivariate Polynomial Ring in q, t over Rational Field, Schur symmetric
 functions as basis
           To:   Macdonald polynomials in the Ht basis over Fraction Field
 of Multivariate Polynomial Ring in q, t over Rational Field
 }}}
 (the latter being the same as in vanilla sage)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12969#comment:24>
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