Index: Tst/Long/gcdp_l.tst
===================================================================
--- Tst/Long/gcdp_l.tst	(revision c0971eb773a055d9b3183e7672eb903762e398c9)
+++ Tst/Long/gcdp_l.tst	(revision cc8350f619e28faa89a9cc221bb9eb248eab3122)
@@ -1,14 +1,21 @@
-// $Id: gcdp_l.tst,v 1.1.1.1 1998-04-17 15:07:35 obachman Exp $
+// $Id: gcdp_l.tst,v 1.2 1998-04-22 09:13:27 schmidt Exp $
 
 //
 // gcdp_l.tst - long tests for gcd calculations mod p.
 //
-// To Do: gcd calculations over transcendental extensions of
-// finite fields.
+// All univariate non-trivial examples come from gcdUnivP.fex
+// or gcdUnivPAlpha.fex.
+//
+// The example in variables `a', `c', `e', ... came from `untitled2(6/p/1)'
+// in stdMultivPGcd.in.
+//
+// To Do:
+//
+// o multivariate gcd calculations with parameters
 //
 
 LIB "tst.lib";
 tst_init();
-tst_ignore("CVS ID  : $Id: gcdp_l.tst,v 1.1.1.1 1998-04-17 15:07:35 obachman Exp $");
+tst_ignore("CVS ID  : $Id: gcdp_l.tst,v 1.2 1998-04-22 09:13:27 schmidt Exp $");
 
 //
@@ -16,8 +23,24 @@
 //
 
+tst_ignore( "ring r1=32003,x,dp;" );
 ring r1=32003,x,dp;
 
 poly f;
 poly g;
+
+f=106*x^13-583*x^12-1060*x^11+8056*x^10+1696*x^9-327*x^8+12508*x^7+8277*x^6+5609*x^5-12879*x^4+13144*x^3-2544*x^2;
+g=11118*x^14-5404*x^13-908*x^12-13908*x^11+3188*x^10-8818*x^9+10439*x^8-14811*x^7+15530*x^6-4891*x^5+6322*x^4+15829*x^3-13686*x^2;
+
+gcd(f, g);
+
+f=-14613*x^17+2235*x^16-298*x^15+4540*x^14+7214*x^13+5494*x^12-3122*x^11-4720*x^10+8300*x^9-6582*x^8-9908*x^7-15983*x^6-5802*x^5-8634*x^4+7899*x^3+10556*x^2+6931*x+11063;
+g=-10168*x^20+6674*x^19+3004*x^18+13113*x^17+9449*x^16+9097*x^15-6420*x^14+50*x^13+434*x^12-15226*x^11+3727*x^10-14065*x^9-9751*x^8-15792*x^7+6004*x^6-5059*x^5+2479*x^4-12504*x^3-11328*x^2-11338*x-8280;
+
+gcd(f, g);
+
+f=3812*x^22-6874*x^21+12586*x^20+3003*x^19-9568*x^18+11117*x^17 +7524*x^16+11138*x^15-9743*x^14+1892*x^13+12485*x^12-569*x^11-8265*x^10-5991*x^9+13701*x^8+2644*x^7-3936*x^6-15875*x^5+1289*x^4+3956*x^3-10099*x^2-6616*x+5401;
+g=10652*x^20-4144*x^19-11810*x^18+8237*x^17-8675*x^16+6545*x^15-3601*x^14+14559*x^13+8090*x^12-8378*x^11+14255*x^10+8767*x^9-13932*x^8+11602*x^7-10751*x^6-4899*x^5+8637*x^4+14084*x^3-11583*x^2+5882*x+885;
+
+gcd(f, g);
 
 f=3812*x^22-6874*x^21+12586*x^20+3003*x^19-9568*x^18+11117*x^17+7524*x^16+11138*x^15-9743*x^14+1892*x^13+12485*x^12-569*x^11-8265*x^10-5991*x^9+13701*x^8+2644*x^7-3936*x^6-15875*x^5+1289*x^4+3956*x^3-10099*x^2-6616*x+5401;
@@ -46,7 +69,8 @@
 
 //
-// - ring r2=(32003,a),x,dp.
+// - ring r2=(32003,a),x,dp; minpoly=a^4+8734*a^3+a^2+11817*a+1.
 //
 
