936 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 937 PrintS(
"sca_SetupQuotient(rGR, rG, bCopy)");
949 if(
rIsSCA(rG) && (rG != rGR))
967 PrintS(
"sca_SetupQuotient: qring?\n");
970 if(rGR->qideal ==
NULL)
974 PrintS(
"sca_SetupQuotient: qideal!!!\n");
982 int iAltVarStart = N+1;
985 const ring rBase = rG;
990 PrintS(
"sca_SetupQuotient: AltVars?!\n");
993 for(
int i = 1;
i <
N;
i++)
995 for(
int j =
i + 1;
j <=
N;
j++)
999 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1000 Print(
"Nonzero D[%d, %d]\n",
i,
j);
1011 if(
i < iAltVarStart)
1020 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1021 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1029 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1030 Print(
"AltVars?1: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1034 if( (iAltVarEnd == -1) || (iAltVarStart == (N+1)) )
1038 for(
int i = 1;
i <
N;
i++)
1040 for(
int j =
i + 1;
j <=
N;
j++)
1045 if( (iAltVarStart <=
i) && (
j <= iAltVarEnd) )
1049 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1050 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1058 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1059 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1067 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1068 Print(
"AltVars!?: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1071 assume( 1 <= iAltVarStart );
1072 assume( iAltVarStart < iAltVarEnd );
1073 assume( iAltVarEnd <= N );
1083 const ideal idQuotient = rGR->qideal;
1086 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1087 PrintS(
"Analyzing quotient ideal:\n");
1106 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1107 Print(
"AltVars!?: [%d, %d]\n", b, e);
1111 for (
int i = iAltVarStart; (
i <= iAltVarEnd) && bSCA;
i++ )
1112 if( (
i < b) || (
i > e) )
1120 square =
nc_NF(idQuotient,
NULL, square, 0, 1, rG);
1122 if( square !=
NULL )
1130 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1131 Print(
"ScaVars!: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1138 ideal tempQ =
id_KillSquares(idQuotient, iAltVarStart, iAltVarEnd, rG);
1141 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1144 PrintS(
"tempSCAQuotient: \n");
1156 rGR->GetNC()->SCAQuotient() =
NULL;
1158 rGR->GetNC()->SCAQuotient() =
idrMoveR(tempQ, rG, rGR);
1163 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1164 PrintS(
"SCAQuotient: \n");
static int si_min(const int a, const int b)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
void nc_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
static bool rIsPluralRing(const ring r)
we must always have this test!
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
bool sca_Force(ring rGR, int b, int e)
const CanonicalForm CFMap CFMap & N
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
static int si_max(const int a, const int b)
void PrintS(const char *s)
void rWrite(ring r, BOOLEAN details)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static short scaFirstAltVar(ring r)
static void p_Delete(poly *p, const ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
static short scaLastAltVar(ring r)
static bool rIsSCA(const ring r)
static void p_Setm(poly p, const ring r)
static nc_type & ncRingType(nc_struct *p)
static FORCE_INLINE BOOLEAN n_IsMOne(number n, const coeffs r)
TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
#define MATELEM(mat, i, j)