Question: map can't recognize assumptions with tildes

When Matrix or Vector output that has variables with assumptions on them (and therefore with tildes on them) is copied and pasted to the expression argument of a map( ) function, the map code cannot find the assumptions. Of course, when it is pasted in appears in the input with the tildes.  It then seems to not recognize the tildes as indicating assumptions on the base name.

If, on the other hand, the output is directly saved to a name, and that name is used in the input to the map( ) function, then the assumptions are recognized and the output is correct. It seems that in this case, the tilde is an output phenomenon that is not recognized on input. Apparently, the save output is not saved with the tilde.

Here is a simple example:

> assume(a>0, b<0);
   v:=<a,b>;

   see_assump:=proc(x)
     print(getassumptions(x));
     x;
   end proc:

map(see_assump, v);

map(see_assump, <a~, b~>;
map(see_assump, <copied from output of v assignment statement above>);

The first map statement shows the assumptions, the second two just give empty brackets { }.

Attempting to use more complicated procs that require the assumptions in the map( ) function leads to incorrect answers or failure to evaluate in the last two cases.

Please Wait...