[35aab3] | 1 | /***************************************** |
---|
| 2 | * Computer Algebra System SINGULAR * |
---|
| 3 | *****************************************/ |
---|
| 4 | /* $Id: walk.h,v 1.1.1.1 2003-10-06 12:16:04 Singular Exp $ */ |
---|
| 5 | /* |
---|
| 6 | * ABSTRACT: Declaration of the Groebner walk |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #ifndef WALK_H |
---|
| 10 | #define WALK_H |
---|
| 11 | |
---|
| 12 | #include "structs.h" |
---|
| 13 | |
---|
| 14 | ////////////////////////////////////////////////////////////////////// |
---|
| 15 | ////////////////////////////////////////////////////////////////////// |
---|
| 16 | // |
---|
| 17 | // IMPORTANT: |
---|
| 18 | // The following routines assume that pGetOrder(p) yields the scalar |
---|
| 19 | // product of the first row of the order matrix with the exponent |
---|
| 20 | // vector of p |
---|
| 21 | // Remark: This is true for all degree orderings (like dp) and block |
---|
| 22 | // orderings (like a(...),lp) BUT NOT FOR lp!!! |
---|
| 23 | // |
---|
| 24 | ////////////////////////////////////////////////////////////////////// |
---|
| 25 | ////////////////////////////////////////////////////////////////////// |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | ////////////////////////////////////////////////////////////////////// |
---|
| 30 | // |
---|
| 31 | // walkNextWeight |
---|
| 32 | // Returns : weight vector for next step in Groebner walk, if exists |
---|
| 33 | // (int) 1, if next weight vector is target_weight |
---|
| 34 | // (int) 0, if no next weight vectro exist |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | // assumes that curr_weight is first row of order matrix |
---|
| 38 | //intvec* walkNextWeight(intvec* curr_weight, intvec* target_weight, ideal G); |
---|
| 39 | |
---|
| 40 | //intvec* MwalkNextWeight(intvec* curr_weight, intvec* target_weight, ideal G); |
---|
| 41 | // assume curr_weight and target_weight are arrays of length |
---|
| 42 | // currRing->N storing current and target weight |
---|
| 43 | |
---|
| 44 | ////////////////////////////////////////////////////////////////////// |
---|
| 45 | // |
---|
| 46 | // walkInitials |
---|
| 47 | // assume polys of G are ordererd decreasingly w.r.t. curr_weight |
---|
| 48 | // returns ideal consisting of leading (w.r.t. curr_weight) monomials |
---|
| 49 | //ideal walkInitials(ideal G); |
---|
| 50 | |
---|
| 51 | //intvec* walkAddIntVec(intvec* v1, intvec* v2); |
---|
| 52 | |
---|
| 53 | //int MwalkWeightDegree(poly p, intvec* weight_vector); |
---|
| 54 | |
---|
| 55 | //poly MpolyInitialForm(poly g, intvec* curr_weight); |
---|
| 56 | |
---|
| 57 | ideal MwalkInitialForm(ideal G, intvec* curr_weight); |
---|
| 58 | |
---|
| 59 | //poly MOrderedPoly(poly p, intvec* curr_weight); |
---|
| 60 | |
---|
| 61 | //compute the next weight vector |
---|
| 62 | intvec* MwalkNextWeight(intvec* curr_weight,intvec* target_weight, ideal G); |
---|
| 63 | //intvec* MwalkNextWeightZ(intvec* curr_weight); |
---|
| 64 | //return lead exponent of the polynomial f |
---|
| 65 | //intvec* MExpPol(poly f);//11.02 |
---|
| 66 | |
---|
| 67 | //return the product of two intvecs |
---|
| 68 | //intvec* MivMult(intvec* a, intvec* b); //11.02 |
---|
| 69 | intvec* Mivdp(int n); |
---|
| 70 | intvec* Mivlp(int n); |
---|
| 71 | intvec* Mivdp0(int n); |
---|
| 72 | //intvec* MivUnit(int n); |
---|
| 73 | poly MivSame(intvec* u , intvec* v); |
---|
| 74 | poly M3ivSame(intvec* next_weight, intvec* u , intvec* v); |
---|
| 75 | /*********************** |
---|
| 76 | * create a new ring * |
---|
| 77 | ***********************/ |
---|
| 78 | //5.12 ring MNextRing(intvec* new_weight_vector); |
---|
| 79 | |
---|
| 80 | //ring MNextRing(ring startRing, intvec* new_weight_vector); |
---|
| 81 | char* MNextRingStringC(ring startRing, intvec* new_weight_vector); |
---|
| 82 | |
---|
| 83 | // compute an intermediate Groebner basis |
---|
| 84 | //ideal MwalkStep(ideal G,intvec* origin_weight, intvec* curr_weight, intvec* weight_order); |
---|
| 85 | |
---|
| 86 | //ideal MwalkStep(ideal G, intvec* curr_weight, ring NRing); |
---|
| 87 | |
---|
| 88 | // compute a Groebner basis of an ideal G w.r.t. lexicographic order |
---|
| 89 | //ideal Mwalk(ideal G, intvec* curr_weight, intvec* target_weight); |
---|
| 90 | |
---|
| 91 | //compute the division of two monoms |
---|
| 92 | //poly MpDiv(poly a, poly b); |
---|
| 93 | |
---|
| 94 | //compute the multiplication of two monoms |
---|
| 95 | //poly MpMult(poly a, poly b); |
---|
| 96 | |
---|
| 97 | //compare a intvec to intvec NULL |
---|
| 98 | //int Mivcomp(intvec* op); |
---|
| 99 | |
---|
| 100 | //define a monomial which exponent is intvec iv |
---|
| 101 | poly MPolVar(intvec* iv); |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | //int* MExpSub(int* i1, int*i2); |
---|
| 105 | |
---|
| 106 | //int* Mleadexp(poly f); |
---|
| 107 | |
---|
| 108 | //compute the multiplikation of two ideals by "elementweise" |
---|
| 109 | ideal MidMultLift(ideal A, ideal B); |
---|
| 110 | |
---|
| 111 | //poly maIMap(ring r, poly h); |
---|
| 112 | |
---|
| 113 | //compute a Groebner basis of an ideal G |
---|
| 114 | ideal Mstd(ideal G); |
---|
| 115 | ideal Mstdhom(ideal G); |
---|
| 116 | //compute a reduced Groebner basis of a Groebner basis G |
---|
| 117 | ideal MkInterRed(ideal G); |
---|
| 118 | ideal MidMinBase(ideal G); |
---|
| 119 | /********** Perturbation Walk ******************/ |
---|
| 120 | /***************************************************************************** |
---|
| 121 | * compute an ordering matrix of the basering ordering. * |
---|
| 122 | * if the basering ordering is a block order, then its weight vector must be * |
---|
| 123 | * entered as the input this programm, otherwise the input is arbitrary * |
---|
| 124 | * integer weight vector which its size is the numbers of variables. * |
---|
| 125 | ******************************************************************************/ |
---|
| 126 | |
---|
| 127 | intvec* MivMatrixOrder(intvec* iv); |
---|
| 128 | intvec* MivMatrixOrderdp(int iv); |
---|
| 129 | intvec* MPertVectors(ideal G, intvec* ivtarget, int pdeg); |
---|
| 130 | intvec* MPertVectorslp(ideal G, intvec* ivtarget, int pdeg); |
---|
| 131 | //ideal pwalk(ideal G, intvec* delta, intvec* teta, int op_deg, int tp_deg); |
---|
| 132 | |
---|
| 133 | /**** Fractal Walk *****/ |
---|
| 134 | intvec* MivMatrixOrderlp(int nV); |
---|
| 135 | |
---|
| 136 | intvec* Mfpertvector(ideal G, intvec* iv); |
---|
| 137 | intvec* MivUnit(int nV); |
---|
| 138 | /* |
---|
| 139 | //ideal MFractalWalkR(ideal G, int nlev, intvec* sigma, intvec* tau, int step); |
---|
| 140 | ideal MFractalWalkR(ideal G, int nlev, intvec* tau, int step); |
---|
| 141 | ideal MFractalWalk(ideal I, intvec* ivstart); |
---|
| 142 | poly Mpsimple(poly p); |
---|
| 143 | poly Mpofid(ideal H); |
---|
| 144 | |
---|
| 145 | intvec* MivMatrixOrderlp(int n); |
---|
| 146 | */ |
---|
| 147 | intvec* MivWeightOrderlp(intvec* ivstart); |
---|
| 148 | intvec* MivWeightOrderdp(intvec* ivstart); |
---|
| 149 | //ideal Mimap(ring oldRing, ideal G); |
---|
| 150 | |
---|
| 151 | ideal MidLift(ideal Gomega, ideal M); |
---|
| 152 | ideal MLiftLmalG(ideal L, ideal G); |
---|
| 153 | ideal MLiftLmalGNew(ideal Gomega, ideal M, ideal G); |
---|
| 154 | ideal MLiftLmalGMin(ideal L, ideal G); |
---|
| 155 | //intvec* MwalkNextWeight(intvec* curr_weight,intvec* target_weight, ideal G); |
---|
| 156 | intvec* Mfivpert(ideal G, intvec* target, int p_deg); |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | //int MpSame(poly a, poly b); |
---|
| 160 | //char* MidString(ideal G); |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | //intvec* MwalkNextWeightZ(intvec* iv); |
---|
| 164 | //intvec* MNextWeightList(intvec* curr_weight, intvec* target_weight, ideal G); |
---|
| 165 | |
---|
| 166 | ideal MNWstdhomRed(ideal G, intvec* iv); |
---|
| 167 | poly MMinPoly(poly p, ideal G); |
---|
| 168 | ideal MMinIdeal(ideal G); |
---|
| 169 | ideal MadeLift4(ideal M, ideal pHGw, ideal Gw, ideal G); |
---|
| 170 | ideal MadeLift(ideal M, ideal Gw, ideal G); |
---|
| 171 | //poly MadepDivId(poly f, ideal Gw, ideal G); |
---|
| 172 | ideal MpHeadIdeal(ideal G); |
---|
| 173 | void* test_w_in_Cone(ideal G, intvec* iv); |
---|
| 174 | void* checkideal(ideal G); |
---|
| 175 | matrix MaMidLift(ideal Gomega, ideal M); |
---|
| 176 | |
---|
| 177 | //ideal MNormalForm(poly f, ideal G); |
---|
| 178 | //poly MpolyConversion(poly f, ideal GW, ideal G); |
---|
| 179 | ideal MidealConversion(ideal M, ideal GW, ideal G); |
---|
| 180 | //poly MCheckpRedId(poly f, ideal G); |
---|
| 181 | poly MpReduceId(poly f, ideal G); |
---|
| 182 | //poly MpMinimId(poly f, ideal M); |
---|
| 183 | ideal MidMinimId(ideal M); |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | #endif //WALK_H |
---|