| 982 | } |
| 983 | |
| 984 | void |
| 985 | extEarlyFactorDetection (CFList& reconstructedFactors, CanonicalForm& F, CFList& |
| 986 | factors,int& adaptedLiftBound, int*& factorsFoundIndex, |
| 987 | DegreePattern& degs, bool& success, const |
| 988 | ExtensionInfo& info, const CanonicalForm& eval, int deg |
| 989 | ) |
| 990 | { |
| 991 | Variable alpha= info.getAlpha(); |
| 992 | Variable beta= info.getBeta(); |
| 993 | CanonicalForm gamma= info.getGamma(); |
| 994 | CanonicalForm delta= info.getDelta(); |
| 995 | int k= info.getGFDegree(); |
| 996 | DegreePattern bufDegs1= degs, bufDegs2; |
| 997 | CFList result; |
| 998 | CFList T= factors; |
| 999 | Variable y= F.mvar(); |
| 1000 | Variable x= Variable (1); |
| 1001 | CanonicalForm buf= F, LCBuf= LC (buf, x), g, buf2; |
| 1002 | CanonicalForm M= power (y, deg); |
| 1003 | adaptedLiftBound= 0; |
| 1004 | bool trueFactor= false; |
| 1005 | int d= degree (F), l= 0; |
| 1006 | CFList source, dest; |
| 1007 | int degMipoBeta= 1; |
| 1008 | if (!k && beta.level() != 1) |
| 1009 | degMipoBeta= degree (getMipo (beta)); |
| 1010 | CanonicalForm quot; |
| 1011 | for (CFListIterator i= factors; i.hasItem(); i++, l++) |
| 1012 | { |
| 1013 | if (!bufDegs1.find (degree (i.getItem(), 1)) || factorsFoundIndex[l] == 1) |
| 1014 | continue; |
| 1015 | else |
| 1016 | { |
| 1017 | g= mulMod2 (i.getItem(), LCBuf, M); |
| 1018 | g /= content (g, x); |
| 1019 | if (fdivides (g, buf, quot)) |
| 1020 | { |
| 1021 | buf2= g (y - eval, y); |
| 1022 | buf2 /= Lc (buf2); |
| 1023 | |
| 1024 | if (!k && beta == x) |
| 1025 | { |
| 1026 | if (degree (buf2, alpha) < degMipoBeta) |
| 1027 | { |
| 1028 | appendTestMapDown (reconstructedFactors, buf2, info, source, dest); |
| 1029 | factorsFoundIndex[l]= 1; |
| 1030 | buf= quot; |
| 1031 | d -= degree (g); |
| 1032 | LCBuf= LC (buf, x); |
| 1033 | trueFactor= true; |
| 1034 | } |
| 1035 | } |
| 1036 | else |
| 1037 | { |
| 1038 | if (!isInExtension (buf2, gamma, k, delta, source, dest)) |
| 1039 | { |
| 1040 | appendTestMapDown (reconstructedFactors, buf2, info, source, dest); |
| 1041 | factorsFoundIndex[l]= 1; |
no test coverage detected