924 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 925 PrintS(
"sca_SetupQuotient(rGR, rG, bCopy)");
937 if(
rIsSCA(rG) && (rG != rGR))
955 PrintS(
"sca_SetupQuotient: qring?\n");
958 if(rGR->qideal ==
NULL)
962 PrintS(
"sca_SetupQuotient: qideal!!!\n");
970 int iAltVarStart =
N+1;
973 const ring rBase = rG;
978 PrintS(
"sca_SetupQuotient: AltVars?!\n");
981 for(
int i = 1;
i <
N;
i++)
983 for(
int j =
i + 1;
j <=
N;
j++)
987 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 988 Print(
"Nonzero D[%d, %d]\n",
i,
j);
999 if(
i < iAltVarStart)
1008 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1009 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1017 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1018 Print(
"AltVars?1: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1022 if( (iAltVarEnd == -1) || (iAltVarStart == (
N+1)) )
1026 for(
int i = 1;
i <
N;
i++)
1028 for(
int j =
i + 1;
j <=
N;
j++)
1033 if( (iAltVarStart <=
i) && (
j <= iAltVarEnd) )
1037 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1038 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1047 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1048 Print(
"Wrong Coeff at: [%d, %d]\n",
i,
j);
1056 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1057 Print(
"AltVars!?: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1060 assume( 1 <= iAltVarStart );
1061 assume( iAltVarStart < iAltVarEnd );
1072 const ideal idQuotient = rGR->qideal;
1075 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1076 PrintS(
"Analyzing quotient ideal:\n");
1093 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1094 Print(
"AltVars!?: [%d, %d]\n",
b, e);
1098 for (
int i = iAltVarStart; (
i <= iAltVarEnd);
i++ )
1099 if( (
i <
b) || (
i > e) )
1101 poly square =
p_One( rG);
1107 square =
nc_NF(idQuotient,
NULL, square, 0, 1, rG);
1109 if( square !=
NULL )
1116 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1117 Print(
"ScaVars!: [%d, %d]\n", iAltVarStart, iAltVarEnd);
1124 ideal tempQ =
id_KillSquares(idQuotient, iAltVarStart, iAltVarEnd, rG);
1127 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1130 PrintS(
"tempSCAQuotient: \n");
1142 rGR->GetNC()->SCAQuotient() =
NULL;
1144 rGR->GetNC()->SCAQuotient() =
idrMoveR(tempQ, rG, rGR);
1149 #if ((defined(PDEBUG) && OUTPUT) || MYTEST) 1150 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 @Note: 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)