login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #269 some issues with the 'Factored' domain revision 1 of 3

1 2 3
Editor:
Time: 2007/11/17 22:18:34 GMT-8
Note:

changed:
-
Consider the following:
\begin{axiom}
q:FR POLY INT := (x-1)*(x^2+1)
p:FR POLY INT := (x-1)*(2*x)
p+q
)tr MULTFACT )ma
factor(p+q)
\end{axiom}

The documentation says::

  Others, like addition require somewhat more work, and unless 
  the argument domain provides a factor function, the result 
  may not be completely factored.

which is not true, as shown by the result of $p+q$ above.

Furthermore, applying 'factor' to $p+q$ should probably not first expand the expression and then factor it again. It should rather map over the already known factors.

I'm not sure whether 'FR' should always try to factor the result of an addition, at least, I don't think that this was the intention of the original author.

Another issue is raised by the documentation to 'expand: % -> R' ::

  expand(f) multiplies the unit and factors together, yielding an
  "unfactored" object. Note: this is purposely not called 'coerce' which would
  cause the interpreter to do this automatically.


I tested this and found it not to be true. Note that the domain was written already in 1985, so it might well be that the interpreters behaviour has changed in this respect.

Martin

Submitted by : (unknown) at: 2007-11-17T22:18:34-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

Consider the following:

fricas
q:FR POLY INT := (x-1)*(x^2+1)

\label{eq1}{\left(x - 1 \right)}\ {\left({{x}^{2}}+ 1 \right)}(1)
Type: Factored(Polynomial(Integer))
fricas
p:FR POLY INT := (x-1)*(2*x)

\label{eq2}2 \ {\left(x - 1 \right)}\  x(2)
Type: Factored(Polynomial(Integer))
fricas
p+q

\label{eq3}{\left(x - 1 \right)}\ {{\left(x + 1 \right)}^{2}}(3)
Type: Factored(Polynomial(Integer))
fricas
)tr MULTFACT )ma
Packages traced: MultivariateFactorize(Symbol,IndexedExponents(Symbol), Integer,Polynomial(Integer)) Parameterized constructors traced: MULTFACT factor(p+q)
Internal Error The function factor with signature hashcode is missing from domain Factored(Polynomial (Integer))

The documentation says:

  Others, like addition require somewhat more work, and unless 
  the argument domain provides a factor function, the result 
  may not be completely factored.

which is not true, as shown by the result of p+q above.

Furthermore, applying factor to p+q should probably not first expand the expression and then factor it again. It should rather map over the already known factors.

I'm not sure whether FR should always try to factor the result of an addition, at least, I don't think that this was the intention of the original author.

Another issue is raised by the documentation to expand: % -> R :

  expand(f) multiplies the unit and factors together, yielding an
  "unfactored" object. Note: this is purposely not called 'coerce' which would
  cause the interpreter to do this automatically.

I tested this and found it not to be true. Note that the domain was written already in 1985, so it might well be that the interpreters behaviour has changed in this respect.

Martin