we could change the evaluation of a command on line %i10 to be something
like evaluating
block([],newcontext(%i10), ... result: whatever is on line 10 .... ,
revert context, return result),
but this would not work if the command were, say, assume(a>0).
We could allow assumptions to become "sticky" on command.
I don't mind the current behavior, since it can be fixed by stating
assumptions earlier, and it allows for
the possibility that the two a's ARE different. Though how you would
know which is which from the question...
In particular, they are typically different in a case like this:
f(a):= -a if a<0
:= a if a>=0
(pick your own maxima syntax for expressing this).
RJF