Question: Strange behaviour when using assume and saving variables

Hi guys,

I'm doing some heavy analytical calculations, as the calculations take hours to finish, I want to save the results, which is easily done, however when I load the saved results, it behaves differently, somehow I can no longer substitute the variables. I extracted the main problem into the following minimal working example.

Thanks for any useful insight,

Cheers, Sören

restart():

assume(`in`(n, real))

x := n+1

n+1

(1)

subs(n = 1, x)

2

(2)

save x, "./myfunction.m";

read "./myfunction.m";

x

n+1

(3)

Now we can't substitute n in x:

subs(n = 1, x)

n+1

(4)

subs(n = 1, n+1)

2

(5)

y := x:

Download assume_and_save.mw

Please Wait...