[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: Ralf Hemmecke
Subject: Re: [Axiom-developer] Am I posing this solve problem wrong?
Date: Mon, 05 May 2008 23:31:16 +0200
User-agent: Thunderbird (X11/20080421)

On 05/05/2008 06:57 PM, Bill Page wrote:
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.

 E1: P := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2

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


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?

I don't think that I meant that. But anyway, I am sure that nobody remembers that name when he wants to find a y such that E1=0.

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.

Hmm, the "Subject" does not say anything that "solve" should always return the most general solution. If it is the general opinion that a function with name "solve" should always return the most general solution, I should rather be quiet.

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

Ok. A different problem, I think.

It depends. Cliff did not say where he expects the result to live.

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.

Ooops, I should have written "@Set(...)" above, because I wanted to specify the result type. But maybe, it would even be better to give it as an argument like

  solve(x+1=0, x, PositiveInteger)

or so.

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

I know that it is not the most simple task for the interpreter to find out what the user actually wanted, but you asked my for an ideal AXIOM.


reply via email to

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