934 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 935 PrintS(
"sca_SetupQuotient(rGR, rG, bCopy)");
947 if(
rIsSCA(rG) && (rG != rGR))
965 PrintS(
"sca_SetupQuotient: qring?\n");
968 if(rGR->qideal ==
NULL)
972 PrintS(
"sca_SetupQuotient: qideal!!!\n");
980 int iAltVarStart =
N+1;
983 const ring rBase = rG;
988 PrintS(
"sca_SetupQuotient: AltVars?!\n");
991 for(
int i = 1;
i <
N;
i++)
993 for(
int j =
i + 1;
j <=
N;
j++)
997 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 998 Print(
"Nonzero D[%d, %d]\n",
i,
j);
1009 if(
i < iAltVarStart)
1018 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1019 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1027 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1028 Print(
"AltVars?1: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1032 if( (iAltVarEnd == -1) || (iAltVarStart == (
N+1)) )
1036 for(
int i = 1;
i <
N;
i++)
1038 for(
int j =
i + 1;
j <=
N;
j++)
1043 if( (iAltVarStart <=
i) && (
j <= iAltVarEnd) )
1047 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1048 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1057 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1058 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1066 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1067 Print(
"AltVars!?: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1070 assume( 1 <= iAltVarStart );
1071 assume( iAltVarStart < iAltVarEnd );
1082 const ideal idQuotient = rGR->qideal;
1085 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1086 PrintS(
"Analyzing quotient ideal:\n");
1105 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1106 Print(
"AltVars!?: [%d, %d]\n",
b, e);
1110 for (
int i = iAltVarStart; (
i <= iAltVarEnd) && bSCA;
i++ )
1111 if( (
i <
b) || (
i > e) )
1119 square =
nc_NF(idQuotient,
NULL, square, 0, 1, rG);
1121 if( square !=
NULL )
1129 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1130 Print(
"ScaVars!: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1137 ideal tempQ =
id_KillSquares(idQuotient, iAltVarStart, iAltVarEnd, rG);
1140 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1143 PrintS(
"tempSCAQuotient: \n");
1155 rGR->GetNC()->SCAQuotient() =
NULL;
1157 rGR->GetNC()->SCAQuotient() =
idrMoveR(tempQ, rG, rGR);
1162 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1163 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)
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
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
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)