30#define modp_number int
168 cout << endl <<
"quotient basis: ";
170 cout << endl <<
"leading terms: ";
172 cout << endl <<
"to be checked: ";
175 cout << endl <<
"Matrix:" << endl;
189 cout << *row <<
" , ";
200 cout <<
"Special row: Solve row:" << endl;
204 cout << *row <<
" , ";
211 cout << *row <<
" , ";
217 cout << endl << endl;
238 if ((
u1<0)||((
u1*a)%
p!=1))
244 if ((a*
i)%
p==1)
return i;
273 if (m1[
i]!=m2[
i])
return false;;
306 if (
EqualMon (mon,(*curptr).mon))
return list;
307 if (
Greater ((*curptr).mon,mon))
break;
708#ifdef integerstrategy
725#ifdef integerstrategy
766 PrintS(
"reduction by row ");
780 if (*row!=0) {zero=0;
break;}
790 if (m1[
i]>m2[
i])
return false;;
866#ifndef unsortedmatrix
877 (*temp).first_col=first_col;
891#ifdef integerstrategy
1002#ifndef integerstrategy
1106 str=(
char*)
omAlloc0(
sizeof(
char)*1000);
1140 for (
k=n-2;
k>=0;
k--)
1187 PrintS(
"-discarding ALL.\n");
1228 PrintS(
"wrong number of generators occurred");
1238 PrintS(
"denom of coef divisible by p");
1254 PrintS(
"wrong leading term occurred");
1269 PrintS(
"wrong seq of cols occurred");
1421 cout <<
"row produced for monomial ";
1434 cout <<
"row is zero - linear dependence found (should be seen in my_solve_row)" << endl;
1435 cout <<
"monomial added to leading terms list" << endl;
1436 cout <<
"check list updated" << endl;
1446 cout <<
"row is non-zero" << endl;
1447 cout <<
"monomial added to quotient basis list" << endl;
1448 cout <<
"new monomials added to check list" << endl;
1449 cout <<
"check list reduced by monomials from leading term list" << endl;
1454 cout <<
"row prepared and put into matrix" << endl;
1493 WerrorS(
"coefficient field should be Zp or Q!");
1498 WerrorS(
"quotient ring not supported!");
1503 WerrorS(
"ordering must be global!");
1509 WerrorS(
"list and intvec must have the same length!");
1528 PrintS(
"multiplicities: ");
1540 for(
i=0;
i<L.size();
i++)
1555 Print(
"coordinate %d for point %d initialized twice!\n",
pcvar+1,
i+1);
1580 PrintS(
"not a variable? ");
1599 Print(
"coordinate %d for point %d not known!\n",
j+1,
i+1);
1608 WerrorS(
"data structure is invalid");
1666 PrintS(
"wrong generator!\n");
1692 PrintS(
"computations finished.\n");
1701 WerrorS(
"internal error - coefficient too big!");
bool solve(int **extmat, int nrows, int ncols)
int cf_getNumSmallPrimes()
int cf_getSmallPrime(int i)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
const CanonicalForm int s
const CanonicalForm int const CFList const Variable & y
const Variable & v
< [in] a sqrfree bivariate poly
‘factory.h’ is the user interface to Factory.
void WerrorS(const char *s)
static void NewGenerator(mono_type mon)
static void TakeNextMonomial(mono_type mon)
static modp_number TakePrime(modp_number)
STATIC_VAR int * multiplicity
static void ClearGenList()
STATIC_VAR modp_number * my_row
static modp_number modp_sub(modp_number x, modp_number y)
static mon_list_entry * FreeMonList(mon_list_entry *list)
static void ReduceCheckListByMon(mono_type m)
STATIC_VAR int last_solve_column
static void modp_Evaluate(modp_number *ev, mono_type mon, condition_type con)
static mono_type ZeroMonomial()
static void UpdateGenList()
static mono_type MonListElement(mon_list_entry *list, int n)
static void FreeProcData()
STATIC_VAR mpz_t bigcongr
static void ResolveCoeff(mpq_t c, number m)
STATIC_VAR mon_list_entry * check_list
static modp_number modp_mul(modp_number x, modp_number y)
STATIC_VAR mon_list_entry * generic_lt
ideal interpolation(const std::vector< ideal > &L, intvec *v)
static void IntegerPoints()
static bool EqualMon(mono_type m1, mono_type m2)
STATIC_VAR coordinates * points
struct modp_result_struct * prev
static void MakeConditions()
static void CloseChinese()
static void int_Evaluate(mpz_t ev, mono_type mon, condition_type con)
struct modp_result_struct * next
coordinate_products * coordinates
static void NewResultEntry()
static void PrepareChinese(int n)
STATIC_VAR modp_number myp
static void ReduceCheckListByLTs()
STATIC_VAR q_coordinates * q_points
static modp_number OneInverse(modp_number a, modp_number p)
static void ReconstructGenerator(int ngen, int n)
STATIC_VAR modp_result_entry * modp_result
STATIC_VAR int bad_primes
static void modp_PrepareProducts()
static void PrepareRow(mono_type mon)
STATIC_VAR modp_coordinates * modp_points
STATIC_VAR bool only_modp
static bool CheckGenerator()
STATIC_VAR modp_number * my_solve_row
static mon_list_entry * MonListAdd(mon_list_entry *list, mono_type mon)
STATIC_VAR mono_type * polyexp
STATIC_VAR condition_type * condition_list
STATIC_VAR poly comparizon_p1
static exponent MonDegree(mono_type mon)
static void InitProcData()
STATIC_VAR modp_number * congr
STATIC_VAR modp_number modp_denom
STATIC_VAR mpz_t common_denom
struct mon_list_entry_struct * next
STATIC_VAR modp_number * in_gamma
STATIC_VAR int good_primes
STATIC_VAR mon_list_entry * base_list
STATIC_VAR mon_list_entry * lt_list
static void ProduceRow(mono_type mon)
struct row_list_entry_struct * next
STATIC_VAR int final_base_dim
static void MultGenerators()
STATIC_VAR mono_type * generic_column_name
STATIC_VAR modp_number * modp_Reverse
struct generator_struct * next
static void UpdateCheckList(mono_type m)
static void GeneralInit()
STATIC_VAR mpz_t * polycoef
modp_number * modp_coordinates
STATIC_VAR mono_type * column_name
STATIC_VAR bool denom_divisible
STATIC_VAR int_coordinates * int_points
STATIC_VAR gen_list_entry * gen_list
static void FreeResultEntry(modp_result_entry *e)
static void int_PrepareProducts()
struct gen_list_struct * next
static void GeneralDone()
static void CheckColumnSequence()
static bool DivisibleMon(mono_type m1, mono_type m2)
generator_entry * generator
STATIC_VAR int generic_n_generators
static void RowListAdd(int first_col, mono_type mon)
STATIC_VAR row_list_entry * row_list
modp_number * coordinate_products
STATIC_VAR coord_exist_table * coord_exist
static void modp_SetColumnNames()
STATIC_VAR poly comparizon_p2
STATIC_VAR modp_result_entry * cur_result
static bool Greater(mono_type m1, mono_type m2)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatibility layer for legacy polynomial operations (over currRing)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
void PrintS(const char *s)
static BOOLEAN rField_is_Zp(const ring r)
static BOOLEAN rField_is_Q(const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module