1 #ifndef RATGRING_H 2 #define RATGRING_H 3 /**************************************** 4 * Computer Algebra System SINGULAR * 5 ****************************************/ 6 /* 7 * ABSTRACT additional defines etc for --with-plural 8 */ 9 // #define HAVE_RATGRING to activate 10 11 #ifdef HAVE_RATGRING 12 #include "kernel/structs.h" 13 #include "polys/nc/nc.h" 14 #include "polys/monomials/p_polys.h" 15 16 /* MACROS */ 17 18 /* the part, related to the interface */ 19 20 /* ring nc_rCreateNCcomm(ring r); */ 21 22 void pLcmRat(poly a, poly b, poly m, int rat_shift); 23 24 poly p_HeadRat(poly p, int ishift, ring r); 25 26 void p_ExpVectorDiffRat(poly pr, poly p1, poly p2, int ishift, ring r); 27 28 ideal ncGCD2(poly p, poly q, ring r); // real nc stuff 29 30 ideal ncGCD(poly p, poly q, ring r); // for p,q from a commutative ring 31 32 poly nc_rat_CreateSpoly(poly p1, poly p2, int ishift, ring r); 33 34 poly nc_rat_ReduceSpolyNew(poly p1, poly p2, int ishift, ring r); 35 36 37 /* poly functions defined in p_Procs : */ 38 // poly nc_pp_Mult_mm(poly p, poly m, const ring r, poly &last); 39 // poly nc_p_Mult_mm(poly p, const poly m, const ring r); 40 // poly nc_p_Minus_mm_Mult_qq(poly p, const poly m, poly q, const ring r); 41 // poly nc_p_Minus_mm_Mult_qq_ign(poly p, const poly m, poly q, int & d1, poly d2, const ring ri, poly &d3); 42 43 /* other routines we need in addition : */ 44 // poly nc_p_Mult_mm_Common(poly p, const poly m, int side, const ring r); 45 // poly nc_mm_Mult_p(const poly m, poly p, const ring r); 46 // poly nc_mm_Mult_nn (int *F, int *G, const ring r); 47 // poly nc_mm_Mult_uu (int *F,int jG,int bG, const ring r); 48 49 // /* subst: */ 50 // poly nc_pSubst(poly p, int n, poly e); 51 52 // /* copy : */ 53 // poly nc_p_CopyGet(poly a, const ring r); 54 // poly nc_p_CopyPut(poly a, const ring r); 55 56 // /* syzygies : */ 57 // /* former nc_spGSpolyCreate */ 58 // poly nc_CreateSpoly(poly p1, poly p2, poly spNoether, const ring r); 59 // /* former nc_spGSpolyRed */ 60 // poly nc_ReduceSpoly(poly p1, poly p2, poly spNoether, const ring r); 61 // /* former nc_spGSpolyRedNew */ 62 // poly nc_ReduceSpolyNew(poly p1, poly p2, poly spNoether, const ring r); 63 // /* former nc_spGSpolyRedTail */ 64 // void nc_ReduceSpolyTail(poly p1, poly q, poly q2, poly spNoether, const ring r); 65 // /* former nc_spShort */ 66 // poly nc_CreateShortSpoly(poly p1, poly p2, const ring r=currRing); 67 68 // ideal gr_bba (ideal F, ideal Q,kStrategy strat); 69 70 // /* brackets: */ 71 // poly nc_p_Bracket_qq(poly p, poly q); 72 // poly nc_mm_Bracket_nn(poly m1, poly m2); 73 74 // /* twostd: */ 75 // ideal twostd(ideal I); 76 // /* Ann: */ 77 // ideal Approx_Step(ideal L); 78 79 // /* complete reduction routines */ 80 81 // /* void nc_kBucketPolyRed(kBucket_pt b, poly p); */ 82 // void nc_kBucketPolyRed(kBucket_pt b, poly p, number *c); 83 // void nc_kBucketPolyRed_Z(kBucket_pt b, poly p, number *c); 84 // void nc_PolyPolyRed(poly &b, poly p, number *c); 85 86 // matrix nc_PrintMat(int a, int b, ring r, int metric); 87 88 // poly p_CopyEmbed(poly p, ring srcRing, int shift, int par_shift); 89 // poly pOppose(ring Rop, poly p); 90 // ideal idOppose(ring Rop, ideal I); 91 92 // #else 93 // /* dummy definition to make gcc happy */ 94 // #define nc_kBucketPolyRed(A,B,C) 0 95 // #define nc_PolyPolyRed(A,B,C) 0 96 97 // return: FALSE, if there exists i in ishift..r->N, 98 // such that a->exp[i] > b->exp[i] 99 // TRUE, otherwise 100 BOOLEAN p_DivisibleByRat(poly a, poly b, int ishift, const ring r); 101 102 /*2 103 *reduces h with elements from reducer choosing the best possible 104 * element in t with respect to the given red_length 105 * arrays reducer and red_length are [0..(rl-1)] 106 */ 107 int redRat (poly* h,poly *reducer, int *red_length,int rl, int ishift, ring r); 108 109 // Content stuff 110 static inline void pContentRat(poly &ph, const ring r = currRing){ p_ContentRat(ph, r); } ; 111 112 BOOLEAN p_LmIsConstantRat(const poly p, const ring r); 113 114 BOOLEAN p_LmIsConstantCompRat(const poly p, const ring r); 115 116 #endif /* HAVE_PLURAL */ 117 #endif 118