Fix for bug [ 1370433 ] trigsimp(sqrt(%i2))!=sqrt(trigsimp(%i2))?



On 11/10/06, Richard Fateman <fateman at cs.berkeley.edu> wrote:

> For the second answer we would have
>   X = {(-b+D)/(2*a) |  D=RootOf(z^2-b^2-4*a*c=0,z)}. What do we know about
> D={D[1],D[2]}?  There are two elements, and for any d in D,
>    d^2=4*a*c  and also D[1]+D[2]=0.

FWIW I'm generally in favor of stuff like this (i.e. explicit representation
of the ambiguity) or, if that's too clumsy or unworkable for whatever
reason, then preserving the ambiguous expression as it stands.
I believe it's best not to introduce unjustified certainties such as one
specific root of an expression which may have two or more.
I realize that might lead to tremendously verbose expressions, when
explicitly ambiguous expressions are combined in some way.

For roots of unity and stuff like that, a representation like
{exp(%i * theta) for theta in 2 * %pi * [0, 1, 2, 3, 4] / 5} would be
honest, if verbose. It's clumsy enough that we might not want it to
be something you have to ask for, instead of doing it automatically.

Another choice here is to represent ambiguous expressions via
unevaluated conditionals, e.g. 'if x > 0 then foo(x) else bar(x) .

best
Robert