<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Creating a library</title>
    <link>http://www.mapleprimes.com/questions/40458-Creating-A-Library</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 09:28:02 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 09:28:02 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Creating a library</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Creating a library</title>
      <link>http://www.mapleprimes.com/questions/40458-Creating-A-Library</link>
    </image>
    <item>
      <title>Was lb a local in the original procedure?</title>
      <link>http://www.mapleprimes.com/questions/40458-Creating-A-Library?ref=Feed:MaplePrimes:Creating a library:Comments#answer74647</link>
      <itunes:summary>If lb was a local in the computation that generated this result, then it will not be equal to the global 'lb'.  Also, if the original lb contained assumptions (but was global), it can be tricky to save it, re-read it in, and then use subs on it.

You might be better off using unapply and saving a procedure rather than an expression.</itunes:summary>
      <description>If lb was a local in the computation that generated this result, then it will not be equal to the global 'lb'.  Also, if the original lb contained assumptions (but was global), it can be tricky to save it, re-read it in, and then use subs on it.

You might be better off using unapply and saving a procedure rather than an expression.</description>
      <guid>74647</guid>
      <pubDate>Wed, 28 Nov 2007 08:23:10 Z</pubDate>
      <itunes:author>JacquesC</itunes:author>
      <author>JacquesC</author>
    </item>
    <item>
      <title>Saving assumed variables</title>
      <link>http://www.mapleprimes.com/questions/40458-Creating-A-Library?ref=Feed:MaplePrimes:Creating a library:Comments#answer74626</link>
      <itunes:summary>It might help if you posted some actual code, but what might be happening is something like this.

&lt;pre&gt;
&gt; assume(x &gt; 0);
  y:= x + 1;
  subs(x=3, y);
&lt;/pre&gt;
&lt;maple&gt; 4 &lt;/maple&gt;

&lt;pre&gt;
&gt; save y, "foo.m";
  restart;
  read "foo.m";
  subs(x=3, y);
&lt;/pre&gt;
&lt;maple&gt;x~ + 1&lt;/maple&gt;

What is happening here?  When an assumption is made on a variable x, Maple produces a new variable (which, depending on your settings, may or may not be shown as x~), and assigns it as the value of x.  So y is assigned the value x~+1, and then subs(x=3, y), actually substitutes x~=3 into that, producing 4.  

When I produced the file "foo.m", I saved the value of y, but not the value of x.  So after the restart Maple reads y:= x~ + 1 from the file,  but there's no connection between x~ and x, and the subs command makes no changes.  It would be somewhat better if we had saved the values of both x and y, i.e.
&lt;pre&gt;
&gt; save x, y, "foo.txt";
&lt;/pre&gt;
However, although that would solve the subs problem in this case, it's not really a satisfactory solution, because the assumption of x &gt; 0 is still not saved.  </itunes:summary>
      <description>It might help if you posted some actual code, but what might be happening is something like this.

&lt;pre&gt;
&gt; assume(x &gt; 0);
  y:= x + 1;
  subs(x=3, y);
&lt;/pre&gt;
&lt;maple&gt; 4 &lt;/maple&gt;

&lt;pre&gt;
&gt; save y, "foo.m";
  restart;
  read "foo.m";
  subs(x=3, y);
&lt;/pre&gt;
&lt;maple&gt;x~ + 1&lt;/maple&gt;

What is happening here?  When an assumption is made on a variable x, Maple produces a new variable (which, depending on your settings, may or may not be shown as x~), and assigns it as the value of x.  So y is assigned the value x~+1, and then subs(x=3, y), actually substitutes x~=3 into that, producing 4.  

When I produced the file "foo.m", I saved the value of y, but not the value of x.  So after the restart Maple reads y:= x~ + 1 from the file,  but there's no connection between x~ and x, and the subs command makes no changes.  It would be somewhat better if we had saved the values of both x and y, i.e.
&lt;pre&gt;
&gt; save x, y, "foo.txt";
&lt;/pre&gt;
However, although that would solve the subs problem in this case, it's not really a satisfactory solution, because the assumption of x &gt; 0 is still not saved.  </description>
      <guid>74626</guid>
      <pubDate>Thu, 29 Nov 2007 01:44:06 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>Hi,
Thanks for the reply.
I</title>
      <link>http://www.mapleprimes.com/questions/40458-Creating-A-Library?ref=Feed:MaplePrimes:Creating a library:Comments#comment84623</link>
      <itunes:summary>Hi,

Thanks for the reply.

I was using assumptions that Ip was real.
I believe it was global. I didn't do anything to make it explicitly local.

When you say save a procedure you mean something that takes an argument? t-&gt; (something)
I had created these "functions" via unapply.

Does anyone have any more detail on why saving something with assumptions should make it unrecognizable as the same variable?

Thanks,

Art</itunes:summary>
      <description>Hi,

Thanks for the reply.

I was using assumptions that Ip was real.
I believe it was global. I didn't do anything to make it explicitly local.

When you say save a procedure you mean something that takes an argument? t-&gt; (something)
I had created these "functions" via unapply.

Does anyone have any more detail on why saving something with assumptions should make it unrecognizable as the same variable?

Thanks,

Art</description>
      <guid>84623</guid>
      <pubDate>Wed, 28 Nov 2007 12:06:09 Z</pubDate>
      <itunes:author>Art Kalb</itunes:author>
      <author>Art Kalb</author>
    </item>
  </channel>
</rss>