On 05/05/2008 05:46 AM, Bill Page wrote:
On Sun, May 4, 2008 at 10:23 PM, C Y wrote:
--- Bill Page <[EMAIL PROTECTED]> wrote:
I guess you need to be a little more explicit about the variables:
Ah. Thanks Bill. I wonder if this is the desired default behavior?
Cliff, I guess, you asked for the result you got. Bill has just shown
you how to get what you actually had in mind.
Well, Axiom is a strongly typed system so specifying the main
variables of a multivariate polynomial with coefficients from some
other ring is not entirely unexpected.
Right. Now look at Cliff's original expression.
(1) -> E1 := x2*D12+(y-y1)2*C12 - C12*D12
(1) ->
2 2 2 2 2 2 2 2 2
(1) C1 y1 - 2C1 y y1 + C1 y + D1 x - C1 D1
Type: Polynomial Integer
Without further information, Axiom puts it into the domain
Polynomial(Integer). *Don't* think that this type represents a
polynomial in x and y with C1 and D1 being in the coefficient domain.
None of these variables is a distinguised one. If you now say
solve(E1=0,y)
then before looking at the result, think of what would *you* return.
Maybe you are asking for an expression for y. But, hey, that is of
course not the only thing that you could have asked for. 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.
Now, if Axiom had given you
+----------+ +----------+
| 2 2 | 2 2
D1\|- x + C1 + C1 y1 - D1\|- x + C1 + C1 y1
(2) [y= -----------------------,y= -------------------------]
C1 C1
Type: List Equation Expression Integer
that would even be wrong, since your intention was to get elements of R.
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.
Ralf
_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer