1485{
1487
1488 bool data_ok=true;
1489
1490
1492 {
1493 WerrorS(
"coefficient field should be Zp or Q!");
1495 }
1497 {
1498 WerrorS(
"quotient ring not supported!");
1500 }
1502 {
1503 WerrorS(
"ordering must be global!");
1505 }
1508 {
1509 WerrorS(
"list and intvec must have the same length!");
1511 }
1516
1517
1518
1522
1524
1525#ifdef writemsg
1528 PrintS(
"multiplicities: ");
1532#endif
1533
1535
1536
1537 mpq_t divisor;
1540 for(
i=0;
i<L.size();
i++)
1541 {
1544 {
1547 {
1550 if (pcvar!=0)
1551 {
1552 pcvar--;
1554 {
1555 Print(
"coordinate %d for point %d initialized twice!\n",pcvar+1,
i+1);
1556 data_ok=false;
1557 }
1561 number n;
1565 {
1569 }
1570 else
1571 {
1575 }
1577 }
1578 else
1579 {
1580 PrintS(
"not a variable? ");
1583 data_ok=false;
1584 }
1586 }
1587 }
1588 }
1590
1591
1592
1594 {
1596 {
1598 {
1599 Print(
"coordinate %d for point %d not known!\n",
j+1,
i+1);
1600 data_ok=false;
1601 }
1602 }
1603 }
1604
1605 if (!data_ok)
1606 {
1608 WerrorS(
"data structure is invalid");
1610 }
1611
1614#ifdef writemsg
1616#else
1618#endif
1619
1620
1621
1622 int modp_cycles=10;
1623 bool correct_gen=false;
1626
1628 {
1629#ifdef writemsg
1630 Print(
"trying %d cycles mod p...\n",modp_cycles);
1631#else
1633#endif
1635 {
1640
1642
1644 {
1647 }
1648 else
1649 {
1651 }
1653 }
1654
1656 {
1658 correct_gen=true;
1660 {
1663 if (!correct_gen)
1664 {
1665#ifdef writemsg
1666 PrintS(
"wrong generator!\n");
1667#else
1668
1669#endif
1671 break;
1672 }
1673 else
1674 {
1676 }
1677 }
1678#ifdef checksize
1679 Print(
"maximal size of output: %d, precision bound: %d.\n",maximalsize,mpz_sizeinbase(
bigcongr,10));
1680#endif
1682 modp_cycles=modp_cycles+10;
1683 }
1684 else
1685 {
1686 correct_gen=true;
1687 }
1688 }
1689
1690
1691#ifdef writemsg
1692 PrintS(
"computations finished.\n");
1693#else
1695#endif
1696
1697 if (!correct_gen)
1698 {
1701 WerrorS(
"internal error - coefficient too big!");
1703 }
1704
1705
1706 ideal ret;
1707
1709 {
1714 {
1717 int a;
1720 {
1723 {
1729 }
1730 }
1732 cur_gen=cur_gen->next;
1733 }
1734 }
1735 else
1736 {
1740 {
1743 int a;
1745 {
1746 if (mpz_sgn(temp->polycoef[a])!=0)
1747 {
1749#ifdef LDEBUG
1750 n->debug=123456;
1751#endif
1752 mpz_init_set(n->z,temp->polycoef[a]);
1753 n->s=3;
1759 }
1760 }
1762 temp=temp->next;
1763 }
1764 }
1765
1766
1767
1770 return ret;
1771}
int cf_getNumSmallPrimes()
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
static modp_number TakePrime(modp_number)
STATIC_VAR int * multiplicity
static void ClearGenList()
static void UpdateGenList()
static void FreeProcData()
STATIC_VAR mpz_t bigcongr
static void ResolveCoeff(mpq_t c, number m)
static void IntegerPoints()
static void MakeConditions()
static void CloseChinese()
static void NewResultEntry()
static void PrepareChinese(int n)
STATIC_VAR modp_number myp
STATIC_VAR q_coordinates * q_points
static void ReconstructGenerator(int ngen, int n)
STATIC_VAR modp_result_entry * modp_result
static void modp_PrepareProducts()
STATIC_VAR modp_coordinates * modp_points
STATIC_VAR bool only_modp
static bool CheckGenerator()
static void InitProcData()
STATIC_VAR int final_base_dim
static void MultGenerators()
STATIC_VAR mono_type * generic_column_name
static void GeneralInit()
STATIC_VAR gen_list_entry * gen_list
static void int_PrepareProducts()
static void GeneralDone()
static void CheckColumnSequence()
STATIC_VAR int generic_n_generators
STATIC_VAR coord_exist_table * coord_exist
static void modp_SetColumnNames()
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 ...
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
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