+tst_ignore( "ring r2=(32003,a),x,dp;" );
 ring r2=(32003,a),x,dp;
 minpoly=a^4+8734*a^3+a^2+11817*a+1;
@@ -55,5 +79,5 @@
 poly g;
 
-// first, some of the above examples
+// first, some of the r1 examples
 
 f=3812*x^22-6874*x^21+12586*x^20+3003*x^19-9568*x^18+11117*x^17+7524*x^16+11138*x^15-9743*x^14+1892*x^13+12485*x^12-569*x^11-8265*x^10-5991*x^9+13701*x^8+2644*x^7-3936*x^6-15875*x^5+1289*x^4+3956*x^3-10099*x^2-6616*x+5401;
@@ -100,3 +124,73 @@
 gcd(f,g);
 
+//
+// - ring r3=(32003,a,c,e),(f,h,k),dp.
+//
+
+tst_ignore( "ring r3=(32003,a,c,e),(f,h,k),dp;" );
+ring r3=(32003,a,c,e),(f,h,k),dp;
+
+poly fPoly;
+poly gPoly;
+
+fPoly=(10501*c^11*e^3*f^3*k^4+500*c^10*e^4*f^2*k^5+12001*c^10*e^3*f^4*h*k^3-500*c^9*e^5*f*k^6-14501*c^9*e^4*f^3*h*k^4-3500*c^9*e^3*f^5*h^2*k^2-10501*c^8*e^6*k^7+4000*c^8*e^5*f^2*h*k^5+7000*c^8*e^4*f^4*h^2*k^3-7001*c^8*e^3*f^6*h^3*k-12501*c^7*e^6*f*h*k^6-13501*c^7*e^5*f^3*h^2*k^4-12001*c^7*e^3*f^7*h^4+11001*c^6*e^7*h*k^7+9001*c^6*e^6*f^2*h^2*k^5+13002*c^6*e^5*f^4*h^3*k^3+3001*c^6*e^4*f^6*h^4*k+1000*c^5*e^7*f*h^2*k^6+14002*c^5*e^6*f^3*h^3*k^4-7001*c^5*e^5*f^5*h^4*k^2+4000*c^5*e^4*f^7*h^5-4003*c^4*e^7*f^2*h^3*k^5+7997*c^4*e^6*f^4*h^4*k^3-12002*c^4*e^5*f^6*h^5*k+2*c^3*e^8*f*h^3*k^6-7995*c^3*e^7*f^3*h^4*k^4-7997*c^3*e^6*f^5*h^5*k^2-16001*c^3*e^5*f^7*h^6+16001*c^2*e^9*h^3*k^7-3*c^2*e^8*f^2*h^4*k^5+15998*c^2*e^7*f^4*h^5*k^3-c^2*e^6*f^6*h^6*k-16001*c*e^9*f*h^4*k^6+c*e^8*f^3*h^5*k^4-16001*c*e^7*f^5*h^6*k^2);
+
+gPoly=(10501*c^9*f^8*k^4+500*c^8*e*f^7*k^5-9001*c^8*f^9*h*k^3-500*c^7*e^2*f^6*k^6+15002*c^7*e*f^8*h*k^4-5500*c^7*f^10*h^2*k^2-10501*c^6*e^3*f^5*k^7+9000*c^6*e^2*f^7*h*k^5-7503*c^6*e*f^9*h^2*k^3-4001*c^6*f^11*h^3*k+5001*c^5*e^3*f^6*h*k^6-496*c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+128*c^3*e^3*f^5*h^8*k^3-32*c^2*e^4*f^4*h^8*k^4);
+
+gcd(fPoly, gPoly);
+
+fPoly=(-15939*a^2*c^18*e*f^5*k^10+15314*a^2*c^17*e^2*f^4*k^11-5813*a^2*c^17*e*f^6*h*k^9+12626*a^2*c^16*e^3*f^3*k^12-6189*a^2*c^16*e^2*f^5*h*k^10-13501*a^2*c^16*e*f^7*h^2*k^8+2938*a^2*c^15*e^4*f^2*k^13+6254*a^2*c^15*e^3*f^4*h*k^11-809*a^2*c^15*e^2*f^6*h^2*k^9+14497*a^2*c^15*e*f^8*h^3*k^7+6688*a^2*c^14*e^5*f*k^14+10933*a^2*c^14*e^4*f^3*h*k^12+2667*a^2*c^14*e^3*f^5*h^2*k^10-15807*a^2*c^14*e^2*f^7*h^3*k^8+12710*a^2*c^14*e*f^9*h^4*k^6+10376*a^2*c^13*e^6*k^15-11809*a^2*c^13*e^5*f^2*h*k^13+15983*a^2*c^13*e^4*f^4*h^2*k^11-7531*a^2*c^13*e^3*f^6*h^3*k^9-11595*a^2*c^13*e^2*f^8*h^4*k^7+7759*a^2*c^13*e*f^10*h^5*k^5-377*a^2*c^12*e^6*f*h*k^14-8237*a^2*c^12*e^5*f^3*h^2*k^12+12315*a^2*c^12*e^4*f^5*h^3*k^10+14837*a^2*c^12*e^3*f^7*h^4*k^8-2945*a^2*c^12*e^2*f^9*h^5*k^6-1669*a^2*c^12*e*f^11*h^6*k^4+7001*a^2*c^11*e^7*h*k^15-5095*a^2*c^11*e^6*f^2*h^2*k^13+15751*a^2*c^11*e^5*f^4*h^3*k^11-6433*a^2*c^11*e^4*f^6*h^4*k^9-1178*a^2*c^11*e^3*f^8*h^5*k^7+13741*a^2*c^11*e^2*f^10*h^6*k^5-6075*a^2*c^11*e*f^12*h^7*k^3-7011*a^2*c^10*e^7*f*h^2*k^14+9719*a^2*c^10*e^6*f^3*h^3*k^12+2122*a^2*c^10*e^5*f^5*h^4*k^10-7622*a^2*c^10*e^4*f^7*h^5*k^8-6837*a^2*c^10*e^3*f^9*h^6*k^6+496*a^2*c^10*e^2*f^11*h^7*k^4-7959*a^2*c^10*e*f^13*h^8*k^2-16000*a^2*c^9*e^8*h^2*k^15-4923*a^2*c^9*e^7*f^2*h^3*k^13+9471*a^2*c^9*e^6*f^4*h^4*k^11+9695*a^2*c^9*e^5*f^6*h^5*k^9-5510*a^2*c^9*e^4*f^8*h^6*k^7+10543*a^2*c^9*e^3*f^10*h^7*k^5+7714*a^2*c^9*e^2*f^12*h^8*k^3+15988*a^2*c^9*e*f^14*h^9*k-8022*a^2*c^8*e^8*f*h^3*k^14+2836*a^2*c^8*e^7*f^3*h^4*k^12+341*a^2*c^8*e^6*f^5*h^5*k^10+1267*a^2*c^8*e^5*f^7*h^6*k^8-5523*a^2*c^8*e^4*f^9*h^7*k^6-15137*a^2*c^8*e^3*f^11*h^8*k^4+94*a^2*c^8*e^2*f^13*h^9*k^2+2*a^2*c^8*e*f^15*h^10-15999*a^2*c^7*e^9*h^3*k^15+8068*a^2*c^7*e^8*f^2*h^4*k^13+1994*a^2*c^7*e^7*f^4*h^5*k^11-9422*a^2*c^7*e^6*f^6*h^6*k^9+7341*a^2*c^7*e^5*f^8*h^7*k^7+14503*a^2*c^7*e^4*f^10*h^8*k^5+15717*a^2*c^7*e^3*f^12*h^9*k^3-14*a^2*c^7*e^2*f^14*h^10*k-14*a^2*c^6*e^9*f*h^4*k^14-8072*a^2*c^6*e^8*f^3*h^5*k^12+487*a^2*c^6*e^7*f^5*h^6*k^10+9827*a^2*c^6*e^6*f^7*h^7*k^8-6364*a^2*c^6*e^5*f^9*h^8*k^6+489*a^2*c^6*e^4*f^11*h^9*k^4+42*a^2*c^6*e^3*f^13*h^10*k^2+a^2*c^5*e^10*h^4*k^15+33*a^2*c^5*e^9*f^2*h^5*k^13+7970*a^2*c^5*e^8*f^4*h^6*k^11+15252*a^2*c^5*e^7*f^6*h^7*k^9+6849*a^2*c^5*e^6*f^8*h^8*k^7+15479*a^2*c^5*e^5*f^10*h^9*k^5-70*a^2*c^5*e^4*f^12*h^10*k^3-5*a^2*c^4*e^10*f*h^5*k^14-36*a^2*c^4*e^9*f^3*h^6*k^12-15865*a^2*c^4*e^8*f^5*h^7*k^10+503*a^2*c^4*e^7*f^7*h^8*k^8+356*a^2*c^4*e^6*f^9*h^9*k^6+70*a^2*c^4*e^5*f^11*h^10*k^4+9*a^2*c^3*e^10*f^2*h^6*k^13-15989*a^2*c^3*e^9*f^4*h^7*k^11-117*a^2*c^3*e^8*f^6*h^8*k^9+15850*a^2*c^3*e^7*f^8*h^9*k^7-42*a^2*c^3*e^6*f^10*h^10*k^5-7*a^2*c^2*e^10*f^3*h^7*k^12+6*a^2*c^2*e^9*f^5*h^8*k^10+37*a^2*c^2*e^8*f^7*h^9*k^8+14*a^2*c^2*e^7*f^9*h^10*k^6+2*a^2*c*e^10*f^4*h^8*k^11-4*a^2*c*e^9*f^6*h^9*k^9-2*a^2*c*e^8*f^8*h^10*k^7);
+
+gPoly=(-5313*c^17*e*f^3*k^13+5313*c^17*f^5*h*k^11+15939*c^16*e^2*f^2*k^14-5688*c^16*e*f^4*h*k^12-10251*c^16*f^6*h^2*k^10-15939*c^15*e^3*f*k^15-3813*c^15*e^2*f^3*h*k^13+1875*c^15*e*f^5*h^2*k^11-14126*c^15*f^7*h^3*k^9+5313*c^14*e^4*k^16-7563*c^14*e^3*f^2*h*k^14+7877*c^14*e^2*f^4*h^2*k^12-10376*c^14*e*f^6*h^3*k^10+4749*c^14*f^8*h^4*k^8-9251*c^13*e^4*f*h*k^15+5623*c^13*e^3*f^3*h^2*k^13-12131*c^13*e^2*f^5*h^3*k^11-13560*c^13*e*f^7*h^4*k^9-2684*c^13*f^9*h^5*k^7-11001*c^12*e^5*h*k^16+6878*c^12*e^4*f^2*h^2*k^14-8112*c^12*e^3*f^4*h^3*k^12+193*c^12*e^2*f^6*h^4*k^10-6954*c^12*e*f^8*h^5*k^8-13007*c^12*f^10*h^6*k^6-10002*c^11*e^5*f*h^2*k^15+12734*c^11*e^4*f^3*h^3*k^13-2722*c^11*e^3*f^5*h^4*k^11-12047*c^11*e^2*f^7*h^5*k^9+14032*c^11*e*f^9*h^6*k^7-1995*c^11*f^11*h^7*k^5-2000*c^10*e^6*h^2*k^16+8012*c^10*e^5*f^2*h^3*k^14+7371*c^10*e^4*f^4*h^4*k^12+713*c^10*e^3*f^6*h^5*k^10+7940*c^10*e^2*f^8*h^6*k^8-6032*c^10*e*f^10*h^7*k^6+15999*c^10*f^12*h^8*k^4+7997*c^9*e^6*f*h^3*k^15+15952*c^9*e^5*f^3*h^4*k^13+3916*c^9*e^4*f^5*h^5*k^11-7958*c^9*e^3*f^7*h^6*k^9+12079*c^9*e^2*f^9*h^7*k^7-15985*c^9*e*f^11*h^8*k^5-16001*c^9*f^13*h^9*k^3-16001*c^8*e^7*h^3*k^16-11978*c^8*e^6*f^2*h^4*k^14+9096*c^8*e^5*f^4*h^5*k^12-972*c^8*e^4*f^6*h^6*k^10+3903*c^8*e^3*f^8*h^7*k^8-46*c^8*e^2*f^10*h^8*k^6+15998*c^8*e*f^12*h^9*k^4+15996*c^7*e^7*f*h^4*k^15-8056*c^7*e^6*f^3*h^5*k^13+1925*c^7*e^5*f^5*h^6*k^11-9945*c^7*e^4*f^7*h^7*k^9-15932*c^7*e^3*f^9*h^8*k^7-15991*c^7*e^2*f^11*h^9*k^5-16001*c^6*e^8*h^4*k^16-15985*c^6*e^7*f^2*h^5*k^14-1942*c^6*e^6*f^4*h^6*k^12-13999*c^6*e^5*f^6*h^7*k^10-60*c^6*e^4*f^8*h^8*k^8+15984*c^6*e^3*f^10*h^9*k^6-2*c^5*e^8*f*h^5*k^15-21*c^5*e^7*f^3*h^6*k^13-22*c^5*e^6*f^5*h^7*k^11-15974*c^5*e^5*f^7*h^8*k^9-15984*c^5*e^4*f^9*h^9*k^7+3*c^4*e^8*f^2*h^6*k^14-15990*c^4*e^7*f^4*h^7*k^12-4*c^4*e^6*f^6*h^8*k^10+15991*c^4*e^5*f^8*h^9*k^8-2*c^3*e^8*f^3*h^7*k^13+16000*c^3*e^7*f^5*h^8*k^11-15998*c^3*e^6*f^7*h^9*k^9-16001*c^2*e^8*f^4*h^8*k^12+16001*c^2*e^7*f^6*h^9*k^10);
+
+gcd(fPoly, gPoly);
+
+//
+// - ring r4=32003,(a,c,e,f,h,k),dp.
+//
+// The examples from r4 are those from r3 with parameters
+// changed to ring variables.
+//
+
+tst_ignore( "ring r4=32003,(a,c,e,f,h,k),dp;" );
+ring r4=32003,(a,c,e,f,h,k),dp;
+
+poly fPoly;
+poly gPoly;
+
+fPoly=(10501*c^11*e^3*f^3*k^4+500*c^10*e^4*f^2*k^5+12001*c^10*e^3*f^4*h*k^3-500*c^9*e^5*f*k^6-14501*c^9*e^4*f^3*h*k^4-3500*c^9*e^3*f^5*h^2*k^2-10501*c^8*e^6*k^7+4000*c^8*e^5*f^2*h*k^5+7000*c^8*e^4*f^4*h^2*k^3-7001*c^8*e^3*f^6*h^3*k-12501*c^7*e^6*f*h*k^6-13501*c^7*e^5*f^3*h^2*k^4-12001*c^7*e^3*f^7*h^4+11001*c^6*e^7*h*k^7+9001*c^6*e^6*f^2*h^2*k^5+13002*c^6*e^5*f^4*h^3*k^3+3001*c^6*e^4*f^6*h^4*k+1000*c^5*e^7*f*h^2*k^6+14002*c^5*e^6*f^3*h^3*k^4-7001*c^5*e^5*f^5*h^4*k^2+4000*c^5*e^4*f^7*h^5-4003*c^4*e^7*f^2*h^3*k^5+7997*c^4*e^6*f^4*h^4*k^3-12002*c^4*e^5*f^6*h^5*k+2*c^3*e^8*f*h^3*k^6-7995*c^3*e^7*f^3*h^4*k^4-7997*c^3*e^6*f^5*h^5*k^2-16001*c^3*e^5*f^7*h^6+16001*c^2*e^9*h^3*k^7-3*c^2*e^8*f^2*h^4*k^5+15998*c^2*e^7*f^4*h^5*k^3-c^2*e^6*f^6*h^6*k-16001*c*e^9*f*h^4*k^6+c*e^8*f^3*h^5*k^4-16001*c*e^7*f^5*h^6*k^2);
+
+gPoly=(10501*c^9*f^8*k^4+500*c^8*e*f^7*k^5-9001*c^8*f^9*h*k^3-500*c^7*e^2*f^6*k^6+15002*c^7*e*f^8*h*k^4-5500*c^7*f^10*h^2*k^2-10501*c^6*e^3*f^5*k^7+9000*c^6*e^2*f^7*h*k^5-7503*c^6*e*f^9*h^2*k^3-4001*c^6*f^11*h^3*k+5001*c^5*e^3*f^6*h*k^6-496*c^5*e^2*f^8*h^2*k^4+3*c^5*e*f^10*h^3*k^2+8001*c^5*f^12*h^4+12001*c^4*e^4*f^5*h*k^7+5497*c^4*e^3*f^7*h^2*k^5+7995*c^4*e^2*f^9*h^3*k^3-8002*c^4*e*f^11*h^4*k-16000*c^3*e^4*f^6*h^2*k^6-15996*c^3*e^3*f^8*h^3*k^4-15999*c^3*e^2*f^10*h^4*k^2-8001*c^2*e^5*f^5*h^2*k^7-4003*c^2*e^4*f^7*h^3*k^5+15999*c^2*e^3*f^9*h^4*k^3-16001*c*e^5*f^6*h^3*k^6+8002*c*e^4*f^8*h^4*k^4-8001*e^5*f^7*h^4*k^5);
+
+gcd(fPoly, gPoly);
+
+fPoly=(8001*a*c^10*e^2*f^4*k^4+16001*a*c^9*e^3*f^3*k^5+15999*a*c^9*e^2*f^5*h*k^3+8001*a*c^8*e^4*f^2*k^6+7*a*c^8*e^3*f^4*h*k^4+8009*a*c^8*e^2*f^6*h^2*k^2+15995*a*c^7*e^4*f^3*h*k^5+15973*a*c^7*e^3*f^5*h^2*k^3-10*a*c^7*e^2*f^7*h^3*k+2*a*c^6*e^5*f^2*h*k^6+8037*a*c^6*e^4*f^4*h^2*k^4+38*a*c^6*e^3*f^6*h^3*k^2+4*a*c^6*e^2*f^8*h^4-20*a*c^5*e^5*f^3*h^2*k^5-54*a*c^5*e^4*f^5*h^3*k^3-16*a*c^5*e^3*f^7*h^4*k+4*a*c^4*e^6*f^2*h^2*k^6+34*a*c^4*e^5*f^4*h^3*k^4+24*a*c^4*e^4*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^5*k^6-1548*c^6*e^2*f^4*h^6*k^4-608*c^6*e*f^6*h^7*k^2-32*c^6*f^8*h^8+128*c^5*e^4*f*h^5*k^7+896*c^5*e^3*f^3*h^6*k^5+864*c^5*e^2*f^5*h^7*k^3+128*c^5*e*f^7*h^8*k-192*c^4*e^4*f^2*h^6*k^6-544*c^4*e^3*f^4*h^7*k^4-192*c^4*e^2*f^6*h^8*k^2+128*c^3*e^4*f^3*h^7*k^5+128*c^3*e^3*f^5*h^8*k^3-32*c^2*e^4*f^4*h^8*k^4);
+
+gcd(fPoly, gPoly);
+
+fPoly=(-15939*a^2*c^18*e*f^5*k^10+15314*a^2*c^17*e^2*f^4*k^11-5813*a^2*c^17*e*f^6*h*k^9+12626*a^2*c^16*e^3*f^3*k^12-6189*a^2*c^16*e^2*f^5*h*k^10-13501*a^2*c^16*e*f^7*h^2*k^8+2938*a^2*c^15*e^4*f^2*k^13+6254*a^2*c^15*e^3*f^4*h*k^11-809*a^2*c^15*e^2*f^6*h^2*k^9+14497*a^2*c^15*e*f^8*h^3*k^7+6688*a^2*c^14*e^5*f*k^14+10933*a^2*c^14*e^4*f^3*h*k^12+2667*a^2*c^14*e^3*f^5*h^2*k^10-15807*a^2*c^14*e^2*f^7*h^3*k^8+12710*a^2*c^14*e*f^9*h^4*k^6+10376*a^2*c^13*e^6*k^15-11809*a^2*c^13*e^5*f^2*h*k^13+15983*a^2*c^13*e^4*f^4*h^2*k^11-7531*a^2*c^13*e^3*f^6*h^3*k^9-11595*a^2*c^13*e^2*f^8*h^4*k^7+7759*a^2*c^13*e*f^10*h^5*k^5-377*a^2*c^12*e^6*f*h*k^14-8237*a^2*c^12*e^5*f^3*h^2*k^12+12315*a^2*c^12*e^4*f^5*h^3*k^10+14837*a^2*c^12*e^3*f^7*h^4*k^8-2945*a^2*c^12*e^2*f^9*h^5*k^6-1669*a^2*c^12*e*f^11*h^6*k^4+7001*a^2*c^11*e^7*h*k^15-5095*a^2*c^11*e^6*f^2*h^2*k^13+15751*a^2*c^11*e^5*f^4*h^3*k^11-6433*a^2*c^11*e^4*f^6*h^4*k^9-1178*a^2*c^11*e^3*f^8*h^5*k^7+13741*a^2*c^11*e^2*f^10*h^6*k^5-6075*a^2*c^11*e*f^12*h^7*k^3-7011*a^2*c^10*e^7*f*h^2*k^14+9719*a^2*c^10*e^6*f^3*h^3*k^12+2122*a^2*c^10*e^5*f^5*h^4*k^10-7622*a^2*c^10*e^4*f^7*h^5*k^8-6837*a^2*c^10*e^3*f^9*h^6*k^6+496*a^2*c^10*e^2*f^11*h^7*k^4-7959*a^2*c^10*e*f^13*h^8*k^2-16000*a^2*c^9*e^8*h^2*k^15-4923*a^2*c^9*e^7*f^2*h^3*k^13+9471*a^2*c^9*e^6*f^4*h^4*k^11+9695*a^2*c^9*e^5*f^6*h^5*k^9-5510*a^2*c^9*e^4*f^8*h^6*k^7+10543*a^2*c^9*e^3*f^10*h^7*k^5+7714*a^2*c^9*e^2*f^12*h^8*k^3+15988*a^2*c^9*e*f^14*h^9*k-8022*a^2*c^8*e^8*f*h^3*k^14+2836*a^2*c^8*e^7*f^3*h^4*k^12+341*a^2*c^8*e^6*f^5*h^5*k^10+1267*a^2*c^8*e^5*f^7*h^6*k^8-5523*a^2*c^8*e^4*f^9*h^7*k^6-15137*a^2*c^8*e^3*f^11*h^8*k^4+94*a^2*c^8*e^2*f^13*h^9*k^2+2*a^2*c^8*e*f^15*h^10-15999*a^2*c^7*e^9*h^3*k^15+8068*a^2*c^7*e^8*f^2*h^4*k^13+1994*a^2*c^7*e^7*f^4*h^5*k^11-9422*a^2*c^7*e^6*f^6*h^6*k^9+7341*a^2*c^7*e^5*f^8*h^7*k^7+14503*a^2*c^7*e^4*f^10*h^8*k^5+15717*a^2*c^7*e^3*f^12*h^9*k^3-14*a^2*c^7*e^2*f^14*h^10*k-14*a^2*c^6*e^9*f*h^4*k^14-8072*a^2*c^6*e^8*f^3*h^5*k^12+487*a^2*c^6*e^7*f^5*h^6*k^10+9827*a^2*c^6*e^6*f^7*h^7*k^8-6364*a^2*c^6*e^5*f^9*h^8*k^6+489*a^2*c^6*e^4*f^11*h^9*k^4+42*a^2*c^6*e^3*f^13*h^10*k^2+a^2*c^5*e^10*h^4*k^15+33*a^2*c^5*e^9*f^2*h^5*k^13+7970*a^2*c^5*e^8*f^4*h^6*k^11+15252*a^2*c^5*e^7*f^6*h^7*k^9+6849*a^2*c^5*e^6*f^8*h^8*k^7+15479*a^2*c^5*e^5*f^10*h^9*k^5-70*a^2*c^5*e^4*f^12*h^10*k^3-5*a^2*c^4*e^10*f*h^5*k^14-36*a^2*c^4*e^9*f^3*h^6*k^12-15865*a^2*c^4*e^8*f^5*h^7*k^10+503*a^2*c^4*e^7*f^7*h^8*k^8+356*a^2*c^4*e^6*f^9*h^9*k^6+70*a^2*c^4*e^5*f^11*h^10*k^4+9*a^2*c^3*e^10*f^2*h^6*k^13-15989*a^2*c^3*e^9*f^4*h^7*k^11-117*a^2*c^3*e^8*f^6*h^8*k^9+15850*a^2*c^3*e^7*f^8*h^9*k^7-42*a^2*c^3*e^6*f^10*h^10*k^5-7*a^2*c^2*e^10*f^3*h^7*k^12+6*a^2*c^2*e^9*f^5*h^8*k^10+37*a^2*c^2*e^8*f^7*h^9*k^8+14*a^2*c^2*e^7*f^9*h^10*k^6+2*a^2*c*e^10*f^4*h^8*k^11-4*a^2*c*e^9*f^6*h^9*k^9-2*a^2*c*e^8*f^8*h^10*k^7);
+
+gPoly=(-5313*c^17*e*f^3*k^13+5313*c^17*f^5*h*k^11+15939*c^16*e^2*f^2*k^14-5688*c^16*e*f^4*h*k^12-10251*c^16*f^6*h^2*k^10-15939*c^15*e^3*f*k^15-3813*c^15*e^2*f^3*h*k^13+1875*c^15*e*f^5*h^2*k^11-14126*c^15*f^7*h^3*k^9+5313*c^14*e^4*k^16-7563*c^14*e^3*f^2*h*k^14+7877*c^14*e^2*f^4*h^2*k^12-10376*c^14*e*f^6*h^3*k^10+4749*c^14*f^8*h^4*k^8-9251*c^13*e^4*f*h*k^15+5623*c^13*e^3*f^3*h^2*k^13-12131*c^13*e^2*f^5*h^3*k^11-13560*c^13*e*f^7*h^4*k^9-2684*c^13*f^9*h^5*k^7-11001*c^12*e^5*h*k^16+6878*c^12*e^4*f^2*h^2*k^14-8112*c^12*e^3*f^4*h^3*k^12+193*c^12*e^2*f^6*h^4*k^10-6954*c^12*e*f^8*h^5*k^8-13007*c^12*f^10*h^6*k^6-10002*c^11*e^5*f*h^2*k^15+12734*c^11*e^4*f^3*h^3*k^13-2722*c^11*e^3*f^5*h^4*k^11-12047*c^11*e^2*f^7*h^5*k^9+14032*c^11*e*f^9*h^6*k^7-1995*c^11*f^11*h^7*k^5-2000*c^10*e^6*h^2*k^16+8012*c^10*e^5*f^2*h^3*k^14+7371*c^10*e^4*f^4*h^4*k^12+713*c^10*e^3*f^6*h^5*k^10+7940*c^10*e^2*f^8*h^6*k^8-6032*c^10*e*f^10*h^7*k^6+15999*c^10*f^12*h^8*k^4+7997*c^9*e^6*f*h^3*k^15+15952*c^9*e^5*f^3*h^4*k^13+3916*c^9*e^4*f^5*h^5*k^11-7958*c^9*e^3*f^7*h^6*k^9+12079*c^9*e^2*f^9*h^7*k^7-15985*c^9*e*f^11*h^8*k^5-16001*c^9*f^13*h^9*k^3-16001*c^8*e^7*h^3*k^16-11978*c^8*e^6*f^2*h^4*k^14+9096*c^8*e^5*f^4*h^5*k^12-972*c^8*e^4*f^6*h^6*k^10+3903*c^8*e^3*f^8*h^7*k^8-46*c^8*e^2*f^10*h^8*k^6+15998*c^8*e*f^12*h^9*k^4+15996*c^7*e^7*f*h^4*k^15-8056*c^7*e^6*f^3*h^5*k^13+1925*c^7*e^5*f^5*h^6*k^11-9945*c^7*e^4*f^7*h^7*k^9-15932*c^7*e^3*f^9*h^8*k^7-15991*c^7*e^2*f^11*h^9*k^5-16001*c^6*e^8*h^4*k^16-15985*c^6*e^7*f^2*h^5*k^14-1942*c^6*e^6*f^4*h^6*k^12-13999*c^6*e^5*f^6*h^7*k^10-60*c^6*e^4*f^8*h^8*k^8+15984*c^6*e^3*f^10*h^9*k^6-2*c^5*e^8*f*h^5*k^15-21*c^5*e^7*f^3*h^6*k^13-22*c^5*e^6*f^5*h^7*k^11-15974*c^5*e^5*f^7*h^8*k^9-15984*c^5*e^4*f^9*h^9*k^7+3*c^4*e^8*f^2*h^6*k^14-15990*c^4*e^7*f^4*h^7*k^12-4*c^4*e^6*f^6*h^8*k^10+15991*c^4*e^5*f^8*h^9*k^8-2*c^3*e^8*f^3*h^7*k^13+16000*c^3*e^7*f^5*h^8*k^11-15998*c^3*e^6*f^7*h^9*k^9-16001*c^2*e^8*f^4*h^8*k^12+16001*c^2*e^7*f^6*h^9*k^10);
+
+gcd(fPoly, gPoly);
 $
