Christian Wolinski

MaplePrimes Activity


These are questions asked by Christian Wolinski

In Maple V, Release 4 (1996):

 

_EnvX:=0; b:=0; proc() global b; print(_EnvX, b); assign('_EnvX=1, b=1'); print(_EnvX, b); end();
_EnvX:=0: b:=0: proc() global b; print(_EnvX, b); _EnvX:=1; b:=1; print(_EnvX, b); end();;

gives:
                                 0, 0
                                 0, 1

In newer Maple:

 

_EnvX:=0; b:=0; proc() global b; print(_EnvX, b); assign('_EnvX=1, b=1'); print(_EnvX, b); end proc();
_EnvX:=0: b:=0: proc() global b; print(_EnvX, b); _EnvX:=1; b:=1; print(_EnvX, b); end proc();

?

Code & result:

> map((a::uneval,b)->'args',[a,b,c,d],1..4,x);       
['a, 1 .. 4, x', 'b, 1 .. 4, x', 'c, 1 .. 4, x', 'd, 1 .. 4, x']

> map((a,b::uneval)->'args',[a,b,c,d],1..4,x);           
[a, 1 .. 4, x, b, 1 .. 4, x, c, 1 .. 4, x, d, 1 .. 4, x]

Why is the output not:
['a', 1 .. 4, x, 'b', 1 .. 4, x, 'c', 1 .. 4, x, 'd', 1 .. 4, x]
and
[a, '1 .. 4', x, b, '1 .. 4', x, c, '1 .. 4', x, d, '1 .. 4', x]
?

Does `evala/toprof` still exist in newer Maple versions, or is there an equivalent?

I am curious, can simplify/siderels be executed in mod p by some equivalent Maple function call?

Is there a Maple function that given a set of substitutions in form object=set of substitute objects produces a sequence of sets, each a product of substitution from the next, remove repetitions. An example:

 

#Substitutions
a = {b, c, d}, b = {a, b, e}, c = {a, d, f};
#Result
a = ({e, f}, {b, c, d}), b = ({f}, {c, d}, {a, b, e}), c = ({e}, {b}, {a, d, f});

First 12 13 14 15 Page 14 of 15