The user documentation for 'contexts' says:
"When a fresh Maxima is started up, the user is in a context called
`initial',
which has `global' as a subcontext."
But in a fresh Maxima, it seems there is no context called 'initial'
(%i1) contexts;
(%o1) [global]
Is this a bug or a documentation error? Let's try an experiment:
(%i1) contexts;
(%o1) [global]
(%i2) f(e) := block([lcntx,q],
apply('supcontext, ['lcntx, context]),
activate(lcntx),
assume(x > 0),
q : is(e > 0),
killcontext(lcntx),
q)$
(%i3) f(x);
(%o3) true <-- OK
(%i4) f(x);
Nonexistent context initial. <-- Yikes
#0: f(e=x)
Try this again, but first create a context 'initial.'
It now seems to work:
(%i1) newcontext(initial)$
(%i2) f(e) := block([lcntx,q],
apply('supcontext, ['lcntx, context]),
activate(lcntx),
assume(x > 0),
q : is(e > 0),
killcontext(lcntx),
q)$
(%i3) f(x);
(%o3) true
(%i4) f(x);
(%o4) true
(%i5) f(-x);
(%o5) false
(%i6) contexts;
(%o6) [initial,global]
Barton