diff options
Diffstat (limited to 'src/algebra/gpgcd.spad.pamphlet')
-rw-r--r-- | src/algebra/gpgcd.spad.pamphlet | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/algebra/gpgcd.spad.pamphlet b/src/algebra/gpgcd.spad.pamphlet index 5b5c4510..7a5d282f 100644 --- a/src/algebra/gpgcd.spad.pamphlet +++ b/src/algebra/gpgcd.spad.pamphlet @@ -119,8 +119,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where pp1:=flatten(p1,v1) pp2:=flatten(p2,v2) g:=gcdSameVariables(pp1,pp2,v) --- one? g => gcd(c1,c2)::SUPP - (g = 1) => gcd(c1,c2)::SUPP + one? g => gcd(c1,c2)::SUPP (#v1 = 0 or not (p1 exquo g) case "failed") and -- if #vi = 0 then pp1 = p1, so we know g divides (#v2 = 0 or not (p2 exquo g) case "failed") @@ -132,8 +131,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where if (#v1 = 0) then g:= gcdSameVariables(g,flatten(p2,v2),v) else if (#v2=0) then g:=gcdSameVariables(g,flatten(p1,v1),v) else g:=gcdSameVariables(g,flatten(p1,v1)-flatten(p2,v2),v) --- one? g => gcd(c1,c2)::SUPP - (g = 1) => gcd(c1,c2)::SUPP + one? g => gcd(c1,c2)::SUPP (#v1 = 0 or not (p1 exquo g) case "failed") and (#v2 = 0 or not (p2 exquo g) case "failed") => g*gcd(c1,c2)::SUPP -- divdes them both, so is the gcd @@ -141,8 +139,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where v1:=setDifference(vp1,v) if #v1 ~= 0 then g:=recursivelyGCDCoefficients(g,v,p1,v1) --- one? g => return gcd(c1,c2)::SUPP - (g = 1) => return gcd(c1,c2)::SUPP + one? g => return gcd(c1,c2)::SUPP v:=variables g -- there can be at most these variables in answer v2:=setDifference(vp2,v) recursivelyGCDCoefficients(g,v,p2,v2)*gcd(c1,c2) @@ -254,8 +251,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where oldg:=g if pv = [] then g:=gcdSameVariables(g,p1,v) else g:=recursivelyGCDCoefficients(p,v,p1,pv) --- one? g => return 1 - (g = 1) => return 1 + one? g => return 1 g~=oldg => oldv:=v v:=variables g @@ -276,8 +272,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where -- p1 is non-zero, but has degree zero -- p2 is non-zero cp1:=leadingCoefficient p1 --- one? cp1 => 1 - (cp1 = 1) => 1 + one? cp1 => 1 degree p2 = 0 => gcd(cp1,leadingCoefficient p2)::SUPP un?:=unit? cp1 while not zero? p2 and not un? repeat |