Sage: Ticket #11651: Decide what to do with e^(y=x)
https://trac.sagemath.org/ticket/11651
<p>
<a class="ext-link" href="http://groups.google.com/group/sage-support/browse_thread/thread/641c16b1d5c9f026"><span class="icon"></span>This sage-support thread</a> describes the following problem:
</p>
<pre class="wiki">sage: var('y')
y
sage: (y==x).log()
log(y == x)
sage: (y==x).log().simplify() # just sends to Maxima and back to Sage
log(y) == log(x)
sage: (y==x).exp()
e^(y == x)
sage: (y==x).exp().simplify() # just sends to Maxima and back to Sage
TypeError: unable to make sense of Maxima expression 'e^(y=x)' in Sage
</pre><p>
Basically, one can consider the problem in two ways - a Sage bug or a Maxima bug/feature. Depends on how you look at it.
</p>
<ul><li>Option 1: We don't expect an = sign inside of expressions in our parser in sage/misc/parser.py. Once you leave Parser.p_eqn, there is a lot of jumping around that happens, but it never gets back there, and that is the only place that replaces = with ==. So we should fix that.
</li><li>Option 2: Maxima erroneously doesn't change <code>e^(y=x)</code> to <code>e^y=e^x</code>. With log, it does:
<pre class="wiki">sage: var('y'); a = (y==x).log()
sage: a._maxima_()
log(y)=log(x)
</pre>But with exp, it doesn't:
<pre class="wiki">sage: var('y'); a = (y==x).exp()
y
sage: a._maxima_()
%e^(y=x)
</pre></li></ul><p>
For now putting the upstream as 'none of the above' since it's not clear the bug is upstream.
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/11651
Trac 1.1.6kcrismanMon, 08 Aug 2011 12:56:50 GMTupstream changed
https://trac.sagemath.org/ticket/11651#comment:1
https://trac.sagemath.org/ticket/11651#comment:1
<ul>
<li><strong>upstream</strong>
changed from <em>None of the above - read trac for reasoning.</em> to <em>Reported upstream. Developers deny it's a bug.</em>
</li>
</ul>
<p>
See <a class="ext-link" href="http://www.math.utexas.edu/pipermail/maxima/2011/025756.html"><span class="icon"></span>this Maxima list message</a>, and the ensuing comments, for more information.
</p>
<p>
For now I'm putting this as "upstream denies bug" because the sense on the list was not unanimous that it should always happen; certainly one doesn't always want to expand the <code>==</code>, though for <code>exp</code> one might want to.
</p>
<p>
Robert Dodier had a partial fix:
</p>
<pre class="wiki">
Well, log is declared to distrubute over lists, matrices, and equations,
while exp is not so declared.
You can get the desired effect like this in a Maxima session,
or just put the Lisp code in maxima-init.lisp.
:lisp (setf (get '%exp 'distribute_over) '(mlist mequal))
(Note that this also declares that exp distributes over lists;
I hope that's not controversial. Exp shouldn't distribute over
matrices since exp(matrix) has another interpretation.)
</pre><p>
However, this would not work with <code>%e^(y=x)</code>, only <code>exp(y=x)</code>, apparently.
</p>
TicketjdemeyerTue, 13 Aug 2013 15:35:53 GMTmilestone changed
https://trac.sagemath.org/ticket/11651#comment:2
https://trac.sagemath.org/ticket/11651#comment:2
<ul>
<li><strong>milestone</strong>
changed from <em>sage-5.11</em> to <em>sage-5.12</em>
</li>
</ul>
Ticketvbraun_spamThu, 30 Jan 2014 21:20:52 GMTmilestone changed
https://trac.sagemath.org/ticket/11651#comment:3
https://trac.sagemath.org/ticket/11651#comment:3
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.1</em> to <em>sage-6.2</em>
</li>
</ul>
Ticketvbraun_spamTue, 06 May 2014 15:20:58 GMTmilestone changed
https://trac.sagemath.org/ticket/11651#comment:4
https://trac.sagemath.org/ticket/11651#comment:4
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.2</em> to <em>sage-6.3</em>
</li>
</ul>
Ticketvbraun_spamSun, 10 Aug 2014 16:51:03 GMTmilestone changed
https://trac.sagemath.org/ticket/11651#comment:5
https://trac.sagemath.org/ticket/11651#comment:5
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.3</em> to <em>sage-6.4</em>
</li>
</ul>
Ticket