Re: [fricas-devel] discussion: bug and description for 'radicalRoots:(L

2016-05-30 Thread oldk1331
>  Our solvers transform 
>  system of equations into triangular form.  If system is zero 
>  dimensional (has finite number of solutions) than current 
>  method works OK.  We have problem in case of higher dimensional 
>  solution set.

I noticed that too, 'triangularSystems' uses 'groebSolve' to do the
0 dimension case.  For the linear 'solve' function, there's 'checkLinear'
and 'linSolve' to deal with this high dimension situation.  But according
to your reply, similar technique doesn't apply to radicalSolve.

Still, did this patch fix this trival case and not break others?

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] discussion: bug and description for 'radicalRoots:(L RF, L SY) -> L L RE'

2016-05-29 Thread oldk1331
The bug is:

(1) -> radicalSolve([x-y],[x,y])

   (1)  [[x= x]]
  Type: 
List(List(Equation(Expression(Integer
(2) -> radicalRoots([x-y],[x,y])

   (2)  [[x]]
Type: 
List(List(Expression(Integer)))
(3) -> solve([x-y],[x,y])

   (3)  [[x= %A,y= %A]]
Type: 
List(List(Equation(Fraction(Polynomial(Integer)

Clearly result (1) is wrong, and it's easy to make it return "[[x= y]]",
however, that depends on the meaning of 'radicalRoots':

radicalRoots :(L RF, L SY)   -> L L RE
  ++ radicalRoots(lrf, lvar) finds the roots expressed in terms of
  ++ radicals of the list of rational functions lrf
  ++ with respect to the list of symbols lvar.

In the case of "radicalRoots([x-y],[x,y])" returns "[[x]]",
when equations of lrf are indeterminate, returns with
respect to the *reverse* order of lvar.

If so, the patch is:

diff --git a/src/algebra/solverad.spad b/src/algebra/solverad.spad
index c836157..fc6dec4 100644
--- a/src/algebra/solverad.spad
+++ b/src/algebra/solverad.spad
@@ -276,7 +277,7 @@ RadicalSolvePackage(R) : Cat == Capsule where
 makeEq(nres : L RE, lv : L SY) : L EQ RE ==
-  [equation(x :: RE, r) for x in lv for r in nres]
+  [equation(x :: RE, r) for x in reverse lv for r in nres]



After patch:
(1) -> radicalSolve([y-x],[x,y])

   (1)  [[y= x]]
  Type: 
List(List(Equation(Expression(Integer

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.