On Sun, Nov 4, 2018 at 8:03 AM Waldek Hebisch <[email protected]> wrote:
...
> <snip>
> > enough. The following patch corrects this problem:
>
> Before the patch
>
> f101 := (x*z - z*x)^2 - 2
>
> was immediately recognized as irreducible. With the patch I did not
> get answer for several minutes (may be I am not patient enough?).
> Similarly
>
> f102 := (x*z + z*x)^2 - 2
>
> and
>
> f103 := (x^2 + x + z)^2 - 2
>
Thanks again for these great test cases. There was an error in the
'bisect' function that caused an infinite loop triggered by the
earlier patch. Here is a revised patch that corrects this problem.
(Only one additional change at the beginning.)
---
diff --git a/xdpolyf1.spad b/xdpolyf1.spad
index d91cf4a..cc88597 100644
--- a/xdpolyf1.spad
+++ b/xdpolyf1.spad
@@ -75,7 +75,7 @@ XDistributedPolynomialFunctions1(ALPHABET:List
Symbol, F:Join(IntegralDomain,Gcd
remove(0,map((x:G):G+->eval(x,z)$RF,e))
bisect(z:List Equation G, e:List G):List Equation G ==
- if #z<2 then return z
+ if #z<2 then return []
z1 := first(z,#z quo 2)
if groebner(map(numer,eval(e,z)))~=[1] then return z1
z1 := last(z,#z quo 2)
@@ -145,16 +145,25 @@ XDistributedPolynomialFunctions1(ALPHABET:List
Symbol, F:Join(IntegralDomain,Gcd
else
s0: List Equation G := []
- while empty? s0 for fp in v repeat
- --output("try: ", fp::OutputForm)
- s := solve(e1,remove(fp,v))$SystemSolvePackage(F)
- while empty? s0 for s1 in s repeat
- m := map(explicit, s1)
- if #s1>0 and reduce(_and$Boolean, m) then s0:=s1
- --output("s0: ",s0::OutputForm)
-
- if empty? s0 then
- return [p]
+ while empty? s0 repeat
+ while empty? s0 for fp in v repeat
+ --output("try: ", fp::OutputForm)
+ if not groebner(map(numer,e1))=[1] then
+ s := solve(e1,remove(fp,v))$SystemSolvePackage(F)
+ while empty? s0 for s1 in s repeat
+ m := map(explicit, s1)
+ if #s1>0 and reduce(_and$Boolean, m) then s0:=s1
+ --output("s0: ",s0::OutputForm)
+
+ if empty? s0 then
+ if empty? lz then
+ return [p]
+ else
+ -- try harder!
+ lz := bisect(lz,e)
+ e1 := eval(e,lz)
+ v := members set(concat map(variables, e1))$Set(Symbol)
+
sz := concat(lz,s0)
-- choose a parameter value to make G retractable to F
---
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.