On 4/3/07, Robert Dodier <robert.dodier at gmail.com> wrote:
> On 4/2/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> > solve(x*p=x,x)
> > Currently, Maxima returns x=0, the only solution true for all p. But
> > if you interpret parameters so that there only have to be solutions
> > for *some* values, then the correct answer is ALL, because for p=1, it
> > is true for all x.
>
> Interesting example.
Counterexamples R Us.
> I wouldn't mind seeing something like
> solve(x*p = x, x) => if p=1 then {x s.t. x in C} else {x = 0}.
This sort of thing would be fine in many ways, but I'd think it would
be difficult for many programmatic users of solve.
By the way, why not the simpler solve(...) => (p=1) or (x=0)? Maxima
currently represents that with [[x=%r1,p=1],[x=0,p=%r2]], which is of
course less general, but also probably easier for programmatic clients
of solve to use.
And what is the clause (x s.t. x in C) adding here? The type of x?
But in solving x*p=x, we are assuming that we are working in C. The
answers would be different if we were working in some other algebraic
setting: in Z4, x=2,p=3; in the 2-vectors over C, with * being
componentwise multiplication, we have solutions like x=[0,3],p=[3,1];
etc.
-s