Ralf Hemmecke wrote:
>
> > Well, general idea in FriCAS is that domain and conditional sections
> > can provide more efficient code in special cases.
>
> Yes, I know, but then one has to test for every possible "coefficient"
> domain. That doesn't really scale well.
>
> Take for example, SUP. Once it is implemented, one has to add special
> code for any new coefficient domain (in case one wants that).
>
> Well we are luckily open source so that's not a big problem, but still,
> it's somewhat ugly.
My point is that PolynomialFactorizationExplicit really does not
give you more possibilities than that.
> > However, design of PolynomialFactorizationExplicit has serious
> > efficiency problems. Virtue of PolynomialFactorizationExplicit is
> > simplicity.
>
> Yes simplicity is what I like in this idea. Now you say that there is an
> efficience panelty. Can you elaborate on that? I somehow don't quite see
> it. Is this because the compiler is not able to simple take the function
> from the coefficient domain (for example squareFreePolynomial$R) and
> inline it as squareFree$SUP(R)?
It would take too much time to explain it well. But basicaly you
need global view for efficient factorization. Inability to
inline is just tip of iceberg. One example problem (not the
most important, but easiest to explain) is clearing denominators.
With global view this can be done once and _all_ other steps
work without fractions. With recursive approach there may be
fractions hidden in inner domains and at upper levels there
is no way to avoid them. Another issue is variable ordering:
simple heuristic of using variable of lowest degree as main
variable helps a lot. But you can not do this when variables
are hidden in inner domains.
As an excercise you can think how to organize routines in
src/algebra/amodgcd.spad as nice recursion in style of
PolynomialFactorizationExplicit. You will see that
routines depend crucialy on information that is normaly
hidden by domains. And formulating explicitely properties
of domains leads to so called principal ideal rings (PIR)
which are not integral domains, but have some useful
properties of PID-s.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/E1if4H5-0004bi-KH%40hera.math.uni.wroc.pl.