MCPcopy Create free account
hub / github.com/Singular/Singular / extEarlyFactorDetect

Function extEarlyFactorDetect

factory/facFqFactorize.cc:664–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662
663#if defined(HAVE_NTL) || defined(HAVE_FLINT)
664CFList
665extEarlyFactorDetect (CanonicalForm& F, CFList& factors, int& adaptedLiftBound,
666 bool& success, const ExtensionInfo& info, const CFList&
667 eval, const int deg, const CFList& MOD, const int bound)
668{
669 Variable alpha= info.getAlpha();
670 Variable beta= info.getBeta();
671 CanonicalForm gamma= info.getGamma();
672 CanonicalForm delta= info.getDelta();
673 int k= info.getGFDegree();
674 CFList result;
675 CFList T= factors;
676 CanonicalForm buf= F;
677 Variable y= F.mvar();
678 Variable x= Variable (1);
679 CanonicalForm LCBuf= LC (buf, x);
680 CanonicalForm g, gg, quot;
681 CFList M= MOD;
682 M.append (power (y, deg));
683 adaptedLiftBound= 0;
684 int d= bound;
685 int e= 0;
686 int nBuf;
687 CFList source, dest;
688
689 int degMipoBeta= 1;
690 if (!k && beta.level() != 1)
691 degMipoBeta= degree (getMipo (beta));
692
693 for (CFListIterator i= factors; i.hasItem(); i++)
694 {
695 g= mulMod (i.getItem(), LCBuf, M);
696 g /= myContent (g);
697 if (fdivides (g, buf, quot))
698 {
699 gg= reverseShift (g, eval);
700 gg /= Lc (gg);
701 if (!k && beta == x)
702 {
703 if (degree (gg, alpha) < degMipoBeta)
704 {
705 appendTestMapDown (result, gg, info, source, dest);
706 buf= quot;
707 nBuf= degree (g, y) + degree (LC (g, x), y);
708 d -= nBuf;
709 e= tmax (e, nBuf);
710 LCBuf= LC (buf, x);
711 T= Difference (T, CFList (i.getItem()));
712 }
713 }
714 else
715 {
716 if (!isInExtension (gg, gamma, k, delta, source, dest))
717 {
718 appendTestMapDown (result, gg, info, source, dest);
719 buf= quot;
720 nBuf= degree (g, y) + degree (LC (g, x), y);
721 d -= nBuf;

Callers 1

henselLiftAndEarlyFunction · 0.85

Calls 15

VariableFunction · 0.85
LCFunction · 0.85
powerFunction · 0.85
degreeFunction · 0.85
getMipoFunction · 0.85
mulModFunction · 0.85
myContentFunction · 0.85
fdividesFunction · 0.85
reverseShiftFunction · 0.85
LcFunction · 0.85
appendTestMapDownFunction · 0.85
tmaxFunction · 0.85

Tested by

no test coverage detected