Ask Your Question

Revision history [back]

It seems that for now max is not a symbolic function, ie, when you type max(x/b, a), this is not kept as a symbolic expression involving the symbolic function max. Instead, it is immediately evaluated (using some form of comparison on symbolic expressions.

sage: var('a b x')
(a, b, x)
sage: expr = max(x/b,a)
sage: expr
x/b

I think there is some ticket about making more functions symbolic in Sage, it would be worth checking if max is among the functions targeted by that ticket.

One obstacle might be that max is a standard Python function and there are objections to modifying it in Sage. This obstacle is a problem for Sage in other areas too, such as interval arithmetic.