#16732: Fix _maxima_init_evaled_ use, as well as translations of psi etc. 
to/from
maxima.
------------------------------+------------------------
       Reporter:  nbruin      |        Owner:
           Type:  defect      |       Status:  new
       Priority:  major       |    Milestone:  sage-6.3
      Component:  interfaces  |   Resolution:
       Keywords:              |    Merged in:
        Authors:              |    Reviewers:
Report Upstream:  N/A         |  Work issues:
         Branch:              |       Commit:
   Dependencies:              |     Stopgaps:
------------------------------+------------------------

Comment (by nbruin):

 For the bracket problem: since we are *removing* the square brackets we
 CAN actually do the transformations with regexes, if we apply the
 substitutions repeatedly:
 {{{
 sage: s="psi[psi[a](b)](c)"
 sage: s=maxima_polygamma.sub('psi(\g<1>,',s);s
 'psi[psi(a,b)](c)'
 sage: s=maxima_polygamma.sub('psi(\g<1>,',s);s
 'psi(psi(a,b),c)'
 }}}
 so we could have a little square-bracket replacement loop:
 {{{
 sold = None
 while s != sold:
     sold = s
     s=maxima_polygamma.sub('psi(\g<1>,',s)
     s=maxima_<other square bracket pattern>.sub(...,s)
     s=maxima_<yet other one>.sub(...,s)
 }}}
 we should converge to a fixed point that is square-bracketless if our
 patterns cover all legitimate uses of square brackets: If there is a
 square-bracket use, there is an "innermost" one (that doesn't contain any
 square bracket uses itself) and its pattern will trigger and remove it
 (modifying s).

 I'm not claiming this is an *efficient* way of doing it, but it can be
 done with relatively mild changes to the code.

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

Reply via email to