[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Am I posing this solve problem wrong?

From: Bill Page
Subject: Re: [Axiom-developer] Am I posing this solve problem wrong?
Date: Mon, 5 May 2008 12:57:03 -0400

On Mon, May 5, 2008 at 11:48 AM, Ralf Hemmecke wrote:
> On 05/05/2008 04:03 PM, Bill Page wrote:
>> On Mon, May 5, 2008 at 3:43 AM, Ralf Hemmecke wrote:
>>> ...
>>> Having types, Axiom should actually allow you to specify what you want.
>>>  R:=MPOLY([C1,D1,y1,x],Integer)
>>>  P:=MPOLY([y],R)
>>>  E1: P := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
>>>  solve(E1=0,y)@List(R))
>>> Unfortunately, that doesn't work (yet), but I would expect it to work in
>>> an ideal AXIOM.
>> I do not think this can work exactly like this since the solution
>> cannot be expressed in R.
> I refer again to what I wrote in
> --BEGIN quote
> Suppose, I consider the above input expression as an element in R[y]]
> where the coefficient domain R is Z[C1,D1,y1,x]. And I would like
>  solve(E1=0,y)
> to stand for "find a (or several) z \in R such that E1[y<--z]=0" where
> E1[y<--z] is my (fancy) notation for substitution of y by z in E1.
> --END quote
> I have a polynomial E1 in R[y] and I am looking for those z \in R which
> make this (univariate) Polynomial vanish. If there are no such z \in R
> then Axiom should return an empty list (or empty set).

Ok, so this is some other form of 'solve' not like those already
available in Axiom? Maybe it is something like
'solveLinearPolynomialEquation' in SUP?

>> You need Expression in order to include
>> kernels involving 'sqrt'.
> I am not looking for the most general expression.

Ok. But I thought that was the intention of this thread.

>> Or did you have something else in mind?
> Yep. I was looking for solutions that live in R.

Ok. A different problem, I think.

>> Inspite of that, could you explain a little more about how you
>> think the ideal AXIOM should work? It seems to me that the way
>> it works now is rather complex and is a consequence of several
>> interacting factors such a coercion rules that heuristically start
>> with the most specify type (i.e. a polynomial type) using coercion
>> to expand the range of possibilities.  This is affected in a non-trivial
>> and not so easily predicted manner by the exports exports from
>> the underlying types. This is built into the Axiom interpreter in a
>> rather deep way. Is there a different way this could work that might
>> produce less surprise (and frustration) on the part of the user?
> Ideally, I would like to tell "solve" where it should look for solutions.

Remember that there is not just one "solve" but rather many different
such operations and one job of the interpreter is to decide which one.

> Consider the simple equation.
>  x + 1 = 0
> What does "solve for x" actually mean? It is ambiguous.
> I would like to say
>  solve(x+1=0, x)$Set(PositiveInteger)
>  solve(x+1=0, x)$Set(Integer)
> (or similar) and get different results.

Well as I said above, by design of the interpreter what actually
happens is a consequence of the algorithm that is used to select the
appropriate "solve" operation. If I say nothing else, then the
interpreter says:

(1) -> x+1 = 0

   (1)  x + 1= 0
                                            Type: Equation Polynomial Integer

So this is what is uses to begin the process of finding an appropriate
version of "solve".

(2) -> solve(x+1=0,x)

   (2)  [x= - 1]
                              Type: List Equation Fraction Polynomial Integer

> Of course, now one could say, that one first computes the most
> general expression for the result. And then filters out results that
> one is not interested in.

No, I don't think that is the algorithm that is acutally used.

> So solve polynomials over the complex numbers and filter out all
> real solutions, if you are only interested in real solutions.
> That's a simple case.
> But I guess, there are cases where one would simply switch to another
> (maybe faster) algorithm if it were known at input time that some of the
> results are not needed anyway. Why should one bother to waste
> computation time if the result of that computation is thrown away
> immediately afterwards? Imagine one has given a polynomial (of high
> degree) with integer coefficients and looks only for integer solutions?
> Root isolation can stop if the interval is less than 1 since either there
> is exactly one solution or none in this interval. (Maybe not the best
> example to demonstrate what I mean.)

I think that in Axiom somehow this must be specified by specifying the
appropriate types.

Bill Page.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]