Sage: Ticket #10073: held variables aren't restored
https://trac.sagemath.org/ticket/10073
<p>
See <a class="closed ticket" href="https://trac.sagemath.org/ticket/9879" title="enhancement: allow preventing automatic evaluation of symbolic expressions (hold) (closed: fixed)">#9879</a>, where this was discovered. After <a class="closed ticket" href="https://trac.sagemath.org/ticket/9901" title="defect: update pynac to 0.2.1 (closed: fixed)">#9901</a> is merged, this will be possible:
</p>
<pre class="wiki">sage: I.log(hold=True).simplify()
1/2*I*pi
sage: var('I')
I
sage: I.log(hold=True).simplify()
log(I)
sage: restore('I')
sage: I.log(hold=True).simplify()
log(I)
</pre><p>
It's totally unclear to me why this is happening. It even happens across different classes in doctesting. For now I'm putting this under symbolics, but it may be unrelated to that, and instead related to the miscellaneous commands.
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/10073
Trac 1.1.6jpfloriWed, 06 Oct 2010 15:14:58 GMT
https://trac.sagemath.org/ticket/10073#comment:1
https://trac.sagemath.org/ticket/10073#comment:1
<p>
By the way, that does not happen when you do not use the hold parameter followed by the simplify call :
</p>
<pre class="wiki">sage: I.log()
1/2*I*pi
sage: var('I')
I
sage: I.log()
log(I)
sage: restore('I')
sage: I.log()
1/2*I*pi
</pre><p>
So 'I' gets restored but maybe Maxima gets the var('I') which was created and not the default numeric 'I'.
</p>
<p>
Here is another strange thing:
</p>
<pre class="wiki">sage: I.log()
1/2*I*pi
sage: J = deepcopy(I)
sage: bool(I == J)
True
sage: J.log()
1.57079632679490*I
</pre>
TicketkcrismanWed, 06 Oct 2010 15:19:49 GMT
https://trac.sagemath.org/ticket/10073#comment:2
https://trac.sagemath.org/ticket/10073#comment:2
<p>
Yes, Burcin says it has something to do with "a problem with restore and the maxima interface, not pynac". This seems likely. I can't explain the second thing.
</p>
TicketjdemeyerTue, 13 Aug 2013 15:35:53 GMTmilestone changed
https://trac.sagemath.org/ticket/10073#comment:3
https://trac.sagemath.org/ticket/10073#comment:3
<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/10073#comment:4
https://trac.sagemath.org/ticket/10073#comment:4
<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/10073#comment:5
https://trac.sagemath.org/ticket/10073#comment:5
<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/10073#comment:6
https://trac.sagemath.org/ticket/10073#comment:6
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.3</em> to <em>sage-6.4</em>
</li>
</ul>
TicketrwsSat, 31 Jan 2015 08:23:08 GMT
https://trac.sagemath.org/ticket/10073#comment:7
https://trac.sagemath.org/ticket/10073#comment:7
<p>
Something has changed here, probably with <a class="closed ticket" href="https://trac.sagemath.org/ticket/6882" title="defect: bugs in conversion of variable names from Maxima to Sage (closed: fixed)">#6882</a>:
</p>
<pre class="wiki">sage: I.log(hold=True).simplify()
1/2*I*pi
sage: var('I')
I
sage: I.log(hold=True).simplify()
log(_I)
sage: restore('I')
sage: I.log(hold=True).simplify()
log(I)
sage: I.log()
1/2*I*pi
sage: I.log(hold=True).simplify_full()
log(_I)
</pre><p>
This is not encouraging.
</p>
Ticket