1 #ifndef INITIAL_H
2 #define INITIAL_H
3 
4 /**
5  * various functions to compute the initial form of polynomials and ideals
6  */
7 #include "gfanlib/gfanlib_vector.h"
8 #include "gfanlib/gfanlib_matrix.h"
9 #include "polys/monomials/p_polys.h"
10 
11 /**
12  * Returns the weighted degree of the leading term of p with respect to w
13  */
14 long wDeg(const poly p, const ring r, const gfan::ZVector &w);
15 
16 /**
17  * Returns the weighted multidegree of the leading term of p with respect to (w,W).
18  * The weighted multidegree is a vector of length one higher than the column vectors of W.
19  * The first entry is the weighted degree with respect to w
20  * and the i+1st entry is the weighted degree with respect to the i-th row vector of W.
21  */
22 gfan::ZVector WDeg(const poly p, const ring r, const gfan::ZVector &w, const gfan::ZMatrix &W);
23 
24 /**
25  * Returns the initial form of p with respect to w
26  */
27 poly initial(const poly p, const ring r, const gfan::ZVector &w);
28 
29 /**
30  * Returns the initial form of I with respect to w
31  */
32 ideal initial(const ideal I, const ring r, const gfan::ZVector &w);
33 
34 /**
35  * Returns the initial form of p with respect to w and W
36  */
37 poly initial(const poly p, const ring r, const gfan::ZVector &w, const gfan::ZMatrix &W);
38 
39 /**
40  * Returns the initial form of I with respect to w and W
41  */
42 ideal initial(const ideal I, const ring r, const gfan::ZVector &w, const gfan::ZMatrix &W);
43 
44 /**
45  * Stores the initial form of *pStar with respect to w in pStar
46  */
47 void initial(poly* pStar, const ring r, const gfan::ZVector &w);
48 
49 /**
50  * Stores the initial form of *IStar with respect to w in IStar
51  */
52 void initial(ideal* IStar, const ring r, const gfan::ZVector &w);
53 
54 /**
55  * Stores the initial form of *pStar with respect to w and W in pStar
56  */
57 void initial(poly* pStar, const ring r, const gfan::ZVector &w, const gfan::ZMatrix &W);
58 
59 /**
60  * Stores the initial form of *IStar with respect to w and W in IStar
61  */
62 void initial(ideal* IStar, const ring r, const gfan::ZVector &w, const gfan::ZMatrix &W);
63 
64 #endif
65